Beignet API reference
    Preparing search index...

    Function createBetterAuthAgentCapabilityTestContext

    • Create a typed execution context for adapter unit tests.

      Returns {
          agentSession: AgentSession;
          arguments?: Record<string, unknown>;
          capability: string;
          capabilityDef: Capability;
          ctx: GenericEndpointContext;
          grant: AgentCapabilityGrant;
          revokeGrant: () => Promise<void>;
      }

      • agentSession: AgentSession
      • Optionalarguments?: Record<string, unknown>
      • capability: string
      • capabilityDef: Capability
      • ctx: GenericEndpointContext
      • grant: AgentCapabilityGrant

        The active grant that authorized this execution.

      • revokeGrant: () => Promise<void>

        Revoke the grant that authorized this execution. Call this for single-use capabilities (e.g. payments) to consume the grant after successful execution.