Interface HITLHandlerPayload

HITL handler payload for custom human interaction handlers. Handlers receive human interaction requests and manage the approval/response flow.

interface HITLHandlerPayload {
    name: string;
    description: string;
    supportedTypes: ("escalation" | "checkpoint" | "approval" | "clarification" | "edit")[];
    sendNotification: ((notification) => Promise<void>);
    checkHealth?: (() => Promise<{
        healthy: boolean;
        message?: string;
    }>);
}

Properties

name: string

Handler name (e.g., 'slack-approvals', 'email-notifications', 'ui-modal')

description: string

Handler description

supportedTypes: ("escalation" | "checkpoint" | "approval" | "clarification" | "edit")[]

Types of interactions this handler supports

sendNotification: ((notification) => Promise<void>)

Handler function for sending notifications

Type declaration

    • (notification): Promise<void>
    • Parameters

      • notification: {
            type: string;
            requestId: string;
            summary: string;
            urgency: string;
        }
        • type: string
        • requestId: string
        • summary: string
        • urgency: string

      Returns Promise<void>

checkHealth?: (() => Promise<{
    healthy: boolean;
    message?: string;
}>)

Optional function to check handler health/connectivity

Type declaration

    • (): Promise<{
          healthy: boolean;
          message?: string;
      }>
    • Returns Promise<{
          healthy: boolean;
          message?: string;
      }>