{
  "openapi": "3.1.0",
  "info": {
    "title": "PeaceLock runtime",
    "version": "0.1.0",
    "description": "Chosen silence / chosen inaction as a first-class receipt (PL-WP-0.1). Client sends the ledger JSON (stateless). Transcript always ABSENT. HARD_DUTY cannot be bypassed. Author Aziel Eliab."
  },
  "servers": [
    {
      "url": "https://peacelock-download-tracker.vibelock.workers.dev"
    }
  ],
  "paths": {
    "/v1/skill": {
      "get": {
        "operationId": "peacelock_skill",
        "summary": "Return skill markdown. Does not increment download KV.",
        "responses": {
          "200": {
            "description": "markdown"
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/v1/doctor": {
      "get": {
        "operationId": "doctor",
        "summary": "Hosted self-check. No writes.",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/v1/open": {
      "post": {
        "operationId": "open",
        "summary": "Open a quiet window. HARD_DUTY refused.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mode",
                  "channel",
                  "act_class"
                ],
                "properties": {
                  "mode": {
                    "type": "string"
                  },
                  "channel": {
                    "type": "string"
                  },
                  "act_class": {
                    "type": "string"
                  },
                  "duty_check": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "ledger": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "opened"
          }
        }
      }
    },
    "/v1/seal": {
      "post": {
        "operationId": "seal",
        "summary": "Seal OPEN → SEALED. HARD_DUTY refused.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pl_id"
                ],
                "properties": {
                  "pl_id": {
                    "type": "string"
                  },
                  "ledger": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "sealed"
          }
        }
      }
    },
    "/v1/break": {
      "post": {
        "operationId": "break",
        "summary": "Append BROKEN. Original seal stays.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pl_id",
                  "reason"
                ],
                "properties": {
                  "pl_id": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "ledger": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "broken"
          }
        }
      }
    },
    "/v1/show": {
      "post": {
        "operationId": "show",
        "summary": "Return the client-held ledger.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "show"
          }
        }
      }
    },
    "/v1/verify": {
      "post": {
        "operationId": "verify",
        "summary": "Walk hashes and links.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ledger": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "verify"
          }
        }
      }
    },
    "/v1/lattice": {
      "post": {
        "operationId": "lattice",
        "summary": "Verify receipt links + state machine.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "lattice"
          }
        }
      }
    },
    "/v1/upload": {
      "post": {
        "operationId": "upload",
        "summary": "Attach evidence envelope (file hash + timestamp + date stamp). No transcript.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file_sha256": {
                    "type": "string"
                  },
                  "file_name": {
                    "type": "string"
                  },
                  "timestamp": {
                    "type": "string"
                  },
                  "date_stamp": {
                    "type": "string"
                  },
                  "ledger": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "envelope"
          }
        }
      }
    },
    "/v1/example": {
      "get": {
        "operationId": "example",
        "summary": "Sample open payload.",
        "responses": {
          "200": {
            "description": "example"
          }
        }
      }
    }
  }
}