export function setPhase(jobId, phase, deps) {
    const { progressGateway, completionBridge } = deps;
    const progress = progressGateway.setPhase(jobId, phase);
    if (!progress) {
        return {
            success: false,
            error: `Job not found: ${jobId}`,
        };
    }
    if (phase === "completed" && completionBridge) {
        completionBridge.publish(jobId, { source: "mcp", outcome: "completed", reason: null });
    }
    return {
        success: true,
        phase: progress.currentPhase,
        overallProgress: progress.overallProgress,
    };
}
//# sourceMappingURL=setPhase.usecase.js.map