{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/h2o-ai/main/json-schema/h2o-ai-agent-server-directory-stats-schema.json",
  "title": "AgentServerDirectoryStats",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/h2o-ai-chat-api-openapi.yml#/components/schemas/AgentServerDirectoryStats",
  "required": [
    "id",
    "object",
    "size_bytes",
    "size_human_readable",
    "file_count",
    "directory_count",
    "created_timestamp",
    "modified_timestamp",
    "created_date",
    "modified_date",
    "is_empty",
    "top_level_contents",
    "owner",
    "permissions"
  ],
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string"
    },
    "size_bytes": {
      "type": "integer"
    },
    "size_human_readable": {
      "type": "string"
    },
    "file_count": {
      "type": "integer"
    },
    "directory_count": {
      "type": "integer"
    },
    "created_timestamp": {
      "type": "number"
    },
    "modified_timestamp": {
      "type": "number"
    },
    "created_date": {
      "type": "string"
    },
    "modified_date": {
      "type": "string"
    },
    "is_empty": {
      "type": "boolean"
    },
    "top_level_contents": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "owner": {
      "type": "string"
    },
    "permissions": {
      "type": "string"
    },
    "files": {
      "description": "Only populated when detail_level > 0",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentServerDirectoryFileStats"
      }
    }
  },
  "$defs": {
    "AgentServerDirectoryFileStats": {
      "required": [
        "name",
        "path",
        "size_bytes",
        "size_human_readable",
        "created_timestamp",
        "modified_timestamp",
        "created_date",
        "modified_date",
        "is_directory",
        "owner",
        "permissions"
      ],
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "name": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "size_bytes": {
          "type": "integer"
        },
        "size_human_readable": {
          "type": "string"
        },
        "created_timestamp": {
          "type": "number"
        },
        "modified_timestamp": {
          "type": "number"
        },
        "created_date": {
          "type": "string"
        },
        "modified_date": {
          "type": "string"
        },
        "is_directory": {
          "type": "boolean"
        },
        "owner": {
          "description": "Unix systems only",
          "type": "string"
        },
        "permissions": {
          "description": "Unix systems only",
          "type": "string"
        },
        "sha256": {
          "description": "Only for files, not directories",
          "type": "string"
        }
      }
    }
  }
}