@@ -2737,18 +2737,18 @@ describe('policy handler', () => {
27372737 } ) ;
27382738} ) ;
27392739
2740- describe ( 'toolSelectionQuality handler' , ( ) => {
2741- // Mock the globals module before importing toolSelectionQuality
2740+ describe ( 'toolUseQuality handler' , ( ) => {
2741+ // Mock the globals module before importing toolUseQuality
27422742 jest . mock ( './globals' , ( ) => ( {
27432743 postQualifire : jest . fn ( ) ,
27442744 convertToMessages : jest . fn ( ) ,
27452745 parseAvailableTools : jest . fn ( ) ,
27462746 } ) ) ;
27472747
2748- let toolSelectionQualityHandler : any ;
2748+ let toolUseQualityHandler : any ;
27492749
27502750 beforeAll ( ( ) => {
2751- toolSelectionQualityHandler = require ( './toolSelectionQuality ' ) . handler ;
2751+ toolUseQualityHandler = require ( './toolUseQuality ' ) . handler ;
27522752 } ) ;
27532753
27542754 const mockContext = {
@@ -2848,7 +2848,7 @@ describe('toolSelectionQuality handler', () => {
28482848 } ,
28492849 ] ) ;
28502850
2851- const result = await toolSelectionQualityHandler (
2851+ const result = await toolUseQualityHandler (
28522852 mockContext ,
28532853 mockParameters ,
28542854 'afterRequestHook' as HookEventType
@@ -2928,7 +2928,7 @@ describe('toolSelectionQuality handler', () => {
29282928 } ,
29292929 ] ) ;
29302930
2931- const result = await toolSelectionQualityHandler (
2931+ const result = await toolUseQualityHandler (
29322932 mockContext ,
29332933 mockParameters ,
29342934 'afterRequestHook' as HookEventType
@@ -2940,7 +2940,7 @@ describe('toolSelectionQuality handler', () => {
29402940
29412941 describe ( 'when called with unsupported event types' , ( ) => {
29422942 it ( 'should return error for beforeRequestHook' , async ( ) => {
2943- const result = await toolSelectionQualityHandler (
2943+ const result = await toolUseQualityHandler (
29442944 mockContext ,
29452945 mockParameters ,
29462946 'beforeRequestHook' as HookEventType
@@ -2949,15 +2949,15 @@ describe('toolSelectionQuality handler', () => {
29492949 expect ( result ) . toEqual ( {
29502950 error : {
29512951 message :
2952- 'Qualifire Tool Selection Quality guardrail only supports after_request_hooks.' ,
2952+ 'Qualifire Tool Use Quality guardrail only supports after_request_hooks.' ,
29532953 } ,
29542954 verdict : true ,
29552955 data : null ,
29562956 } ) ;
29572957 } ) ;
29582958
29592959 it ( 'should return error for other event types' , async ( ) => {
2960- const result = await toolSelectionQualityHandler (
2960+ const result = await toolUseQualityHandler (
29612961 mockContext ,
29622962 mockParameters ,
29632963 'onErrorHook' as HookEventType
@@ -2966,7 +2966,7 @@ describe('toolSelectionQuality handler', () => {
29662966 expect ( result ) . toEqual ( {
29672967 error : {
29682968 message :
2969- 'Qualifire Tool Selection Quality guardrail only supports after_request_hooks.' ,
2969+ 'Qualifire Tool Use Quality guardrail only supports after_request_hooks.' ,
29702970 } ,
29712971 verdict : true ,
29722972 data : null ,
@@ -2989,7 +2989,7 @@ describe('toolSelectionQuality handler', () => {
29892989 ( convertToMessages as jest . Mock ) . mockReturnValue ( [ ] ) ;
29902990 ( parseAvailableTools as jest . Mock ) . mockReturnValue ( [ ] ) ;
29912991
2992- const result = await toolSelectionQualityHandler (
2992+ const result = await toolUseQualityHandler (
29932993 mockContext ,
29942994 mockParameters ,
29952995 'afterRequestHook' as HookEventType
0 commit comments