{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-atlas-annotation-comment-schema.json",
  "title": "AtlasAnnotationComment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/revyl-app-atlas-api-openapi.yml#/components/schemas/AtlasAnnotationComment",
  "properties": {
    "agent_tool_mentions": {
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/AtlasAnnotationCursorLaunchMention"
          },
          {
            "$ref": "#/$defs/AtlasAnnotationCursorFollowupMention"
          },
          {
            "$ref": "#/$defs/AtlasAnnotationCapyLaunchMention"
          },
          {
            "$ref": "#/$defs/AtlasAnnotationCapyFollowupMention"
          }
        ]
      },
      "title": "Agent Tool Mentions",
      "type": "array"
    },
    "attachments": {
      "items": {
        "$ref": "#/$defs/AtlasAttachment"
      },
      "title": "Attachments",
      "type": "array"
    },
    "author": {
      "$ref": "#/$defs/AtlasAnnotationAuthor"
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Plain-text body; null when the comment is a tombstone.",
      "title": "Body"
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "deleted": {
      "default": false,
      "title": "Deleted",
      "type": "boolean"
    },
    "edited_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Edited At"
    },
    "id": {
      "title": "Id",
      "type": "string"
    },
    "mentions": {
      "items": {
        "$ref": "#/$defs/AtlasAnnotationMention"
      },
      "title": "Mentions",
      "type": "array"
    },
    "thread_id": {
      "title": "Thread Id",
      "type": "string"
    },
    "version": {
      "default": 1,
      "minimum": 1.0,
      "title": "Version",
      "type": "integer"
    }
  },
  "required": [
    "id",
    "thread_id",
    "author",
    "created_at"
  ],
  "type": "object",
  "$defs": {
    "AtlasAnnotationAgentKind": {
      "enum": [
        "codex",
        "claude_code",
        "cursor",
        "capy",
        "revyl",
        "other"
      ],
      "title": "AtlasAnnotationAgentKind",
      "type": "string"
    },
    "AtlasAnnotationAuthor": {
      "description": "Author identity for authenticated org members.\n\n``user_id`` is the authenticated PropelAuth user id (authorization and\naudit key); ``display_name``/``avatar_url`` are snapshots taken at write\ntime so attribution survives membership changes.",
      "properties": {
        "agent_kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/AtlasAnnotationAgentKind"
            },
            {
              "type": "null"
            }
          ]
        },
        "avatar_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatar Url"
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display Name"
        },
        "user_id": {
          "title": "User Id",
          "type": "string"
        }
      },
      "required": [
        "user_id"
      ],
      "title": "AtlasAnnotationAuthor",
      "type": "object"
    },
    "AtlasAnnotationCapyAdjustSettingsAction": {
      "additionalProperties": false,
      "properties": {
        "recovery_kind": {
          "const": "adjust_settings",
          "title": "Recovery Kind",
          "type": "string"
        },
        "recovery_revision": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Recovery Revision",
          "type": "string"
        },
        "settings": {
          "$ref": "#/$defs/AtlasAnnotationCapyCloudAgentLaunchSettings"
        }
      },
      "required": [
        "recovery_kind",
        "recovery_revision",
        "settings"
      ],
      "title": "AtlasAnnotationCapyAdjustSettingsAction",
      "type": "object"
    },
    "AtlasAnnotationCapyCloudAgentLaunchSettings": {
      "additionalProperties": false,
      "properties": {
        "capy_project_id": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Capy Project Id",
          "type": "string"
        },
        "connection_id": {
          "format": "uuid",
          "title": "Connection Id",
          "type": "string"
        },
        "connection_type": {
          "$ref": "#/$defs/CapyConnectionScope"
        },
        "credential_revision": {
          "minimum": 1.0,
          "title": "Credential Revision",
          "type": "integer"
        },
        "device_target": {
          "anyOf": [
            {
              "$ref": "#/$defs/DevicePair"
            },
            {
              "type": "null"
            }
          ]
        },
        "launch_env_var_ids": {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "maxItems": 50,
          "title": "Launch Env Var Ids",
          "type": "array"
        },
        "model_id": {
          "anyOf": [
            {
              "enum": [
                "openai/gpt-6-luna",
                "openai/gpt-6.1-sol",
                "anthropic/claude-opus-5-5",
                "anthropic/claude-sonnet-5-5"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Id"
        },
        "repository_url": {
          "maxLength": 2048,
          "minLength": 1,
          "title": "Repository Url",
          "type": "string"
        }
      },
      "required": [
        "connection_type",
        "connection_id",
        "credential_revision",
        "capy_project_id",
        "repository_url"
      ],
      "title": "AtlasAnnotationCapyCloudAgentLaunchSettings",
      "type": "object"
    },
    "AtlasAnnotationCapyConnectAction": {
      "additionalProperties": false,
      "properties": {
        "recovery_kind": {
          "const": "connect_capy",
          "title": "Recovery Kind",
          "type": "string"
        }
      },
      "required": [
        "recovery_kind"
      ],
      "title": "AtlasAnnotationCapyConnectAction",
      "type": "object"
    },
    "AtlasAnnotationCapyFollowupDelivery": {
      "additionalProperties": false,
      "properties": {
        "delivery_message": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Delivery Message"
        },
        "delivery_status": {
          "$ref": "#/$defs/CloudAgentConversationLaunchSubmissionStatus"
        },
        "recovery_actions": {
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/AtlasAnnotationCapyConnectAction"
              },
              {
                "$ref": "#/$defs/AtlasAnnotationCursorRetryAction"
              }
            ]
          },
          "title": "Recovery Actions",
          "type": "array"
        }
      },
      "required": [
        "delivery_status",
        "recovery_actions"
      ],
      "title": "AtlasAnnotationCapyFollowupDelivery",
      "type": "object"
    },
    "AtlasAnnotationCapyFollowupMention": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "capy",
          "title": "Agent Kind",
          "type": "string"
        },
        "delivery": {
          "$ref": "#/$defs/AtlasAnnotationCapyFollowupDelivery"
        },
        "dispatch_kind": {
          "const": "cloud_agent_follow_up",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "display_name": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Display Name",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "display_name",
        "delivery"
      ],
      "title": "AtlasAnnotationCapyFollowupMention",
      "type": "object"
    },
    "AtlasAnnotationCapyLaunchDelivery": {
      "additionalProperties": false,
      "properties": {
        "delivery_message": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Delivery Message"
        },
        "delivery_status": {
          "$ref": "#/$defs/CloudAgentConversationLaunchSubmissionStatus"
        },
        "launch_settings_summary": {
          "maxLength": 2000,
          "title": "Launch Settings Summary",
          "type": "string"
        },
        "recovery_actions": {
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/AtlasAnnotationCapyConnectAction"
              },
              {
                "$ref": "#/$defs/AtlasAnnotationCursorRetryAction"
              },
              {
                "$ref": "#/$defs/AtlasAnnotationCapyAdjustSettingsAction"
              }
            ]
          },
          "title": "Recovery Actions",
          "type": "array"
        }
      },
      "required": [
        "delivery_status",
        "launch_settings_summary",
        "recovery_actions"
      ],
      "title": "AtlasAnnotationCapyLaunchDelivery",
      "type": "object"
    },
    "AtlasAnnotationCapyLaunchMention": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "capy",
          "title": "Agent Kind",
          "type": "string"
        },
        "delivery": {
          "$ref": "#/$defs/AtlasAnnotationCapyLaunchDelivery"
        },
        "dispatch_kind": {
          "const": "cloud_agent_launch",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "display_name": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Display Name",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "display_name",
        "delivery"
      ],
      "title": "AtlasAnnotationCapyLaunchMention",
      "type": "object"
    },
    "AtlasAnnotationCursorAdjustSettingsAction": {
      "additionalProperties": false,
      "properties": {
        "recovery_kind": {
          "const": "adjust_settings",
          "title": "Recovery Kind",
          "type": "string"
        },
        "recovery_revision": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Recovery Revision",
          "type": "string"
        },
        "settings": {
          "$ref": "#/$defs/AtlasAnnotationCursorCloudAgentLaunchSettings"
        }
      },
      "required": [
        "recovery_kind",
        "recovery_revision",
        "settings"
      ],
      "title": "AtlasAnnotationCursorAdjustSettingsAction",
      "type": "object"
    },
    "AtlasAnnotationCursorCloudAgentLaunchSettings": {
      "additionalProperties": false,
      "properties": {
        "auto_create_pr": {
          "default": false,
          "title": "Auto Create Pr",
          "type": "boolean"
        },
        "connection_id": {
          "format": "uuid",
          "title": "Connection Id",
          "type": "string"
        },
        "connection_type": {
          "$ref": "#/$defs/CursorConnectionType"
        },
        "credential_revision": {
          "minimum": 1.0,
          "title": "Credential Revision",
          "type": "integer"
        },
        "device_target": {
          "anyOf": [
            {
              "$ref": "#/$defs/DevicePair"
            },
            {
              "type": "null"
            }
          ]
        },
        "launch_env_var_ids": {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "maxItems": 50,
          "title": "Launch Env Var Ids",
          "type": "array"
        },
        "model_id": {
          "anyOf": [
            {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Id"
        },
        "repository_url": {
          "maxLength": 2048,
          "minLength": 1,
          "title": "Repository Url",
          "type": "string"
        },
        "starting_point": {
          "anyOf": [
            {
              "maxLength": 2048,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Starting Point"
        },
        "starting_point_type": {
          "$ref": "#/$defs/CursorCloudAgentStartingPointType"
        }
      },
      "required": [
        "connection_type",
        "connection_id",
        "credential_revision",
        "repository_url",
        "starting_point_type"
      ],
      "title": "AtlasAnnotationCursorCloudAgentLaunchSettings",
      "type": "object"
    },
    "AtlasAnnotationCursorConnectAction": {
      "additionalProperties": false,
      "properties": {
        "recovery_kind": {
          "const": "connect_cursor",
          "title": "Recovery Kind",
          "type": "string"
        }
      },
      "required": [
        "recovery_kind"
      ],
      "title": "AtlasAnnotationCursorConnectAction",
      "type": "object"
    },
    "AtlasAnnotationCursorFollowupDelivery": {
      "additionalProperties": false,
      "properties": {
        "delivery_message": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Delivery Message"
        },
        "delivery_status": {
          "$ref": "#/$defs/CloudAgentConversationLaunchSubmissionStatus"
        },
        "recovery_actions": {
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/AtlasAnnotationCursorConnectAction"
              },
              {
                "$ref": "#/$defs/AtlasAnnotationCursorRetryAction"
              }
            ]
          },
          "title": "Recovery Actions",
          "type": "array"
        }
      },
      "required": [
        "delivery_status",
        "recovery_actions"
      ],
      "title": "AtlasAnnotationCursorFollowupDelivery",
      "type": "object"
    },
    "AtlasAnnotationCursorFollowupMention": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "cursor",
          "title": "Agent Kind",
          "type": "string"
        },
        "delivery": {
          "$ref": "#/$defs/AtlasAnnotationCursorFollowupDelivery"
        },
        "dispatch_kind": {
          "const": "cloud_agent_follow_up",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "display_name": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Display Name",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "display_name",
        "delivery"
      ],
      "title": "AtlasAnnotationCursorFollowupMention",
      "type": "object"
    },
    "AtlasAnnotationCursorLaunchAnotherAction": {
      "additionalProperties": false,
      "properties": {
        "recovery_kind": {
          "const": "launch_another",
          "title": "Recovery Kind",
          "type": "string"
        },
        "recovery_revision": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Recovery Revision",
          "type": "string"
        }
      },
      "required": [
        "recovery_kind",
        "recovery_revision"
      ],
      "title": "AtlasAnnotationCursorLaunchAnotherAction",
      "type": "object"
    },
    "AtlasAnnotationCursorLaunchDelivery": {
      "additionalProperties": false,
      "properties": {
        "delivery_message": {
          "anyOf": [
            {
              "maxLength": 2000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Delivery Message"
        },
        "delivery_status": {
          "$ref": "#/$defs/CloudAgentConversationLaunchSubmissionStatus"
        },
        "launch_settings_summary": {
          "maxLength": 2000,
          "title": "Launch Settings Summary",
          "type": "string"
        },
        "recovery_actions": {
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/AtlasAnnotationCursorConnectAction"
              },
              {
                "$ref": "#/$defs/AtlasAnnotationCursorRetryAction"
              },
              {
                "$ref": "#/$defs/AtlasAnnotationCursorAdjustSettingsAction"
              },
              {
                "$ref": "#/$defs/AtlasAnnotationCursorLaunchAnotherAction"
              }
            ]
          },
          "title": "Recovery Actions",
          "type": "array"
        }
      },
      "required": [
        "delivery_status",
        "launch_settings_summary",
        "recovery_actions"
      ],
      "title": "AtlasAnnotationCursorLaunchDelivery",
      "type": "object"
    },
    "AtlasAnnotationCursorLaunchMention": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "cursor",
          "title": "Agent Kind",
          "type": "string"
        },
        "delivery": {
          "$ref": "#/$defs/AtlasAnnotationCursorLaunchDelivery"
        },
        "dispatch_kind": {
          "const": "cloud_agent_launch",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "display_name": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Display Name",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "display_name",
        "delivery"
      ],
      "title": "AtlasAnnotationCursorLaunchMention",
      "type": "object"
    },
    "AtlasAnnotationCursorRetryAction": {
      "additionalProperties": false,
      "properties": {
        "recovery_kind": {
          "const": "retry",
          "title": "Recovery Kind",
          "type": "string"
        },
        "recovery_revision": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Recovery Revision",
          "type": "string"
        }
      },
      "required": [
        "recovery_kind",
        "recovery_revision"
      ],
      "title": "AtlasAnnotationCursorRetryAction",
      "type": "object"
    },
    "AtlasAnnotationMention": {
      "properties": {
        "display_name": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Display Name",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        },
        "user_id": {
          "maxLength": 200,
          "minLength": 1,
          "title": "User Id",
          "type": "string"
        }
      },
      "required": [
        "user_id",
        "start_utf16",
        "end_utf16",
        "display_name"
      ],
      "title": "AtlasAnnotationMention",
      "type": "object"
    },
    "AtlasAttachment": {
      "properties": {
        "byte_size": {
          "exclusiveMinimum": 0.0,
          "title": "Byte Size",
          "type": "integer"
        },
        "content_type": {
          "title": "Content Type",
          "type": "string"
        },
        "filename": {
          "title": "Filename",
          "type": "string"
        },
        "height": {
          "anyOf": [
            {
              "exclusiveMinimum": 0.0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height"
        },
        "id": {
          "title": "Id",
          "type": "string"
        },
        "render_tier": {
          "$ref": "#/$defs/AtlasAttachmentTier"
        },
        "url": {
          "title": "Url",
          "type": "string"
        },
        "url_expires_at": {
          "format": "date-time",
          "title": "Url Expires At",
          "type": "string"
        },
        "width": {
          "anyOf": [
            {
              "exclusiveMinimum": 0.0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width"
        }
      },
      "required": [
        "id",
        "filename",
        "content_type",
        "byte_size",
        "render_tier",
        "url",
        "url_expires_at"
      ],
      "title": "AtlasAttachment",
      "type": "object"
    },
    "AtlasAttachmentTier": {
      "enum": [
        "image",
        "video",
        "pdf",
        "download"
      ],
      "title": "AtlasAttachmentTier",
      "type": "string"
    },
    "CapyConnectionScope": {
      "enum": [
        "organization_default",
        "project"
      ],
      "title": "CapyConnectionScope",
      "type": "string"
    },
    "CloudAgentConversationLaunchSubmissionStatus": {
      "description": "Once-only result of submitting the founding launch to its provider.",
      "enum": [
        "not_attempted",
        "dispatching",
        "accepted",
        "rejected",
        "unconfirmed"
      ],
      "title": "CloudAgentConversationLaunchSubmissionStatus",
      "type": "string"
    },
    "CursorCloudAgentStartingPointType": {
      "enum": [
        "branch",
        "commit",
        "pull_request"
      ],
      "title": "CursorCloudAgentStartingPointType",
      "type": "string"
    },
    "CursorConnectionType": {
      "enum": [
        "personal",
        "organization_default"
      ],
      "title": "CursorConnectionType",
      "type": "string"
    },
    "DevicePair": {
      "description": "A device model + runtime combination.",
      "properties": {
        "model": {
          "description": "Device model name (e.g. 'iPhone 16')",
          "title": "Model",
          "type": "string"
        },
        "runtime": {
          "description": "OS runtime version (e.g. 'iOS 18.5')",
          "title": "Runtime",
          "type": "string"
        }
      },
      "required": [
        "model",
        "runtime"
      ],
      "title": "DevicePair",
      "type": "object"
    }
  }
}