@adcp/client API Reference - v4.19.0
    Preparing search index...

    Class GovernanceMiddleware

    Index

    Constructors

    Accessors

    Methods

    • Run a proposed governance check before sending a tool call to a seller.

      Returns the governance result. The caller decides how to handle each status:

      • approved: proceed with execution (params may be modified by conditions)
      • denied: do not execute
      • escalated: do not execute, return continuation to caller

      When conditions are returned with required_value, this method auto-applies them and re-checks, up to maxConditionsIterations.

      Parameters

      Returns Promise<{ result: GovernanceCheckResult; params: Record<string, unknown> }>

    • Report the outcome of a tool execution to the governance agent. Called after the seller responds (success or failure).

      Parameters

      • checkId: string
      • outcome: OutcomeType
      • OptionalsellerResponse: Record<string, unknown>
      • Optionalerror: { code?: string; message: string }
      • debugLogs: GovernanceDebugEntry[] = []
      • OptionalgovernanceContext: string

      Returns Promise<GovernanceOutcome | undefined>