import { defaultReleaseGateBudget, pickLaunchableReleaseGates } from './release-gate-resource-governor.js';
export function findReadyReleaseGateNodes(input) {
    const satisfiedDeps = input.satisfiedDeps || new Set();
    return [...input.pending.values()].filter((gate) => gate.deps.every((dep) => input.completed.has(dep) || satisfiedDeps.has(dep)) && !gate.deps.some((dep) => input.failed.has(dep)));
}
export function findReleaseGatesBlockedByFailedDeps(input) {
    return [...input.pending.values()].filter((gate) => gate.deps.some((dep) => input.failed.has(dep)));
}
export function pickReadyLaunchableReleaseGates(input) {
    return pickLaunchableReleaseGates({
        ready: input.ready,
        running: input.running,
        budget: defaultReleaseGateBudget()
    });
}
//# sourceMappingURL=release-gate-scheduler.js.map