syntax = "proto3";

package chroma;

import "chromadb/proto/chroma.proto";

message CollectionIds {
  repeated string ids = 1;
}

message CompactRequest {
  CollectionIds ids = 1;
}

message CompactResponse {
  // Empty
}

message RebuildRequest {
  CollectionIds ids = 1;
  // Segment scopes to rebuild. If empty, rebuilds all segments (metadata + vector).
  repeated SegmentScope segment_scopes = 2;
}

message RebuildResponse {
  // Empty
}

message ListDeadJobsRequest {
  // Empty
}

message ListDeadJobsResponse {
  CollectionIds ids = 1;
}

service Compactor {
  rpc Compact(CompactRequest) returns (CompactResponse) {}
  rpc Rebuild(RebuildRequest) returns (RebuildResponse) {}
  rpc ListDeadJobs(ListDeadJobsRequest) returns (ListDeadJobsResponse) {}
}
