@@ -35,7 +35,7 @@ const LOG_PREFIX = '[AXe]';
3535const describeUITimestamps = new Map ( ) ;
3636const DESCRIBE_UI_WARNING_TIMEOUT = 60000 ; // 60 seconds
3737
38- function getCoordinateWarning ( simulatorUuid ) : string | null {
38+ function getCoordinateWarning ( simulatorUuid : string ) : string | null {
3939 const session = describeUITimestamps . get ( simulatorUuid ) ;
4040 if ( ! session ) {
4141 return 'Warning: describe_ui has not been called yet. Consider using describe_ui for precise coordinates instead of guessing from screenshots.' ;
@@ -61,11 +61,11 @@ export async function tapLogic(
6161) : Promise < ToolResponse > {
6262 const toolName = 'tap' ;
6363 const simUuidValidation = validateRequiredParam ( 'simulatorUuid' , params . simulatorUuid ) ;
64- if ( ! simUuidValidation . isValid ) return simUuidValidation . errorResponse ;
64+ if ( ! simUuidValidation . isValid ) return simUuidValidation . errorResponse ! ;
6565 const xValidation = validateRequiredParam ( 'x' , params . x ) ;
66- if ( ! xValidation . isValid ) return xValidation . errorResponse ;
66+ if ( ! xValidation . isValid ) return xValidation . errorResponse ! ;
6767 const yValidation = validateRequiredParam ( 'y' , params . y ) ;
68- if ( ! yValidation . isValid ) return yValidation . errorResponse ;
68+ if ( ! yValidation . isValid ) return yValidation . errorResponse ! ;
6969
7070 const { simulatorUuid, x, y, preDelay, postDelay } = params ;
7171 const commandArgs = [ 'tap' , '-x' , String ( x ) , '-y' , String ( y ) ] ;
@@ -127,7 +127,7 @@ export default {
127127 postDelay : z . number ( ) . min ( 0 , 'Post-delay must be non-negative' ) . optional ( ) ,
128128 } ,
129129 async handler ( args : Record < string , unknown > ) : Promise < ToolResponse > {
130- return tapLogic ( args as TapParams , getDefaultCommandExecutor ( ) ) ;
130+ return tapLogic ( args as unknown as TapParams , getDefaultCommandExecutor ( ) ) ;
131131 } ,
132132} ;
133133
@@ -174,7 +174,7 @@ async function executeAxeCommand(
174174 ) ;
175175 }
176176
177- return result . output . trim ( ) ;
177+ return createTextResponse ( result . output . trim ( ) ) ;
178178 } catch ( error ) {
179179 if ( error instanceof Error ) {
180180 if ( error instanceof AxeError ) {
0 commit comments