{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "const": "owp-docs-draft/0.1",
      "description": "Draft discriminator. This value is not OWP v0.4 conformance or an alpha wire profile."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z))$",
      "description": "Draft: UTC date-time, second precision, ending in Z."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z))$",
      "description": "Draft: UTC date-time, second precision, ending in Z."
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 500
      },
      "description": "Source metadata dictionary; draft limits keys to 40 and values to 500 characters. Never put secrets here."
    },
    "id": {
      "type": "string",
      "pattern": "^sttl_[A-Za-z0-9]{8,64}$",
      "description": "Source defines the prefix; this draft chooses an 8–64 character alphanumeric suffix."
    },
    "job_id": {
      "type": "string",
      "pattern": "^job_[A-Za-z0-9]{8,64}$",
      "description": "Source defines the prefix; this draft chooses an 8–64 character alphanumeric suffix."
    },
    "output_id": {
      "type": "string",
      "pattern": "^out_[A-Za-z0-9]{8,64}$",
      "description": "Source defines the prefix; this draft chooses an 8–64 character alphanumeric suffix."
    },
    "state": {
      "type": "string",
      "enum": [
        "SETTLEMENT_PROPOSED",
        "SETTLED",
        "DISPUTE"
      ]
    },
    "amount": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "const": "USD",
          "description": "Draft examples support USD only. Multi-currency and exponent rules require adoption."
        },
        "amount": {
          "type": "string",
          "pattern": "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
          "description": "Draft exact decimal USD string, e.g. 25.00. Never convert through floating point for accounting."
        }
      },
      "required": [
        "currency",
        "amount"
      ],
      "additionalProperties": false,
      "description": "Proposed serialization only; the source does not specify a canonical money representation."
    },
    "dispute_deadline": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z))$",
      "description": "Draft: UTC date-time, second precision, ending in Z."
    }
  },
  "required": [
    "profile",
    "created_at",
    "updated_at",
    "metadata",
    "id",
    "job_id",
    "output_id",
    "state",
    "amount",
    "dispute_deadline"
  ],
  "additionalProperties": false,
  "description": "Proposed coordinator-only production record. Evaluation skips payment. No agent-callable settlement API.",
  "title": "Settlement",
  "$comment": "owp-docs-draft/0.1: proposed documentation shape only. Source: https://app.notion.com/p/338ed9cb3201819d96e9fc7b8e88594a §3 · §9.3. No production conformance claim."
}
