{
  "openapi": "3.1.0",
  "info": {
    "title": "E.L.V.I.S. memory patch debug proxy",
    "version": "1.0.0",
    "description": "Cloudflare Pages Worker proxy for GPTs Actions debugging."
  },
  "servers": [
    {
      "url": "https://elvis-gpts-debug-proxy.pages.dev",
      "description": "Cloudflare Pages Worker debug proxy"
    }
  ],
  "paths": {
    "/elvis/gpts/tools/memory_apply_patch": {
      "post": {
        "summary": "Run E.L.V.I.S. memory_apply_patch",
        "description": "Apply a simplified unified-diff style patch to one memory block.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "The memory block label.",
                    "enum": [
                      "",
                      "elvis_openclaw_integration"
                    ],
                    "default": "elvis_openclaw_integration"
                  },
                  "patch": {
                    "type": "string",
                    "description": "Unified diff-style patch text."
                  }
                },
                "required": [
                  "label",
                  "patch"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool execution result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "func_return": {},
                    "stdout": {},
                    "stderr": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication token"
          },
          "422": {
            "description": "Invalid arguments"
          }
        },
        "security": [
          {
            "XApiKeyAuth": []
          }
        ],
        "operationId": "memory_apply_patch"
      }
    },
    "/elvis/gpts/tools/memoryApplyPatch": {
      "post": {
        "summary": "Run E.L.V.I.S. memory_apply_patch",
        "description": "Apply a simplified unified-diff style patch to one memory block.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "The memory block label.",
                    "enum": [
                      "",
                      "elvis_openclaw_integration"
                    ],
                    "default": "elvis_openclaw_integration"
                  },
                  "patch": {
                    "type": "string",
                    "description": "Unified diff-style patch text."
                  }
                },
                "required": [
                  "label",
                  "patch"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool execution result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "func_return": {},
                    "stdout": {},
                    "stderr": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication token"
          },
          "422": {
            "description": "Invalid arguments"
          }
        },
        "security": [
          {
            "XApiKeyAuth": []
          }
        ],
        "operationId": "memoryApplyPatch"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "XApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "security": [
    {
      "XApiKeyAuth": []
    }
  ]
}