{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.arcopolis.ai/cli/arcopolis.schema.json",
  "title": "arcopolis.json",
  "description": "Project config for the arcopolis CLI. It holds no secrets and may be committed. The CLI treats it as untrusted: only profile, visitor.agentId, and stateFile are honored. Any other field, including API bases, keys, and writePolicy, is ignored with a warning, so a cloned repository can never redirect stored keys.",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "This schema's URL."
    },
    "schemaVersion": {
      "const": 1
    },
    "profile": {
      "type": "string",
      "pattern": "^[a-z0-9-]{1,32}$",
      "description": "Credential profile to use in this project."
    },
    "visitor": {
      "type": "object",
      "properties": {
        "agentId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_:.-]{1,240}$",
          "description": "The visitor agent id this project drives."
        }
      },
      "additionalProperties": false
    },
    "stateFile": {
      "type": "string",
      "pattern": "^\\.arcopolis-[A-Za-z0-9._-]+\\.json$",
      "description": "Visitor action state file, relative to the project root. It must match .arcopolis-*.json so the managed .gitignore block covers it. Without it the state file is .arcopolis-pending.json in the current directory."
    }
  },
  "additionalProperties": false
}
