export async function cleanupClaudeSession(input, deps) {
    const warnings = [];
    const stopResult = await deps.sessionGateway.stop(input.sessionId).catch(error => {
        const message = error instanceof Error ? error.message : String(error);
        warnings.push(`stop failed: ${message}`);
        return { success: false, warning: message };
    });
    if (!stopResult.success && stopResult.warning) {
        warnings.push(`stop: ${stopResult.warning}`);
    }
    const removeResult = await deps.sessionGateway.remove(input.sessionId).catch(error => {
        const message = error instanceof Error ? error.message : String(error);
        warnings.push(`remove failed: ${message}`);
        return { success: false, warning: message };
    });
    if (!removeResult.success && removeResult.warning) {
        warnings.push(`remove: ${removeResult.warning}`);
    }
    return {
        stopped: stopResult.success,
        removed: removeResult.success,
        warnings,
    };
}
//# sourceMappingURL=cleanupClaudeSession.usecase.js.map