Member Junction
    Preparing search index...

    Manages agent state and provides real-time updates for active agents Polls for agent status changes and provides reactive streams

    Implements

    • OnDestroy
    Index

    Constructors

    Properties

    ActiveAgents$: Observable<AgentWithStatus[]> = ...

    Accessors

    Methods

    • Stops an agent run that is still in flight.

      The run's row is the control channel: this marks it Cancelled with reason User Request, and the server process that owns the run notices within a few seconds (the agent-run watchdog's cancellation poll), aborts the in-flight step through the run's cancellation token, and finalizes the run — keeping the payload as it stood — and its reply as stopped. No request reaches the running process directly, so this works whichever replica owns it.

      The row is loaded fresh rather than taken from the polled active-agent list, which refreshes every 30 seconds and may not hold a run that started a moment ago.

      Parameters

      • agentRunId: string

      Returns Promise<boolean>

      true when the row was marked; false when the run was not found, had already finished (nothing to stop), or the save was refused.

    • Stops the in-flight run behind an agent's reply message, for callers that know the conversation detail but not yet the run (the run row is created a moment after the reply placeholder). Finds the newest Running or Paused run for that detail and stops it.

      Parameters

      • conversationDetailId: string

      Returns Promise<boolean>

      true when a run was found and marked; false otherwise.