syntax = "proto3";

package storage_backend.multi_file;

// Wire schema for the variable-length manifest stored after MultiFilePreamble.
//
// Compatibility rules:
// - Only add fields with new tag numbers.
// - Never change or reuse existing tag numbers.
// - Never change field types or cardinality.
// - Reserve removed field numbers before deleting them.
message MultiFileManifest {
  uint64 frag_id = 1;
  repeated FileEntry files = 2;
}

message FileEntry {
  string relative_path = 1;
  // Byte offset from the start of the payload area (the byte immediately after
  // preamble + manifest), not from the object start. Payloads are stored
  // back-to-back in manifest order with no padding, so the first entry has
  // offset 0 and each next offset equals the sum of prior sizes. Keeping
  // offsets payload-relative avoids baking preamble/manifest length into the
  // wire schema and keeps the manifest self-contained.
  uint64 offset = 2;
  uint64 size = 3;
}
