syntax = "proto3";

package nominal.ai.v1;

// DataIngestionErrorClassifierService classifies data ingestion errors as CLIENT or SERVER issues.
// CLIENT errors are customer data issues (empty files, schema conflicts, timestamp problems, etc.)
// SERVER errors are infrastructure issues (internal errors, timeouts, capacity limits, etc.)
service DataIngestionErrorClassifierService {
  // ClassifyError analyzes an error message and classifies it as CLIENT or SERVER.
  rpc ClassifyError(ClassifyErrorRequest) returns (ClassifyErrorResponse);
}

message ClassifyErrorRequest {
  // The error message or description to classify
  string error_message = 1;
}

message ClassifyErrorResponse {
  // The classification result
  ErrorClassification classification = 1;
  // Explanation for why this classification was chosen
  string reason = 2;
}

enum ErrorClassification {
  ERROR_CLASSIFICATION_UNSPECIFIED = 0;
  ERROR_CLASSIFICATION_CLIENT = 1;
  ERROR_CLASSIFICATION_SERVER = 2;
}
