Didn't know you could write Photoshop plugins in JS, nice!
Edit: fix typo
CEP is for building extensions with HTML+JS+CSS. ExtendScript (an old JS dialect plus Adobe extensions) is for internal product scripting (e.g., building/manipulating the document model in InDesign).
You can bridge the two, of course, but there's no direct connection or even relation without explicit developer effort.