ART Framework API Docs
    Preparing search index...

    Class A2ATaskSocket

    A specialized TypedSocket for handling A2A task status updates and events. Allows filtering by task status, type, agent, and other criteria. Can optionally fetch historical task data from a repository.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Retrieves historical A2A task events, optionally filtered by criteria. Note: This method constructs events from stored tasks, not from a dedicated event log.

      Parameters

      • Optionalfilter: A2ATaskFilter

        Optional A2ATaskFilter to filter the tasks.

      • Optionaloptions: { limit?: number; threadId?: string }

        Optional threadId and limit.

      Returns Promise<A2ATaskEvent[]>

      A promise resolving to an array of A2A task events.

    • Notifies all relevant subscribers with new data.

      Parameters

      • data: A2ATaskEvent

        The data payload to send to subscribers.

      • Optionaloptions: { targetSessionId?: string; targetThreadId?: string }

        Optional targeting options (e.g., targetThreadId).

      • OptionalfilterCheck: (data: A2ATaskEvent, filter?: A2ATaskFilter) => boolean

        A function to check if a subscription's filter matches the data.

      Returns void

    • Convenience method to notify about task completion.

      Parameters

      • task: A2ATask

        The completed A2A task.

      • Optionalmetadata: { automatic?: boolean; context?: Record<string, any>; source?: string }

        Optional additional metadata about the completion.

        • Optionalautomatic?: boolean

          Whether this was an automatic update or manual

        • Optionalcontext?: Record<string, any>

          Any additional context

        • Optionalsource?: string

          The component that triggered the update

      Returns void

    • Convenience method to notify about a task creation.

      Parameters

      • task: A2ATask

        The newly created A2A task.

      • Optionalmetadata: { automatic?: boolean; context?: Record<string, any>; source?: string }

        Optional additional metadata about the creation.

        • Optionalautomatic?: boolean

          Whether this was an automatic update or manual

        • Optionalcontext?: Record<string, any>

          Any additional context

        • Optionalsource?: string

          The component that triggered the update

      Returns void

    • Convenience method to notify about task delegation.

      Parameters

      • task: A2ATask

        The delegated A2A task.

      • Optionalmetadata: { automatic?: boolean; context?: Record<string, any>; source?: string }

        Optional additional metadata about the delegation.

        • Optionalautomatic?: boolean

          Whether this was an automatic update or manual

        • Optionalcontext?: Record<string, any>

          Any additional context

        • Optionalsource?: string

          The component that triggered the update

      Returns void

    • Convenience method to notify about task failure.

      Parameters

      • task: A2ATask

        The failed A2A task.

      • Optionalmetadata: { automatic?: boolean; context?: Record<string, any>; source?: string }

        Optional additional metadata about the failure.

        • Optionalautomatic?: boolean

          Whether this was an automatic update or manual

        • Optionalcontext?: Record<string, any>

          Any additional context

        • Optionalsource?: string

          The component that triggered the update

      Returns void

    • Convenience method to notify about a task update.

      Parameters

      • task: A2ATask

        The updated A2A task.

      • OptionalpreviousStatus: A2ATaskStatus

        The previous status of the task (if status changed).

      • Optionalmetadata: { automatic?: boolean; context?: Record<string, any>; source?: string }

        Optional additional metadata about the update.

        • Optionalautomatic?: boolean

          Whether this was an automatic update or manual

        • Optionalcontext?: Record<string, any>

          Any additional context

        • Optionalsource?: string

          The component that triggered the update

      Returns void