"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildPreWorkerGateFailureSeed = buildPreWorkerGateFailureSeed;
const run_state_helpers_1 = require("./run-state-helpers");
function buildPreWorkerGateFailureSeed(input, gate) {
    return {
        ...input.failureSeed,
        runMode: gate.workflow?.mode ?? (0, run_state_helpers_1.inferWorkflowRunMode)(gate.workflowState),
        workflowTemplateName: gate.workflowTemplateName,
        workflowState: gate.workflowState,
        totalAiRunHours: gate.currentTotalAiRunHours,
    };
}
