  The central engine in long gamma-ray bursts (GRBs) is thought to be a compact
object produced by the core collapse of massive stars, but its exact nature
(black hole or millisecond magnetar) is still debatable. Although the central
engine of GRB collapsars is hidden to direct observation, its properties may be
imprinted on the accompanying electromagnetic signals. We aim to decipher the
generic properties of central engines that are consistent with prompt
observations of long GRBs detected by the Burst Alert Telescope (BAT) on board
the Neil Gehrels Swift Observatory. Adopting a generic model for the central
engine, in which the engine power and activity timescale are independent of
each other, we perform Monte Carlo simulations of long GRBs produced by jets
that successfully breakout from the star. Our simulations consider the
dependence of the jet breakout timescale on the engine luminosity and the
effects of the detector's flux threshold. The two-dimensional (2D) distribution
of simulated detectable bursts in the gamma-ray luminosity versus gamma-ray
duration plane is consistent with the observed one for a range of parameter
values describing the central engine. The intrinsic 2D distribution of
simulated collapsar GRBs peaks at lower gamma-ray luminosities and longer
durations than the observed one, a prediction that can be tested in the future
with more sensitive detectors. Black-hole accretors, whose power and activity
time are set by the large-scale magnetic flux through the progenitor star and
stellar structure, respectively, are compatible with the properties of the
central engine inferred by our model.
