/**
 * Startup update orchestration.
 *
 * Keeps the package-update decision testable outside the full CLI startup path.
 */
import { resolveStartupUpdateStatus } from './update-manager.js';
import { runStartupUpdatePromptIfNeeded } from './update-prompt.js';
export async function runStartupUpdateFlow(options, deps = {}) {
    if (!options.isInteractive) {
        return { kind: 'continue' };
    }
    const resolveStatus = deps.resolveStatus ?? resolveStartupUpdateStatus;
    const promptIfNeeded = deps.promptIfNeeded ?? runStartupUpdatePromptIfNeeded;
    const startupUpdateStatus = await resolveStatus({
        offline: options.offline,
        skipCheck: options.skipVersionCheck || options.needsSetup
    });
    return promptIfNeeded(startupUpdateStatus, {
        suppress: options.needsSetup
    });
}
//# sourceMappingURL=update-flow.js.map