Skip to content

agent-core / 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
configIExecutionProxyConfig

Returns

ExecutionProxy<T>

Defined in

packages/agent-core/src/utils/execution-proxy.ts:75

Methods

configureMethod

configureMethod(methodName, config): this

Configure specific methods for event emission

Parameters

NameType
methodNamestring
configIMethodConfig

Returns

this

Defined in

packages/agent-core/src/utils/execution-proxy.ts:82


configureStandardMethods

configureStandardMethods(): this

Configure multiple methods with standard patterns

Returns

this

Defined in

packages/agent-core/src/utils/execution-proxy.ts:90


wrap

wrap(target): T

Create a proxy wrapper around the target object

Parameters

NameType
targetT

Returns

T

Defined in

packages/agent-core/src/utils/execution-proxy.ts:182

Released under the MIT License.