{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "PlaygroundConfigFile",
  "description": "Serializable model for a playground's `apg.toml` file.",
  "type": "object",
  "properties": {
    "create_mode": {
      "description": "Optional strategy for creating the temporary playground working tree.",
      "anyOf": [
        {
          "$ref": "#/$defs/CreateMode"
        },
        {
          "type": "null"
        }
      ]
    },
    "default_agent": {
      "description": "Optional default agent id override.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Human-readable description shown in listing output.",
      "type": "string"
    },
    "load_env": {
      "description": "Optional flag controlling `.env` loading in playground runs.",
      "type": [
        "boolean",
        "null"
      ]
    }
  },
  "required": [
    "description"
  ],
  "$defs": {
    "CreateMode": {
      "description": "Strategy used to materialize playground contents into a temporary directory.",
      "oneOf": [
        {
          "description": "Recursively copy files into the temporary directory.",
          "type": "string",
          "const": "copy"
        },
        {
          "description": "Create symlinks from the temporary directory back to the playground.",
          "type": "string",
          "const": "symlink"
        },
        {
          "description": "Recreate directories and hard-link regular files into the temporary directory.",
          "type": "string",
          "const": "hardlink"
        }
      ]
    }
  }
}