registerFunctionDecorator
registerFunctionDecorator(
functionName,plugin):void
Decorate a named SDK function — observe its calls or transform its arguments / return value without forking.
Common decoration targets: 'trackFutureChange' (state-mutation tracking),
diagram-listener emitters, save callbacks. See the
Build a plugin guide for the authoritative
list of decoratable functions.
Safe to call more than once; pass plugin.name to deduplicate.
Parameters
Section titled “Parameters”functionName
Section titled “functionName”string
plugin
Section titled “plugin”Returns
Section titled “Returns”void
Example
Section titled “Example”registerFunctionDecorator('trackFutureChange', { place: 'after', callback: ({ params }) => auditLog(params), name: 'audit-log',});