Build the per-execution handler map exposed to sandboxed user code via
__bridgeCall(name, args). Each handler runs in the host process and
is responsible for its own authorization checks against ctx.config
(the permission allowlists in RuntimeActionConfiguration.permissions).
The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
Returns the JavaScript preamble that ActionEngine prepends to the
user's Runtime action code. The preamble defines the utilities.*
namespace object whose methods proxy through __bridgeCall to the
handlers returned by BuildHandlers. Preamble and handler map MUST
stay in sync — a utilities.foo.bar(x) call requires a
'foo.bar' handler to be registered.
Protected StaticgetReturns the singleton instance of the class. If the instance does not exist, it is created and stored in the Global Object Store. If className is provided it will be used as part of the key in the Global Object Store, otherwise the actual class name will be used. NOTE: the class name used by default is the lowest level of the object hierarchy, so if you have a class that extends another class, the lowest level class name will be used.
OptionalclassName: string
Default concrete
RuntimeActionBridgeBuilder— registered with no key so any subclass registered later wins automatically via MJ's auto-priority tiebreak. Consumers that want to customize the bridge (for example, to add a newutilities.*namespace, tighten the default surface, or stub everything out for tests) just need to register their own subclass:@memberjunction/actionscallsClassFactory.CreateInstance(RuntimeActionBridgeBuilder)and invokes these two methods each time a Runtime action with a bridge configuration runs. If nothing registers (e.g., this package isn't loaded), ActionEngine falls through to pure-compute mode — a safe degradation.