Skip to content

agents / Exports / ExecutionProxy

Class: ExecutionProxy<T>

ExecutionProxy - Automatic event emission using Proxy pattern

This class wraps target objects and automatically emits events around method execution without modifying business logic.

Benefits:

  • Zero business logic pollution
  • Automatic event emission
  • Configurable per method
  • AOP (Aspect-Oriented Programming) pattern

Type parameters

NameType
Textends object = object

Table of contents

Constructors

Methods

Constructors

constructor

new ExecutionProxy<T>(config): ExecutionProxy<T>

Type parameters

NameType
Textends object = object

Parameters

NameType
configExecutionProxyConfig

Returns

ExecutionProxy<T>

Defined in

packages/agents/src/utils/execution-proxy.ts:51

Methods

configureMethod

configureMethod(methodName, config): this

Configure specific methods for event emission

Parameters

NameType
methodNamestring
configMethodConfig

Returns

this

Defined in

packages/agents/src/utils/execution-proxy.ts:58


configureStandardMethods

configureStandardMethods(): this

Configure multiple methods with standard patterns

Returns

this

Defined in

packages/agents/src/utils/execution-proxy.ts:66


wrap

wrap(target): T

Create a proxy wrapper around the target object

Parameters

NameType
targetT

Returns

T

Defined in

packages/agents/src/utils/execution-proxy.ts:153

Released under the MIT License.