The rl.getPrompt() method returns the current prompt used by rl.prompt().
rl.getPrompt()
rl.prompt()
v15.3.0, v14.17.0
the current prompt string