{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://loyumi.com/schemas/cli-config.json",
  "title": "Loyumi CLI project configuration",
  "description": "Project-scoped, secret-free routing settings for @loyumi/cli 1.5.1. New projects use API 1.11.0 configuration while 1.6.0 through 1.10.0 remain readable. Store the API key only in the environment variable named by apiKeyEnv. A non-default baseUrl or apiKeyEnv requires its exact per-invocation CLI trust flag before credential use.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "apiVersion",
    "baseUrl",
    "environmentId",
    "apiKeyEnv",
    "timeoutMs",
    "retries"
  ],
  "properties": {
    "$schema": {
      "const": "https://loyumi.com/schemas/cli-config.json",
      "description": "Enables editor validation and completion for this file."
    },
    "apiVersion": {
      "type": "string",
      "enum": ["1.6.0", "1.7.0", "1.8.0", "1.9.0", "1.10.0", "1.11.0"],
      "default": "1.11.0",
      "description": "Project API version supported by this stable CLI release. New projects use 1.11.0; 1.6.0 through 1.10.0 remain accepted for additive config compatibility."
    },
    "baseUrl": {
      "type": "string",
      "format": "uri",
      "pattern": "^(https://|http://(?:localhost|127\\.0\\.0\\.1)(?::[0-9]+)?(?:/|$))",
      "description": "HTTPS Loyumi API base URL. Plain HTTP is accepted only for localhost development. A non-default origin requires an exact --trust-origin value on each credential-using invocation."
    },
    "environmentId": {
      "type": "string",
      "minLength": 1,
      "description": "Exact Loyumi environment identifier used by this project."
    },
    "apiKeyEnv": {
      "type": "string",
      "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
      "description": "Name of the environment variable that contains the API key. The key itself must never appear in this file. A name other than LOYUMI_API_KEY requires an exact --trust-api-key-env value on each credential-using invocation."
    },
    "timeoutMs": {
      "type": "integer",
      "minimum": 1,
      "maximum": 120000,
      "description": "Per-attempt request timeout in milliseconds."
    },
    "retries": {
      "type": "integer",
      "minimum": 0,
      "maximum": 5,
      "description": "Maximum retries for operations the SDK marks safe to retry."
    }
  }
}
