agent-web-tools - v0.3.0
    Preparing search index...

    Class SecurityPolicy

    Index

    Constructors

    Methods

    • Validate and optionally gate a tool execution through all security checks. Returns a ToolResult with an error if blocked, or null if the action is allowed.

      Parameters

      • tool: string
      • params: Record<string, unknown>

      Returns Promise<ToolResult<null> | null>

    • Log the result of a tool execution (success or error).

      Parameters

      • tool: string
      • params: Record<string, unknown>
      • success: boolean
      • duration: number
      • Optionalerror: string

      Returns void

    • Parameters

      • selector: string

      Returns boolean

    • Parameters

      • selector: string

      Returns string | null

    • Returns { remaining: number; resetMs: number } | null

    • Parameters

      • tool: string

      Returns boolean

    • Reset all internal state (rate limiter, audit log).

      Returns void