{
  "components": {
    "headers": {
      "McpSessionId": {
        "description": "Opaque MCP session identifier",
        "schema": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z0-9_-]+$",
          "type": "string"
        }
      },
      "NoSniff": {
        "description": "Prevent MIME sniffing",
        "schema": {
          "const": "nosniff",
          "type": "string"
        }
      },
      "NoStore": {
        "description": "Prevent storage",
        "schema": {
          "const": "no-store",
          "type": "string"
        }
      }
    },
    "parameters": {
      "BatchId": {
        "in": "path",
        "name": "id",
        "required": true,
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "Cursor": {
        "in": "query",
        "name": "cursor",
        "required": false,
        "schema": {
          "maxLength": 512,
          "minLength": 1,
          "pattern": "^[A-Za-z0-9._~-]+$",
          "type": "string"
        }
      },
      "IdempotencyKey": {
        "in": "header",
        "name": "Idempotency-Key",
        "required": true,
        "schema": {
          "maxLength": 128,
          "minLength": 8,
          "pattern": "^[A-Za-z0-9._:-]+$",
          "type": "string"
        }
      },
      "JobId": {
        "in": "path",
        "name": "id",
        "required": true,
        "schema": {
          "format": "uuid",
          "type": "string"
        }
      },
      "Limit": {
        "in": "query",
        "name": "limit",
        "required": false,
        "schema": {
          "maximum": 100,
          "minimum": 1,
          "type": "integer"
        }
      },
      "McpProtocolVersion": {
        "description": "Optional for initialize and required after protocol negotiation.",
        "in": "header",
        "name": "MCP-Protocol-Version",
        "required": false,
        "schema": {
          "enum": [
            "2025-06-18"
          ],
          "type": "string"
        }
      },
      "McpSessionId": {
        "in": "header",
        "name": "MCP-Session-Id",
        "required": false,
        "schema": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[A-Za-z0-9_-]+$",
          "type": "string"
        }
      },
      "Origin": {
        "description": "Browser clients send Origin and the server validates it against its allowlist.",
        "in": "header",
        "name": "Origin",
        "required": false,
        "schema": {
          "format": "uri",
          "maxLength": 2048,
          "type": "string"
        }
      },
      "ReceiptId": {
        "in": "path",
        "name": "id",
        "required": true,
        "schema": {
          "pattern": "^LTH-[A-Z]{2,20}-[0-9]{8}-[a-z0-9]{8,64}$",
          "type": "string"
        }
      }
    },
    "responses": {
      "AgentEventsOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AgentEventsSuccess"
            }
          },
          "text/event-stream": {
            "schema": {
              "maxLength": 65536,
              "type": "string"
            }
          }
        },
        "description": "Content-free events or event stream",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "ArtifactCompleted": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ArtifactSuccess"
            }
          }
        },
        "description": "Artifact manifest committed",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "ArtifactPrepared": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ArtifactPrepareSuccess"
            }
          }
        },
        "description": "Artifact upload prepared",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "BatchAccepted": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BatchSuccess"
            }
          }
        },
        "description": "Batch accepted for asynchronous execution",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "BatchOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BatchSuccess"
            }
          }
        },
        "description": "Current batch projection",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "CapabilityListOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CapabilityListSuccess"
            }
          }
        },
        "description": "Admitted capability summaries",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "EventListOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/EventListSuccess"
            }
          }
        },
        "description": "Content-free events",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "FinanceTypedError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/FinanceErrorEnvelope"
            }
          }
        },
        "description": "Typed finance refusal with an explicit recovery action. An unavailable authority is never an empty ledger.",
        "headers": {
          "Cache-Control": {
            "schema": {
              "type": "string"
            }
          },
          "Retry-After": {
            "schema": {
              "maximum": 86400,
              "minimum": 0,
              "type": "integer"
            }
          },
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "JobAccepted": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JobSuccess"
            }
          }
        },
        "description": "Job accepted for asynchronous execution",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "JobOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JobSuccess"
            }
          }
        },
        "description": "Current job projection",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "McpMessageOK": {
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/McpSuccessResponse"
                },
                {
                  "$ref": "#/components/schemas/McpErrorResponse"
                }
              ]
            }
          },
          "text/event-stream": {
            "schema": {
              "maxLength": 65536,
              "type": "string"
            }
          }
        },
        "description": "JSON-RPC response or negotiated event stream",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "MCP-Session-Id": {
            "$ref": "#/components/headers/McpSessionId"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "McpNotificationAccepted": {
        "description": "Notification accepted without a response body",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "MCP-Session-Id": {
            "$ref": "#/components/headers/McpSessionId"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "McpSessionClosed": {
        "description": "MCP session closed"
      },
      "McpStreamOK": {
        "content": {
          "text/event-stream": {
            "schema": {
              "maxLength": 65536,
              "type": "string"
            }
          }
        },
        "description": "MCP Server-Sent Events stream",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "MCP-Session-Id": {
            "$ref": "#/components/headers/McpSessionId"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "QuoteOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/QuoteSuccess"
            }
          }
        },
        "description": "Signed quote",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "ReceiptOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ReceiptSuccess"
            }
          }
        },
        "description": "Immutable receipt verification material",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "ResultListOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResultListSuccess"
            }
          },
          "application/x-ndjson": {
            "schema": {
              "maxLength": 1048576,
              "type": "string"
            }
          }
        },
        "description": "Encrypted batch result metadata",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "ResultOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ResultSuccess"
            }
          }
        },
        "description": "Encrypted result metadata",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "TypedError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        },
        "description": "Typed content-free refusal",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      },
      "UsageListOK": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UsageListSuccess"
            }
          }
        },
        "description": "Bounded usage counters",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "X-Content-Type-Options": {
            "$ref": "#/components/headers/NoSniff"
          }
        }
      }
    },
    "schemas": {
      "AcceptedProfile": {
        "enum": [
          "shared_public",
          "shared_deidentified",
          "shared_customer_approved",
          "shared_native_test",
          "shared_synthetic_seed"
        ],
        "type": "string"
      },
      "AgentEventsSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventList"
              }
            },
            "type": "object"
          }
        ]
      },
      "ArtifactCompleteRequest": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "artifact_id": {
            "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
            "type": "string"
          },
          "capability_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "chunk_root_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "ciphertext_manifest_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "upload_id": {
            "pattern": "^upload_[A-Za-z0-9_-]{16,96}$",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "artifact_id",
          "upload_id",
          "ciphertext_manifest_digest",
          "chunk_root_digest",
          "capability_digest"
        ],
        "type": "object"
      },
      "ArtifactPrepareProjection": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "artifact_id": {
                "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
                "type": "string"
              },
              "chunk_size": {
                "maximum": 1048576,
                "minimum": 1,
                "type": "integer"
              },
              "digest": {
                "$ref": "#/components/schemas/Digest"
              },
              "expires_at": {
                "format": "date-time",
                "type": "string"
              },
              "max_chunks": {
                "maximum": 10000,
                "minimum": 1,
                "type": "integer"
              },
              "upload_id": {
                "pattern": "^upload_[A-Za-z0-9_-]{16,96}$",
                "type": "string"
              }
            },
            "required": [
              "artifact_id",
              "upload_id",
              "chunk_size",
              "max_chunks",
              "expires_at",
              "digest"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Source and future quote identifiers for local sealing. The planned phase provides no upload or execution grant. Preserve the original request's optional selector presence when creating the future quote.",
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "artifact_id": {
                "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
                "type": "string"
              },
              "batch_id": {
                "format": "uuid",
                "type": "string"
              },
              "expires_at": {
                "format": "date-time",
                "type": "string"
              },
              "job_id": {
                "format": "uuid",
                "type": "string"
              },
              "manifest_id": {
                "format": "uuid",
                "type": "string"
              },
              "phase": {
                "enum": [
                  "planned"
                ],
                "type": "string"
              },
              "quote_id": {
                "format": "uuid",
                "type": "string"
              },
              "source_intent_id": {
                "format": "uuid",
                "type": "string"
              },
              "storage_attempt_id": {
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "uuid",
                "type": "string"
              },
              "trace_id": {
                "format": "uuid",
                "type": "string"
              },
              "workflow_run_id": {
                "description": "Equals task_id.",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "phase",
              "account_id",
              "artifact_id",
              "source_intent_id",
              "storage_attempt_id",
              "manifest_id",
              "quote_id",
              "task_id",
              "trace_id",
              "workflow_run_id",
              "job_id",
              "batch_id",
              "expires_at"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "The current original source record confirms this exact full manifest. request_sha256 is the canonical full document digest, rather than the source-plan request digest or an encrypted object's digest. Bind the reply to the captured account, artifact, source, manifest, workflow, block count, atomic groups, root and full document digest.",
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "artifact_id": {
                "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
                "type": "string"
              },
              "block_count": {
                "maximum": 10000,
                "minimum": 1,
                "type": "integer"
              },
              "manifest_id": {
                "format": "uuid",
                "type": "string"
              },
              "manifest_root": {
                "$ref": "#/components/schemas/Digest"
              },
              "outcome": {
                "enum": [
                  "recorded",
                  "replayed"
                ],
                "type": "string"
              },
              "phase": {
                "const": "recorded"
              },
              "recorded_at": {
                "format": "date-time",
                "type": "string"
              },
              "request_sha256": {
                "$ref": "#/components/schemas/Digest"
              },
              "source_intent_id": {
                "format": "uuid",
                "type": "string"
              },
              "total_atomic_groups": {
                "maximum": 10000000,
                "minimum": 1,
                "type": "integer"
              },
              "workflow_run_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "phase",
              "account_id",
              "artifact_id",
              "source_intent_id",
              "outcome",
              "manifest_id",
              "manifest_root",
              "workflow_run_id",
              "block_count",
              "total_atomic_groups",
              "request_sha256",
              "recorded_at"
            ],
            "type": "object"
          }
        ]
      },
      "ArtifactPrepareRequest": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "artifact_id": {
                "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
                "type": "string"
              },
              "chunk_count": {
                "maximum": 10000,
                "minimum": 1,
                "type": "integer"
              },
              "chunk_root_digest": {
                "$ref": "#/components/schemas/Digest"
              },
              "ciphertext_bytes": {
                "maximum": 10485760000,
                "minimum": 1,
                "type": "integer"
              },
              "data_profile": {
                "$ref": "#/components/schemas/AcceptedProfile"
              },
              "destination_id": {
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "account_id",
              "artifact_id",
              "data_profile",
              "ciphertext_bytes",
              "chunk_count",
              "chunk_root_digest",
              "destination_id"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Allocate source metadata before local sealing. The quote key and optional selectors are the original future quote request, separate from this action's Idempotency-Key.",
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "artifact_id": {
                "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
                "type": "string"
              },
              "batch_id": {
                "format": "uuid",
                "type": "string"
              },
              "data_profile": {
                "$ref": "#/components/schemas/AcceptedProfile"
              },
              "destination_id": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]{1,160}$",
                "type": "string"
              },
              "job_id": {
                "format": "uuid",
                "type": "string"
              },
              "phase": {
                "enum": [
                  "plan"
                ],
                "type": "string"
              },
              "quote_idempotency_key": {
                "maxLength": 128,
                "minLength": 8,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$",
                "type": "string"
              }
            },
            "required": [
              "phase",
              "account_id",
              "artifact_id",
              "data_profile",
              "destination_id",
              "quote_idempotency_key"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "description": "Record postseal metadata under the original account, artifact and source intent. The full document, original request key and every future identifier remain bound; neither caller fields nor a recorded response supply private principal or execution authority.",
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "artifact_id": {
                "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
                "type": "string"
              },
              "phase": {
                "const": "record"
              },
              "sealed_block_manifest": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SealedBlockManifestV1"
                  },
                  {
                    "properties": {
                      "idempotency_key": {
                        "maxLength": 128,
                        "minLength": 8,
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "idempotency_key"
                    ],
                    "type": "object"
                  }
                ]
              },
              "source_intent_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "phase",
              "account_id",
              "artifact_id",
              "source_intent_id",
              "sealed_block_manifest"
            ],
            "type": "object"
          }
        ]
      },
      "ArtifactPrepareSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ArtifactPrepareProjection"
              }
            },
            "type": "object"
          }
        ]
      },
      "ArtifactProjection": {
        "additionalProperties": false,
        "properties": {
          "artifact_id": {
            "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
            "type": "string"
          },
          "chunk_count": {
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "ciphertext_bytes": {
            "maximum": 10485760000,
            "minimum": 1,
            "type": "integer"
          },
          "digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "state": {
            "enum": [
              "prepared",
              "uploaded",
              "complete",
              "delivered",
              "expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "artifact_id",
          "state",
          "ciphertext_bytes",
          "chunk_count",
          "digest"
        ],
        "type": "object"
      },
      "ArtifactSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ArtifactProjection"
              }
            },
            "type": "object"
          }
        ]
      },
      "BatchProjection": {
        "additionalProperties": false,
        "properties": {
          "accepted_count": {
            "maximum": 1000000,
            "minimum": 0,
            "type": "integer"
          },
          "batch_id": {
            "format": "uuid",
            "type": "string"
          },
          "digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "failed_count": {
            "maximum": 1000000,
            "minimum": 0,
            "type": "integer"
          },
          "p_next_action": {
            "maxLength": 256,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          },
          "state": {
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          },
          "total_count": {
            "maximum": 1000000,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "batch_id",
          "state",
          "total_count",
          "accepted_count",
          "failed_count",
          "digest",
          "p_next_action"
        ],
        "type": "object"
      },
      "BatchRequest": {
        "additionalProperties": false,
        "description": "A batch is one run over one sealed input. Its first item carries the run's sealed_block_manifest, stage_partition and completion_policy, once for the whole batch; every later item carries none of them, and every item carries its own sealed_binding.",
        "properties": {
          "completion_policy_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/LiveBoundedLithiJobV1"
            },
            "maxItems": 100000,
            "minItems": 1,
            "type": "array"
          },
          "quote_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "quote_id",
          "completion_policy_digest",
          "items"
        ],
        "type": "object"
      },
      "BatchSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/BatchProjection"
              }
            },
            "type": "object"
          }
        ]
      },
      "CancelRequest": {
        "additionalProperties": false,
        "properties": {
          "reason_code": {
            "enum": [
              "validation_failed",
              "verification_failed",
              "cancelled",
              "deadline_exceeded",
              "execution_failed",
              "delivery_failed",
              "policy_refusal"
            ],
            "type": "string"
          }
        },
        "required": [
          "reason_code"
        ],
        "type": "object"
      },
      "CapabilityList": {
        "additionalProperties": false,
        "properties": {
          "catalog_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CapabilitySummary"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "maxLength": 512,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._~-]+$",
            "type": "string"
          }
        },
        "required": [
          "items",
          "catalog_digest"
        ],
        "type": "object"
      },
      "CapabilityListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/CapabilityList"
              }
            },
            "type": "object"
          }
        ]
      },
      "CapabilitySummary": {
        "additionalProperties": false,
        "properties": {
          "availability": {
            "enum": [
              "available",
              "constrained",
              "unavailable"
            ],
            "type": "string"
          },
          "capability": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "type": "string"
          },
          "manifest_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "release_digest": {
            "$ref": "#/components/schemas/Digest"
          }
        },
        "required": [
          "capability",
          "release_digest",
          "manifest_digest",
          "availability"
        ],
        "type": "object"
      },
      "CompatibilityRequest": {
        "additionalProperties": false,
        "properties": {
          "capability": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "type": "string"
          },
          "data_profile": {
            "$ref": "#/components/schemas/AcceptedProfile"
          },
          "encrypted_artifact_id": {
            "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
            "type": "string"
          },
          "model_ref": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "operation": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "type": "string"
          },
          "output_schema_id": {
            "maxLength": 160,
            "minLength": 1,
            "pattern": "^[A-Za-z][A-Za-z0-9._-]*$",
            "type": "string"
          },
          "quote_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "capability",
          "operation",
          "model_ref",
          "quote_id",
          "data_profile",
          "encrypted_artifact_id",
          "output_schema_id"
        ],
        "type": "object"
      },
      "ComputeCreditActivityV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeCreditActivityV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Immutable account-scoped credit movement with its original source references; a reversal does not create a cash refund.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "account_sequence": {
            "maxLength": 18,
            "minLength": 1,
            "pattern": "^[1-9][0-9]{0,17}$(?![\\s\\S])",
            "type": "string"
          },
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "amount_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": "string"
          },
          "authorizes_execution": {
            "const": false
          },
          "budget_reservation_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "contract_id": {
            "const": "ComputeCreditActivityV1"
          },
          "credit_event_id": {
            "format": "uuid",
            "type": "string"
          },
          "currency": {
            "const": "USD"
          },
          "event_kind": {
            "enum": [
              "purchase_issued",
              "promotion_issued",
              "work_held",
              "work_consumed",
              "hold_released",
              "refund_held",
              "refund_retired",
              "refund_released",
              "refund_cancelled",
              "refund_compensated",
              "risk_held",
              "risk_released",
              "usage_reversed",
              "promotion_expired"
            ],
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "lot_id": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "origin_kind": {
            "enum": [
              "paid",
              "promotional"
            ],
            "type": "string"
          },
          "p_next_action": {
            "enum": [
              "none",
              "refresh_policy",
              "refresh_balance",
              "open_billing",
              "wait_for_payment",
              "reconcile_payment",
              "contact_owner",
              "await_terminal"
            ],
            "type": "string"
          },
          "purchase_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "receipt_id": {
            "maxLength": 160,
            "minLength": 24,
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "reverses_event_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "schema_version": {
            "const": "v1"
          },
          "source_document_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "usage_journal_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "account_id",
          "currency",
          "authorizes_execution",
          "p_next_action",
          "credit_event_id",
          "account_sequence",
          "lot_id",
          "origin_kind",
          "event_kind",
          "amount_nano_usd",
          "purchase_id",
          "budget_reservation_id",
          "usage_journal_id",
          "reverses_event_id",
          "source_document_id"
        ],
        "title": "ComputeCreditActivityV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-not-authorizing": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-credit-activity-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeCreditBalanceV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeCreditBalanceV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Exact account credit at one source sequence; unavailable values are explicit null, never a zero balance.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "account_sequence": {
            "maxLength": 18,
            "minLength": 1,
            "pattern": "^[1-9][0-9]{0,17}$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "authorizes_execution": {
            "const": false
          },
          "available_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "balance_state": {
            "enum": [
              "available",
              "restricted",
              "unavailable"
            ],
            "type": "string"
          },
          "consumed_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "contract_id": {
            "const": "ComputeCreditBalanceV1"
          },
          "currency": {
            "const": "USD"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "issued_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "observed_at": {
            "format": "date-time",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "p_next_action": {
            "enum": [
              "none",
              "refresh_policy",
              "refresh_balance",
              "open_billing",
              "wait_for_payment",
              "reconcile_payment",
              "contact_owner",
              "await_terminal"
            ],
            "type": "string"
          },
          "paid_available_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "policy_digest": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "promotional_available_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "receipt_id": {
            "maxLength": 160,
            "minLength": 24,
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "refund_held_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "retired_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "risk_held_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "schema_version": {
            "const": "v1"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "work_held_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "account_id",
          "currency",
          "authorizes_execution",
          "p_next_action",
          "balance_state",
          "account_sequence",
          "policy_digest",
          "observed_at",
          "issued_nano_usd",
          "available_nano_usd",
          "work_held_nano_usd",
          "refund_held_nano_usd",
          "risk_held_nano_usd",
          "consumed_nano_usd",
          "retired_nano_usd",
          "paid_available_nano_usd",
          "promotional_available_nano_usd"
        ],
        "title": "ComputeCreditBalanceV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-not-authorizing": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-credit-balance-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeCreditBalanceV1Success": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ComputeCreditBalanceV1"
              }
            },
            "type": "object"
          }
        ]
      },
      "ComputeCreditFundingV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeCreditFundingV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Funding decomposition of the original budget reservation; stages and retries share its maximum and create no additional hold.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "authorizes_execution": {
            "const": false
          },
          "budget_reservation_id": {
            "format": "uuid",
            "type": "string"
          },
          "consumed_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "contract_id": {
            "const": "ComputeCreditFundingV1"
          },
          "currency": {
            "const": "USD"
          },
          "funding_mode": {
            "const": "prepaid_credit"
          },
          "funding_policy_digest": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "funding_state": {
            "enum": [
              "held",
              "consuming",
              "settled",
              "restricted",
              "unavailable"
            ],
            "type": "string"
          },
          "held_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "lot_allocations": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "account_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "allocated_nano_usd": {
                  "maxLength": 16,
                  "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                  "type": "string"
                },
                "allocation_ordinal": {
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                },
                "consumed_nano_usd": {
                  "maxLength": 16,
                  "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                  "type": "string"
                },
                "held_nano_usd": {
                  "maxLength": 16,
                  "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                  "type": "string"
                },
                "lot_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "origin_kind": {
                  "enum": [
                    "paid",
                    "promotional"
                  ],
                  "type": "string"
                },
                "released_nano_usd": {
                  "maxLength": 16,
                  "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                  "type": "string"
                },
                "reversed_nano_usd": {
                  "maxLength": 16,
                  "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                  "type": "string"
                }
              },
              "required": [
                "lot_id",
                "account_id",
                "origin_kind",
                "allocation_ordinal",
                "allocated_nano_usd",
                "held_nano_usd",
                "consumed_nano_usd",
                "released_nano_usd",
                "reversed_nano_usd"
              ],
              "type": "object"
            },
            "maxItems": 256,
            "type": "array"
          },
          "maximum_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "p_next_action": {
            "enum": [
              "none",
              "refresh_policy",
              "refresh_balance",
              "open_billing",
              "wait_for_payment",
              "reconcile_payment",
              "contact_owner",
              "await_terminal"
            ],
            "type": "string"
          },
          "quote_id": {
            "format": "uuid",
            "type": "string"
          },
          "receipt_id": {
            "maxLength": 160,
            "minLength": 24,
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "released_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "reversed_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "schema_version": {
            "const": "v1"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "stage_allocations": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "maximum_nano_usd": {
                  "maxLength": 16,
                  "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                  "type": "string"
                },
                "stage_id": {
                  "format": "uuid",
                  "type": "string"
                }
              },
              "required": [
                "stage_id",
                "maximum_nano_usd"
              ],
              "type": "object"
            },
            "maxItems": 1024,
            "type": "array"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "terminal_evidence_digest": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": [
              "string",
              "null"
            ]
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "account_id",
          "currency",
          "authorizes_execution",
          "p_next_action",
          "funding_mode",
          "budget_reservation_id",
          "quote_id",
          "funding_policy_digest",
          "funding_state",
          "maximum_nano_usd",
          "held_nano_usd",
          "consumed_nano_usd",
          "released_nano_usd",
          "reversed_nano_usd",
          "lot_allocations",
          "stage_allocations",
          "terminal_evidence_digest"
        ],
        "title": "ComputeCreditFundingV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-not-authorizing": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-credit-funding-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeCreditPaymentObservationV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeCreditPaymentObservationV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Bounded authenticated provider observation; retained identity and amounts exclude raw payloads, card data and browser secrets.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "authorizes_execution": {
            "const": false
          },
          "captured_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "contract_id": {
            "const": "ComputeCreditPaymentObservationV1"
          },
          "credit_subtotal_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "const": "USD"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "identity": {
            "additionalProperties": false,
            "description": "External uniqueness is this complete tuple, independently of account and purchase ownership.",
            "properties": {
              "environment": {
                "enum": [
                  "sandbox",
                  "production"
                ],
                "type": "string"
              },
              "merchant_ref": {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "object_id": {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              "object_kind": {
                "enum": [
                  "payment",
                  "refund",
                  "dispute"
                ],
                "type": "string"
              },
              "provider": {
                "maxLength": 64,
                "minLength": 1,
                "pattern": "^[a-z][a-z0-9_]{0,63}$",
                "type": "string"
              }
            },
            "required": [
              "provider",
              "merchant_ref",
              "environment",
              "object_kind",
              "object_id"
            ],
            "type": "object"
          },
          "observation_id": {
            "format": "uuid",
            "type": "string"
          },
          "observation_source": {
            "enum": [
              "verified_webhook",
              "authenticated_readback"
            ],
            "type": "string"
          },
          "observed_state": {
            "enum": [
              "pending",
              "authorized",
              "captured",
              "failed",
              "refunded",
              "disputed",
              "unknown"
            ],
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "p_next_action": {
            "enum": [
              "none",
              "refresh_policy",
              "refresh_balance",
              "open_billing",
              "wait_for_payment",
              "reconcile_payment",
              "contact_owner",
              "await_terminal"
            ],
            "type": "string"
          },
          "payment_customer_ref": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "provider_observed_at": {
            "format": "date-time",
            "type": "string"
          },
          "purchase_id": {
            "format": "uuid",
            "type": "string"
          },
          "raw_payload_retained": {
            "const": false
          },
          "receipt_id": {
            "maxLength": 160,
            "minLength": 24,
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "refunded_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "schema_version": {
            "const": "v1"
          },
          "source_digest": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "tax_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "total_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "account_id",
          "currency",
          "authorizes_execution",
          "p_next_action",
          "observation_id",
          "purchase_id",
          "identity",
          "payment_customer_ref",
          "observation_source",
          "source_digest",
          "observed_state",
          "credit_subtotal_cents",
          "tax_cents",
          "total_cents",
          "captured_cents",
          "refunded_cents",
          "provider_observed_at",
          "raw_payload_retained"
        ],
        "title": "ComputeCreditPaymentObservationV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-not-authorizing": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-credit-payment-observation-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeCreditPolicyV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeCreditPolicyV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Account-owned paid-credit purchase policy; buying credit does not change spending or execution limits.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "approved_purchase_cents": {
            "items": {
              "maxLength": 9,
              "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
              "type": "string"
            },
            "maxItems": 64,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "authorizes_execution": {
            "const": false
          },
          "auto_reload_enabled": {
            "const": false
          },
          "cash_redeemable": {
            "const": false
          },
          "contract_id": {
            "const": "ComputeCreditPolicyV1"
          },
          "currency": {
            "const": "USD"
          },
          "effective_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "overage_enabled": {
            "const": false
          },
          "p_next_action": {
            "enum": [
              "none",
              "refresh_policy",
              "refresh_balance",
              "open_billing",
              "wait_for_payment",
              "reconcile_payment",
              "contact_owner",
              "await_terminal"
            ],
            "type": "string"
          },
          "policy_digest": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "policy_id": {
            "format": "uuid",
            "type": "string"
          },
          "promotions_enabled": {
            "const": false
          },
          "purchased_credit_expires": {
            "const": false
          },
          "receipt_id": {
            "maxLength": 160,
            "minLength": 24,
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "schema_version": {
            "const": "v1"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "starter_credit_nano_usd": {
            "const": "25000000000"
          },
          "starter_policy": {
            "const": "paid_first"
          },
          "starter_purchase_cents": {
            "const": "2500"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "transferable": {
            "const": false
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "account_id",
          "currency",
          "authorizes_execution",
          "p_next_action",
          "policy_id",
          "policy_digest",
          "starter_policy",
          "starter_purchase_cents",
          "starter_credit_nano_usd",
          "approved_purchase_cents",
          "promotions_enabled",
          "auto_reload_enabled",
          "overage_enabled",
          "purchased_credit_expires",
          "transferable",
          "cash_redeemable",
          "effective_at",
          "expires_at"
        ],
        "title": "ComputeCreditPolicyV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-not-authorizing": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-credit-policy-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeCreditPurchaseV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeCreditPurchaseV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Sanitized purchase projection with independent payment, fulfillment, risk and document states; payment context belongs to the authorized browser.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "authorizes_execution": {
            "const": false
          },
          "captured_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "contract_id": {
            "const": "ComputeCreditPurchaseV1"
          },
          "credit_face_nano_usd": {
            "maxLength": 16,
            "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
            "type": "string"
          },
          "credit_subtotal_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": "string"
          },
          "currency": {
            "const": "USD"
          },
          "document_state": {
            "enum": [
              "none",
              "pending",
              "issued",
              "failed"
            ],
            "type": "string"
          },
          "fulfillment_state": {
            "enum": [
              "not_started",
              "pending",
              "fulfilled",
              "refused"
            ],
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "issued_lot_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "p_next_action": {
            "enum": [
              "none",
              "refresh_policy",
              "refresh_balance",
              "open_billing",
              "wait_for_payment",
              "reconcile_payment",
              "contact_owner",
              "await_terminal"
            ],
            "type": "string"
          },
          "payment_binding_ref": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "payment_context_audience": {
            "const": "authorized_human_browser"
          },
          "purchase_id": {
            "format": "uuid",
            "type": "string"
          },
          "purchase_invoice_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_policy_digest": {
            "maxLength": 64,
            "minLength": 64,
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "purchase_state": {
            "enum": [
              "requested",
              "checkout_pending",
              "processing",
              "paid",
              "failed",
              "cancelled",
              "expired",
              "unknown"
            ],
            "type": "string"
          },
          "receipt_id": {
            "maxLength": 160,
            "minLength": 24,
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "risk_state": {
            "enum": [
              "clear",
              "held",
              "refunded",
              "disputed"
            ],
            "type": "string"
          },
          "schema_version": {
            "const": "v1"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "state_version": {
            "maxLength": 18,
            "minLength": 1,
            "pattern": "^(0|[1-9][0-9]{0,17})$(?![\\s\\S])",
            "type": "string"
          },
          "successful_observation_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "tax_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "total_cents": {
            "maxLength": 9,
            "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
            "type": [
              "string",
              "null"
            ]
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "account_id",
          "currency",
          "authorizes_execution",
          "p_next_action",
          "purchase_id",
          "purchase_policy_digest",
          "payment_binding_ref",
          "payment_context_audience",
          "credit_subtotal_cents",
          "credit_face_nano_usd",
          "tax_cents",
          "total_cents",
          "captured_cents",
          "purchase_state",
          "fulfillment_state",
          "risk_state",
          "document_state",
          "successful_observation_id",
          "issued_lot_id",
          "purchase_invoice_id",
          "state_version",
          "idempotency_key"
        ],
        "title": "ComputeCreditPurchaseV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-not-authorizing": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-credit-purchase-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeCreditPurchaseV1Success": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ComputeCreditPurchaseV1"
              }
            },
            "type": "object"
          }
        ]
      },
      "ComputeImpactReportV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeImpactReportV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "revision": {
                  "minimum": 2
                }
              }
            },
            "then": {
              "required": [
                "supersedes_snapshot_digest",
                "revision_reason"
              ]
            }
          }
        ],
        "description": "Monthly Compute impact report — Work, energy and community. One immutable organisation/account-month revision. period_id is SHA-256 of UTF-8 JSON.stringify([customer_account_id, reporting_timezone, period_start_utc, period_end_utc]) using lowercase UUID and canonical UTC microsecond timestamps. snapshot_digest hashes recursively key-sorted compact UTF-8 JSON with only snapshot_digest omitted. Array order is canonical producer order. Changed evidence creates revision N+1, never an update; advancing the observation watermark alone reuses the filed snapshot. Retrieval requires account-bound reporting:read; work and finance grants do not imply it. Artifact hashes are separate AL11 records; this snapshot contains no raw ingredients.",
        "properties": {
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "billing_timezone": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "community": {
            "additionalProperties": false,
            "properties": {
              "availability_state": {
                "enum": [
                  "available",
                  "partial",
                  "unavailable"
                ],
                "type": "string"
              },
              "confirmed_payments": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "payments"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  }
                ],
                "properties": {
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "event_date_basis": {
                    "const": "authoritative_payment_completed_at"
                  },
                  "payments": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "amount_minor_units": {
                          "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                          "pattern": "^(0|[1-9][0-9]{0,77})$",
                          "type": "string"
                        },
                        "currency": {
                          "pattern": "^[A-Z]{3}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "currency",
                        "amount_minor_units"
                      ],
                      "type": "object"
                    },
                    "maxItems": 32,
                    "type": "array"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "event_date_basis"
                ],
                "type": "object"
              },
              "earned_allocations": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "amount_micro_usd"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "amount_micro_usd"
                      ]
                    }
                  }
                ],
                "properties": {
                  "amount_micro_usd": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "currency": {
                    "const": "USD"
                  },
                  "event_date_basis": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "currency",
                  "event_date_basis"
                ],
                "type": "object"
              },
              "geography": {
                "additionalProperties": false,
                "properties": {
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable",
                      "suppressed"
                    ],
                    "type": "string"
                  },
                  "buckets": {
                    "items": {
                      "additionalProperties": false,
                      "allOf": [
                        {
                          "if": {
                            "properties": {
                              "availability_state": {
                                "const": "suppressed"
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "required": [
                                "participant_bucket"
                              ]
                            }
                          }
                        }
                      ],
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "suppressed"
                          ],
                          "type": "string"
                        },
                        "broad_region": {
                          "maxLength": 80,
                          "minLength": 1,
                          "type": "string"
                        },
                        "participant_bucket": {
                          "maxLength": 40,
                          "minLength": 1,
                          "type": "string"
                        },
                        "unavailable_reason": {
                          "maxLength": 240,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "availability_state",
                        "broad_region"
                      ],
                      "type": "object"
                    },
                    "maxItems": 128,
                    "type": "array"
                  },
                  "complementary_suppression_applied": {
                    "const": true
                  },
                  "counting_basis": {
                    "const": "independent_provider_owners"
                  },
                  "minimum_bucket_size": {
                    "minimum": 5,
                    "type": "integer"
                  },
                  "privacy_release_policy_version": {
                    "const": "independent_owner_complementary_suppression.v1"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "privacy_release_policy_version",
                  "minimum_bucket_size",
                  "buckets",
                  "counting_basis",
                  "complementary_suppression_applied"
                ],
                "type": "object"
              },
              "payable_allocations": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "amount_micro_usd"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "amount_micro_usd"
                      ]
                    }
                  }
                ],
                "properties": {
                  "amount_micro_usd": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "currency": {
                    "const": "USD"
                  },
                  "event_date_basis": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "currency",
                  "event_date_basis"
                ],
                "type": "object"
              },
              "population": {
                "const": "canonical_allocations_and_confirmed_payments_by_own_event_dates"
              },
              "reversals": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "amount_micro_usd"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "amount_micro_usd"
                      ]
                    }
                  }
                ],
                "properties": {
                  "amount_micro_usd": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "currency": {
                    "const": "USD"
                  },
                  "event_date_basis": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "currency",
                  "event_date_basis"
                ],
                "type": "object"
              },
              "unavailable_reason": {
                "maxLength": 240,
                "minLength": 1,
                "type": "string"
              },
              "zero_payout_contribution_work": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "completed_outcomes"
                            ]
                          },
                          {
                            "required": [
                              "active_time_us"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  }
                ],
                "properties": {
                  "active_time_us": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "completed_outcomes": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state"
                ],
                "type": "object"
              }
            },
            "required": [
              "availability_state",
              "population",
              "earned_allocations",
              "payable_allocations",
              "confirmed_payments",
              "reversals",
              "zero_payout_contribution_work",
              "geography"
            ],
            "type": "object"
          },
          "comparison": {
            "additionalProperties": false,
            "allOf": [
              {
                "if": {
                  "properties": {
                    "availability_state": {
                      "const": "unavailable"
                    }
                  },
                  "required": [
                    "availability_state"
                  ]
                },
                "then": {
                  "not": {
                    "anyOf": [
                      {
                        "required": [
                          "baseline_digest"
                        ]
                      },
                      {
                        "required": [
                          "functional_unit"
                        ]
                      },
                      {
                        "required": [
                          "equivalence_rubric_digest"
                        ]
                      },
                      {
                        "required": [
                          "boundary"
                        ]
                      },
                      {
                        "required": [
                          "difference_co2e_ug"
                        ]
                      },
                      {
                        "required": [
                          "lower_difference_co2e_ug"
                        ]
                      },
                      {
                        "required": [
                          "upper_difference_co2e_ug"
                        ]
                      },
                      {
                        "required": [
                          "claim_policy_version"
                        ]
                      }
                    ]
                  },
                  "required": [
                    "unavailable_reason"
                  ]
                }
              },
              {
                "if": {
                  "properties": {
                    "availability_state": {
                      "const": "available"
                    }
                  }
                },
                "then": {
                  "required": [
                    "availability_state",
                    "baseline_digest",
                    "functional_unit",
                    "equivalence_rubric_digest",
                    "boundary",
                    "difference_co2e_ug",
                    "lower_difference_co2e_ug",
                    "upper_difference_co2e_ug",
                    "claim_policy_version"
                  ]
                }
              }
            ],
            "properties": {
              "availability_state": {
                "enum": [
                  "available",
                  "unavailable"
                ],
                "type": "string"
              },
              "baseline_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "boundary": {
                "maxLength": 320,
                "minLength": 1,
                "type": "string"
              },
              "claim_policy_version": {
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "difference_co2e_ug": {
                "pattern": "^-?(0|[1-9][0-9]{0,77})$",
                "type": "string"
              },
              "equivalence_rubric_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "functional_unit": {
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "lower_difference_co2e_ug": {
                "pattern": "^-?(0|[1-9][0-9]{0,77})$",
                "type": "string"
              },
              "unavailable_reason": {
                "maxLength": 240,
                "minLength": 1,
                "type": "string"
              },
              "upper_difference_co2e_ug": {
                "pattern": "^-?(0|[1-9][0-9]{0,77})$",
                "type": "string"
              }
            },
            "required": [
              "availability_state"
            ],
            "type": "object"
          },
          "contract_id": {
            "const": "ComputeImpactReportV1"
          },
          "customer_account_id": {
            "format": "uuid",
            "type": "string"
          },
          "emissions": {
            "additionalProperties": false,
            "properties": {
              "availability_state": {
                "enum": [
                  "available",
                  "partial",
                  "unavailable"
                ],
                "type": "string"
              },
              "defined_boundary_total": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "defined_boundary_total_co2e_ug"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "defined_boundary_total_co2e_ug"
                      ]
                    }
                  }
                ],
                "properties": {
                  "availability_state": {
                    "enum": [
                      "available",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "boundary": {
                    "const": "provider_operation_plus_embodied_plus_lithi_managed_infrastructure"
                  },
                  "defined_boundary_total_co2e_ug": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "boundary"
                ],
                "type": "object"
              },
              "embodied": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "embodied_co2e_ug"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "embodied_state": {
                          "enum": [
                            "unknown",
                            "excluded"
                          ]
                        }
                      }
                    },
                    "then": {
                      "not": {
                        "required": [
                          "embodied_co2e_ug"
                        ]
                      },
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "embodied_state": {
                          "enum": [
                            "available",
                            "modeled"
                          ]
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      },
                      "required": [
                        "embodied_co2e_ug",
                        "source_digest",
                        "hardware_applicability",
                        "lifetime_basis",
                        "allocation_basis",
                        "uncertainty_ppm"
                      ]
                    }
                  }
                ],
                "properties": {
                  "allocation_basis": {
                    "maxLength": 320,
                    "minLength": 1,
                    "type": "string"
                  },
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "embodied_co2e_ug": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "embodied_state": {
                    "enum": [
                      "available",
                      "modeled",
                      "excluded",
                      "unknown"
                    ],
                    "type": "string"
                  },
                  "hardware_applicability": {
                    "maxLength": 320,
                    "minLength": 1,
                    "type": "string"
                  },
                  "lifetime_basis": {
                    "maxLength": 320,
                    "minLength": 1,
                    "type": "string"
                  },
                  "method_version": {
                    "maxLength": 160,
                    "minLength": 1,
                    "type": "string"
                  },
                  "source_digest": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  },
                  "uncertainty_ppm": {
                    "maximum": 1000000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "availability_state",
                  "embodied_state",
                  "method_version"
                ],
                "type": "object"
              },
              "managed_infrastructure": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "managed_infrastructure_co2e_ug"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "managed_infrastructure_co2e_ug"
                      ]
                    }
                  }
                ],
                "properties": {
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "managed_infrastructure_co2e_ug": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "required_components": {
                    "items": {
                      "enum": [
                        "control_services",
                        "database_queue",
                        "artifact_storage",
                        "network_transfer"
                      ],
                      "type": "string"
                    },
                    "maxItems": 4,
                    "type": "array"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "required_components"
                ],
                "type": "object"
              },
              "operational": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "operational_co2e_ug"
                            ]
                          },
                          {
                            "required": [
                              "result_lower_ug"
                            ]
                          },
                          {
                            "required": [
                              "result_upper_ug"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "operational_co2e_ug"
                      ]
                    }
                  }
                ],
                "properties": {
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "energy_boundary": {
                    "const": "grid_input"
                  },
                  "factor_methods": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "factor_method_requested": {
                          "maxLength": 160,
                          "minLength": 1,
                          "type": "string"
                        },
                        "factor_method_used": {
                          "maxLength": 160,
                          "minLength": 1,
                          "type": "string"
                        },
                        "fallback_reason": {
                          "maxLength": 240,
                          "minLength": 1,
                          "type": "string"
                        },
                        "fallback_tier": {
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "factor_method_requested",
                        "factor_method_used",
                        "fallback_tier"
                      ],
                      "type": "object"
                    },
                    "maxItems": 64,
                    "type": "array"
                  },
                  "factor_sources": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "factor_digest": {
                          "pattern": "^[a-f0-9]{64}$",
                          "type": "string"
                        },
                        "factor_id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "source_version": {
                          "maxLength": 160,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "factor_id",
                        "factor_digest",
                        "source_version"
                      ],
                      "type": "object"
                    },
                    "maxItems": 1000,
                    "type": "array"
                  },
                  "operational_co2e_ug": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "result_lower_ug": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "result_upper_ug": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  },
                  "uncertainty": {
                    "additionalProperties": false,
                    "properties": {
                      "allocation_uncertainty_ppm": {
                        "maximum": 1000000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "boundary_uncertainty_ppm": {
                        "maximum": 1000000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "energy_uncertainty_ppm": {
                        "maximum": 1000000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "factor_uncertainty_ppm": {
                        "maximum": 1000000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "region_time_uncertainty_ppm": {
                        "maximum": 1000000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "uncertainty_method": {
                        "const": "bounded_interval.v1"
                      }
                    },
                    "required": [
                      "energy_uncertainty_ppm",
                      "allocation_uncertainty_ppm",
                      "factor_uncertainty_ppm",
                      "region_time_uncertainty_ppm",
                      "boundary_uncertainty_ppm",
                      "uncertainty_method"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "availability_state",
                  "energy_boundary",
                  "factor_methods",
                  "factor_sources"
                ],
                "type": "object"
              },
              "unavailable_reason": {
                "maxLength": 240,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "availability_state",
              "operational",
              "embodied",
              "managed_infrastructure",
              "defined_boundary_total"
            ],
            "type": "object"
          },
          "energy": {
            "additionalProperties": false,
            "allOf": [
              {
                "if": {
                  "required": [
                    "physical_time_coverage_ppm"
                  ]
                },
                "then": {
                  "required": [
                    "physical_time_coverage"
                  ]
                }
              },
              {
                "if": {
                  "required": [
                    "grid_factor_coverage_ppm"
                  ]
                },
                "then": {
                  "required": [
                    "grid_factor_coverage"
                  ]
                }
              }
            ],
            "properties": {
              "availability_state": {
                "enum": [
                  "available",
                  "partial",
                  "unavailable"
                ],
                "type": "string"
              },
              "grid_factor_coverage": {
                "additionalProperties": false,
                "properties": {
                  "coverage_ppm": {
                    "maximum": 1000000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "denominator": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "numerator": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "population": {
                    "maxLength": 160,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "numerator",
                  "denominator",
                  "population"
                ],
                "type": "object"
              },
              "grid_factor_coverage_ppm": {
                "maximum": 1000000,
                "minimum": 0,
                "type": "integer"
              },
              "grid_input": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "grid_input_uwh"
                            ]
                          },
                          {
                            "required": [
                              "provenance"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "enum": [
                            "available",
                            "partial"
                          ]
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "grid_input_uwh"
                      ]
                    }
                  }
                ],
                "description": "Device load is nested within grid input and must never be added to it. Provenance is a decomposition of grid_input_uwh, never a third total; its three values reconcile exactly.",
                "properties": {
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "device_load": {
                    "additionalProperties": false,
                    "allOf": [
                      {
                        "if": {
                          "properties": {
                            "availability_state": {
                              "const": "unavailable"
                            }
                          },
                          "required": [
                            "availability_state"
                          ]
                        },
                        "then": {
                          "not": {
                            "anyOf": [
                              {
                                "required": [
                                  "device_load_uwh"
                                ]
                              }
                            ]
                          },
                          "required": [
                            "unavailable_reason"
                          ]
                        }
                      },
                      {
                        "if": {
                          "properties": {
                            "availability_state": {
                              "enum": [
                                "available",
                                "partial"
                              ]
                            }
                          }
                        },
                        "then": {
                          "required": [
                            "device_load_uwh"
                          ]
                        }
                      }
                    ],
                    "properties": {
                      "availability_state": {
                        "enum": [
                          "available",
                          "partial",
                          "unavailable"
                        ],
                        "type": "string"
                      },
                      "device_load_uwh": {
                        "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                        "pattern": "^(0|[1-9][0-9]{0,77})$",
                        "type": "string"
                      },
                      "energy_boundary": {
                        "const": "device_load"
                      },
                      "unavailable_reason": {
                        "maxLength": 240,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "availability_state",
                      "energy_boundary"
                    ],
                    "type": "object"
                  },
                  "energy_boundary": {
                    "const": "grid_input"
                  },
                  "grid_input_uwh": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "provenance": {
                    "additionalProperties": false,
                    "properties": {
                      "calibrated_profile_uwh": {
                        "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                        "pattern": "^(0|[1-9][0-9]{0,77})$",
                        "type": "string"
                      },
                      "calibrated_telemetry_uwh": {
                        "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                        "pattern": "^(0|[1-9][0-9]{0,77})$",
                        "type": "string"
                      },
                      "other_qualified_uwh": {
                        "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                        "pattern": "^(0|[1-9][0-9]{0,77})$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "calibrated_telemetry_uwh",
                      "calibrated_profile_uwh",
                      "other_qualified_uwh"
                    ],
                    "type": "object"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "energy_boundary",
                  "device_load"
                ],
                "type": "object"
              },
              "managed_infrastructure_components": {
                "items": {
                  "additionalProperties": false,
                  "allOf": [
                    {
                      "if": {
                        "properties": {
                          "availability_state": {
                            "const": "unavailable"
                          }
                        },
                        "required": [
                          "availability_state"
                        ]
                      },
                      "then": {
                        "not": {
                          "anyOf": [
                            {
                              "required": [
                                "energy_uwh"
                              ]
                            },
                            {
                              "required": [
                                "operational_co2e_ug"
                              ]
                            }
                          ]
                        },
                        "required": [
                          "unavailable_reason"
                        ]
                      }
                    }
                  ],
                  "properties": {
                    "availability_state": {
                      "enum": [
                        "available",
                        "partial",
                        "unavailable"
                      ],
                      "type": "string"
                    },
                    "component": {
                      "enum": [
                        "control_services",
                        "database_queue",
                        "artifact_storage",
                        "network_transfer"
                      ],
                      "type": "string"
                    },
                    "energy_boundary": {
                      "maxLength": 160,
                      "minLength": 1,
                      "type": "string"
                    },
                    "energy_uwh": {
                      "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                      "pattern": "^(0|[1-9][0-9]{0,77})$",
                      "type": "string"
                    },
                    "evidence_digest": {
                      "pattern": "^[a-f0-9]{64}$",
                      "type": "string"
                    },
                    "method_version": {
                      "maxLength": 160,
                      "minLength": 1,
                      "type": "string"
                    },
                    "operational_co2e_ug": {
                      "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                      "pattern": "^(0|[1-9][0-9]{0,77})$",
                      "type": "string"
                    },
                    "unavailable_reason": {
                      "maxLength": 240,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "availability_state",
                    "component",
                    "energy_boundary",
                    "method_version"
                  ],
                  "type": "object"
                },
                "maxItems": 4,
                "type": "array"
              },
              "physical_time_coverage": {
                "additionalProperties": false,
                "properties": {
                  "coverage_ppm": {
                    "maximum": 1000000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "denominator": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "numerator": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "population": {
                    "maxLength": 160,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "numerator",
                  "denominator",
                  "population"
                ],
                "type": "object"
              },
              "physical_time_coverage_ppm": {
                "maximum": 1000000,
                "minimum": 0,
                "type": "integer"
              },
              "platform_allocation": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "device_load_uwh"
                            ]
                          },
                          {
                            "required": [
                              "grid_input_uwh"
                            ]
                          },
                          {
                            "required": [
                              "unallocated_service_present"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "available"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "unallocated_service_present"
                      ]
                    }
                  }
                ],
                "properties": {
                  "allocation_basis": {
                    "const": "overlapping_customer_active_time"
                  },
                  "allocation_manifest_digest": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "device_load_uwh": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "grid_input_uwh": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "method_version": {
                    "const": "contemporaneous_active_time.v1"
                  },
                  "unallocated_service_present": {
                    "type": "boolean"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "method_version",
                  "allocation_basis"
                ],
                "type": "object"
              },
              "population": {
                "const": "physical_consumption_intervals_including_failed_and_unpaid_work"
              },
              "profile_versions": {
                "items": {
                  "pattern": "^[a-f0-9]{64}$",
                  "type": "string"
                },
                "maxItems": 1000,
                "type": "array"
              },
              "unavailable_reason": {
                "maxLength": 240,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "availability_state",
              "population",
              "grid_input",
              "platform_allocation",
              "managed_infrastructure_components",
              "profile_versions"
            ],
            "type": "object"
          },
          "excluded_components": {
            "items": {
              "maxLength": 160,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 32,
            "type": "array"
          },
          "finalised_at": {
            "format": "date-time",
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "invoice_relationship": {
            "additionalProperties": false,
            "allOf": [
              {
                "if": {
                  "properties": {
                    "availability_state": {
                      "const": "unavailable"
                    }
                  },
                  "required": [
                    "availability_state"
                  ]
                },
                "then": {
                  "not": {
                    "anyOf": [
                      {
                        "required": [
                          "invoice_ids"
                        ]
                      }
                    ]
                  },
                  "required": [
                    "unavailable_reason"
                  ]
                }
              },
              {
                "if": {
                  "properties": {
                    "availability_state": {
                      "const": "available"
                    }
                  }
                },
                "then": {
                  "properties": {
                    "invoice_ids": {
                      "minItems": 1
                    }
                  },
                  "required": [
                    "invoice_ids"
                  ]
                }
              }
            ],
            "properties": {
              "availability_state": {
                "enum": [
                  "available",
                  "partial",
                  "unavailable"
                ],
                "type": "string"
              },
              "invoice_ids": {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 128,
                "type": "array"
              },
              "period_match": {
                "const": "same_account_timezone_and_utc_half_open_bounds"
              },
              "unavailable_reason": {
                "maxLength": 240,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "availability_state",
              "period_match"
            ],
            "type": "object"
          },
          "late_event_grace_hours": {
            "const": 72
          },
          "method_version": {
            "const": "compute_impact_report.v1"
          },
          "methodology_authority": {
            "const": "/trust/impact"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "organisation_id": {
            "format": "uuid",
            "type": "string"
          },
          "period_end_utc": {
            "format": "date-time",
            "type": "string"
          },
          "period_id": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "period_start_utc": {
            "format": "date-time",
            "type": "string"
          },
          "receipt_id": {
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "report_id": {
            "format": "uuid",
            "type": "string"
          },
          "reporting_month": {
            "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$",
            "type": "string"
          },
          "reporting_timezone": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "revision": {
            "minimum": 1,
            "type": "integer"
          },
          "revision_reason": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "schema_version": {
            "const": "v1"
          },
          "snapshot_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "source_manifest_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "source_watermark": {
            "format": "date-time",
            "type": "string"
          },
          "supersedes_snapshot_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "work": {
            "additionalProperties": false,
            "allOf": [
              {
                "if": {
                  "properties": {
                    "availability_state": {
                      "const": "unavailable"
                    }
                  },
                  "required": [
                    "availability_state"
                  ]
                },
                "then": {
                  "not": {
                    "anyOf": [
                      {
                        "required": [
                          "accepted_outcomes"
                        ]
                      },
                      {
                        "required": [
                          "successful_outcomes"
                        ]
                      },
                      {
                        "required": [
                          "failed_outcomes"
                        ]
                      },
                      {
                        "required": [
                          "abstained_outcomes"
                        ]
                      },
                      {
                        "required": [
                          "cancelled_outcomes"
                        ]
                      },
                      {
                        "required": [
                          "workflows"
                        ]
                      },
                      {
                        "required": [
                          "useful_units"
                        ]
                      }
                    ]
                  },
                  "required": [
                    "unavailable_reason"
                  ]
                }
              }
            ],
            "properties": {
              "abstained_outcomes": {
                "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                "pattern": "^(0|[1-9][0-9]{0,77})$",
                "type": "string"
              },
              "accepted_outcomes": {
                "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                "pattern": "^(0|[1-9][0-9]{0,77})$",
                "type": "string"
              },
              "availability_state": {
                "enum": [
                  "available",
                  "partial",
                  "unavailable"
                ],
                "type": "string"
              },
              "cancelled_outcomes": {
                "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                "pattern": "^(0|[1-9][0-9]{0,77})$",
                "type": "string"
              },
              "failed_outcomes": {
                "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                "pattern": "^(0|[1-9][0-9]{0,77})$",
                "type": "string"
              },
              "participation": {
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "availability_state": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "availability_state"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "physical_activity_macs"
                            ]
                          },
                          {
                            "required": [
                              "accepted_work_macs"
                            ]
                          },
                          {
                            "required": [
                              "provider_accounts"
                            ]
                          },
                          {
                            "required": [
                              "paid_contribution_macs"
                            ]
                          },
                          {
                            "required": [
                              "zero_payout_contribution_macs"
                            ]
                          }
                        ]
                      },
                      "required": [
                        "unavailable_reason"
                      ]
                    }
                  }
                ],
                "properties": {
                  "accepted_work_macs": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "availability_state": {
                    "enum": [
                      "available",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  },
                  "counting_rule": {
                    "const": "distinct_enrolled_device_identity_not_snapshot_or_epoch"
                  },
                  "paid_contribution_macs": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "physical_activity_macs": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "provider_accounts": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  },
                  "unavailable_reason": {
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  },
                  "zero_payout_contribution_macs": {
                    "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                    "pattern": "^(0|[1-9][0-9]{0,77})$",
                    "type": "string"
                  }
                },
                "required": [
                  "availability_state",
                  "counting_rule"
                ],
                "type": "object"
              },
              "population": {
                "const": "accepted_customer_outcomes_by_completion_time"
              },
              "successful_outcomes": {
                "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                "pattern": "^(0|[1-9][0-9]{0,77})$",
                "type": "string"
              },
              "unavailable_reason": {
                "maxLength": 240,
                "minLength": 1,
                "type": "string"
              },
              "useful_units": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "quantity": {
                      "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                      "pattern": "^(0|[1-9][0-9]{0,77})$",
                      "type": "string"
                    },
                    "unit": {
                      "maxLength": 80,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "unit",
                    "quantity"
                  ],
                  "type": "object"
                },
                "maxItems": 64,
                "type": "array"
              },
              "workflows": {
                "description": "Exact nonnegative integer encoded in base 10; never a floating point quantity.",
                "pattern": "^(0|[1-9][0-9]{0,77})$",
                "type": "string"
              }
            },
            "required": [
              "availability_state",
              "population",
              "participation"
            ],
            "type": "object"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "idempotency_key",
          "source_system",
          "report_id",
          "customer_account_id",
          "organisation_id",
          "period_id",
          "reporting_month",
          "reporting_timezone",
          "billing_timezone",
          "period_start_utc",
          "period_end_utc",
          "revision",
          "snapshot_digest",
          "method_version",
          "methodology_authority",
          "source_watermark",
          "finalised_at",
          "late_event_grace_hours",
          "source_manifest_digest",
          "invoice_relationship",
          "work",
          "energy",
          "emissions",
          "community",
          "comparison",
          "excluded_components"
        ],
        "title": "ComputeImpactReportV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-required-scope": "reporting:read",
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeImpactReportV1Success": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ComputeImpactReportV1"
              }
            },
            "type": "object"
          }
        ]
      },
      "ComputeMonthlyStatementV1": {
        "$id": "https://contracts.lithi.com/compute/ComputeMonthlyStatementV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "allOf": [
          {
            "else": {
              "properties": {
                "prepaid_credit": false
              }
            },
            "if": {
              "properties": {
                "statement_kind": {
                  "const": "prepaid_usage"
                }
              },
              "required": [
                "statement_kind"
              ]
            },
            "then": {
              "required": [
                "prepaid_credit"
              ]
            }
          }
        ],
        "description": "Immutable accepted-use statement with an exact prepaid-credit close or historical usage detail; prepaid amount due is zero.",
        "properties": {
          "account_ref": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "actor": {
            "pattern": "^[A-Za-z0-9._:-]{1,160}$",
            "type": "string"
          },
          "compliance_state": {
            "enum": [
              "supported",
              "unsupported_review"
            ],
            "type": "string"
          },
          "contract_id": {
            "const": "ComputeMonthlyStatementV1"
          },
          "credits_micro_usd": {
            "maximum": 1000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "currency": {
            "const": "USD"
          },
          "export_schema_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "export_schema_version": {
            "const": "v1"
          },
          "export_state": {
            "enum": [
              "export_ready",
              "no_accounting_system_export",
              "unsupported_review"
            ],
            "type": "string"
          },
          "finalized_at": {
            "format": "date-time",
            "type": "string"
          },
          "format_parity": {
            "items": {
              "enum": [
                "pdf",
                "csv",
                "json",
                "api"
              ],
              "type": "string"
            },
            "maxItems": 4,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "immutable": {
            "const": true
          },
          "invoice_authority": {
            "const": "lithi_invoices"
          },
          "line_count": {
            "maximum": 100000,
            "minimum": 0,
            "type": "integer"
          },
          "mapping_recipe_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "period_end": {
            "format": "date-time",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "type": "string"
          },
          "prepaid_credit": {
            "additionalProperties": false,
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "amount_due_cents": {
                "const": "0"
              },
              "closing_unconsumed_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "commercial_effect": {
                "const": "usage_evidence_only"
              },
              "credit_period_close_digest": {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "credit_period_close_id": {
                "format": "uuid",
                "type": "string"
              },
              "opening_unconsumed_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "other_retired_credit_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "paid_credit_used_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "promotional_credit_issued_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "promotional_credit_used_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "purchased_credit_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "refund_compensated_nano_usd": {
                "description": "Credit restored after an earlier credit refund retirement. This incoming amount remains separate from gross refunded credit and can occur in a later period. Omission means zero.",
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "refunded_credit_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "usage_reversed_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "usage_subtotal_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              }
            },
            "required": [
              "opening_unconsumed_nano_usd",
              "closing_unconsumed_nano_usd",
              "purchased_credit_nano_usd",
              "promotional_credit_issued_nano_usd",
              "usage_subtotal_nano_usd",
              "paid_credit_used_nano_usd",
              "promotional_credit_used_nano_usd",
              "usage_reversed_nano_usd",
              "refunded_credit_nano_usd",
              "other_retired_credit_nano_usd",
              "amount_due_cents",
              "commercial_effect",
              "credit_period_close_id",
              "credit_period_close_digest",
              "account_id"
            ],
            "type": "object",
            "x-lithi-reject-explicit-null-optionals": true
          },
          "schema_version": {
            "const": "v1"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "supabase",
              "web"
            ],
            "type": "string"
          },
          "statement_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "statement_id": {
            "format": "uuid",
            "type": "string"
          },
          "statement_kind": {
            "enum": [
              "legacy_usage",
              "prepaid_usage"
            ],
            "type": "string"
          },
          "subtotal_micro_usd": {
            "maximum": 1000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "token_usage": {
            "additionalProperties": false,
            "description": "Usage by service at the price book's two token rates. Every row uses the same two rates: input_nano_usd = billable_input_tokens x input_rate_nano_usd_per_token and output_nano_usd = billable_output_tokens x output_rate_nano_usd_per_token, exactly. The totals are the exact sums of the rows and equal the two lines of the period's invoice. The statement explains the invoice and creates no receivable.",
            "properties": {
              "billable_input_tokens": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "billable_output_tokens": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "input_nano_usd": {
                "maximum": 1000000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "input_rate_nano_usd_per_token": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "output_nano_usd": {
                "maximum": 1000000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "output_rate_nano_usd_per_token": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "period_close_id": {
                "format": "uuid",
                "type": "string"
              },
              "period_close_sha256": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "price_book_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "price_book_id": {
                "format": "uuid",
                "type": "string"
              },
              "service_rows": {
                "description": "Rows sorted by service_id, one per service.",
                "items": {
                  "additionalProperties": false,
                  "description": "One service's billable tokens for the period, priced at the statement's two rates.",
                  "properties": {
                    "billable_input_tokens": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "billable_output_tokens": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "input_nano_usd": {
                      "maximum": 1000000000000000,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "output_nano_usd": {
                      "maximum": 1000000000000000,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "service_id": {
                      "pattern": "^[A-Za-z0-9._:-]{1,160}$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "service_id",
                    "billable_input_tokens",
                    "billable_output_tokens",
                    "input_nano_usd",
                    "output_nano_usd"
                  ],
                  "type": "object"
                },
                "maxItems": 512,
                "minItems": 0,
                "type": "array"
              },
              "tariff": {
                "const": "universal_token_tariff"
              },
              "usage_subtotal_nano_usd": {
                "maximum": 1000000000000000,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "tariff",
              "price_book_id",
              "price_book_digest",
              "input_rate_nano_usd_per_token",
              "output_rate_nano_usd_per_token",
              "service_rows",
              "billable_input_tokens",
              "billable_output_tokens",
              "input_nano_usd",
              "output_nano_usd",
              "usage_subtotal_nano_usd",
              "period_close_id",
              "period_close_sha256"
            ],
            "type": "object"
          },
          "total_micro_usd": {
            "maximum": 1000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "usage_units": {
            "maximum": 1000000000,
            "minimum": 0,
            "type": "integer"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "statement_id",
          "account_ref",
          "period_start",
          "period_end",
          "currency",
          "usage_units",
          "subtotal_micro_usd",
          "credits_micro_usd",
          "total_micro_usd",
          "line_count",
          "statement_digest",
          "export_schema_digest",
          "export_schema_version",
          "mapping_recipe_digest",
          "format_parity",
          "export_state",
          "compliance_state",
          "immutable",
          "invoice_authority",
          "finalized_at"
        ],
        "title": "ComputeMonthlyStatementV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-immutable-projection": true,
        "x-lithi-not-receivable-authority": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-monthly-statement-v1",
        "x-lithi-swift-reject-unknown-fields": true
      },
      "ComputeMonthlyStatementV1Success": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ComputeMonthlyStatementV1"
              }
            },
            "type": "object"
          }
        ]
      },
      "ComputePaymentInvoiceV1": {
        "$id": "https://contracts.lithi.com/compute/ComputePaymentInvoiceV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "allOf": [
          {
            "else": {
              "properties": {
                "credit_purchase": false,
                "payment_status_authority": {
                  "const": "mercury"
                },
                "source_invoice_authority": {
                  "const": "lithi_invoices"
                }
              }
            },
            "if": {
              "properties": {
                "document_kind": {
                  "const": "credit_purchase_invoice"
                }
              },
              "required": [
                "document_kind"
              ]
            },
            "then": {
              "properties": {
                "payment_status_authority": {
                  "const": "qualified_payment_provider"
                }
              },
              "required": [
                "credit_purchase"
              ]
            }
          }
        ],
        "description": "Issued invoice projection for purchased credit or historical customer collection; one source owns issuance and payment status.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "maxLength": 320,
            "minLength": 1,
            "type": "string"
          },
          "amount_unit": {
            "const": "cents"
          },
          "contract_id": {
            "const": "ComputePaymentInvoiceV1"
          },
          "credit_purchase": {
            "additionalProperties": false,
            "properties": {
              "amount_due_cents": {
                "const": "0"
              },
              "authorizes_payment": {
                "const": false
              },
              "capture_identity": {
                "additionalProperties": false,
                "description": "External uniqueness is this complete tuple, independently of account and purchase ownership.",
                "properties": {
                  "environment": {
                    "enum": [
                      "sandbox",
                      "production"
                    ],
                    "type": "string"
                  },
                  "merchant_ref": {
                    "maxLength": 64,
                    "minLength": 64,
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "object_id": {
                    "maxLength": 256,
                    "minLength": 1,
                    "type": "string"
                  },
                  "object_kind": {
                    "const": "payment"
                  },
                  "provider": {
                    "maxLength": 64,
                    "minLength": 1,
                    "pattern": "^[a-z][a-z0-9_]{0,63}$",
                    "type": "string"
                  }
                },
                "required": [
                  "provider",
                  "merchant_ref",
                  "environment",
                  "object_kind",
                  "object_id"
                ],
                "type": "object"
              },
              "captured_cents": {
                "maxLength": 9,
                "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
                "type": "string"
              },
              "credit_face_nano_usd": {
                "maxLength": 16,
                "pattern": "^(0|[1-9][0-9]{0,14}|1000000000000000)$(?![\\s\\S])",
                "type": "string"
              },
              "credit_subtotal_cents": {
                "maxLength": 9,
                "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
                "type": "string"
              },
              "currency": {
                "const": "USD"
              },
              "invoice_issuer": {
                "enum": [
                  "lithi_invoices",
                  "qualified_payment_provider"
                ],
                "type": "string"
              },
              "issuer_document_ref": {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "payment_customer_ref": {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "purchase_id": {
                "format": "uuid",
                "type": "string"
              },
              "tax_cents": {
                "maxLength": 9,
                "pattern": "^(0|[1-9][0-9]{0,7}|100000000)$(?![\\s\\S])",
                "type": "string"
              }
            },
            "required": [
              "purchase_id",
              "credit_subtotal_cents",
              "credit_face_nano_usd",
              "tax_cents",
              "captured_cents",
              "amount_due_cents",
              "capture_identity",
              "payment_customer_ref",
              "invoice_issuer",
              "issuer_document_ref",
              "currency",
              "authorizes_payment"
            ],
            "type": "object"
          },
          "document_kind": {
            "enum": [
              "payment_invoice",
              "credit_purchase_invoice"
            ],
            "type": "string"
          },
          "human_fields": {
            "additionalProperties": false,
            "properties": {
              "account_reference": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "amount_due_cents": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maximum": 100000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "authoritative_status": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "enum": [
                  "Draft",
                  "Sent",
                  "Unpaid",
                  "Processing",
                  "Overdue",
                  "Paid",
                  "Cancelled"
                ],
                "type": "string"
              },
              "billing_period_end": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "format": "date-time",
                "type": "string"
              },
              "billing_period_start": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "format": "date-time",
                "type": "string"
              },
              "credits_cents": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maximum": 100000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "currency": {
                "const": "USD",
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults."
              },
              "customer_legal_entity": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maxLength": 320,
                "minLength": 1,
                "type": "string"
              },
              "due_date": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "format": "date-time",
                "type": "string"
              },
              "impact_report_reference": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maxLength": 512,
                "minLength": 1,
                "type": "string"
              },
              "invoice_number": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "issue_date": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "format": "date-time",
                "type": "string"
              },
              "payment_rail": {
                "const": "mercury_net30_v1",
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults."
              },
              "payment_reference": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "payment_terms": {
                "const": "Net30",
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults."
              },
              "period_id": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "subtotal_cents": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maximum": 100000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "tax_cents": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maximum": 100000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "usage_statement_reference": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "maxLength": 512,
                "minLength": 1,
                "type": "string"
              },
              "work_category_subtotals": {
                "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "amount_cents": {
                      "description": "Issued invoice authority only. Omit and list as unavailable when the source does not supply this field; never infer it from observation time or customer accounting defaults.",
                      "maximum": 100000000000000,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "category": {
                      "maxLength": 160,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "category",
                    "amount_cents"
                  ],
                  "type": "object"
                },
                "maxItems": 100,
                "type": "array"
              }
            },
            "type": "object"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "invoice_id": {
            "format": "uuid",
            "type": "string"
          },
          "issued_total_cents": {
            "description": "Authoritative issued total from amount_cents, distinct from the remaining amount due. Preserve this total in customer payable planning; never equate it to a paid or partially paid balance.",
            "maximum": 100000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "p_next_action": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "payment_status_authority": {
            "enum": [
              "mercury",
              "qualified_payment_provider"
            ],
            "type": "string"
          },
          "schema_version": {
            "const": "v1"
          },
          "source_invoice_authority": {
            "enum": [
              "lithi_invoices",
              "qualified_payment_provider"
            ],
            "type": "string"
          },
          "source_observed_at": {
            "format": "date-time",
            "type": "string"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "source_version": {
            "maximum": 1000000,
            "minimum": 1,
            "type": "integer"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "unavailable_fields": {
            "items": {
              "enum": [
                "invoice_number",
                "issue_date",
                "due_date",
                "period_id",
                "billing_period_start",
                "billing_period_end",
                "customer_legal_entity",
                "account_reference",
                "currency",
                "work_category_subtotals",
                "subtotal_cents",
                "credits_cents",
                "tax_cents",
                "amount_due_cents",
                "payment_terms",
                "payment_rail",
                "payment_reference",
                "authoritative_status",
                "usage_statement_reference",
                "impact_report_reference"
              ],
              "type": "string"
            },
            "maxItems": 20,
            "type": "array",
            "uniqueItems": true
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "idempotency_key",
          "invoice_id",
          "account_id",
          "document_kind",
          "amount_unit",
          "human_fields",
          "unavailable_fields",
          "source_invoice_authority",
          "payment_status_authority",
          "source_observed_at",
          "source_version",
          "p_next_action",
          "issued_total_cents"
        ],
        "title": "ComputePaymentInvoiceV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-payment-invoice-v1"
      },
      "ComputePaymentInvoiceV1Success": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ComputePaymentInvoiceV1"
              }
            },
            "type": "object"
          }
        ]
      },
      "ComputeResultBundleV1": {
        "$defs": {
          "ItemOutcome": {
            "additionalProperties": false,
            "description": "One item's outcome. The item is named by its prepared source-unit ordinal, never by a customer identifier. Calibrated confidence appears only where it was measured, always with the calibration evidence behind it.",
            "properties": {
              "calibrated_confidence": {
                "additionalProperties": false,
                "description": "Measured confidence for an accepted item, bound to calibration evidence the bundle declares. Never estimated or invented.",
                "properties": {
                  "calibration_evidence_digest": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "confidence_ppm": {
                    "maximum": 1000000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "confidence_ppm",
                  "calibration_evidence_digest"
                ],
                "type": "object"
              },
              "evidence_spans": {
                "description": "Located evidence as UTF-8 byte offsets into prepared items. Offsets only: the kit resolves them locally.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "end_offset": {
                      "maximum": 2147483647,
                      "minimum": 1,
                      "type": "integer"
                    },
                    "source_item_ordinal": {
                      "maximum": 9999999,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "start_offset": {
                      "maximum": 2147483646,
                      "minimum": 0,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "source_item_ordinal",
                    "start_offset",
                    "end_offset"
                  ],
                  "type": "object"
                },
                "maxItems": 8,
                "minItems": 1,
                "type": "array"
              },
              "item_ordinal": {
                "maximum": 9999999,
                "minimum": 0,
                "type": "integer"
              },
              "outcome": {
                "enum": [
                  "accepted",
                  "failed",
                  "abstained",
                  "missing"
                ],
                "type": "string"
              },
              "provenance": {
                "additionalProperties": false,
                "description": "The plan unit whose accepted winner produced the result, and that winner's decision digest.",
                "properties": {
                  "unit_id": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "winner_decision_digest": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  }
                },
                "required": [
                  "unit_id",
                  "winner_decision_digest"
                ],
                "type": "object"
              },
              "reason_code": {
                "description": "Present exactly for failed items (a failure code) and abstained items (INSUFFICIENT_EVIDENCE or MORE_CONTEXT_REQUIRED).",
                "enum": [
                  "OUTPUT_SCHEMA_INVALID",
                  "OUTPUT_TRUNCATED",
                  "VERIFICATION_FAILED",
                  "INPUT_INVALID",
                  "ATTEMPTS_EXHAUSTED",
                  "REPLAN_EXHAUSTED",
                  "POLICY_INFEASIBLE",
                  "INSUFFICIENT_EVIDENCE",
                  "MORE_CONTEXT_REQUIRED"
                ],
                "type": "string"
              },
              "result_ref": {
                "additionalProperties": false,
                "description": "Where the item's result row lives: an index into artifacts and a row ordinal within that artifact.",
                "properties": {
                  "artifact_ordinal": {
                    "maximum": 63,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "row_ordinal": {
                    "maximum": 9999999,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "artifact_ordinal",
                  "row_ordinal"
                ],
                "type": "object"
              },
              "truncated": {
                "description": "The item's output reached its output limit. An accepted item is never truncated.",
                "type": "boolean"
              },
              "verification_level": {
                "description": "The independent verification that applied to this item's result, in the ComputeVerificationPolicyV1 mode vocabulary. Schema validation applies to every accepted result; none means nothing beyond it.",
                "enum": [
                  "none",
                  "sampled",
                  "full",
                  "independent_quorum"
                ],
                "type": "string"
              }
            },
            "required": [
              "item_ordinal",
              "outcome",
              "verification_level",
              "truncated"
            ],
            "type": "object",
            "x-lithi-reject-explicit-null-optionals": true
          }
        },
        "$id": "https://contracts.lithi.com/compute/ComputeResultBundleV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "The immutable result bundle the finalizer seals for one Compute job (master plan §6.21, §36.10 completion law, §36.13 finalize stage). It is content-free: identities, commitments, counts, roots, token totals, digests and opaque references only. Customer outputs, labels and extracted values live in the referenced result artifacts, and the customer's kit alone maps an item ordinal back to the customer's item. Only the finalizer writes a bundle, and only a COMPLETE or PARTIAL bundle moves its job to succeeded, carrying expected_coverage_root and result_bundle_digest.",
        "properties": {
          "accepted_partition_manifest_root": {
            "description": "Root over each accepted unit and its one winner: winner, attempt, result and decision digests.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "actor": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "actual_segment_durations_ms": {
            "additionalProperties": false,
            "description": "Measured segment durations of the job's completion path from the canonical per-attempt timing record. Finalizer and delivery segments are recorded after the bundle is sealed.",
            "properties": {
              "claim": {
                "maximum": 1209600000,
                "minimum": 0,
                "type": "integer"
              },
              "execution": {
                "maximum": 1209600000,
                "minimum": 0,
                "type": "integer"
              },
              "queue": {
                "maximum": 1209600000,
                "minimum": 0,
                "type": "integer"
              },
              "ready": {
                "maximum": 1209600000,
                "minimum": 0,
                "type": "integer"
              },
              "startup": {
                "maximum": 1209600000,
                "minimum": 0,
                "type": "integer"
              },
              "transfer": {
                "maximum": 1209600000,
                "minimum": 0,
                "type": "integer"
              },
              "verification": {
                "maximum": 1209600000,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "transfer",
              "ready",
              "queue",
              "claim",
              "startup",
              "execution",
              "verification"
            ],
            "type": "object"
          },
          "adopted_plan_digest": {
            "description": "canonical_shard_plan_digest of the adopted WorkflowShardPlanV1.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "artifacts": {
            "items": {
              "additionalProperties": false,
              "description": "One immutable result artifact. artifact_ref is an opaque private reference, never download authority. Tabular outputs keep the customer's columns and append namespaced lithi_* columns.",
              "properties": {
                "appended_lithi_columns": {
                  "items": {
                    "enum": [
                      "lithi_status",
                      "lithi_result",
                      "lithi_error_code",
                      "lithi_confidence",
                      "lithi_evidence",
                      "lithi_verification",
                      "lithi_usage"
                    ],
                    "type": "string"
                  },
                  "maxItems": 7,
                  "type": "array",
                  "uniqueItems": true
                },
                "artifact_digest": {
                  "pattern": "^[a-f0-9]{64}$",
                  "type": "string"
                },
                "artifact_ref": {
                  "pattern": "^[a-f0-9]{64}$",
                  "type": "string"
                },
                "byte_count": {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "column_layout": {
                  "enum": [
                    "customer_columns_then_lithi_columns",
                    "lithi_columns_only",
                    "not_tabular"
                  ],
                  "type": "string"
                },
                "format": {
                  "enum": [
                    "parquet",
                    "arrow",
                    "jsonl",
                    "csv",
                    "json"
                  ],
                  "type": "string"
                },
                "part_count": {
                  "maximum": 100000,
                  "minimum": 1,
                  "type": "integer"
                },
                "role": {
                  "enum": [
                    "accepted_results",
                    "failures",
                    "abstentions",
                    "disagreements",
                    "metrics",
                    "verification",
                    "provenance",
                    "training_export"
                  ],
                  "type": "string"
                },
                "row_count": {
                  "maximum": 10000000,
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "artifact_ref",
                "role",
                "format",
                "part_count",
                "row_count",
                "byte_count",
                "artifact_digest",
                "column_layout",
                "appended_lithi_columns"
              ],
              "type": "object"
            },
            "maxItems": 64,
            "type": "array"
          },
          "attempt_lineage_root": {
            "description": "Root over every attempt of every required unit: winners, losers, retries, hedges and verifiers.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "batch_id": {
            "format": "uuid",
            "type": "string"
          },
          "calibration_evidence_digests": {
            "description": "Calibration evidence behind every calibrated confidence in this bundle. Empty when nothing was calibrated.",
            "items": {
              "pattern": "^[a-f0-9]{64}$",
              "type": "string"
            },
            "maxItems": 16,
            "type": "array",
            "uniqueItems": true
          },
          "completion_policy_digest": {
            "description": "Digest of the approved completion policy that decided the terminal state.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "contract_id": {
            "const": "ComputeResultBundleV1"
          },
          "delivery_manifest_root": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "event_root": {
            "description": "The job's hash-chained event root (rpc_read_compute_job_event_chain_v1) when the bundle is sealed, before the finalizing transition that records this bundle's digest.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "execution_profile": {
            "additionalProperties": false,
            "properties": {
              "metering_recipe_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "model_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "profile_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "runtime_release_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "template_sha256": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "tokenizer_sha256": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              }
            },
            "required": [
              "model_digest",
              "runtime_release_digest",
              "profile_digest",
              "metering_recipe_digest",
              "tokenizer_sha256"
            ],
            "type": "object",
            "x-lithi-reject-explicit-null-optionals": true
          },
          "expected_coverage_root": {
            "description": "Root over the adopted plan's exact coverage and its required units: every map shard and network reducer.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "forecast_basis_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "item_counts": {
            "additionalProperties": false,
            "description": "Prepared items by outcome. expected = accepted + failed + abstained + missing.",
            "properties": {
              "abstained": {
                "maximum": 10000000,
                "minimum": 0,
                "type": "integer"
              },
              "accepted": {
                "maximum": 10000000,
                "minimum": 0,
                "type": "integer"
              },
              "expected": {
                "maximum": 10000000,
                "minimum": 1,
                "type": "integer"
              },
              "failed": {
                "maximum": 10000000,
                "minimum": 0,
                "type": "integer"
              },
              "missing": {
                "maximum": 10000000,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "expected",
              "accepted",
              "failed",
              "abstained",
              "missing"
            ],
            "type": "object"
          },
          "item_outcome_root": {
            "description": "Root over every item outcome in ordinal order, whether listed here or held in the result artifacts.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "item_outcomes": {
            "description": "Every item outcome in ordinal order when the job has at most 10,000 items; empty above that, where the result artifacts hold them under item_outcome_root.",
            "items": {
              "$ref": "#/$defs/ItemOutcome"
            },
            "maxItems": 10000,
            "type": "array"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "next_action": {
            "enum": [
              "deliver_result_bundle",
              "deliver_partial_result_bundle",
              "review_verification_failures",
              "inspect_failed_units",
              "redrive_dead_letters",
              "resubmit_missing_units"
            ],
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "owner_exposure_root": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "preparation_commitment": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "quoted_completion_window": {
            "additionalProperties": false,
            "properties": {
              "eta_p50_at": {
                "format": "date-time",
                "type": "string"
              },
              "protected_completion_at": {
                "format": "date-time",
                "type": "string"
              }
            },
            "required": [
              "eta_p50_at",
              "protected_completion_at"
            ],
            "type": "object"
          },
          "receipt_id": {
            "description": "Null until the receipt that references result_bundle_digest is minted. It is outside result_bundle_digest, so the commitment graph stays acyclic.",
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": [
              "string",
              "null"
            ]
          },
          "reducer_topology_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "result_artifact_root": {
            "description": "Root over the artifacts list in order: the committed final artifact digest.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "result_bundle_digest": {
            "description": "Digest of this bundle without its envelope fields (trace_id, actor, occurred_at, source_system, receipt_id, idempotency_key) and without itself, so a replayed finalization of the same evidence reproduces it.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "schema_version": {
            "const": "v1"
          },
          "sealed_block_manifest_root": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "source_system": {
            "enum": [
              "fly",
              "supabase",
              "edge"
            ],
            "type": "string"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "terminal_reason": {
            "enum": [
              "ALL_UNITS_ACCEPTED",
              "PARTIAL_POLICY_SATISFIED",
              "VERIFICATION_FAILED",
              "OUTPUT_TRUNCATED",
              "OUTPUT_SCHEMA_INVALID",
              "UNIT_FAILED_PERMANENTLY",
              "UNITS_ABSTAINED",
              "ATTEMPTS_EXHAUSTED",
              "DEADLINE_PASSED"
            ],
            "type": "string"
          },
          "terminal_state": {
            "enum": [
              "COMPLETE",
              "PARTIAL",
              "REVIEW_REQUIRED",
              "FAILED",
              "DEAD_LETTERED",
              "EXPIRED"
            ],
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "unit_counts": {
            "additionalProperties": false,
            "description": "Required plan units by outcome. expected = accepted + failed + abstained + missing.",
            "properties": {
              "abstained": {
                "maximum": 20000,
                "minimum": 0,
                "type": "integer"
              },
              "accepted": {
                "maximum": 20000,
                "minimum": 0,
                "type": "integer"
              },
              "expected": {
                "maximum": 20000,
                "minimum": 1,
                "type": "integer"
              },
              "failed": {
                "maximum": 20000,
                "minimum": 0,
                "type": "integer"
              },
              "missing": {
                "maximum": 20000,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "expected",
              "accepted",
              "failed",
              "abstained",
              "missing"
            ],
            "type": "object"
          },
          "usage": {
            "additionalProperties": false,
            "description": "The three token quantities (§36.15.3). billable ≤ accepted ≤ physical for input and for output.",
            "properties": {
              "accepted_input_tokens": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "accepted_output_tokens": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "billable_input_tokens": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "billable_output_tokens": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "physical_input_tokens": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "physical_output_tokens": {
                "maximum": 1000000000000,
                "minimum": 0,
                "type": "integer"
              },
              "usage_root": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              }
            },
            "required": [
              "usage_root",
              "physical_input_tokens",
              "physical_output_tokens",
              "accepted_input_tokens",
              "accepted_output_tokens",
              "billable_input_tokens",
              "billable_output_tokens"
            ],
            "type": "object"
          },
          "verification_root": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "receipt_id",
          "job_id",
          "batch_id",
          "preparation_commitment",
          "sealed_block_manifest_root",
          "adopted_plan_digest",
          "completion_policy_digest",
          "expected_coverage_root",
          "unit_counts",
          "item_counts",
          "accepted_partition_manifest_root",
          "attempt_lineage_root",
          "verification_root",
          "owner_exposure_root",
          "usage",
          "reducer_topology_digest",
          "result_artifact_root",
          "delivery_manifest_root",
          "event_root",
          "item_outcome_root",
          "execution_profile",
          "forecast_basis_digest",
          "quoted_completion_window",
          "actual_segment_durations_ms",
          "terminal_state",
          "terminal_reason",
          "next_action",
          "calibration_evidence_digests",
          "artifacts",
          "item_outcomes",
          "result_bundle_digest"
        ],
        "title": "ComputeResultBundleV1",
        "type": "object",
        "x-lithi-closed-bounded": true,
        "x-lithi-content-free": true,
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-no-plaintext-evidence": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-laws": [
          "unit_and_item_counts_sum_to_expected",
          "billable_at_most_accepted_at_most_physical_tokens",
          "terminal_state_reason_and_next_action_agree",
          "complete_means_every_unit_accepted_and_no_failed_or_missing_item",
          "partial_accepts_some_but_not_all_units",
          "artifact_refs_unique_and_layouts_consistent_with_format_and_columns",
          "complete_or_partial_carries_accepted_results",
          "lithi_confidence_column_and_item_confidence_require_declared_calibration_evidence",
          "item_outcomes_listed_in_full_contiguous_order_up_to_10000_items",
          "accepted_items_untruncated_with_result_and_provenance",
          "missing_items_carry_no_result_evidence_or_verification",
          "reason_code_present_exactly_for_failed_and_abstained_items",
          "eta_p50_not_after_protected_completion",
          "result_bundle_digest_recomputed_by_consumers_without_envelope_fields"
        ],
        "x-lithi-semantic-profile": "compute-result-bundle-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-lowercase-uuids": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "CreditActivityList": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ComputeCreditActivityV1"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "pattern": "^[1-9][0-9]{0,17}$",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "items"
        ],
        "type": "object"
      },
      "CreditActivityListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/CreditActivityList"
              }
            },
            "type": "object"
          }
        ]
      },
      "CreditPurchaseList": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ComputeCreditPurchaseV1"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "items"
        ],
        "type": "object"
      },
      "CreditPurchaseListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/CreditPurchaseList"
              }
            },
            "type": "object"
          }
        ]
      },
      "Digest": {
        "pattern": "^[a-f0-9]{64}$",
        "type": "string"
      },
      "Error": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "enum": [
              "INVALID_REQUEST",
              "UNAUTHENTICATED",
              "FORBIDDEN",
              "NOT_FOUND",
              "CONFLICT",
              "PAYLOAD_TOO_LARGE",
              "UNSUPPORTED_MEDIA_TYPE",
              "NOT_ACCEPTABLE",
              "RATE_LIMITED",
              "INTERNAL_ERROR",
              "UNAVAILABLE",
              "UNSUPPORTED_SEMANTICS",
              "DATA_PROFILE_REQUIRED",
              "CREDENTIAL_DETECTED",
              "CONTEXT_OVERFLOW"
            ],
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "ErrorEnvelope": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          },
          "ok": {
            "const": false
          },
          "p_next_action": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "ok",
          "error",
          "p_next_action"
        ],
        "type": "object"
      },
      "EventItem": {
        "additionalProperties": false,
        "properties": {
          "digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "event_id": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          },
          "reason_code": {
            "enum": [
              "validation_failed",
              "verification_failed",
              "cancelled",
              "deadline_exceeded",
              "execution_failed",
              "delivery_failed",
              "policy_refusal"
            ],
            "type": "string"
          },
          "state": {
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          },
          "timing_bucket": {
            "maxLength": 32,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "state",
          "digest"
        ],
        "type": "object"
      },
      "EventList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EventItem"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "maxLength": 512,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._~-]+$",
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "EventListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/EventList"
              }
            },
            "type": "object"
          }
        ]
      },
      "FinanceConnectionList": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/FinanceConnectionRead"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "items"
        ],
        "type": "object"
      },
      "FinanceConnectionListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/FinanceConnectionList"
              }
            },
            "type": "object"
          }
        ]
      },
      "FinanceConnectionRead": {
        "additionalProperties": false,
        "properties": {
          "commercial_flow": {
            "const": "customer_payable"
          },
          "connection_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "connection_id": {
            "format": "uuid",
            "type": "string"
          },
          "connection_state": {
            "enum": [
              "disconnected",
              "pending_verification",
              "ready",
              "expired",
              "revoked"
            ],
            "type": "string"
          },
          "connection_version": {
            "maximum": 1000000,
            "minimum": 1,
            "type": "integer"
          },
          "read_back_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "reconciliation_state": {
            "enum": [
              "not_required",
              "pending",
              "matched",
              "drifted",
              "blocked"
            ],
            "type": "string"
          },
          "safe_external_reference": {
            "pattern": "^ref:[A-Za-z0-9:._-]{1,252}$",
            "type": "string"
          },
          "sync_mode": {
            "enum": [
              "inspect",
              "plan_dry_run",
              "approval",
              "idempotent_apply",
              "read_back"
            ],
            "type": "string"
          },
          "system_edition": {
            "enum": [
              "not_applicable",
              "quickbooks_online_standard",
              "xero_business",
              "sage_intacct_standard",
              "oracle_netsuite_standard",
              "dynamics_365_business_central",
              "dynamics_365_finance",
              "sap_s4hana_cloud",
              "sap_s4hana_on_premise",
              "registered_adapter_edition"
            ],
            "type": "string"
          },
          "system_family": {
            "enum": [
              "quickbooks_online",
              "xero",
              "sage_intacct",
              "oracle_netsuite",
              "microsoft_dynamics_365",
              "sap_s4hana",
              "registered_finance_adapter",
              "none_export_only"
            ],
            "type": "string"
          }
        },
        "required": [
          "connection_id",
          "connection_version",
          "system_family",
          "system_edition",
          "connection_state",
          "reconciliation_state",
          "sync_mode",
          "read_back_digest",
          "connection_digest",
          "commercial_flow",
          "safe_external_reference"
        ],
        "type": "object"
      },
      "FinanceErrorEnvelope": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          },
          "ok": {
            "const": false
          },
          "p_next_action": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "ok",
          "error",
          "p_next_action"
        ],
        "type": "object"
      },
      "FinanceInvoiceList": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ComputePaymentInvoiceV1"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "items"
        ],
        "type": "object"
      },
      "FinanceInvoiceListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/FinanceInvoiceList"
              }
            },
            "type": "object"
          }
        ]
      },
      "FinanceMappingAcknowledgement": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "mapping_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "mapping_id": {
            "format": "uuid",
            "type": "string"
          },
          "mapping_version": {
            "maximum": 1000000,
            "minimum": 1,
            "type": "integer"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "account_id",
          "mapping_id",
          "mapping_version",
          "mapping_digest",
          "replayed"
        ],
        "type": "object"
      },
      "FinanceMappingAcknowledgementSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/FinanceMappingAcknowledgement"
              }
            },
            "type": "object"
          }
        ]
      },
      "FinanceSchemaRead": {
        "additionalProperties": false,
        "properties": {
          "applySupported": {
            "const": false
          },
          "mappingPreview": {
            "minLength": 1,
            "type": "string"
          },
          "methods": {
            "items": {
              "enum": [
                "csv",
                "manual_documents"
              ],
              "type": "string"
            },
            "maxItems": 2,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "oauthSupported": {
            "const": false
          },
          "systems": {
            "items": {
              "enum": [
                "quickbooks-online",
                "xero",
                "sage-intacct",
                "oracle-netsuite",
                "microsoft-dynamics-365",
                "sap-s4hana",
                "other"
              ],
              "type": "string"
            },
            "maxItems": 7,
            "minItems": 7,
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "systems",
          "methods",
          "mappingPreview",
          "oauthSupported",
          "applySupported"
        ],
        "type": "object"
      },
      "FinanceSchemaReadSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/FinanceSchemaRead"
              }
            },
            "type": "object"
          }
        ]
      },
      "FinanceStatementList": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ComputeMonthlyStatementV1"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "items"
        ],
        "type": "object"
      },
      "FinanceStatementListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/FinanceStatementList"
              }
            },
            "type": "object"
          }
        ]
      },
      "FinanceSyncEventList": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/FinanceSyncEventRead"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "items"
        ],
        "type": "object"
      },
      "FinanceSyncEventListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/FinanceSyncEventList"
              }
            },
            "type": "object"
          }
        ]
      },
      "FinanceSyncEventRead": {
        "additionalProperties": false,
        "properties": {
          "commercial_flow": {
            "const": "customer_payable"
          },
          "effective_at": {
            "format": "date-time",
            "type": "string"
          },
          "event_digest": {
            "description": "SHA-256 of the normalized RFC8785 full event preimage. The event_digest and idempotency_key fields alone are excluded; prior_event_digest and replay_basis_digest are included.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "event_id": {
            "format": "uuid",
            "type": "string"
          },
          "external_annotation_state": {
            "enum": [
              "not_observed",
              "unpaid",
              "open",
              "paid",
              "void",
              "unknown"
            ],
            "type": "string"
          },
          "mercury_authoritative_status": {
            "enum": [
              "draft",
              "scheduled",
              "sent",
              "partially_paid",
              "paid",
              "void",
              "unknown"
            ],
            "type": "string"
          },
          "observed_at": {
            "format": "date-time",
            "type": "string"
          },
          "outcome": {
            "const": "accepted"
          },
          "p_next_action": {
            "enum": [
              "none",
              "reconcile",
              "read_back_mercury"
            ],
            "type": "string"
          },
          "read_back_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "reconciliation_state": {
            "enum": [
              "not_required",
              "pending",
              "matched",
              "drifted",
              "blocked"
            ],
            "type": "string"
          },
          "safe_external_reference": {
            "pattern": "^ref:[A-Za-z0-9:._-]{1,252}$",
            "type": "string"
          },
          "sync_mode": {
            "enum": [
              "inspect",
              "plan_dry_run",
              "approval",
              "idempotent_apply",
              "read_back"
            ],
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "event_digest",
          "external_annotation_state",
          "mercury_authoritative_status",
          "reconciliation_state",
          "sync_mode",
          "read_back_digest",
          "effective_at",
          "commercial_flow",
          "outcome",
          "p_next_action",
          "safe_external_reference",
          "observed_at"
        ],
        "type": "object"
      },
      "JobProjection": {
        "additionalProperties": false,
        "properties": {
          "digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "p_next_action": {
            "maxLength": 256,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          },
          "state": {
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          },
          "state_version": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "job_id",
          "state",
          "state_version",
          "digest",
          "p_next_action"
        ],
        "type": "object"
      },
      "JobSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/JobProjection"
              }
            },
            "type": "object"
          }
        ]
      },
      "JsonRpcId": {
        "oneOf": [
          {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          {
            "type": "integer"
          }
        ]
      },
      "LithiBillingProfileV1": {
        "$id": "https://contracts.lithi.com/compute/LithiBillingProfileV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "allOf": [
          {
            "else": {
              "properties": {
                "card_enabled": {
                  "const": false
                },
                "credit_policy": false,
                "invoice_authority": {
                  "const": "lithi_invoices"
                },
                "payment_methods": {
                  "items": {
                    "enum": [
                      "bank_transfer",
                      "ach"
                    ]
                  },
                  "maxItems": 2,
                  "minItems": 2
                },
                "payment_preference": {
                  "enum": [
                    "bank_transfer",
                    "ach"
                  ]
                }
              }
            },
            "if": {
              "properties": {
                "collection_policy": {
                  "const": "prepaid_credit"
                }
              },
              "required": [
                "collection_policy"
              ]
            },
            "then": {
              "required": [
                "credit_policy"
              ]
            }
          }
        ],
        "description": "Sanitized solo or team billing projection with distinct prepaid credit and historical NET30 collection policies.",
        "oneOf": [
          {
            "properties": {
              "account_kind": {
                "const": "solo"
              },
              "organisation_id": {
                "type": "null"
              }
            }
          },
          {
            "properties": {
              "account_kind": {
                "const": "team"
              },
              "organisation_id": {
                "format": "uuid",
                "type": "string"
              }
            }
          }
        ],
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "account_kind": {
            "enum": [
              "solo",
              "team"
            ]
          },
          "actor": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "billing_contact_ref": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "card_enabled": {
            "type": "boolean"
          },
          "collection_policy": {
            "enum": [
              "mercury_net30",
              "prepaid_credit"
            ],
            "type": "string"
          },
          "contract_id": {
            "const": "LithiBillingProfileV1"
          },
          "credit_policy": {
            "additionalProperties": false,
            "properties": {
              "payment_context_audience": {
                "const": "authorized_human_browser"
              },
              "policy_digest": {
                "maxLength": 64,
                "minLength": 64,
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "policy_id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "policy_id",
              "policy_digest",
              "payment_context_audience"
            ],
            "type": "object"
          },
          "currency": {
            "const": "USD"
          },
          "finance_readiness": {
            "enum": [
              "ready",
              "no_accounting_system_export"
            ]
          },
          "invoice_authority": {
            "enum": [
              "lithi_invoices",
              "qualified_payment_provider"
            ],
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "organisation_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "owner_ref": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "payment_methods": {
            "items": {
              "enum": [
                "bank_transfer",
                "ach",
                "card"
              ],
              "type": "string"
            },
            "maxItems": 3,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "payment_preference": {
            "enum": [
              "bank_transfer",
              "ach",
              "card"
            ],
            "type": "string"
          },
          "payout_authority": {
            "const": "none"
          },
          "profile_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "schema_version": {
            "const": "v1"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "supabase",
              "web"
            ]
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "account_id",
          "account_kind",
          "owner_ref",
          "organisation_id",
          "billing_contact_ref",
          "currency",
          "collection_policy",
          "payment_methods",
          "payment_preference",
          "card_enabled",
          "invoice_authority",
          "payout_authority",
          "finance_readiness",
          "profile_digest"
        ],
        "title": "LithiBillingProfileV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-not-authorizing": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-billing-profile-v1",
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "LithiJobV1": {
        "$id": "https://contracts.lithi.com/compute/LithiJobV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Canonical content-free Lithi compute command.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "maxLength": 160,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "capability": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "type": "string"
          },
          "completion_policy": {
            "additionalProperties": false,
            "description": "The completion policy the customer approves for the run: what a verification failure does (fail, or human_checkpoint for the customer's review) and, for a batch admitted allow_partial, the fewest accepted items a partial result needs. A batch admitted all_items sends no partial; a single job never sends partial. The service records it with its policy_digest, the SHA-256 of these terms.",
            "properties": {
              "on_verification_failure": {
                "enum": [
                  "fail",
                  "human_checkpoint"
                ],
                "type": "string"
              },
              "partial": {
                "additionalProperties": false,
                "properties": {
                  "minimum_accepted_items": {
                    "maximum": 10000000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "minimum_accepted_items"
                ],
                "type": "object"
              }
            },
            "required": [
              "on_verification_failure"
            ],
            "type": "object"
          },
          "contract": {
            "additionalProperties": false,
            "properties": {
              "hard_gates": {
                "items": {
                  "enum": [
                    "schema_valid",
                    "label_allowed",
                    "evidence_bound",
                    "typed_output_contract",
                    "verification_passed"
                  ],
                  "type": "string"
                },
                "maxItems": 8,
                "minItems": 1,
                "type": "array",
                "uniqueItems": true
              },
              "max_output_tokens": {
                "maximum": 32768,
                "minimum": 1,
                "type": "integer"
              },
              "output_schema_id": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z][A-Za-z0-9._-]*$",
                "type": "string"
              },
              "verification": {
                "additionalProperties": false,
                "properties": {
                  "mode": {
                    "enum": [
                      "none",
                      "sampled",
                      "full"
                    ],
                    "type": "string"
                  },
                  "rate": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "mode",
                  "rate"
                ],
                "type": "object"
              }
            },
            "required": [
              "output_schema_id",
              "max_output_tokens",
              "hard_gates",
              "verification"
            ],
            "type": "object"
          },
          "contract_id": {
            "const": "LithiJobV1"
          },
          "delivery": {
            "additionalProperties": false,
            "properties": {
              "destination_id": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              "result_recipient_key_id": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              }
            },
            "required": [
              "destination_id",
              "result_recipient_key_id"
            ],
            "type": "object"
          },
          "execution": {
            "additionalProperties": false,
            "properties": {
              "data_profile": {
                "enum": [
                  "shared_public",
                  "shared_deidentified",
                  "shared_customer_approved",
                  "shared_native_test",
                  "shared_synthetic_seed"
                ],
                "type": "string"
              },
              "deadline_at": {
                "format": "date-time",
                "type": "string"
              },
              "engine_policy": {
                "enum": [
                  "apple_native",
                  "deterministic",
                  "test_lane",
                  "gemma_resident",
                  "mlx_safetensors"
                ],
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              }
            },
            "required": [
              "data_profile",
              "priority",
              "deadline_at",
              "engine_policy"
            ],
            "type": "object"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "input": {
            "additionalProperties": false,
            "properties": {
              "public_bounds": {
                "additionalProperties": false,
                "properties": {
                  "ciphertext_bytes": {
                    "maximum": 1099511627776,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "estimated_input_tokens": {
                    "maximum": 131072,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "files": {
                    "maximum": 1000000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "files",
                  "ciphertext_bytes",
                  "estimated_input_tokens"
                ],
                "type": "object"
              },
              "source": {
                "additionalProperties": false,
                "properties": {
                  "artifact_id": {
                    "maxLength": 160,
                    "minLength": 1,
                    "pattern": "^[A-Za-z0-9._:-]+$",
                    "type": "string"
                  },
                  "kind": {
                    "const": "encrypted_artifact"
                  }
                },
                "required": [
                  "kind",
                  "artifact_id"
                ],
                "type": "object"
              }
            },
            "required": [
              "source",
              "public_bounds"
            ],
            "type": "object"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "operation": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "type": "string"
          },
          "quote_id": {
            "format": "uuid",
            "type": "string"
          },
          "receipt_id": {
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": [
              "string",
              "null"
            ]
          },
          "schema_version": {
            "const": "lithi-job.v1"
          },
          "sealed_binding": {
            "additionalProperties": false,
            "description": "The sealed admission binding: the local preparation decision and its content-bound commitment, the sealed-block manifest root the transfer was authorised for, and the digest of the exact quote execution approval covered (the quote's accepted_quote_digest). Only an eligible preparation is admitted, and only against a quote that signed the same manifest root and commitment.",
            "properties": {
              "manifest_root": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "preparation_commitment": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              },
              "preparation_decision": {
                "enum": [
                  "blocked",
                  "review_required",
                  "eligible"
                ],
                "type": "string"
              },
              "quote_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              }
            },
            "required": [
              "preparation_decision",
              "preparation_commitment",
              "manifest_root",
              "quote_digest"
            ],
            "type": "object"
          },
          "sealed_block_manifest": {
            "description": "The content-free SealedBlockManifestV1 document (contracts/compute/SealedBlockManifestV1.yaml) the sealed binding's manifest_root was computed from: opaque block ordinals, atomic-group counts, core unit ranges, measured token and output bounds, sealed byte sizes and digests, never plaintext, labels or key material. A single job sends it with its sealed_binding; a batch sends it once for the batch. The service validates it against its contract, recomputes its root and requires the quote's signed manifest root and preparation commitment before anything is recorded.",
            "type": "object"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "stage_partition": {
            "additionalProperties": false,
            "description": "The content-free compiler terms of the stage that plans the sealed input: the workflow plan digest and stage, the registered partition strategy, the pinned operation-profile limits the manifest was measured under, the packing target, reducer and context policies and, for evaluation_tuple.v1 and candidate_tournament.v1 only, the evaluation policy with its rubric named by version and digest. The fixed block and output framing leave room within min(10,800, model_context_limit); an evaluation stage plans core_only tuples joined customer-local; a tournament's bracket seed is drawn by the service, never sent. A single job sends it; a batch sends it once for the batch.",
            "properties": {
              "context_policy": {
                "enum": [
                  "core_only",
                  "adjacent_non_voting_overlap"
                ],
                "type": "string"
              },
              "evaluation_policy": {
                "additionalProperties": false,
                "description": "Exactly one input tuple member and at most one reference and one context; candidate_count is 1 for evaluation_tuple.v1 and 2 to 8 for candidate_tournament.v1, which alone may name comparison_fan_in.",
                "properties": {
                  "candidate_count": {
                    "maximum": 8,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "comparison_fan_in": {
                    "maximum": 7,
                    "minimum": 2,
                    "type": "integer"
                  },
                  "grader_fixed_block_tokens": {
                    "maximum": 9599,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "rubric_ref": {
                    "additionalProperties": false,
                    "properties": {
                      "digest": {
                        "pattern": "^[a-f0-9]{64}$",
                        "type": "string"
                      },
                      "version": {
                        "maximum": 2147483647,
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "version",
                      "digest"
                    ],
                    "type": "object"
                  },
                  "tuple_members": {
                    "items": {
                      "enum": [
                        "input",
                        "reference",
                        "candidate",
                        "context"
                      ],
                      "type": "string"
                    },
                    "maxItems": 8,
                    "minItems": 1,
                    "type": "array"
                  },
                  "verdict_tokens_per_tuple": {
                    "maximum": 1200,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "tuple_members",
                  "candidate_count",
                  "rubric_ref",
                  "grader_fixed_block_tokens",
                  "verdict_tokens_per_tuple"
                ],
                "type": "object"
              },
              "limits": {
                "additionalProperties": false,
                "properties": {
                  "fixed_block_tokens": {
                    "maximum": 9599,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "input_token_limit": {
                    "maximum": 9600,
                    "minimum": 2,
                    "type": "integer"
                  },
                  "max_items_per_unit": {
                    "maximum": 10000000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "metering_recipe_digest": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "model_context_limit": {
                    "maximum": 10000000,
                    "minimum": 2,
                    "type": "integer"
                  },
                  "output_framing_tokens": {
                    "maximum": 1199,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "output_token_limit": {
                    "maximum": 1200,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "template_sha256": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "tokenizer_sha256": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  }
                },
                "required": [
                  "input_token_limit",
                  "output_token_limit",
                  "model_context_limit",
                  "fixed_block_tokens",
                  "output_framing_tokens",
                  "max_items_per_unit",
                  "metering_recipe_digest",
                  "tokenizer_sha256"
                ],
                "type": "object"
              },
              "partition_strategy": {
                "enum": [
                  "records.v1",
                  "parquet_row_groups.v1",
                  "document_hierarchy.v1",
                  "rag_semantic.v1",
                  "evaluation_tuple.v1",
                  "candidate_tournament.v1"
                ],
                "type": "string"
              },
              "reducer_policy": {
                "additionalProperties": false,
                "description": "customer_local carries only its mode; network also names max_fan_in.",
                "properties": {
                  "max_fan_in": {
                    "maximum": 7,
                    "minimum": 2,
                    "type": "integer"
                  },
                  "mode": {
                    "enum": [
                      "customer_local",
                      "network"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "mode"
                ],
                "type": "object"
              },
              "stage_id": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              "target_fraction": {
                "maximum": 1,
                "minimum": 0.0001,
                "type": "number"
              },
              "workflow_plan_digest": {
                "pattern": "^[a-f0-9]{64}$",
                "type": "string"
              }
            },
            "required": [
              "workflow_plan_digest",
              "stage_id",
              "partition_strategy",
              "limits"
            ],
            "type": "object"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "training": {
            "additionalProperties": false,
            "properties": {
              "batch_completion_policy": {
                "enum": [
                  "all_items",
                  "minimum_success_ratio",
                  "first_k_valid",
                  "best_effort_until_deadline",
                  "quality_threshold",
                  "stagnation"
                ],
                "type": "string"
              },
              "dataset_ref": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              "evaluation_policy_ref": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              "model_bundle_ref": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              "result_destination_id": {
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              "training_profile": {
                "enum": [
                  "economy",
                  "balanced",
                  "quality"
                ],
                "type": "string"
              }
            },
            "required": [
              "model_bundle_ref",
              "dataset_ref",
              "training_profile",
              "evaluation_policy_ref",
              "batch_completion_policy",
              "result_destination_id"
            ],
            "type": "object"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "receipt_id",
          "actor",
          "occurred_at",
          "idempotency_key",
          "source_system",
          "account_id",
          "capability",
          "operation",
          "input",
          "contract",
          "execution",
          "delivery",
          "quote_id"
        ],
        "title": "LithiJobV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-swift-encode-required-nulls": true,
        "x-lithi-swift-reject-unknown-fields": true
      },
      "LithiQuoteV1": {
        "$id": "https://contracts.lithi.com/compute/LithiQuoteV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "accepted_quote_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "actor": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "batch_id": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "capability_id": {
            "maxLength": 160,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "capability_release_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "capability_release_id": {
            "maxLength": 160,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "capacity_authority_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "capacity_eta_seconds": {
            "minimum": 0,
            "type": "integer"
          },
          "capacity_state": {
            "description": "Capacity state of the home cell at quote time; never a Mac count, Mac-hours or a cell. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "enum": [
              "reservable",
              "insufficient_macs",
              "insufficient_owners"
            ],
            "type": "string"
          },
          "ceilings": {
            "additionalProperties": false,
            "properties": {
              "cold_downloads": {
                "maximum": 16,
                "minimum": 0,
                "type": "integer"
              },
              "replicas": {
                "maximum": 64,
                "minimum": 1,
                "type": "integer"
              },
              "retries": {
                "maximum": 32,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "replicas",
              "cold_downloads",
              "retries"
            ],
            "type": "object"
          },
          "contract_id": {
            "const": "LithiQuoteV1"
          },
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "data_profile": {
            "enum": [
              "shared_public",
              "shared_deidentified",
              "shared_customer_approved",
              "shared_native_test",
              "shared_synthetic_seed"
            ],
            "type": "string"
          },
          "deadline_state": {
            "description": "Deadline risk at quote time. An infeasible deadline is refused with the earliest feasible window and is never quoted. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "enum": [
              "feasible",
              "at_risk"
            ],
            "type": "string"
          },
          "delegation_policy_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "delegation_recommendation": {
            "enum": [
              "local",
              "delegate",
              "refuse"
            ],
            "type": "string"
          },
          "engine": {
            "enum": [
              "apple_native",
              "gemma_resident",
              "mlx_safetensors",
              "deterministic",
              "test_lane"
            ],
            "type": "string"
          },
          "estimated_charge_micro_usd": {
            "minimum": 0,
            "type": "integer"
          },
          "estimated_charge_nano_usd": {
            "minimum": 0,
            "type": "integer"
          },
          "estimated_output_tokens": {
            "description": "Expected accepted output Lithi tokens; never more than maximum_output_tokens. estimated_charge_nano_usd equals input_tokens_exact x input_rate_nano_usd + estimated_output_tokens x output_rate_nano_usd. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "maximum": 9000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "eta_p50": {
            "description": "Median forecast completion time (RFC 3339). One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "forecast_basis_digest": {
            "description": "RFC 8785 SHA-256 of the capacity forecast's complete input basis. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "forecast_expires_at": {
            "description": "When the admission forecast stops being valid (RFC 3339); a quote never outlives it. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "format": "date-time",
            "type": "string"
          },
          "idempotency_key": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          },
          "input_bounds_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "input_rate_nano_usd": {
            "description": "The global input rate in nano-USD per input Lithi token, from the price book named by price_book_digest (section 36.15.1). One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "maximum": 1000000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "input_tokens_exact": {
            "description": "Exact input Lithi tokens, measured with the metering recipe named by metering_recipe_digest. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "maximum": 9000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "job_id": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "latest_safe_start": {
            "description": "Latest start that still meets the deadline at the protected quantile (RFC 3339). One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "format": "date-time",
            "type": "string"
          },
          "lines": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "amount_micro_usd": {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "amount_nano_usd": {
                  "maximum": 1000000000000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "basis": {
                  "maxLength": 240,
                  "minLength": 1,
                  "type": "string"
                },
                "category": {
                  "enum": [
                    "model_preparation",
                    "compute",
                    "evaluation",
                    "verification",
                    "delivery"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "category",
                "amount_micro_usd",
                "basis"
              ],
              "type": "object"
            },
            "maxItems": 32,
            "minItems": 1,
            "type": "array"
          },
          "maximum_charge_micro_usd": {
            "maximum": 1000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "maximum_charge_nano_usd": {
            "maximum": 1000000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "maximum_output_tokens": {
            "description": "Output Lithi token ceiling. maximum_charge_nano_usd equals input_tokens_exact x input_rate_nano_usd + maximum_output_tokens x output_rate_nano_usd. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "maximum": 9000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "metering_recipe_digest": {
            "description": "The signed metering recipe the token counts were measured with (section 36.15.2). One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "model_ref": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "operation": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "output_rate_nano_usd": {
            "description": "The global output rate in nano-USD per output Lithi token, from the price book named by price_book_digest (section 36.15.1). One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "maximum": 1000000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "preparation_commitment": {
            "description": "Content-bound commitment of the eligible local preparation the sealed manifest was sealed from. Present together with sealed_block_manifest_root.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "price_book_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "price_book_id": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "protected_completion_at": {
            "description": "Completion time at the quality preset's protected quantile of the simulated makespan (RFC 3339). One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "format": "date-time",
            "type": "string"
          },
          "quote_id": {
            "format": "uuid",
            "type": "string"
          },
          "release_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "request_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "reserved_budget_micro_usd": {
            "maximum": 1000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "reserved_budget_nano_usd": {
            "maximum": 1000000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "schema_version": {
            "const": "v1"
          },
          "sealed_block_manifest_root": {
            "description": "manifest_root of the SealedBlockManifestV1 the quote was sized from. Present together with preparation_commitment, and only on a quote carrying the admission forecast; execution approval of this quote therefore binds the sealed manifest.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "signature": {
            "additionalProperties": false,
            "description": "Ed25519 (RFC 8032) signature by the registered compute_quote_signer key named by key_id, over the UTF-8 bytes of the RFC 8785 canonical quote with signature and accepted_quote_digest removed. accepted_quote_digest is the SHA-256 of those same bytes. This is the only algorithm rpc_create_compute_quote_v1 stores.",
            "properties": {
              "algorithm": {
                "const": "Ed25519"
              },
              "key_id": {
                "description": "A registered compute_quote_signer key. Verifiers resolve its public key from their signer registry, never from the quote.",
                "maxLength": 160,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9._:-]+$",
                "type": "string"
              },
              "value": {
                "description": "The 64-byte signature, base64url without padding.",
                "maxLength": 86,
                "minLength": 86,
                "pattern": "^[A-Za-z0-9_-]{86}$",
                "type": "string"
              }
            },
            "required": [
              "algorithm",
              "key_id",
              "value"
            ],
            "type": "object"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "mac",
              "edge"
            ],
            "type": "string"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "verification_level": {
            "description": "The verification level the quote prices. One of the section 36.3 admission forecast fields, which a quote carries all together or not at all; a quote carrying them is priced in exact nano-USD.",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "type": "string"
          },
          "verification_policy_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "idempotency_key",
          "quote_id",
          "account_id",
          "job_id",
          "batch_id",
          "model_ref",
          "price_book_id",
          "price_book_digest",
          "release_digest",
          "input_bounds_digest",
          "expires_at",
          "currency",
          "maximum_charge_micro_usd",
          "reserved_budget_micro_usd",
          "lines",
          "ceilings",
          "signature",
          "capability_id",
          "capability_release_id",
          "capability_release_digest",
          "data_profile",
          "engine",
          "operation",
          "request_digest",
          "capacity_authority_digest",
          "delegation_policy_digest",
          "estimated_charge_micro_usd",
          "verification_policy_digest",
          "capacity_eta_seconds",
          "delegation_recommendation"
        ],
        "title": "LithiQuoteV1",
        "type": "object",
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-profile": "compute-quote-nano-usd-v1",
        "x-lithi-swift-reject-unknown-fields": true
      },
      "LiveBoundedLithiJobV1": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LithiJobV1"
          },
          {
            "properties": {
              "input": {
                "properties": {
                  "public_bounds": {
                    "properties": {
                      "ciphertext_bytes": {
                        "maximum": 10485760000,
                        "minimum": 1,
                        "type": "integer"
                      }
                    }
                  }
                }
              },
              "sealed_block_manifest": {
                "$ref": "#/components/schemas/SealedBlockManifestV1"
              }
            },
            "type": "object"
          }
        ]
      },
      "McpClientResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/McpSuccessResponse"
          },
          {
            "$ref": "#/components/schemas/McpErrorResponse"
          }
        ]
      },
      "McpError": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "integer"
          },
          "data": {
            "additionalProperties": true,
            "type": "object"
          },
          "message": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "McpErrorResponse": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "$ref": "#/components/schemas/McpError"
          },
          "id": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/JsonRpcId"
              },
              {
                "type": "null"
              }
            ]
          },
          "jsonrpc": {
            "const": "2.0"
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "error"
        ],
        "type": "object"
      },
      "McpInitializeParams": {
        "additionalProperties": false,
        "properties": {
          "capabilities": {
            "additionalProperties": true,
            "type": "object"
          },
          "clientInfo": {
            "additionalProperties": false,
            "properties": {
              "name": {
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "version": {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "name",
              "version"
            ],
            "type": "object"
          },
          "protocolVersion": {
            "const": "2025-06-18",
            "type": "string"
          }
        },
        "required": [
          "protocolVersion",
          "capabilities",
          "clientInfo"
        ],
        "type": "object"
      },
      "McpInitializeRequest": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "jsonrpc": {
            "const": "2.0"
          },
          "method": {
            "const": "initialize"
          },
          "params": {
            "$ref": "#/components/schemas/McpInitializeParams"
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "type": "object"
      },
      "McpInitializeResult": {
        "additionalProperties": false,
        "properties": {
          "capabilities": {
            "additionalProperties": true,
            "type": "object"
          },
          "protocolVersion": {
            "const": "2025-06-18"
          },
          "serverInfo": {
            "additionalProperties": false,
            "properties": {
              "name": {
                "minLength": 1,
                "type": "string"
              },
              "version": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "name",
              "version"
            ],
            "type": "object"
          }
        },
        "required": [
          "protocolVersion",
          "capabilities",
          "serverInfo"
        ],
        "type": "object"
      },
      "McpInitializedNotification": {
        "additionalProperties": false,
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "method": {
            "const": "notifications/initialized"
          },
          "params": {
            "additionalProperties": false,
            "type": "object"
          }
        },
        "required": [
          "jsonrpc",
          "method"
        ],
        "type": "object"
      },
      "McpMessage": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/McpInitializeRequest"
          },
          {
            "$ref": "#/components/schemas/McpToolsListRequest"
          },
          {
            "$ref": "#/components/schemas/McpToolsCallRequest"
          },
          {
            "$ref": "#/components/schemas/McpInitializedNotification"
          },
          {
            "$ref": "#/components/schemas/McpClientResponse"
          }
        ]
      },
      "McpResultArguments": {
        "additionalProperties": false,
        "properties": {
          "job_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "job_id"
        ],
        "type": "object"
      },
      "McpStatusArguments": {
        "additionalProperties": false,
        "properties": {
          "job_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "job_id"
        ],
        "type": "object"
      },
      "McpSuccessResponse": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "jsonrpc": {
            "const": "2.0"
          },
          "result": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/McpInitializeResult"
              },
              {
                "$ref": "#/components/schemas/McpToolsListResult"
              },
              {
                "$ref": "#/components/schemas/McpToolResult"
              },
              {
                "$ref": "#/components/schemas/QuoteResponse"
              },
              {
                "$ref": "#/components/schemas/JobProjection"
              },
              {
                "$ref": "#/components/schemas/BatchProjection"
              },
              {
                "$ref": "#/components/schemas/ResultProjection"
              }
            ]
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "type": "object"
      },
      "McpTool": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "inputSchema": {
            "additionalProperties": true,
            "type": "object"
          },
          "name": {
            "enum": [
              "lithi.quote",
              "lithi.run",
              "lithi.batch",
              "lithi.status",
              "lithi.result"
            ],
            "type": "string"
          },
          "x-lithi-scope": {
            "enum": [
              "jobs:read",
              "jobs:write",
              "batches:write",
              "quotes:read"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "inputSchema",
          "x-lithi-scope"
        ],
        "type": "object"
      },
      "McpToolResult": {
        "additionalProperties": false,
        "properties": {
          "isError": {
            "type": "boolean"
          },
          "structuredContent": {
            "additionalProperties": false,
            "properties": {
              "digest": {
                "$ref": "#/components/schemas/Digest"
              },
              "handle": {
                "maxLength": 160,
                "minLength": 1,
                "type": "string"
              },
              "p_next_action": {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              "state": {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "handle",
              "digest",
              "state"
            ],
            "type": "object"
          }
        },
        "required": [
          "structuredContent",
          "isError"
        ],
        "type": "object"
      },
      "McpToolsCallRequest": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "jsonrpc": {
            "const": "2.0"
          },
          "method": {
            "const": "tools/call"
          },
          "params": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "arguments": {
                    "$ref": "#/components/schemas/QuoteRequest"
                  },
                  "name": {
                    "const": "lithi.quote"
                  }
                },
                "required": [
                  "name",
                  "arguments"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "arguments": {
                    "$ref": "#/components/schemas/LiveBoundedLithiJobV1"
                  },
                  "name": {
                    "const": "lithi.run"
                  }
                },
                "required": [
                  "name",
                  "arguments"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "arguments": {
                    "$ref": "#/components/schemas/BatchRequest"
                  },
                  "name": {
                    "const": "lithi.batch"
                  }
                },
                "required": [
                  "name",
                  "arguments"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "arguments": {
                    "$ref": "#/components/schemas/McpStatusArguments"
                  },
                  "name": {
                    "const": "lithi.status"
                  }
                },
                "required": [
                  "name",
                  "arguments"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "arguments": {
                    "$ref": "#/components/schemas/McpResultArguments"
                  },
                  "name": {
                    "const": "lithi.result"
                  }
                },
                "required": [
                  "name",
                  "arguments"
                ],
                "type": "object"
              }
            ]
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method",
          "params"
        ],
        "type": "object"
      },
      "McpToolsListRequest": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/JsonRpcId"
          },
          "jsonrpc": {
            "const": "2.0"
          },
          "method": {
            "const": "tools/list"
          },
          "params": {
            "additionalProperties": false,
            "properties": {
              "cursor": {
                "maxLength": 512,
                "minLength": 1,
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "jsonrpc",
          "id",
          "method"
        ],
        "type": "object"
      },
      "McpToolsListResult": {
        "additionalProperties": false,
        "properties": {
          "nextCursor": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/McpTool"
            },
            "maxItems": 5,
            "minItems": 5,
            "type": "array"
          }
        },
        "required": [
          "tools"
        ],
        "type": "object"
      },
      "PricingSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/PublicPricingProjection"
              }
            },
            "type": "object"
          }
        ]
      },
      "PublicBounds": {
        "additionalProperties": false,
        "properties": {
          "ciphertext_bytes": {
            "maximum": 10485760000,
            "minimum": 1,
            "type": "integer"
          },
          "estimated_input_tokens": {
            "maximum": 131072,
            "minimum": 1,
            "type": "integer"
          },
          "files": {
            "maximum": 1000000,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "files",
          "ciphertext_bytes",
          "estimated_input_tokens"
        ],
        "type": "object"
      },
      "PublicPricingComponent": {
        "additionalProperties": false,
        "properties": {
          "component_id": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "denominator": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "rate_micro_usd": {
            "pattern": "^(?:0|[1-9][0-9]*)$",
            "type": "string"
          },
          "unit_label": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "component_id",
          "rate_micro_usd",
          "denominator",
          "unit_label"
        ],
        "type": "object"
      },
      "PublicPricingLine": {
        "additionalProperties": false,
        "properties": {
          "availability_label": {
            "const": "Quote first"
          },
          "billing_basis": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "capability_id": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "category_id": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "category_label": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "comparison_class": {
            "enum": [
              "direct",
              "proxy"
            ]
          },
          "components": {
            "items": {
              "$ref": "#/components/schemas/PublicPricingComponent"
            },
            "maxItems": 8,
            "minItems": 1,
            "type": "array"
          },
          "display_price": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "ordinal": {
            "maximum": 50,
            "minimum": 1,
            "type": "integer"
          },
          "pricing_shape": {
            "enum": [
              "single",
              "dual",
              "base_plus_variable"
            ]
          },
          "service_label": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "ordinal",
          "capability_id",
          "service_label",
          "category_id",
          "category_label",
          "comparison_class",
          "billing_basis",
          "pricing_shape",
          "availability_label",
          "display_price",
          "components"
        ],
        "type": "object"
      },
      "PublicPricingProjection": {
        "additionalProperties": false,
        "description": "Fifty capability lines in ascending ordinal order, with unique capability identifiers. Decimal micro-USD rates remain strings without floating-point conversion.",
        "properties": {
          "authority_id": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "billing_rule": {
            "const": "accepted_work_only"
          },
          "currency": {
            "const": "USD"
          },
          "effective_at": {
            "format": "date-time",
            "type": "string"
          },
          "line_count": {
            "const": 50
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/PublicPricingLine"
            },
            "maxItems": 50,
            "minItems": 50,
            "type": "array"
          },
          "quote_required": {
            "const": true
          },
          "schema_version": {
            "const": "compute-public-pricing.v1"
          }
        },
        "required": [
          "schema_version",
          "authority_id",
          "currency",
          "effective_at",
          "quote_required",
          "billing_rule",
          "line_count",
          "lines"
        ],
        "type": "object"
      },
      "QuoteRequest": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "batch_id": {
            "format": "uuid",
            "type": "string"
          },
          "capability": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "type": "string"
          },
          "capacity": {
            "additionalProperties": false,
            "properties": {
              "max_cold_model_downloads": {
                "maximum": 16,
                "minimum": 0,
                "type": "integer"
              },
              "max_replicas": {
                "maximum": 64,
                "minimum": 1,
                "type": "integer"
              },
              "max_wait_seconds": {
                "maximum": 604800,
                "minimum": 1,
                "type": "integer"
              }
            },
            "required": [
              "max_replicas",
              "max_cold_model_downloads",
              "max_wait_seconds"
            ],
            "type": "object"
          },
          "data_profile": {
            "$ref": "#/components/schemas/AcceptedProfile"
          },
          "delegation": {
            "additionalProperties": false,
            "properties": {
              "mode": {
                "enum": [
                  "local_only",
                  "delegate_allowed",
                  "delegate_required"
                ],
                "type": "string"
              }
            },
            "required": [
              "mode"
            ],
            "type": "object"
          },
          "engine_policy": {
            "enum": [
              "apple_native",
              "deterministic",
              "test_lane",
              "gemma_resident",
              "mlx_safetensors"
            ],
            "type": "string"
          },
          "expires_in_seconds": {
            "maximum": 86400,
            "minimum": 30,
            "type": "integer"
          },
          "input_bounds": {
            "$ref": "#/components/schemas/PublicBounds"
          },
          "input_bounds_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "maximum_charge_micro_usd": {
            "maximum": 1000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "model_ref": {
            "maxLength": 160,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "operation": {
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "type": "string"
          },
          "priority": {
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ],
            "type": "string"
          },
          "result_destination_id": {
            "maxLength": 160,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "type": "string"
          },
          "verification_policy_digest": {
            "$ref": "#/components/schemas/Digest"
          }
        },
        "required": [
          "account_id",
          "capability",
          "operation",
          "model_ref",
          "input_bounds",
          "input_bounds_digest",
          "verification_policy_digest",
          "result_destination_id",
          "engine_policy",
          "data_profile",
          "priority",
          "maximum_charge_micro_usd",
          "capacity",
          "delegation",
          "expires_in_seconds"
        ],
        "type": "object"
      },
      "QuoteResponse": {
        "additionalProperties": false,
        "description": "The signed quote the service stores and returns. Job admission binds each job to this quote and its six binding fields.",
        "properties": {
          "quote": {
            "$ref": "#/components/schemas/LithiQuoteV1"
          },
          "status": {
            "const": "signed"
          }
        },
        "required": [
          "status",
          "quote"
        ],
        "type": "object"
      },
      "QuoteSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/QuoteResponse"
              }
            },
            "type": "object"
          }
        ]
      },
      "ReceiptProjection": {
        "additionalProperties": false,
        "properties": {
          "receipt_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "receipt_id": {
            "pattern": "^LTH-[A-Z]{2,20}-[0-9]{8}-[a-z0-9]{8,64}$",
            "type": "string"
          },
          "signature": {
            "pattern": "^[A-Za-z0-9_-]{80,}$",
            "type": "string"
          },
          "signature_key_id": {
            "maxLength": 160,
            "minLength": 1,
            "pattern": "^(?:[^\\uD800-\\uDFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])*$",
            "type": "string"
          }
        },
        "required": [
          "receipt_id",
          "receipt_digest",
          "signature_key_id",
          "signature"
        ],
        "type": "object"
      },
      "ReceiptSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ReceiptProjection"
              }
            },
            "type": "object"
          }
        ]
      },
      "ResultList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ResultProjection"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "maxLength": 512,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._~-]+$",
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ResultListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ResultList"
              }
            },
            "type": "object"
          }
        ]
      },
      "ResultProjection": {
        "additionalProperties": false,
        "properties": {
          "delivery_state": {
            "enum": [
              "pending",
              "delivering",
              "delivered",
              "failed"
            ],
            "type": "string"
          },
          "encrypted_artifact_id": {
            "pattern": "^artifact_[A-Za-z0-9_-]{16,96}$",
            "type": "string"
          },
          "evidence_digest": {
            "$ref": "#/components/schemas/Digest"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "result_digest": {
            "$ref": "#/components/schemas/Digest"
          }
        },
        "required": [
          "job_id",
          "encrypted_artifact_id",
          "result_digest",
          "evidence_digest",
          "delivery_state"
        ],
        "type": "object"
      },
      "ResultSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/ResultProjection"
              }
            },
            "type": "object"
          }
        ]
      },
      "SealedBlockManifestV1": {
        "$id": "https://contracts.lithi.com/compute/SealedBlockManifestV1.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "description": "Content-free manifest of the independently keyed AES-256-GCM blocks the kit seals on the customer's machine. The network sizes, plans and places work from these declarations without reading plaintext. It carries opaque ordinals, counts and digests only: no plaintext, filenames, field names, customer labels or key material. Token and byte figures are declarations bound to the metering recipe and tokenizer identity; the assigned executor recounts before executing.",
        "properties": {
          "actor": {
            "maxLength": 160,
            "minLength": 1,
            "type": "string"
          },
          "block_count": {
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "blocks": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "aad_digest": {
                  "description": "SHA-256 of the additional authenticated data binding manifest_id, block_ordinal and metering_recipe_digest.",
                  "pattern": "^[a-f0-9]{64}$",
                  "type": "string"
                },
                "atomic_group_count": {
                  "description": "Atomic groups sealed whole in this block. A declared grouping constraint never straddles two blocks.",
                  "maximum": 10000000,
                  "minimum": 1,
                  "type": "integer"
                },
                "block_ordinal": {
                  "maximum": 9999,
                  "minimum": 0,
                  "type": "integer"
                },
                "ciphertext_bytes": {
                  "description": "Bytes of the sealed block: ciphertext followed by the 16-byte GCM tag.",
                  "maximum": 1073741824,
                  "minimum": 17,
                  "type": "integer"
                },
                "ciphertext_sha256": {
                  "pattern": "^[a-f0-9]{64}$",
                  "type": "string"
                },
                "core_first_unit_ordinal": {
                  "maximum": 9999999,
                  "minimum": 0,
                  "type": "integer"
                },
                "core_last_unit_ordinal": {
                  "maximum": 9999999,
                  "minimum": 0,
                  "type": "integer"
                },
                "measured_input_tokens": {
                  "description": "Tokens an executor processes for this block, including non-voting context. Coverage and billing are computed elsewhere and exclude that context.",
                  "maximum": 10000000,
                  "minimum": 0,
                  "type": "integer"
                },
                "nonce_b64u": {
                  "description": "Unpadded base64url of the 96-bit GCM nonce. Unique per block.",
                  "pattern": "^[A-Za-z0-9_-]{16}$",
                  "type": "string"
                },
                "output_token_bound": {
                  "maximum": 10000000,
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "block_ordinal",
                "atomic_group_count",
                "core_first_unit_ordinal",
                "core_last_unit_ordinal",
                "measured_input_tokens",
                "output_token_bound",
                "ciphertext_bytes",
                "ciphertext_sha256",
                "nonce_b64u",
                "aad_digest"
              ],
              "type": "object"
            },
            "maxItems": 10000,
            "minItems": 1,
            "type": "array"
          },
          "contract_id": {
            "const": "SealedBlockManifestV1"
          },
          "idempotency_key": {
            "maxLength": 512,
            "minLength": 1,
            "type": "string"
          },
          "key_custody_mode": {
            "description": "Who releases block keys to leased executors: the run-scoped release authority (default) or the customer's kit while the run is active.",
            "enum": [
              "release_authority",
              "customer_held"
            ],
            "type": "string"
          },
          "manifest_id": {
            "description": "Opaque identity generated locally for this manifest. Every block's additional authenticated data binds it.",
            "format": "uuid",
            "type": "string"
          },
          "manifest_root": {
            "description": "Lowercase hex SHA-256 over the canonical JSON (sorted keys, no whitespace) of the blocks array in ordinal order.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "metering_recipe_digest": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "preparation_commitment": {
            "description": "Content-bound commitment to the local privacy preparation the sealed content came from.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "receipt_id": {
            "pattern": "^LTH-[A-Z]+-[0-9]{8}-[a-z0-9]+$",
            "type": "string"
          },
          "schema_version": {
            "const": "v1"
          },
          "sealing_suite": {
            "const": "aes-256-gcm"
          },
          "source_snapshot_digest": {
            "description": "Digest of the customer's source snapshot. The snapshot itself never leaves the customer's machine.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "source_system": {
            "enum": [
              "nextjs-api",
              "fly",
              "supabase",
              "mac",
              "ios",
              "web",
              "edge"
            ],
            "type": "string"
          },
          "source_unit_count": {
            "description": "Number of prepared, measured units sealed. Block core ranges cover unit ordinals 0..source_unit_count-1 exactly once.",
            "maximum": 10000000,
            "minimum": 1,
            "type": "integer"
          },
          "task_id": {
            "format": "uuid",
            "type": "string"
          },
          "template_sha256": {
            "description": "SHA-256 of the pinned chat template, present exactly when the measurer applies one.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "tokenizer_sha256": {
            "description": "SHA-256 of the pinned tokenizer every measured_input_tokens figure was counted with.",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "total_input_tokens": {
            "maximum": 100000000000,
            "minimum": 0,
            "type": "integer"
          },
          "trace_id": {
            "format": "uuid",
            "type": "string"
          },
          "workflow_run_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "contract_id",
          "task_id",
          "trace_id",
          "workflow_run_id",
          "actor",
          "occurred_at",
          "source_system",
          "manifest_id",
          "sealing_suite",
          "key_custody_mode",
          "metering_recipe_digest",
          "tokenizer_sha256",
          "preparation_commitment",
          "source_snapshot_digest",
          "source_unit_count",
          "block_count",
          "total_input_tokens",
          "manifest_root",
          "blocks"
        ],
        "title": "SealedBlockManifestV1",
        "type": "object",
        "x-lithi-closed-bounded": true,
        "x-lithi-content-free": true,
        "x-lithi-correlation-law": "task_id_equals_workflow_run_id_trace_id_distinct",
        "x-lithi-extends": "LithiContractBaseV1",
        "x-lithi-no-plaintext-evidence": true,
        "x-lithi-reject-explicit-null-optionals": true,
        "x-lithi-semantic-laws": [
          "block_count_equals_block_list_length",
          "block_ordinals_contiguous_from_zero_in_list_order",
          "core_unit_ranges_ordered_contiguous_and_exact_over_source_unit_count",
          "atomic_group_count_within_core_range",
          "total_input_tokens_equals_block_sum",
          "nonce_aad_and_ciphertext_digests_unique_per_block",
          "manifest_root_recomputed_by_consumers_from_the_canonical_block_list"
        ],
        "x-lithi-semantic-profile": "compute-sealed-block-manifest-v1",
        "x-lithi-swift-reject-unknown-fields": true
      },
      "SuccessEnvelope": {
        "additionalProperties": false,
        "properties": {
          "data": {},
          "ok": {
            "const": true
          }
        },
        "required": [
          "ok",
          "data"
        ],
        "type": "object"
      },
      "UsageItem": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "type": "string"
          },
          "gross_micro_usd": {
            "maximum": 1000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "job_id": {
            "format": "uuid",
            "type": "string"
          },
          "usage_digest": {
            "$ref": "#/components/schemas/Digest"
          }
        },
        "required": [
          "job_id",
          "usage_digest",
          "gross_micro_usd",
          "currency"
        ],
        "type": "object"
      },
      "UsageList": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/UsageItem"
            },
            "maxItems": 100,
            "type": "array"
          },
          "next_cursor": {
            "maxLength": 512,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._~-]+$",
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "UsageListSuccess": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SuccessEnvelope"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/UsageList"
              }
            },
            "type": "object"
          }
        ]
      }
    },
    "securitySchemes": {
      "LithiBearer": {
        "bearerFormat": "lthi_cmp_<16 lowercase hex>.<43 base64url>",
        "scheme": "bearer",
        "type": "http",
        "x-lithi-token-pattern": "^lthi_cmp_[0-9a-f]{16}\\.[A-Za-z0-9_-]{43}$"
      },
      "LithiFinanceBearer": {
        "bearerFormat": "lthi_fin_<16 lowercase hex>.<43 base64url>",
        "description": "Separately owner-provisioned, account-bound read automation credential. Its permitted scopes compose independently; it cannot execute work or write finance records.",
        "scheme": "bearer",
        "type": "http",
        "x-lithi-scopes": [
          "billing:read",
          "reporting:read",
          "finance:read"
        ],
        "x-lithi-token-pattern": "^lthi_fin_[0-9a-f]{16}\\.[A-Za-z0-9_-]{43}$"
      }
    },
    "x-lithi-mcp-tools": [
      {
        "description": "Create a content-free signed compute quote",
        "inputSchema": {
          "$ref": "#/components/schemas/QuoteRequest"
        },
        "name": "lithi.quote",
        "x-lithi-scope": "quotes:read"
      },
      {
        "description": "Admit one canonical encrypted compute job",
        "inputSchema": {
          "$ref": "#/components/schemas/LiveBoundedLithiJobV1"
        },
        "name": "lithi.run",
        "x-lithi-scope": "jobs:write"
      },
      {
        "description": "Admit a bounded encrypted compute batch",
        "inputSchema": {
          "$ref": "#/components/schemas/BatchRequest"
        },
        "name": "lithi.batch",
        "x-lithi-scope": "batches:write"
      },
      {
        "description": "Read a content-free job status projection",
        "inputSchema": {
          "$ref": "#/components/schemas/McpStatusArguments"
        },
        "name": "lithi.status",
        "x-lithi-scope": "jobs:read"
      },
      {
        "description": "Read encrypted result metadata",
        "inputSchema": {
          "$ref": "#/components/schemas/McpResultArguments"
        },
        "name": "lithi.result",
        "x-lithi-scope": "jobs:read"
      }
    ]
  },
  "info": {
    "description": "Content-blind canonical compute control plane.",
    "title": "Lithi Compute API",
    "version": "1.0.0"
  },
  "openapi": "3.1.1",
  "paths": {
    "/aws-batch/{operation}": {
      "post": {
        "description": "Unsupported semantics cannot bypass quote, profile, encryption or lifecycle admission.",
        "operationId": "compatibilityAwsBatch",
        "parameters": [
          {
            "in": "path",
            "name": "operation",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9._-]*$",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompatibilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/JobAccepted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Translate a bounded encrypted AWS Batch operation",
        "tags": [
          "compatibility"
        ],
        "x-lithi-compatibility": "translator_no_bypass",
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "jobs:write"
        ]
      }
    },
    "/mcp": {
      "delete": {
        "operationId": "mcpClose",
        "parameters": [
          {
            "$ref": "#/components/parameters/Origin"
          },
          {
            "$ref": "#/components/parameters/McpProtocolVersion"
          },
          {
            "$ref": "#/components/parameters/McpSessionId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/McpSessionClosed"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Close an MCP session",
        "tags": [
          "mcp"
        ],
        "x-lithi-scopes": [
          "jobs:write"
        ]
      },
      "get": {
        "operationId": "mcpStream",
        "parameters": [
          {
            "$ref": "#/components/parameters/Origin"
          },
          {
            "$ref": "#/components/parameters/McpProtocolVersion"
          },
          {
            "$ref": "#/components/parameters/McpSessionId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/McpStreamOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "405": {
            "$ref": "#/components/responses/TypedError"
          },
          "406": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Open an MCP Streamable HTTP event stream",
        "tags": [
          "mcp"
        ],
        "x-lithi-accept": [
          "text/event-stream"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      },
      "post": {
        "operationId": "mcpMessage",
        "parameters": [
          {
            "$ref": "#/components/parameters/Origin"
          },
          {
            "$ref": "#/components/parameters/McpProtocolVersion"
          },
          {
            "$ref": "#/components/parameters/McpSessionId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpMessage"
              }
            },
            "text/event-stream": {
              "schema": {
                "maxLength": 1048576,
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/McpMessageOK"
          },
          "202": {
            "$ref": "#/components/responses/McpNotificationAccepted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "406": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Exchange MCP Streamable HTTP JSON-RPC messages",
        "tags": [
          "mcp"
        ],
        "x-lithi-accept": [
          "application/json",
          "text/event-stream"
        ],
        "x-lithi-mcp-transport": "streamable-http-2025-06-18"
      }
    },
    "/openai/v1/chat/completions": {
      "post": {
        "description": "Unsupported semantics cannot bypass quote, profile, encryption or lifecycle admission.",
        "operationId": "compatibilityOpenaiChatCompletions",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompatibilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/JobAccepted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Translate a bounded encrypted chat request",
        "tags": [
          "compatibility"
        ],
        "x-lithi-compatibility": "translator_no_bypass",
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "jobs:write"
        ]
      }
    },
    "/openai/v1/embeddings": {
      "post": {
        "description": "Unsupported semantics cannot bypass quote, profile, encryption or lifecycle admission.",
        "operationId": "compatibilityOpenaiEmbeddings",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompatibilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/JobAccepted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Translate a bounded encrypted embedding request",
        "tags": [
          "compatibility"
        ],
        "x-lithi-compatibility": "translator_no_bypass",
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "jobs:write"
        ]
      }
    },
    "/openai/v1/responses": {
      "post": {
        "description": "Unsupported semantics cannot bypass quote, profile, encryption or lifecycle admission.",
        "operationId": "compatibilityOpenaiResponses",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompatibilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/JobAccepted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Translate a bounded encrypted Responses request",
        "tags": [
          "compatibility"
        ],
        "x-lithi-compatibility": "translator_no_bypass",
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "jobs:write"
        ]
      }
    },
    "/v1/account/setup": {
      "post": {
        "operationId": "accountSetup",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "account:write"
        ]
      }
    },
    "/v1/agent-events": {
      "get": {
        "operationId": "listAgentEvents",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AgentEventsOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "List or stream connector-blind agent events",
        "tags": [
          "compute"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/approvals": {
      "get": {
        "operationId": "listApprovals",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "approvals:read"
        ]
      }
    },
    "/v1/approvals/{id}": {
      "post": {
        "operationId": "decideApproval",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "approvals:write"
        ]
      }
    },
    "/v1/artifacts/complete": {
      "post": {
        "operationId": "completeArtifact",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtifactCompleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ArtifactCompleted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Commit an encrypted artifact manifest",
        "tags": [
          "artifacts"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "models:write"
        ]
      }
    },
    "/v1/artifacts/prepare": {
      "post": {
        "description": "Plan source identifiers before local sealing, record the full sealed block manifest under that original source, or prepare encrypted upload transport. Recording metadata grants neither upload nor execution. For phase record, the manifest's idempotency_key is required and equals the normalized Idempotency-Key header. Capture the full original document and key before callbacks; preserve both while reconciling any uncertain result against the original source record before another write. The record document has a 16 MiB canonical snapshot bound, inside a request bound of 16 MiB plus 64 KiB; other phases retain 64 KiB.",
        "operationId": "prepareArtifact",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtifactPrepareRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ArtifactPrepared"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Prepare encrypted artifact transport",
        "tags": [
          "artifacts"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "models:write"
        ]
      }
    },
    "/v1/batches": {
      "post": {
        "operationId": "createBatch",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BatchAccepted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Admit a bounded batch",
        "tags": [
          "compute"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "batches:write"
        ]
      }
    },
    "/v1/batches/{id}": {
      "get": {
        "operationId": "getBatch",
        "parameters": [
          {
            "$ref": "#/components/parameters/BatchId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BatchOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Read content-free batch state",
        "tags": [
          "compute"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/batches/{id}/results": {
      "get": {
        "operationId": "listBatchResults",
        "parameters": [
          {
            "$ref": "#/components/parameters/BatchId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ResultListOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "List encrypted batch result metadata",
        "tags": [
          "compute"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/billing-profile": {
      "get": {
        "operationId": "billingProfile",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "listCapabilities",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CapabilityListOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "List admitted capability summaries",
        "tags": [
          "compute"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/credit-purchases": {
      "get": {
        "description": "Payment, fulfillment, risk and document states are independent. Payment context belongs only to the purchasing human's browser.",
        "operationId": "listCreditPurchases",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditPurchaseListSuccess"
                }
              }
            },
            "description": "One page of credit purchases"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "List credit purchases",
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/credit-purchases/{id}": {
      "get": {
        "operationId": "getCreditPurchase",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeCreditPurchaseV1Success"
                }
              }
            },
            "description": "The credit purchase"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read one credit purchase",
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/credits": {
      "get": {
        "description": "Exact account credit at one source sequence. A restricted or unavailable balance has null amounts, never a zero balance. A balance never authorizes a run and never replaces spend limits.",
        "operationId": "getCredits",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeCreditBalanceV1Success"
                }
              }
            },
            "description": "The account's exact credit balance"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read the account's prepaid credit balance",
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/credits/activity": {
      "get": {
        "description": "Ascending account sequence. A usage reversal is not a cash refund.",
        "operationId": "listCreditActivity",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "pattern": "^[1-9][0-9]{0,17}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditActivityListSuccess"
                }
              }
            },
            "description": "One page of credit movements"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "List immutable credit movements",
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/exports": {
      "get": {
        "operationId": "listExports",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/exports/{id}": {
      "get": {
        "operationId": "getExport",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/finance-connections": {
      "get": {
        "operationId": "listFinanceConnections",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "pattern": "^[a-f0-9]{64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceConnectionListSuccess"
                }
              }
            },
            "description": "Read customer-payable connection metadata. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read customer-payable connection metadata",
        "tags": [
          "billing"
        ],
        "x-lithi-pagination": "cursor",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "finance:read"
        ]
      }
    },
    "/v1/finance-mappings": {
      "post": {
        "description": "Read automation credentials cannot grant finance:write. Mapping acknowledgement does not authorize hosted apply, ERP posting or payment.",
        "operationId": "financeMappings",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceMappingAcknowledgementSuccess"
                }
              }
            },
            "description": "Acknowledge a separately authorized mapping version. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "409": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "413": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "415": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Acknowledge a separately authorized mapping version",
        "tags": [
          "billing"
        ],
        "x-lithi-apply-supported": false,
        "x-lithi-idempotency": "required",
        "x-lithi-pagination": "not_applicable",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "finance:write"
        ]
      }
    },
    "/v1/finance-schema": {
      "get": {
        "operationId": "financeSchema",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceSchemaReadSuccess"
                }
              }
            },
            "description": "Read customer-owned accounting export capabilities. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read customer-owned accounting export capabilities",
        "tags": [
          "billing"
        ],
        "x-lithi-pagination": "not_applicable",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "finance:read"
        ]
      }
    },
    "/v1/finance-sync-events": {
      "get": {
        "operationId": "listFinanceSyncEvents",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "pattern": "^[a-f0-9]{64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceSyncEventListSuccess"
                }
              }
            },
            "description": "Read stored finance observations without changing invoice settlement. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read stored finance observations without changing invoice settlement",
        "tags": [
          "billing"
        ],
        "x-lithi-pagination": "cursor",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "finance:read"
        ]
      }
    },
    "/v1/impact-reports/{period_id}": {
      "get": {
        "description": "Returns the frozen account-month snapshot. The path accepts its canonical period hash or a YYYY-MM reporting month; month lookup uses the filed period even after account timezone changes. Each section declares its own availability; unavailable quantities are absent. Omit revision for the latest revision, or pin revision and snapshot_digest to retrieve filed bytes. The report carries no payment instruction.",
        "operationId": "getImpactReport",
        "parameters": [
          {
            "in": "path",
            "name": "period_id",
            "required": true,
            "schema": {
              "pattern": "^([a-f0-9]{64}|[0-9]{4}-(0[1-9]|1[0-2]))$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "revision",
            "required": false,
            "schema": {
              "maximum": 2147483647,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "snapshot_digest",
            "required": false,
            "schema": {
              "pattern": "^[a-f0-9]{64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeImpactReportV1Success"
                }
              }
            },
            "description": "Exact frozen report; partial or unavailable sections are successful data states."
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read an immutable Monthly Compute impact report",
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "reporting:read"
        ]
      }
    },
    "/v1/invoices": {
      "get": {
        "description": "The payment invoice is the receivable. The separate Compute Statement is not a payment invoice and creates no receivable; the impact report carries no payment instruction. Issued total is not a reconstructed current amount due. Human fields without an authorized source are explicitly listed in unavailable_fields.",
        "operationId": "listInvoices",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceInvoiceListSuccess"
                }
              }
            },
            "description": "Read account-scoped payment invoices. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read account-scoped payment invoices",
        "tags": [
          "billing"
        ],
        "x-lithi-pagination": "cursor",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/invoices/{id}": {
      "get": {
        "description": "The payment invoice is the receivable. The separate Compute Statement is not a payment invoice and creates no receivable; the impact report carries no payment instruction. Issued total is not a reconstructed current amount due. Human fields without an authorized source are explicitly listed in unavailable_fields.",
        "operationId": "getInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputePaymentInvoiceV1Success"
                }
              }
            },
            "description": "Read a payment invoice and its authoritative human fields. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read a payment invoice and its authoritative human fields",
        "tags": [
          "billing"
        ],
        "x-lithi-pagination": "not_applicable",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/jobs": {
      "post": {
        "operationId": "createJob",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiveBoundedLithiJobV1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/JobAccepted"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Admit a quoted job",
        "tags": [
          "compute"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "jobs:write"
        ]
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "getJob",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/JobOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Read content-free job state",
        "tags": [
          "compute"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/jobs/{id}/cancel": {
      "post": {
        "operationId": "cancelJob",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/JobOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Cancel an admitted job idempotently",
        "tags": [
          "compute"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "jobs:write"
        ]
      }
    },
    "/v1/jobs/{id}/events": {
      "get": {
        "operationId": "listJobEvents",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/EventListOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "List content-free job events",
        "tags": [
          "compute"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/jobs/{id}/result": {
      "get": {
        "operationId": "getJobResult",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ResultOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Read encrypted result and delivery metadata",
        "tags": [
          "compute"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/limits": {
      "get": {
        "operationId": "showLimits",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "limits:read"
        ]
      }
    },
    "/v1/payments/{id}": {
      "get": {
        "operationId": "getPayment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/payments/{id}/open": {
      "post": {
        "operationId": "openPayment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "billing:write"
        ]
      }
    },
    "/v1/pricing": {
      "get": {
        "operationId": "pricing",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingSuccess"
                }
              }
            },
            "description": "Public accepted-work pricing projection; a signed quote is required for execution"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "quotes:read"
        ]
      }
    },
    "/v1/purchase-order-policy": {
      "get": {
        "operationId": "purchaseOrderPolicy",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/quotes": {
      "post": {
        "operationId": "createQuote",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/QuoteOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Create a bounded signed quote",
        "tags": [
          "compute"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "quotes:read"
        ]
      }
    },
    "/v1/receipts/{id}": {
      "get": {
        "operationId": "getReceipt",
        "parameters": [
          {
            "$ref": "#/components/parameters/ReceiptId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ReceiptOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "Read immutable content-free receipt material",
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "jobs:read"
        ]
      }
    },
    "/v1/referral-status": {
      "get": {
        "operationId": "referralStatus",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "referral:read"
        ]
      }
    },
    "/v1/spend-policy": {
      "post": {
        "operationId": "spendPolicy",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "limits:write"
        ]
      }
    },
    "/v1/statements": {
      "get": {
        "description": "An unavailable statement reader returns a typed refusal with a recovery action, never a fabricated empty statement or ledger.",
        "operationId": "listStatements",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 512,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinanceStatementListSuccess"
                }
              }
            },
            "description": "Read informational usage statements; a statement is not a payment invoice. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read informational usage statements; a statement is not a payment invoice",
        "tags": [
          "billing"
        ],
        "x-lithi-pagination": "cursor",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/statements/{id}": {
      "get": {
        "description": "An unavailable statement reader returns a typed refusal with a recovery action, never a fabricated empty statement or ledger.",
        "operationId": "getStatement",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeMonthlyStatementV1Success"
                }
              }
            },
            "description": "Read a statement that creates no receivable. Account availability is independently authorized."
          },
          "400": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "401": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "403": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "404": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "429": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "500": {
            "$ref": "#/components/responses/FinanceTypedError"
          },
          "503": {
            "$ref": "#/components/responses/FinanceTypedError"
          }
        },
        "security": [
          {
            "LithiFinanceBearer": []
          }
        ],
        "summary": "Read a statement that creates no receivable",
        "tags": [
          "billing"
        ],
        "x-lithi-pagination": "not_applicable",
        "x-lithi-recovery": {
          "401": "provide_a_valid_owner_provisioned_credential",
          "403": "verify_account_and_required_scope_with_the_account_owner",
          "404": "verify_the_document_reference_for_this_account",
          "429": "honor_retry_after",
          "503": "retry_the_authorized_read_or_contact_billing_support"
        },
        "x-lithi-scopes": [
          "billing:read"
        ]
      }
    },
    "/v1/team-invites": {
      "post": {
        "operationId": "listTeamInvites",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "team:write"
        ]
      }
    },
    "/v1/team-members": {
      "get": {
        "operationId": "listTeamMembers",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "team:read"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "listUsage",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/UsageListOK"
          },
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "summary": "List bounded usage counters",
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "usage:read"
        ]
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "webhooks:read"
        ]
      }
    },
    "/v1/webhook-endpoints/{id}": {
      "get": {
        "operationId": "getWebhookEndpoint",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-scopes": [
          "webhooks:read"
        ]
      }
    },
    "/v1/webhook-endpoints/{id}/rotate-secret": {
      "post": {
        "operationId": "rotateWebhookSecret",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/TypedError"
          },
          "401": {
            "$ref": "#/components/responses/TypedError"
          },
          "403": {
            "$ref": "#/components/responses/TypedError"
          },
          "404": {
            "$ref": "#/components/responses/TypedError"
          },
          "409": {
            "$ref": "#/components/responses/TypedError"
          },
          "413": {
            "$ref": "#/components/responses/TypedError"
          },
          "415": {
            "$ref": "#/components/responses/TypedError"
          },
          "429": {
            "$ref": "#/components/responses/TypedError"
          },
          "500": {
            "$ref": "#/components/responses/TypedError"
          },
          "503": {
            "$ref": "#/components/responses/TypedError"
          }
        },
        "security": [
          {
            "LithiBearer": []
          }
        ],
        "tags": [
          "billing"
        ],
        "x-lithi-idempotency": "required",
        "x-lithi-scopes": [
          "webhooks:write"
        ]
      }
    }
  },
  "security": [
    {
      "LithiBearer": []
    }
  ],
  "servers": [
    {
      "url": "https://lithi.ai"
    }
  ],
  "tags": [
    {
      "description": "Canonical quote, job, batch and lifecycle operations.",
      "name": "compute"
    },
    {
      "description": "Encrypted artifact preparation and completion.",
      "name": "artifacts"
    },
    {
      "description": "Content-free usage and receipt projections.",
      "name": "billing"
    },
    {
      "description": "Translators that preserve canonical admission.",
      "name": "compatibility"
    },
    {
      "description": "MCP 2025-06-18 Streamable HTTP transport.",
      "name": "mcp"
    }
  ],
  "x-lithi-contract-source-sha256": {
    "ComputeCreditActivityV1": "8b41f4ba2be81921a0a20719952246f7cceff345bb55bf56893f603b061cae81",
    "ComputeCreditBalanceV1": "02c45bfe61bf1861c1af5202137e6d595462e18c9cd9b1f0936d5b69963a5ac0",
    "ComputeCreditFundingV1": "f260656065849e32ee8bf9884d4689dea0ab164924906cdcf3c8881ba385133f",
    "ComputeCreditPaymentObservationV1": "0d3a2c1e96f10326b1aa0ca4919df8e8d5ca7c1b965e5aa4a93bdd4aa6497280",
    "ComputeCreditPolicyV1": "15cd38818916ebaa2d9cb174525450f84634269df52d37b2f60286032892727f",
    "ComputeCreditPurchaseV1": "2da9edc94367ac52d82d2efcc4c1065869b12e5dae7853958000fdbf783644e3",
    "ComputeImpactReportV1": "90acc4bf24c90ea03dc6ad71cfb3cf712fd87276eb70085af34ff0a1118d75f4",
    "ComputeMonthlyStatementV1": "dfcfd03bd1e96aec995b1ed15a289c5ec80536fd69386afd90f17e13fa10cf40",
    "ComputePaymentInvoiceV1": "faa6da482e2d22c50b92363b6dbeb9991db4b976bacd7aad92e51cec9734c468",
    "ComputeResultBundleV1": "f67b2944c51d05b7dc1b99a32a542a262631254e27d340d4b19bef0a027bdcd6",
    "LithiBillingProfileV1": "d49c412abec6f61573a7a865d34c6568811e6de8cf5079e005c273e4faef33e3",
    "LithiContractBaseV1": "6c898de1d8a8584fb3644b1a8544b999efafa1f0632cd9fabef93217bdf4abcd",
    "LithiJobV1": "5d4351b6db74b48466ee9e7258790687f7d53710013e966b43cc54c80f8ec529",
    "LithiQuoteV1": "484959166ef008a7aa90a3daa73f99ac7573635e4dd30f310430c4e755727859",
    "SealedBlockManifestV1": "0b7440ef0526ab76eb35123b70024c404180b85a93f7645fa042d6f17a602d52"
  },
  "x-lithi-source-sha256": "2ac8dcdda9d2dc8720bc7ccff226b514965611347f54541f7665bc09f946b661"
}
