Firstly, @Commands() won't work in XPages, even using session.evaluate()
However, we're looking to address both actions, opening a window in a new tab and closing the window, for XPiNC in 852.
To open a new window in XPiNC, you will use the 'target' property, setting it to _blank.
To close, we're looking to support window.close()
hope this helps.
p.