{
  "openapi": "3.1.0",
  "info": {
    "title": "Parshva Gala Public Agent API",
    "version": "1.0.0",
    "description": "Read-only API for agents and automated clients to discover public portfolio, project, writing, and contact information."
  },
  "servers": [
    {
      "url": "https://prshv.com"
    }
  ],
  "paths": {
    "/agent.json": {
      "get": {
        "summary": "Static public agent manifest",
        "operationId": "getStaticAgentManifest",
        "responses": {
          "200": {
            "description": "Full public site manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentManifest"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent": {
      "get": {
        "summary": "Public agent manifest",
        "operationId": "getAgentManifest",
        "responses": {
          "200": {
            "description": "Full public site manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentManifest"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/content": {
      "get": {
        "summary": "Search or filter public content",
        "operationId": "getAgentContent",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "projects",
                "project",
                "blogs",
                "blog",
                "posts",
                "post"
              ]
            },
            "description": "Optional content collection filter."
          },
          {
            "name": "slug",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional exact slug filter."
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional case-insensitive keyword search across titles and summaries."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            },
            "description": "Maximum number of items to return."
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered public content.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "query",
                    "count",
                    "items"
                  ],
                  "properties": {
                    "query": {
                      "type": "object"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ContentItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query."
          },
          "404": {
            "description": "No content matched the requested slug."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentManifest": {
        "type": "object",
        "required": [
          "schemaVersion",
          "site",
          "agentAccess",
          "api",
          "pages",
          "content"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "site": {
            "type": "object"
          },
          "owner": {
            "type": "object"
          },
          "agentAccess": {
            "type": "object"
          },
          "api": {
            "type": "object"
          },
          "pages": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "content": {
            "type": "object",
            "properties": {
              "projects": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentItem"
                }
              },
              "blogs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ContentItem"
                }
              }
            }
          },
          "contact": {
            "type": "object"
          },
          "socialLinks": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ContentItem": {
        "type": "object",
        "required": [
          "type",
          "slug",
          "title",
          "description",
          "url",
          "absoluteUrl"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "project",
              "blog"
            ]
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "absoluteUrl": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "readTime": {
            "type": "string"
          }
        }
      }
    }
  }
}
