RenderApi, PreviewApi, Engine etc in jsx files

Today I came across some .jsx scripts that come with Photoshop and are used for the Pattern Fill “Deco” option. (Edit > Fill > set “Contents” to Pattern and select a script).

This type of pattern fill opens a dialog where you can set the parameters and get a live preview of the resulting fill effect.
I’m kinda curious about this behavior, since all tasks performed via ActionManager / BatchPlay scripts always take way longer to execute and there’s no way to preview them.

I thought this kind of immediate rendering (via GPU?) is only available in Filters / C++ Plugins.
The mentioned files are .jsx files though, so I assume it’s extendscript?

The scripts use things like RenderApi, PreviewApi, Engine and a lot of other stuff and functions, which aren’t explicitly imported anywhere. Are these just available in the global scope, or maybe just accessible for scripts within certain paths? (Preset folder) And is there some documentation on all of that, or is it just something Adobe developers use internally and not meant to be used by external developers?

Sorry if this post is confusing, I’ve only developed plugins the typical CEP or UXP way and have literally no knowledge about the technologies behind these scripts, engines and apis.

If anyone knows more about this whole topic, I’d be happy to learn about it, even if it’s old or deprecated technology.

I think that Deco scripts have their own universe. To me seems like classic ExtendScipt runs Deco Script but these two are isolated from each other. I am not sure if there are any plans to maintain Deco scripts.

Hm okay, so it remains a big question mark.
I just wish we had some similar technology we could access. Copying and moving layers around via scripting might take like 10-20 seconds based on the amount of layers (because Photoshop has to perform every single task which somehow takes a lot of time), while these deco scripts can just render the whole image in a few milliseconds.