syntax = "proto3";

package errdefs;

option go_package = "github.com/moby/buildkit/solver/errdefs";

import "github.com/moby/buildkit/solver/pb/ops.proto";

message Vertex {
	string digest = 1;
}

message Source {
	pb.SourceInfo info = 1;
	repeated pb.Range ranges = 2;
}

message Frontend {
	string name = 1; // frontend name e.g. dockerfile.v0 or gateway.v0
	string source = 2; // used by the gateway frontend to identify the source, which corresponds to the image name
}

message FrontendCap {
	string name = 1;
}

message CompatibilityFeature {
	int64 version = 1;
	string feature = 2;
}

message Subrequest {
	string name = 1;
}

message Solve {
	repeated string inputIDs = 1;
	repeated string mountIDs = 2;
	pb.Op op = 3;

	oneof subject {
		FileAction file = 4;
		ContentCache cache = 5;
	}

	map<string, string> description = 6;
}

message FileAction {
	// Index of the file action that failed the exec.
	int64 index = 1;
}

message ContentCache {
	// Original index of result that failed the slow cache calculation.
	int64 index = 1;
}

message ProvenanceMaterialsIncomplete {
	repeated ProvenanceMaterialIncomplete incomplete = 1;
}

message ProvenanceMaterialIncomplete {
	string op = 1;
	string name = 2;
	string method = 3;
	string uri = 4;
	string final_uri = 5;
	string reason = 6;
}
