{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-build-response-schema.json",
  "title": "BuildResponse",
  "description": "Response model for a build (specific artifact/version of an app).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/revyl-apps-api-openapi.yml#/components/schemas/BuildResponse",
  "properties": {
    "app_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "App Id"
    },
    "artifact_kind": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Artifact Kind"
    },
    "artifact_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Artifact Url"
    },
    "branch_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Branch Id"
    },
    "branch_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Branch Name"
    },
    "cloud_agent_conversation": {
      "anyOf": [
        {
          "$ref": "#/$defs/CloudAgentConversationAttributionSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "deploy_url": {
      "anyOf": [
        {
          "maxLength": 2048,
          "pattern": "^https?://[^/?#@\\s]+(/[^?#\\s]*)?$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deploy Url"
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Download Url"
    },
    "id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Id"
    },
    "is_branch_pinned": {
      "default": false,
      "title": "Is Branch Pinned",
      "type": "boolean"
    },
    "metadata": {
      "additionalProperties": true,
      "title": "Metadata",
      "type": "object"
    },
    "owner": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Owner"
    },
    "package_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Package Name"
    },
    "uploaded_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Uploaded At"
    },
    "version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Version"
    },
    "was_reused": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Was Reused"
    }
  },
  "type": "object",
  "$defs": {
    "CapyCloudAgentConversationAttributionLaunch": {
      "description": "Capy launch facts displayed with an ordinary related-resource attribution.",
      "properties": {
        "conversation_origin": {
          "$ref": "#/$defs/CloudAgentConversationOrigin"
        },
        "launch_submission_status": {
          "$ref": "#/$defs/CloudAgentConversationLaunchSubmissionStatus"
        }
      },
      "required": [
        "conversation_origin",
        "launch_submission_status"
      ],
      "title": "CapyCloudAgentConversationAttributionLaunch",
      "type": "object"
    },
    "CloudAgentConversationAttributionSummary": {
      "properties": {
        "cloud_agent_provider_key": {
          "$ref": "#/$defs/CloudAgentProviderKey"
        },
        "conversation_id": {
          "format": "uuid",
          "title": "Conversation Id",
          "type": "string"
        },
        "launch": {
          "anyOf": [
            {
              "$ref": "#/$defs/CursorCloudAgentConversationAttributionLaunch"
            },
            {
              "$ref": "#/$defs/CapyCloudAgentConversationAttributionLaunch"
            },
            {
              "type": "null"
            }
          ],
          "title": "Launch"
        },
        "provider_conversation_id": {
          "anyOf": [
            {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider Conversation Id"
        },
        "provider_conversation_url": {
          "anyOf": [
            {
              "maxLength": 2048,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider Conversation Url"
        },
        "recorded_user": {
          "$ref": "#/$defs/CloudAgentConversationRecordedUser"
        }
      },
      "required": [
        "conversation_id",
        "recorded_user",
        "cloud_agent_provider_key"
      ],
      "title": "CloudAgentConversationAttributionSummary",
      "type": "object"
    },
    "CloudAgentConversationLaunchSubmissionStatus": {
      "description": "Once-only result of submitting the founding launch to its provider.",
      "enum": [
        "not_attempted",
        "dispatching",
        "accepted",
        "rejected",
        "unconfirmed"
      ],
      "title": "CloudAgentConversationLaunchSubmissionStatus",
      "type": "string"
    },
    "CloudAgentConversationOrigin": {
      "description": "Bounded origin of a cloud-agent conversation.",
      "enum": [
        "revyl_atlas_screen",
        "revyl_test_report",
        "revyl_test_report_atlas_screen",
        "revyl_device_session",
        "revyl_device_session_atlas_screen",
        "revyl_proof_of_changes",
        "external_provider"
      ],
      "title": "CloudAgentConversationOrigin",
      "type": "string"
    },
    "CloudAgentConversationRecordedUser": {
      "properties": {
        "user_id": {
          "format": "uuid",
          "title": "User Id",
          "type": "string"
        }
      },
      "required": [
        "user_id"
      ],
      "title": "CloudAgentConversationRecordedUser",
      "type": "object"
    },
    "CloudAgentProviderKey": {
      "description": "Immutable provider identity for one cloud-agent conversation.",
      "enum": [
        "cursor_cloud",
        "capy"
      ],
      "title": "CloudAgentProviderKey",
      "type": "string"
    },
    "CursorCloudAgentConversationAttributionLaunch": {
      "description": "Launch facts displayed with an ordinary related-resource attribution.",
      "properties": {
        "conversation_origin": {
          "$ref": "#/$defs/CloudAgentConversationOrigin"
        },
        "launch_connection_type": {
          "$ref": "#/$defs/CursorConnectionType"
        },
        "launch_submission_status": {
          "$ref": "#/$defs/CloudAgentConversationLaunchSubmissionStatus"
        }
      },
      "required": [
        "launch_connection_type",
        "conversation_origin",
        "launch_submission_status"
      ],
      "title": "CursorCloudAgentConversationAttributionLaunch",
      "type": "object"
    },
    "CursorConnectionType": {
      "enum": [
        "personal",
        "organization_default"
      ],
      "title": "CursorConnectionType",
      "type": "string"
    }
  }
}