{
  "openapi": "3.1.0",
  "info": {
    "title": "Regesta HTTP API",
    "version": "0.0.0",
    "summary": "Machine-readable reference for the current Regesta HTTP surface.",
    "description": "This document describes implemented Transport routes, Core Registry routes, and the current npm projection routes. Regesta-native object shapes are referenced from the JSON Schema reference. Future PyPI, Cargo, Go, OCI, and other projection profiles are design targets, not implemented HTTP APIs. Protocol semantics remain defined by the TypeScript protocol and core validation code."
  },
  "servers": [
    {
      "url": "https://registry.regesta.dev",
      "description": "Experimental core registry API demo host"
    },
    {
      "url": "https://npm.regesta.dev",
      "description": "Experimental npm projection demo host"
    }
  ],
  "tags": [
    {
      "name": "Transport",
      "description": "HTTP mechanics such as host routing, CORS, deployment info, health, and readiness."
    },
    {
      "name": "Core Registry",
      "description": "Regesta-native packages, releases, channels, objects, and events."
    },
    {
      "name": "npm Projection",
      "description": "npm-compatible projection over Regesta-native package data, with optional upstream fallback for missing packages. Fallback metadata requests forward only metadata negotiation and cache validators; fallback metadata responses expose only cache and content metadata headers."
    }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": ["Transport", "npm Projection"],
        "summary": "Read host-specific root information",
        "responses": {
          "200": {
            "description": "Deployment information on core registry hosts, or an empty npm compatibility object on npm projection hosts.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/RootCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    { "$ref": "#/components/schemas/DeploymentInfo" },
                    { "$ref": "#/components/schemas/NpmUtilityRoot" }
                  ]
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": ["Transport", "npm Projection"],
        "summary": "Read host-specific root headers",
        "responses": {
          "200": {
            "description": "Core registry deployment information or npm projection root compatibility response is available.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/RootCacheControl"
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": ["Transport"],
        "summary": "Read liveness status",
        "responses": {
          "200": {
            "description": "Process is alive.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStoreCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HealthStatus" }
              }
            }
          }
        }
      },
      "head": {
        "tags": ["Transport"],
        "summary": "Read liveness headers",
        "responses": {
          "200": {
            "description": "Process is alive.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStoreCacheControl"
              }
            }
          }
        }
      }
    },
    "/ready": {
      "get": {
        "tags": ["Transport"],
        "summary": "Read storage readiness status",
        "responses": {
          "200": {
            "description": "Storage dependencies are ready.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStoreCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ReadinessStatus" }
              }
            }
          },
          "503": {
            "description": "At least one storage dependency is not ready.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStoreCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ReadinessStatus" }
              }
            }
          }
        }
      },
      "head": {
        "tags": ["Transport"],
        "summary": "Read storage readiness headers",
        "responses": {
          "200": {
            "description": "Storage dependencies are ready.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStoreCacheControl"
              }
            }
          },
          "503": {
            "description": "At least one storage dependency is not ready.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStoreCacheControl"
              }
            }
          }
        }
      }
    },
    "/favicon.ico": {
      "get": {
        "tags": ["Transport"],
        "summary": "Handle browser favicon probes",
        "responses": {
          "204": {
            "description": "No favicon body is served.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/FaviconCacheControl"
              }
            }
          }
        }
      }
    },
    "/releases": {
      "post": {
        "tags": ["Core Registry"],
        "summary": "Publish a release",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "authorization": {
                    "description": "Signed release.publish authorization JSON. The payload domain must match the owner domain parsed from payload package.",
                    "type": "string",
                    "contentMediaType": "application/json",
                    "contentSchema": {
                      "$ref": "#/components/schemas/WriteAuthorization"
                    }
                  },
                  "config": {
                    "description": "Normalized Regesta publish config JSON.",
                    "type": "string",
                    "contentMediaType": "application/json"
                  },
                  "source": {
                    "description": "Source archive bytes.",
                    "type": "string",
                    "format": "binary"
                  },
                  "artifacts": {
                    "description": "JSON array describing uploaded artifact binary parts.",
                    "type": "string",
                    "contentMediaType": "application/json"
                  }
                },
                "required": ["authorization", "config", "source", "artifacts"]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Release accepted and committed.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/PublishResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/Error" },
          "401": { "$ref": "#/components/responses/Error" },
          "413": { "$ref": "#/components/responses/Error" },
          "409": { "$ref": "#/components/responses/Error" },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/packages/{packageId}": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Read package state",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Event-derived package state snapshot.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/PackageState" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Read package state headers",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Package state exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/packages/{packageId}/releases/{version}": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Read an immutable release envelope",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/Version" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Stored release envelope.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ReleaseEnvelope" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/ImmutableNotModified" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Read immutable release envelope headers",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/Version" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Release exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/ImmutableNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/packages/{packageId}/releases/{version}/verification": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Verify a release",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/Version" }
        ],
        "responses": {
          "200": {
            "description": "Release verification passed.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/VerificationResult" }
              }
            }
          },
          "422": {
            "description": "Release verification found problems.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/VerificationResult" }
              }
            }
          }
        }
      }
    },
    "/packages/{packageId}/channels/{channel}": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Resolve a channel to a release envelope",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/Channel" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Current channel target release envelope.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ReleaseEnvelope" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Resolve channel headers",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/Channel" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Channel target exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      },
      "put": {
        "tags": ["Core Registry"],
        "summary": "Update a channel",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/Channel" }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "authorization": {
                    "$ref": "#/components/schemas/WriteAuthorization",
                    "description": "Signed channel.update authorization JSON. The payload domain must match the owner domain parsed from payload package."
                  },
                  "version": { "$ref": "#/components/schemas/NonEmptyString" }
                },
                "required": ["authorization", "version"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Channel updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMutationResponse"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/Error" },
          "401": { "$ref": "#/components/responses/Error" },
          "413": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "409": { "$ref": "#/components/responses/Error" }
        }
      },
      "delete": {
        "tags": ["Core Registry"],
        "summary": "Delete a channel",
        "parameters": [
          { "$ref": "#/components/parameters/PackageId" },
          { "$ref": "#/components/parameters/Channel" }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "authorization": {
                    "$ref": "#/components/schemas/WriteAuthorization",
                    "description": "Signed channel.delete authorization JSON. The payload domain must match the owner domain parsed from payload package."
                  }
                },
                "required": ["authorization"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Channel deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelMutationResponse"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/Error" },
          "401": { "$ref": "#/components/responses/Error" },
          "413": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "409": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/objects": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Read a page of object descriptors",
        "parameters": [
          { "$ref": "#/components/parameters/AfterObjectDigest" },
          { "$ref": "#/components/parameters/ObjectLimit" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Object descriptor inventory page.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectInventoryPage"
                }
              }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Read object descriptor inventory page headers",
        "parameters": [
          { "$ref": "#/components/parameters/AfterObjectDigest" },
          { "$ref": "#/components/parameters/ObjectLimit" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Object descriptor inventory page exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/objects/{digest}": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Read immutable object bytes by digest",
        "parameters": [
          { "$ref": "#/components/parameters/Digest" },
          { "$ref": "#/components/parameters/IfNoneMatch" },
          { "$ref": "#/components/parameters/Range" }
        ],
        "responses": {
          "200": {
            "description": "Object bytes.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            },
            "content": {
              "*/*": {
                "schema": { "type": "string", "format": "binary" }
              }
            }
          },
          "206": {
            "description": "Object byte range.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Range": {
                "$ref": "#/components/headers/ContentRange"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/ObjectNotModified" },
          "404": { "$ref": "#/components/responses/Error" },
          "416": { "$ref": "#/components/responses/ObjectRangeNotSatisfiable" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Read immutable object headers by digest",
        "parameters": [
          { "$ref": "#/components/parameters/Digest" },
          { "$ref": "#/components/parameters/IfNoneMatch" },
          { "$ref": "#/components/parameters/Range" }
        ],
        "responses": {
          "200": {
            "description": "Object exists.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            }
          },
          "206": {
            "description": "Object byte range exists.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Range": {
                "$ref": "#/components/headers/ContentRange"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/ObjectNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" },
          "416": { "$ref": "#/components/responses/ObjectRangeNotSatisfiable" }
        }
      }
    },
    "/objects/{algorithm}/{hex}": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Read immutable object bytes by digest parts",
        "parameters": [
          { "$ref": "#/components/parameters/Algorithm" },
          { "$ref": "#/components/parameters/HexDigest" },
          { "$ref": "#/components/parameters/IfNoneMatch" },
          { "$ref": "#/components/parameters/Range" }
        ],
        "responses": {
          "200": {
            "description": "Object bytes.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            },
            "content": {
              "*/*": {
                "schema": { "type": "string", "format": "binary" }
              }
            }
          },
          "206": {
            "description": "Object byte range.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Range": {
                "$ref": "#/components/headers/ContentRange"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/ObjectNotModified" },
          "404": { "$ref": "#/components/responses/Error" },
          "416": { "$ref": "#/components/responses/ObjectRangeNotSatisfiable" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Read immutable object headers by digest parts",
        "parameters": [
          { "$ref": "#/components/parameters/Algorithm" },
          { "$ref": "#/components/parameters/HexDigest" },
          { "$ref": "#/components/parameters/IfNoneMatch" },
          { "$ref": "#/components/parameters/Range" }
        ],
        "responses": {
          "200": {
            "description": "Object exists.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            }
          },
          "206": {
            "description": "Object byte range exists.",
            "headers": {
              "Accept-Ranges": {
                "$ref": "#/components/headers/AcceptRangesBytes"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "Content-Range": {
                "$ref": "#/components/headers/ContentRange"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/ObjectNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" },
          "416": { "$ref": "#/components/responses/ObjectRangeNotSatisfiable" }
        }
      }
    },
    "/events": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Read a page of registry events",
        "parameters": [
          { "$ref": "#/components/parameters/AfterEventId" },
          { "$ref": "#/components/parameters/EventLimit" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Ordered event page.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/EventPage" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Read event page headers",
        "parameters": [
          { "$ref": "#/components/parameters/AfterEventId" },
          { "$ref": "#/components/parameters/EventLimit" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Event page exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/MutableNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/events/{algorithm}/{hex}": {
      "get": {
        "tags": ["Core Registry"],
        "summary": "Read an immutable registry event by id",
        "parameters": [
          { "$ref": "#/components/parameters/Algorithm" },
          { "$ref": "#/components/parameters/HexDigest" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Registry event.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/RegistryEvent" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/ImmutableNotModified" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["Core Registry"],
        "summary": "Read immutable registry event headers",
        "parameters": [
          { "$ref": "#/components/parameters/Algorithm" },
          { "$ref": "#/components/parameters/HexDigest" },
          { "$ref": "#/components/parameters/IfNoneMatch" }
        ],
        "responses": {
          "200": {
            "description": "Registry event exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/ImmutableCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/WeakEtag" }
            }
          },
          "304": { "$ref": "#/components/responses/ImmutableNotModified" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/-/ping": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "npm ping",
        "responses": {
          "200": {
            "description": "npm-compatible ping response.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "ping": { "const": "pong" }
                  },
                  "required": ["ping"]
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "npm ping headers",
        "responses": {
          "200": {
            "description": "npm projection is reachable.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoCacheControl"
              }
            }
          }
        }
      }
    },
    "/-/package/{encoded}/dist-tags": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "Read npm dist-tags for an encoded package name",
        "parameters": [
          { "$ref": "#/components/parameters/EncodedNpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "npm dist-tags object.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/NpmDistTags" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/Error" },
          "502": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "Read npm dist-tags headers for an encoded package name",
        "parameters": [
          { "$ref": "#/components/parameters/EncodedNpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "dist-tags exist.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/HeadError" },
          "502": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/-/package/{scope}/{name}/dist-tags": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "Read npm dist-tags for a scoped package name",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "npm dist-tags object.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/NpmDistTags" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/Error" },
          "502": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "Read npm dist-tags headers for a scoped package name",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "dist-tags exist.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/HeadError" },
          "502": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/{encoded}": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "Read npm packument for an encoded package name",
        "parameters": [
          { "$ref": "#/components/parameters/EncodedNpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "npm packument.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/NpmPackument" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/Error" },
          "502": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "Read npm packument headers for an encoded package name",
        "parameters": [
          { "$ref": "#/components/parameters/EncodedNpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "packument exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/HeadError" },
          "502": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/{scope}/{name}": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "Read npm scoped packument or unscoped package version",
        "description": "This physical npm route has two native npm meanings: `@scope/name` reads a scoped packument, while `name/tag` or `name/version` reads an unscoped fallback package version manifest, such as `/tinyexec/latest`.",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "npm packument or version manifest.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            },
            "content": {
              "application/json": {
                "schema": { "type": "object", "additionalProperties": true }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/Error" },
          "502": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "Read npm scoped packument or unscoped package version headers",
        "description": "This physical npm route has two native npm meanings: `@scope/name` reads scoped packument headers, while `name/tag` or `name/version` reads unscoped fallback package version headers.",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "npm projection resource exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/HeadError" },
          "502": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/{scope}/{name}/{tagOrVersion}": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "Read npm version manifest by version or tag",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmTagOrVersion" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "npm version manifest.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "Content-Length": {
                "$ref": "#/components/headers/ContentLength"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/NpmVersionManifest" }
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/Error" },
          "502": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "Read npm version manifest headers",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmTagOrVersion" },
          { "$ref": "#/components/parameters/NpmMetadataIfNoneMatch" },
          { "$ref": "#/components/parameters/NpmMetadataIfModifiedSince" }
        ],
        "responses": {
          "200": {
            "description": "npm version manifest exists.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NpmMetadataCacheControl"
              },
              "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
              "Last-Modified": {
                "$ref": "#/components/headers/NpmMetadataLastModified"
              }
            }
          },
          "304": { "$ref": "#/components/responses/NotModified" },
          "404": { "$ref": "#/components/responses/HeadError" },
          "502": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/{name}/-/{file}": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "Redirect npm tarball request for an unscoped package",
        "parameters": [
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmTarballFile" }
        ],
        "responses": {
          "302": { "$ref": "#/components/responses/NpmTarballRedirect" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "Redirect npm tarball HEAD request for an unscoped package",
        "parameters": [
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmTarballFile" }
        ],
        "responses": {
          "302": { "$ref": "#/components/responses/NpmTarballRedirect" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      }
    },
    "/{scope}/{name}/-/{file}": {
      "get": {
        "tags": ["npm Projection"],
        "summary": "Redirect npm tarball request for a scoped package",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmTarballFile" }
        ],
        "responses": {
          "302": { "$ref": "#/components/responses/NpmTarballRedirect" },
          "404": { "$ref": "#/components/responses/Error" }
        }
      },
      "head": {
        "tags": ["npm Projection"],
        "summary": "Redirect npm tarball HEAD request for a scoped package",
        "parameters": [
          { "$ref": "#/components/parameters/NpmScope" },
          { "$ref": "#/components/parameters/NpmName" },
          { "$ref": "#/components/parameters/NpmTarballFile" }
        ],
        "responses": {
          "302": { "$ref": "#/components/responses/NpmTarballRedirect" },
          "404": { "$ref": "#/components/responses/HeadError" }
        }
      }
    }
  },
  "components": {
    "headers": {
      "AcceptRangesBytes": {
        "description": "Server supports byte-range requests for this object.",
        "schema": { "const": "bytes" }
      },
      "ContentRange": {
        "description": "Byte range selected for a partial response, or unsatisfied range size for 416 responses.",
        "schema": { "type": "string" }
      },
      "ContentLength": {
        "description": "Decimal byte length of the response body or selected byte range.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "ImmutableCacheControl": {
        "description": "Immutable representation can be cached long-term.",
        "schema": { "const": "public, max-age=31536000, immutable" }
      },
      "FaviconCacheControl": {
        "description": "Browser favicon probe response can be cached briefly.",
        "schema": { "const": "public, max-age=86400" }
      },
      "NoCacheControl": {
        "description": "Mutable representation must be revalidated before reuse.",
        "schema": { "const": "no-cache" }
      },
      "NoStoreCacheControl": {
        "description": "Response must not be stored by caches.",
        "schema": { "const": "no-store" }
      },
      "RootCacheControl": {
        "description": "Core registry root responses use no-store; npm projection root responses use no-cache.",
        "schema": { "enum": ["no-store", "no-cache"] }
      },
      "NpmMetadataCacheControl": {
        "description": "Cache policy for npm metadata. Local mutable projections use no-cache, local immutable version responses can be cached long-term, and upstream fallback metadata preserves upstream cache policy without forwarding upstream cookies, redirects, authentication challenges, or extension headers.",
        "schema": { "type": "string" }
      },
      "NpmMetadataEtag": {
        "description": "Validator for npm metadata. Local projections derive this from Regesta state; upstream fallback metadata preserves upstream validators without forwarding upstream cookies, redirects, authentication challenges, or extension headers.",
        "schema": { "type": "string" }
      },
      "NpmMetadataLastModified": {
        "description": "HTTP date validator for npm metadata when available, especially from upstream fallback metadata. It is part of the fallback response metadata allowlist.",
        "schema": { "type": "string" }
      },
      "StrongDigestEtag": {
        "description": "Strong digest-based validator.",
        "schema": { "type": "string" }
      },
      "WeakEtag": {
        "description": "Weak validator for mutable projections.",
        "schema": { "type": "string" }
      }
    },
    "parameters": {
      "AfterEventId": {
        "in": "query",
        "name": "after",
        "required": false,
        "schema": { "$ref": "#/components/schemas/Sha256Digest" }
      },
      "AfterObjectDigest": {
        "in": "query",
        "name": "after",
        "required": false,
        "schema": { "$ref": "#/components/schemas/Sha256Digest" }
      },
      "Algorithm": {
        "in": "path",
        "name": "algorithm",
        "required": true,
        "schema": { "const": "sha256" }
      },
      "Channel": {
        "in": "path",
        "name": "channel",
        "required": true,
        "schema": { "$ref": "#/components/schemas/NonEmptyString" }
      },
      "Digest": {
        "in": "path",
        "name": "digest",
        "required": true,
        "schema": { "$ref": "#/components/schemas/Sha256Digest" }
      },
      "EncodedNpmName": {
        "in": "path",
        "name": "encoded",
        "required": true,
        "schema": { "$ref": "#/components/schemas/NonEmptyString" }
      },
      "NpmMetadataIfModifiedSince": {
        "in": "header",
        "name": "If-Modified-Since",
        "required": false,
        "description": "Client timestamp validator for npm metadata. Local projections can use it when Last-Modified is available and If-None-Match is not present; upstream fallback forwards it to the upstream npm registry as part of the request header allowlist.",
        "schema": { "type": "string" }
      },
      "NpmMetadataIfNoneMatch": {
        "in": "header",
        "name": "If-None-Match",
        "required": false,
        "description": "Client ETag validator for npm metadata. Local projections can return 304 when it matches the current ETag; upstream fallback forwards it to the upstream npm registry as part of the request header allowlist.",
        "schema": { "type": "string" }
      },
      "EventLimit": {
        "in": "query",
        "name": "limit",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 999
        }
      },
      "ObjectLimit": {
        "in": "query",
        "name": "limit",
        "required": false,
        "schema": { "$ref": "#/components/schemas/ObjectLimit" }
      },
      "HexDigest": {
        "in": "path",
        "name": "hex",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "IfNoneMatch": {
        "in": "header",
        "name": "If-None-Match",
        "required": false,
        "description": "Client ETag validator. Routes with an ETag can return 304 when this matches the current representation.",
        "schema": { "type": "string" }
      },
      "NpmName": {
        "in": "path",
        "name": "name",
        "required": true,
        "description": "npm path segment. For scoped package routes this is the package name. For unscoped fallback version routes under `/{scope}/{name}`, this segment is the requested tag or version.",
        "schema": { "$ref": "#/components/schemas/NonEmptyString" }
      },
      "NpmScope": {
        "in": "path",
        "name": "scope",
        "required": true,
        "description": "npm path segment. For scoped package routes this is the leading scope, including `@`. For unscoped fallback version routes under `/{scope}/{name}`, this segment is the package name.",
        "schema": { "$ref": "#/components/schemas/NonEmptyString" }
      },
      "NpmTagOrVersion": {
        "in": "path",
        "name": "tagOrVersion",
        "required": true,
        "schema": { "$ref": "#/components/schemas/NonEmptyString" }
      },
      "NpmTarballFile": {
        "in": "path",
        "name": "file",
        "required": true,
        "schema": { "$ref": "#/components/schemas/NonEmptyString" }
      },
      "PackageId": {
        "in": "path",
        "name": "packageId",
        "required": true,
        "schema": { "$ref": "#/components/schemas/PackageId" },
        "description": "URL-encoded as one path segment, for example npm%3Asome.dev%2Fsdk."
      },
      "Range": {
        "in": "header",
        "name": "Range",
        "required": false,
        "description": "Single byte range for immutable object reads. Current object responses support one `bytes=start-end` range.",
        "schema": { "type": "string" }
      },
      "Version": {
        "in": "path",
        "name": "version",
        "required": true,
        "schema": { "$ref": "#/components/schemas/NonEmptyString" }
      }
    },
    "responses": {
      "Error": {
        "description": "Structured public error response.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorResponse" }
          }
        }
      },
      "HeadError": {
        "description": "Error status for HEAD requests. Runtime responses keep the status and JSON content type but do not include a response body."
      },
      "NpmTarballRedirect": {
        "description": "Redirect direct npm projection tarball requests. Local releases redirect to immutable core object URLs; missing packages and versions redirect to the upstream npm registry tarball URL when server-side fallback is enabled. Local-only deployments return 404 for missing tarballs. The npm projection never serves or proxies tarball bytes.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoCacheControl"
          },
          "Location": {
            "description": "Tarball download URL.",
            "schema": { "type": "string", "format": "uri" }
          }
        }
      },
      "ObjectRangeNotSatisfiable": {
        "description": "Requested object byte range is not satisfiable.",
        "headers": {
          "Accept-Ranges": {
            "$ref": "#/components/headers/AcceptRangesBytes"
          },
          "Content-Range": {
            "$ref": "#/components/headers/ContentRange"
          }
        }
      },
      "ObjectNotModified": {
        "description": "Client validator still matches the current immutable object representation.",
        "headers": {
          "Accept-Ranges": {
            "$ref": "#/components/headers/AcceptRangesBytes"
          },
          "Cache-Control": {
            "$ref": "#/components/headers/ImmutableCacheControl"
          },
          "ETag": { "$ref": "#/components/headers/StrongDigestEtag" }
        }
      },
      "ImmutableNotModified": {
        "description": "Client validator still matches the current immutable representation.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/ImmutableCacheControl"
          },
          "ETag": {
            "description": "Weak or strong validator for the immutable representation.",
            "schema": { "type": "string" }
          }
        }
      },
      "MutableNotModified": {
        "description": "Client validator still matches the current mutable representation.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoCacheControl"
          },
          "ETag": { "$ref": "#/components/headers/WeakEtag" }
        }
      },
      "NotModified": {
        "description": "Client validator still matches current representation.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NpmMetadataCacheControl"
          },
          "ETag": { "$ref": "#/components/headers/NpmMetadataEtag" },
          "Last-Modified": {
            "$ref": "#/components/headers/NpmMetadataLastModified"
          }
        }
      }
    },
    "schemas": {
      "ChannelMutationResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "channel": { "$ref": "#/components/schemas/NonEmptyString" },
          "event": { "$ref": "#/components/schemas/RegistryEvent" },
          "package": { "$ref": "#/components/schemas/PackageId" },
          "previousVersion": { "$ref": "#/components/schemas/NonEmptyString" },
          "version": { "$ref": "#/components/schemas/NonEmptyString" }
        },
        "required": ["channel", "event", "package"]
      },
      "DeploymentInfo": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "build": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "time": { "type": "string" }
            },
            "required": ["time"]
          },
          "git": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "dirty": {
                "type": ["boolean", "null"]
              },
              "sha": { "type": "string" }
            },
            "required": ["dirty", "sha"]
          },
          "object": { "const": "regesta.deployment-info" },
          "runtime": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": { "type": "string" },
              "version": { "type": "string" }
            },
            "required": ["name", "version"]
          },
          "service": { "type": "string" },
          "statistics": {
            "description": "Advisory deployment statistics for operators. Implementations may cache these values briefly to keep status checks cheap under load. The default server may serve stale cached statistics when a refresh read fails, but schema-invalid statistics still fail closed. Storage adapters should expose them from cheap counters or indexes, not by replaying events or scanning release rows on every root request.",
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "packages": {
                "description": "Approximate current package count exposed as status data, not a consistency boundary.",
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              }
            },
            "required": ["packages"]
          },
          "version": { "type": "string" }
        },
        "required": [
          "build",
          "git",
          "object",
          "runtime",
          "service",
          "statistics",
          "version"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "code": { "type": "string" },
          "error": { "type": "string" },
          "issues": {
            "type": "array",
            "items": { "type": "string" }
          },
          "message": { "type": "string" }
        },
        "required": ["code", "error", "message"]
      },
      "NpmUtilityRoot": {
        "description": "Empty JSON object returned by npm projection root routes for npm client compatibility.",
        "type": "object",
        "additionalProperties": false,
        "properties": {}
      },
      "EventPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "events": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/RegistryEvent" }
          },
          "nextAfter": { "$ref": "#/components/schemas/Sha256Digest" }
        },
        "required": ["events"]
      },
      "HealthStatus": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ok": { "const": true }
        },
        "required": ["ok"]
      },
      "NonEmptyString": {
        "type": "string",
        "minLength": 1
      },
      "NpmDistTags": {
        "type": "object",
        "additionalProperties": { "type": "string" }
      },
      "NpmPackument": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "dist-tags": { "$ref": "#/components/schemas/NpmDistTags" },
          "name": { "type": "string" },
          "time": {
            "type": "object",
            "additionalProperties": { "type": "string" }
          },
          "versions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/NpmVersionManifest"
            }
          }
        },
        "required": ["dist-tags", "name", "versions"]
      },
      "NpmVersionManifest": {
        "type": "object",
        "description": "npm-compatible version metadata. Regesta-hosted package metadata projects only supported resolver fields from artifact metadata; upstream fallback metadata preserves upstream fields.",
        "additionalProperties": true,
        "properties": {
          "description": { "type": "string" },
          "dist": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "integrity": { "type": "string" },
              "shasum": { "type": "string" },
              "tarball": {
                "type": "string",
                "format": "uri",
                "description": "Tarball URL for npm-compatible clients. Regesta-hosted package metadata points to the npm projection tarball URL, which redirects to the immutable core object URL; fallback metadata preserves the upstream npm tarball URL without rewriting."
              }
            },
            "required": ["tarball"]
          },
          "name": { "type": "string" },
          "version": { "type": "string" }
        },
        "required": ["dist", "name", "version"]
      },
      "ObjectDescriptor": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/objectDescriptor"
      },
      "ObjectInventoryPage": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/objectInventory"
      },
      "ObjectLimit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 999
      },
      "PackageId": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/packageId"
      },
      "PackageState": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/packageState"
      },
      "PublishResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "channel": { "$ref": "#/components/schemas/NonEmptyString" },
          "event": { "$ref": "#/components/schemas/RegistryEvent" },
          "manifest": { "$ref": "#/components/schemas/ReleaseManifest" },
          "manifestDescriptor": {
            "$ref": "#/components/schemas/ObjectDescriptor"
          }
        },
        "required": ["channel", "event", "manifest", "manifestDescriptor"]
      },
      "RegistryEvent": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/registryEvent"
      },
      "ReleaseEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event": { "$ref": "#/components/schemas/RegistryEvent" },
          "manifest": { "$ref": "#/components/schemas/ReleaseManifest" },
          "manifestDescriptor": {
            "$ref": "#/components/schemas/ObjectDescriptor"
          }
        },
        "required": ["event", "manifest", "manifestDescriptor"]
      },
      "ReleaseManifest": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/releaseManifest"
      },
      "ReadinessStatus": {
        "description": "Aggregate adapter readiness status. Checks are independent and bounded by deployment timeout policy; clients should read named check results and must not depend on probe ordering. Optional checkpoint store readiness appears when configured.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "checks": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "checkpoints": { "type": "boolean" },
              "database": { "type": "boolean" },
              "objects": { "type": "boolean" },
              "queue": { "type": "boolean" },
              "signer": { "type": "boolean" }
            }
          },
          "kind": { "const": "regesta.readiness" },
          "ok": { "type": "boolean" }
        },
        "required": ["kind", "ok"]
      },
      "Sha256Digest": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/sha256Digest"
      },
      "VerificationResult": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "manifest": { "$ref": "#/components/schemas/ReleaseManifest" },
          "ok": { "type": "boolean" },
          "problems": {
            "type": "array",
            "items": { "type": "string" }
          }
        },
        "required": ["ok", "problems"]
      },
      "WriteAuthorization": {
        "$ref": "../schema/regesta-v0.schema.json#/$defs/writeAuthorization"
      }
    }
  }
}
