syntax = "proto3";

package smelt_client.commands;
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

message ClientCommand {
  oneof ClientCommands {
    SetCommands setter = 1;
    RunOne runone = 2;
    RunType runtype = 3;
    RunMany runmany = 4;
  }
}

message SetCommands { string command_content = 1; }
message RunOne { string command_name = 1; }
message RunMany { repeated string command_names = 1; }
message RunType {
  // Eventually, perhaps we should encode this as info in protobuf
  // not today babey
  string typeinfo = 1;
}

// This configuration is done once, when SMELT is initialized
// The client should provide this when creating an smelt handle
message ConfigureSmelt { 
  // Should be an absolute path
  string smelt_root = 1;
  // relative to smelt_root -- this is an SmeltPath
  string command_def_path = 2;
  // number of slots the entire executor has -- analogous to job slots in make
  uint64 job_slots = 3;
  oneof InitExecutor {
    CfgLocal local = 10;
    CfgDocker docker = 11;
  }
}

message CfgLocal {}

message CfgDocker {
  string image_name = 1;
  map<string, string> additional_mounts = 2;
}
