{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-atlas-annotation-reply-request-schema.json",
  "title": "AtlasAnnotationReplyRequest",
  "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/AtlasAnnotationReplyRequest",
  "additionalProperties": false,
  "properties": {
    "agent_tool_mentions": {
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/AtlasAnnotationCursorLaunchMentionInput"
          },
          {
            "$ref": "#/$defs/AtlasAnnotationCursorFollowupMentionInput"
          },
          {
            "$ref": "#/$defs/AtlasAnnotationCapyLaunchMentionInput"
          },
          {
            "$ref": "#/$defs/AtlasAnnotationCapyFollowupMentionInput"
          }
        ]
      },
      "maxItems": 1,
      "title": "Agent Tool Mentions",
      "type": "array"
    },
    "attachment_ids": {
      "items": {
        "format": "uuid",
        "type": "string"
      },
      "maxItems": 4,
      "title": "Attachment Ids",
      "type": "array"
    },
    "body": {
      "maxLength": 10000,
      "minLength": 1,
      "title": "Body",
      "type": "string"
    },
    "client_request_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Client-generated UUID making retried submissions idempotent.",
      "title": "Client Request Id"
    },
    "mentions": {
      "items": {
        "$ref": "#/$defs/AtlasAnnotationMentionInput"
      },
      "maxItems": 10,
      "title": "Mentions",
      "type": "array"
    }
  },
  "required": [
    "body"
  ],
  "type": "object",
  "$defs": {
    "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"
    },
    "AtlasAnnotationCapyFollowupMentionInput": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "capy",
          "title": "Agent Kind",
          "type": "string"
        },
        "dispatch_kind": {
          "const": "cloud_agent_follow_up",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        },
        "user_prompt": {
          "maxLength": 4000,
          "minLength": 1,
          "title": "User Prompt",
          "type": "string"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "user_prompt"
      ],
      "title": "AtlasAnnotationCapyFollowupMentionInput",
      "type": "object"
    },
    "AtlasAnnotationCapyLaunchMentionInput": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "capy",
          "title": "Agent Kind",
          "type": "string"
        },
        "dispatch_kind": {
          "const": "cloud_agent_launch",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "settings": {
          "$ref": "#/$defs/AtlasAnnotationCapyCloudAgentLaunchSettings"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        },
        "user_prompt": {
          "maxLength": 4000,
          "minLength": 1,
          "title": "User Prompt",
          "type": "string"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "user_prompt",
        "settings"
      ],
      "title": "AtlasAnnotationCapyLaunchMentionInput",
      "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"
    },
    "AtlasAnnotationCursorFollowupMentionInput": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "cursor",
          "title": "Agent Kind",
          "type": "string"
        },
        "dispatch_kind": {
          "const": "cloud_agent_follow_up",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        },
        "user_prompt": {
          "maxLength": 4000,
          "minLength": 1,
          "title": "User Prompt",
          "type": "string"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "user_prompt"
      ],
      "title": "AtlasAnnotationCursorFollowupMentionInput",
      "type": "object"
    },
    "AtlasAnnotationCursorLaunchMentionInput": {
      "additionalProperties": false,
      "properties": {
        "agent_kind": {
          "const": "cursor",
          "title": "Agent Kind",
          "type": "string"
        },
        "dispatch_kind": {
          "const": "cloud_agent_launch",
          "title": "Dispatch Kind",
          "type": "string"
        },
        "end_utf16": {
          "exclusiveMinimum": 0.0,
          "title": "End Utf16",
          "type": "integer"
        },
        "settings": {
          "$ref": "#/$defs/AtlasAnnotationCursorCloudAgentLaunchSettings"
        },
        "start_utf16": {
          "minimum": 0.0,
          "title": "Start Utf16",
          "type": "integer"
        },
        "user_prompt": {
          "maxLength": 4000,
          "minLength": 1,
          "title": "User Prompt",
          "type": "string"
        }
      },
      "required": [
        "start_utf16",
        "end_utf16",
        "agent_kind",
        "dispatch_kind",
        "user_prompt",
        "settings"
      ],
      "title": "AtlasAnnotationCursorLaunchMentionInput",
      "type": "object"
    },
    "AtlasAnnotationMentionInput": {
      "properties": {
        "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"
      ],
      "title": "AtlasAnnotationMentionInput",
      "type": "object"
    },
    "CapyConnectionScope": {
      "enum": [
        "organization_default",
        "project"
      ],
      "title": "CapyConnectionScope",
      "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"
    }
  }
}