Skip to main content

onRequest

plugin.executionGateway.onRequest(callback: Function): void

Register a callback for incoming execution requests. These are proxied agent messages that the claiming plugin must handle. After processing, call sendReply() with the requestId and result.

Parameters

ParameterTypeRequiredDescription
callbackFunctionYesCalled with each ExecutionRequest

Returns

void

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.executionGateway.onRequest(/* Function */);
console.log(result);