@nevermined-io/payments
    Preparing search index...

    Interface AgentExecutor

    interface AgentExecutor {
        cancelTask: (
            taskId: string,
            eventBus: ExecutionEventBus,
        ) => Promise<void>;
        execute: (
            requestContext: RequestContext,
            eventBus: ExecutionEventBus,
        ) => Promise<void>;
    }
    Index

    Properties

    Properties

    cancelTask: (taskId: string, eventBus: ExecutionEventBus) => Promise<void>

    Method to explicitly cancel a running task. The implementation should handle the logic of stopping the execution and publishing the final 'canceled' status event on the provided event bus.

    Type Declaration

      • (taskId: string, eventBus: ExecutionEventBus): Promise<void>
      • Parameters

        • taskId: string

          The ID of the task to cancel.

        • eventBus: ExecutionEventBus

          The event bus associated with the task's execution.

        Returns Promise<void>

    execute: (
        requestContext: RequestContext,
        eventBus: ExecutionEventBus,
    ) => Promise<void>

    Executes the agent logic based on the request context and publishes events.

    Type Declaration

      • (requestContext: RequestContext, eventBus: ExecutionEventBus): Promise<void>
      • Parameters

        • requestContext: RequestContext

          The context of the current request.

        • eventBus: ExecutionEventBus

          The bus to publish execution events to.

        Returns Promise<void>