{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/darwin-so/json-schema/darwin-so-get-thread-response-schema.json",
  "title": "GetThreadResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/darwin-so-openapi.json#/components/schemas/GetThreadResponse",
  "type": "object",
  "properties": {
    "thread": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
    },
    "messages": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "from": {
                "type": "string",
                "enum": [
                  "you",
                  "agent",
                  "darwin"
                ]
              },
              "content": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "text"
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32000
                        }
                      },
                      "required": [
                        "type",
                        "text"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "image"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "audio"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "video"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "file"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "accepted",
                  "delivered",
                  "failed",
                  "unknown"
                ]
              },
              "createdAt": {
                "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(?:\\.\\d+)?)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "const": "input_response"
              },
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "arguments": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "message",
              "from",
              "content",
              "status",
              "createdAt",
              "type",
              "request",
              "arguments"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "from": {
                "type": "string",
                "enum": [
                  "you",
                  "agent",
                  "darwin"
                ]
              },
              "content": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "text"
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32000
                        }
                      },
                      "required": [
                        "type",
                        "text"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "image"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "audio"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "video"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "file"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "accepted",
                  "delivered",
                  "failed",
                  "unknown"
                ]
              },
              "createdAt": {
                "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(?:\\.\\d+)?)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "const": "message"
              }
            },
            "required": [
              "message",
              "from",
              "content",
              "status",
              "createdAt",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "from": {
                "type": "string",
                "enum": [
                  "you",
                  "agent",
                  "darwin"
                ]
              },
              "content": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "text"
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32000
                        }
                      },
                      "required": [
                        "type",
                        "text"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "image"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "audio"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "video"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "file"
                        },
                        "assetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                        }
                      },
                      "required": [
                        "type",
                        "assetId"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "accepted",
                  "delivered",
                  "failed",
                  "unknown"
                ]
              },
              "createdAt": {
                "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(?:\\.\\d+)?)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "const": "result"
              },
              "data": {}
            },
            "required": [
              "message",
              "from",
              "content",
              "status",
              "createdAt",
              "type"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "errors": {
      "description": "Error events in this page. Retryable does not authorize replaying an accepted effect or payment.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "retryable": {
            "type": "boolean"
          },
          "action": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "createdAt": {
            "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(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "event",
          "code",
          "retryable",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "capability": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "request": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_confirmation",
              "queued",
              "running",
              "waiting",
              "reconciling",
              "succeeded",
              "failed",
              "cancelled",
              "withdrawn"
            ]
          },
          "cancellationRequested": {
            "type": "boolean"
          },
          "accepted": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "capability",
          "request",
          "status",
          "cancellationRequested"
        ],
        "additionalProperties": false
      }
    },
    "requests": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "action": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "resolved",
                  "expired",
                  "cancelled",
                  "settled",
                  "failed",
                  "voided",
                  "partially_refunded",
                  "reversal_pending",
                  "reversal_failed",
                  "disputed",
                  "refunded"
                ]
              },
              "type": {
                "type": "string",
                "const": "input_request"
              },
              "capability": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "inputSchema": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "inputSchemaResources": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "expiresAt": {
                "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(?:\\.\\d+)?)?(?:Z))$"
              }
            },
            "required": [
              "request",
              "action",
              "status",
              "type",
              "capability",
              "inputSchema",
              "expiresAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "action": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "resolved",
                  "expired",
                  "cancelled",
                  "settled",
                  "failed",
                  "voided",
                  "partially_refunded",
                  "reversal_pending",
                  "reversal_failed",
                  "disputed",
                  "refunded"
                ]
              },
              "type": {
                "type": "string",
                "const": "action_request"
              },
              "capability": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "arguments": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "additionalProperties": {}
              },
              "account": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            },
            "required": [
              "request",
              "action",
              "status",
              "type",
              "capability",
              "arguments"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "action": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "resolved",
                  "expired",
                  "cancelled",
                  "settled",
                  "failed",
                  "voided",
                  "partially_refunded",
                  "reversal_pending",
                  "reversal_failed",
                  "disputed",
                  "refunded"
                ]
              },
              "type": {
                "type": "string",
                "const": "approval_request"
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000
              },
              "expiresAt": {
                "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(?:\\.\\d+)?)?(?:Z))$"
              },
              "capability": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "arguments": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "additionalProperties": {}
              },
              "account": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            },
            "required": [
              "request",
              "action",
              "status",
              "type",
              "reason",
              "expiresAt",
              "capability",
              "arguments"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "action": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "resolved",
                  "expired",
                  "cancelled",
                  "settled",
                  "failed",
                  "voided",
                  "partially_refunded",
                  "reversal_pending",
                  "reversal_failed",
                  "disputed",
                  "refunded"
                ]
              },
              "type": {
                "type": "string",
                "const": "authentication_request"
              },
              "targetAgent": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "authenticationType": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*$"
              },
              "resource": {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              "scopes": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "account": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            },
            "required": [
              "request",
              "action",
              "status",
              "type",
              "targetAgent",
              "authenticationType",
              "resource",
              "scopes"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "action": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "resolved",
                  "expired",
                  "cancelled",
                  "settled",
                  "failed",
                  "voided",
                  "partially_refunded",
                  "reversal_pending",
                  "reversal_failed",
                  "disputed",
                  "refunded"
                ]
              },
              "type": {
                "type": "string",
                "const": "authentication_required"
              },
              "targetAgent": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "scopes": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "account": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "expiresAt": {
                "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(?:\\.\\d+)?)?(?:Z))$"
              }
            },
            "required": [
              "request",
              "action",
              "status",
              "type",
              "targetAgent",
              "scopes"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "action": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "resolved",
                  "expired",
                  "cancelled",
                  "settled",
                  "failed",
                  "voided",
                  "partially_refunded",
                  "reversal_pending",
                  "reversal_failed",
                  "disputed",
                  "refunded"
                ]
              },
              "type": {
                "type": "string",
                "const": "payment_request"
              },
              "amountMinor": {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,17}$"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "payee": {
                "type": "object",
                "properties": {
                  "agent": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "agent",
                  "name"
                ],
                "additionalProperties": false
              },
              "acceptedMethods": {
                "minItems": 1,
                "maxItems": 8,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "card",
                    "bank",
                    "hosted_checkout",
                    "darwin_wallet",
                    "mpp",
                    "x402",
                    "ucp",
                    "acp"
                  ]
                }
              },
              "expiresAt": {
                "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(?:\\.\\d+)?)?(?:Z))$"
              }
            },
            "required": [
              "request",
              "action",
              "status",
              "type",
              "amountMinor",
              "currency",
              "payee",
              "acceptedMethods",
              "expiresAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "action": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "resolved",
                  "expired",
                  "cancelled",
                  "settled",
                  "failed",
                  "voided",
                  "partially_refunded",
                  "reversal_pending",
                  "reversal_failed",
                  "disputed",
                  "refunded"
                ]
              },
              "type": {
                "type": "string",
                "const": "completion_request"
              },
              "result": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
              }
            },
            "required": [
              "request",
              "action",
              "status",
              "type",
              "result"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "cursor": {
      "type": "string",
      "minLength": 3,
      "maxLength": 200,
      "pattern": "^.+:(0|[1-9][0-9]*)$"
    },
    "hasMore": {
      "type": "boolean"
    },
    "archived": {
      "type": "boolean"
    },
    "needsAttention": {
      "type": "boolean"
    }
  },
  "required": [
    "thread",
    "messages",
    "actions",
    "requests",
    "cursor",
    "hasMore",
    "archived",
    "needsAttention"
  ],
  "additionalProperties": false
}