{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://brutebrothers.com/agent-intake-schema.json",
  "title": "Brute Brothers Agent Intake Draft",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "source",
    "agent",
    "consent",
    "customer",
    "case",
    "safety"
  ],
  "properties": {
    "version": {
      "const": 1
    },
    "source": {
      "const": "agent_intake"
    },
    "agent": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 300
        },
        "platform": {
          "type": "string",
          "maxLength": 300
        },
        "instructions_version": {
          "type": "string",
          "const": "agent-intake-v1"
        }
      }
    },
    "consent": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "user_confirmed_share"
      ],
      "properties": {
        "user_confirmed_share": {
          "const": true
        },
        "confirmation_text": {
          "type": "string",
          "maxLength": 1000
        },
        "confirmed_at": {
          "type": "string",
          "maxLength": 300
        },
        "prompt_version": {
          "type": "string",
          "maxLength": 300
        }
      }
    },
    "customer": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "email",
        "phone"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 300
        },
        "email": {
          "type": "string",
          "format": "email",
          "maxLength": 300
        },
        "phone": {
          "type": "string",
          "maxLength": 40,
          "pattern": "^\\+[1-9][0-9 .()\\-]{6,38}$",
          "description": "Full phone number including country prefix, for example +1 555 123 4567."
        },
        "timezone": {
          "type": "string",
          "maxLength": 300
        }
      }
    },
    "case": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "problem_summary"
      ],
      "properties": {
        "issue_type": {
          "enum": [
            "wallet_password_recovery",
            "partial_seed_recovery",
            "wallet_file_recovery",
            "ethereum_presale_recovery",
            "wallet_security_review",
            "other"
          ]
        },
        "wallet_type": {
          "enum": [
            "bitcoin_core",
            "blockchain_com",
            "electrum",
            "multibit",
            "metamask",
            "mist",
            "ethereum_presale",
            "coinbase_wallet",
            "phantom",
            "mycelium",
            "armory",
            "toast",
            "seed_phrase",
            "unknown",
            "other"
          ]
        },
        "assets": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 300
          }
        },
        "created_year": {
          "type": "string",
          "maxLength": 20
        },
        "approximate_value": {
          "type": "string",
          "maxLength": 300
        },
        "funds_visible_on_chain": {
          "type": "string",
          "maxLength": 300
        },
        "public_addresses_or_txids": {
          "type": "string",
          "maxLength": 5000
        },
        "problem_summary": {
          "type": "string",
          "minLength": 20,
          "maxLength": 5000
        },
        "materials_available": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 300
          }
        },
        "previous_attempts": {
          "type": "string",
          "maxLength": 5000
        },
        "urgency": {
          "type": "string",
          "maxLength": 300
        },
        "additional_notes": {
          "type": "string",
          "maxLength": 5000
        }
      }
    },
    "safety": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "contains_seed_phrase",
        "contains_private_key",
        "contains_wallet_password",
        "contains_wallet_file"
      ],
      "properties": {
        "contains_seed_phrase": {
          "const": false
        },
        "contains_private_key": {
          "const": false
        },
        "contains_wallet_password": {
          "const": false
        },
        "contains_wallet_file": {
          "const": false
        }
      }
    }
  }
}