{
  "openapi": "3.1.0",
  "info": {
    "title": "Post-King Chess runtime",
    "version": "0.1.0",
    "summary": "Stateless Post-King Chess. Human king-bound; AI has a Node.",
    "description": "The goal is not to win. The goal is to remain. Worker subset: legal moves + 1-ply continuity AI."
  },
  "servers": [
    {
      "url": "https://postking-download-tracker.vibelock.workers.dev"
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "operationId": "postking_health",
        "summary": "Liveness. Does not increment download KV.",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/v1/new": {
      "post": {
        "operationId": "postking_new",
        "summary": "Start a game. Body: {difficulty, seed}. Difficulties: witness|steward|remain.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "difficulty": {
                    "type": "string"
                  },
                  "seed": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "state"
          }
        }
      }
    },
    "/v1/move": {
      "post": {
        "operationId": "postking_move",
        "summary": "Play a human UCI move against the current FEN/state. Returns AI reply.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fen_or_state": {},
                  "uci": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "state"
          }
        }
      }
    },
    "/v1/status": {
      "post": {
        "operationId": "postking_status",
        "summary": "Continuity status for a FEN/state. Stateless.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "state"
          }
        }
      }
    }
  }
}