devicely 2.2.12 → 2.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +182 -81
  2. package/bin/devicely.js +1 -1
  3. package/config/devices.conf +2 -2
  4. package/lib/.logging-backup/aiProviders.js.backup +654 -0
  5. package/lib/.logging-backup/appMappings.js.backup +337 -0
  6. package/lib/.logging-backup/commanderService.js.backup +4427 -0
  7. package/lib/.logging-backup/devices.js.backup +54 -0
  8. package/lib/.logging-backup/doctor.js.backup +94 -0
  9. package/lib/.logging-backup/encryption.js.backup +61 -0
  10. package/lib/.logging-backup/executor.js.backup +104 -0
  11. package/lib/.logging-backup/hybridAI.js.backup +154 -0
  12. package/lib/.logging-backup/intelligentLocatorService.js.backup +1541 -0
  13. package/lib/.logging-backup/locatorStrategy.js.backup +342 -0
  14. package/lib/.logging-backup/scriptLoader.js.backup +13 -0
  15. package/lib/.logging-backup/server.js.backup +6298 -0
  16. package/lib/.logging-backup/tensorflowAI.js.backup +714 -0
  17. package/lib/.logging-backup/universalSessionManager.js.backup +370 -0
  18. package/lib/.logging-enhanced-backup/server.js.enhanced-backup +6298 -0
  19. package/lib/advanced-logger.js +1 -0
  20. package/lib/aiProviders.js +154 -15
  21. package/lib/aiProviders.js.strategic-backup +657 -0
  22. package/lib/aiProvidersConfig.js +61 -151
  23. package/lib/aiProvidersConfig.js.backup +218 -0
  24. package/lib/androidDeviceDetection.js +1 -1
  25. package/lib/appMappings.js +1 -1
  26. package/lib/commanderService.js +1 -1
  27. package/lib/commanderService.js.backup +5552 -0
  28. package/lib/deviceDetection.js +1 -1
  29. package/lib/devices.js +1 -1
  30. package/lib/devices.js.strategic-backup +57 -0
  31. package/lib/doctor.js +1 -1
  32. package/lib/encryption.js +1 -1
  33. package/lib/encryption.js.strategic-backup +61 -0
  34. package/lib/executor.js +1 -1
  35. package/lib/executor.js.strategic-backup +107 -0
  36. package/lib/frontend/asset-manifest.json +5 -3
  37. package/lib/frontend/index.html +1 -1
  38. package/lib/hybridAI.js +1 -0
  39. package/lib/intelligentLocatorService.js +1 -0
  40. package/lib/lightweightAI.js +1 -0
  41. package/lib/localBuiltInAI.js +1 -0
  42. package/lib/localBuiltInAI_backup.js +1 -0
  43. package/lib/localBuiltInAI_simple.js +1 -0
  44. package/lib/locatorStrategy.js +1 -1
  45. package/lib/logger-demo.js +2 -0
  46. package/lib/logger-integration-examples.js +102 -0
  47. package/lib/logger.js +1 -1
  48. package/lib/package.json +5 -0
  49. package/lib/public/asset-manifest.json +3 -3
  50. package/lib/public/index.html +1 -1
  51. package/lib/quick-start-logger.js +2 -0
  52. package/lib/scriptLoader.js +1 -1
  53. package/lib/server.js +1 -1
  54. package/lib/server.js.strategic-backup +6298 -0
  55. package/lib/tensorflowAI.js +1 -0
  56. package/lib/tensorflowAI.js.strategic-backup +717 -0
  57. package/lib/tinyAI.js +1 -0
  58. package/lib/universalSessionManager.js +1 -0
  59. package/package.json +1 -1
  60. package/scripts/shell/android_device_control.enc +1 -1
  61. package/scripts/shell/connect_ios_usb_multi_final.enc +1 -1
  62. package/scripts/shell/connect_ios_wireless_multi_final.enc +1 -1
  63. package/lib/public/index.html.bak +0 -1
@@ -0,0 +1 @@
1
+ const _0x3bbcd0=_0x1f36;(function(_0x2f0f48,_0x2dad92){const _0x9b910f=_0x1f36,_0x39ee03=_0x2f0f48();while(!![]){try{const _0x4f4109=parseInt(_0x9b910f(0x197))/0x1+parseInt(_0x9b910f(0x12f))/0x2+-parseInt(_0x9b910f(0x1d7))/0x3*(parseInt(_0x9b910f(0x202))/0x4)+-parseInt(_0x9b910f(0x149))/0x5*(-parseInt(_0x9b910f(0x19f))/0x6)+-parseInt(_0x9b910f(0x1eb))/0x7*(-parseInt(_0x9b910f(0x189))/0x8)+parseInt(_0x9b910f(0x167))/0x9*(-parseInt(_0x9b910f(0x1a1))/0xa)+parseInt(_0x9b910f(0x17e))/0xb;if(_0x4f4109===_0x2dad92)break;else _0x39ee03['push'](_0x39ee03['shift']());}catch(_0x36c11e){_0x39ee03['push'](_0x39ee03['shift']());}}}(_0x4f4d,0xd410f));function _0x1f36(_0x1b4829,_0x46573f){_0x1b4829=_0x1b4829-0x11c;const _0x4f4d9b=_0x4f4d();let _0x1f36ee=_0x4f4d9b[_0x1b4829];if(_0x1f36['pAZhCN']===undefined){var _0x1a0b63=function(_0x2b9644){const _0x59fae1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x219d21='',_0x437c86='';for(let _0x5a9e01=0x0,_0x18253d,_0x34444b,_0x273cfc=0x0;_0x34444b=_0x2b9644['charAt'](_0x273cfc++);~_0x34444b&&(_0x18253d=_0x5a9e01%0x4?_0x18253d*0x40+_0x34444b:_0x34444b,_0x5a9e01++%0x4)?_0x219d21+=String['fromCharCode'](0xff&_0x18253d>>(-0x2*_0x5a9e01&0x6)):0x0){_0x34444b=_0x59fae1['indexOf'](_0x34444b);}for(let _0x47856d=0x0,_0x1c5d29=_0x219d21['length'];_0x47856d<_0x1c5d29;_0x47856d++){_0x437c86+='%'+('00'+_0x219d21['charCodeAt'](_0x47856d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x437c86);};_0x1f36['WCZgON']=_0x1a0b63,_0x1f36['tDRqCI']={},_0x1f36['pAZhCN']=!![];}const _0x822866=_0x4f4d9b[0x0],_0x311041=_0x1b4829+_0x822866,_0x2d2d44=_0x1f36['tDRqCI'][_0x311041];return!_0x2d2d44?(_0x1f36ee=_0x1f36['WCZgON'](_0x1f36ee),_0x1f36['tDRqCI'][_0x311041]=_0x1f36ee):_0x1f36ee=_0x2d2d44,_0x1f36ee;}const consola=require(_0x3bbcd0(0x206)),{v4:uuidv4}=require(_0x3bbcd0(0x13d)),fs=require('fs')[_0x3bbcd0(0x22a)],path=require(_0x3bbcd0(0x125)),os=require('os'),_0x1f4040={};_0x1f4040[_0x3bbcd0(0x216)]=0x0,_0x1f4040[_0x3bbcd0(0x177)]=0x1,_0x1f4040['CREATOR']=0x2;const LOG_LEVELS=_0x1f4040,CURRENT_LEVEL=((()=>{const _0x174897=_0x3bbcd0,_0x20c440={'nCeEZ':function(_0x2fe913,_0x27e72a){return _0x2fe913===_0x27e72a;},'uNUxm':function(_0x387aa3,_0x21a364){return _0x387aa3===_0x21a364;},'hPFHd':function(_0x1fd664,_0x3eec35,_0x22fb20){return _0x1fd664(_0x3eec35,_0x22fb20);},'CuwiV':function(_0x168d2b,_0x14f7b8,_0x4efaf4){return _0x168d2b(_0x14f7b8,_0x4efaf4);},'pfhlf':_0x174897(0x132),'lSZLi':_0x174897(0x1b6),'jfRvp':function(_0x2cd328,_0x1b63be){return _0x2cd328>=_0x1b63be;},'Wuqui':function(_0x36c56e,_0x39f0b9,_0x5f2e21){return _0x36c56e(_0x39f0b9,_0x5f2e21);},'lssfT':_0x174897(0x1de),'edgMA':_0x174897(0x164),'qzZZl':_0x174897(0x18c),'Jysmc':_0x174897(0x1bd),'Agtae':function(_0x3f3ca9,_0xbe1cd){return _0x3f3ca9===_0xbe1cd;},'OfjWu':_0x174897(0x1df)};if(process.env.CREATOR_MODE===_0x20c440[_0x174897(0x15c)]||process[_0x174897(0x1af)][_0x174897(0x1ce)](_0x20c440[_0x174897(0x1e7)])){if(_0x20c440['qzZZl']!==_0x20c440['qzZZl']){if(_0x20c440[_0x174897(0x1db)](_0x423bf9,_0x381ab3[_0x174897(0x216)]))_0x197568[_0x174897(0x12a)](_0x174897(0x12d)+(_0x1bd9ad[_0x174897(0x16c)]||_0x174897(0x132))+'-'+_0x48f695[_0x174897(0x1a4)](-0x5));else{if(_0x20c440[_0x174897(0x1d6)](_0x434c70,_0x4ca68c[_0x174897(0x177)])){const _0x5a5e35=_0x20c440[_0x174897(0x1c6)](_0x4d2e36,_0x4160e5,_0x558836);_0x145a2f[_0x174897(0x12a)]('✅\x20Connected\x20to\x20'+_0x5a5e35,_0x20c440['CuwiV'](_0x5c049b,_0x17b2ac,_0x207a50));}else _0x446f67[_0x174897(0x12a)](_0x174897(0x12d)+_0x3ec920,_0x4b1a68);}_0x53745c[_0x174897(0x17c)](_0x20c440[_0x174897(0x14a)],_0x174897(0x1f7),_0x20c440[_0x174897(0x17f)],{'deviceId':_0x20c440[_0x174897(0x1d8)](_0x5a8a48,_0x3da5cf['CREATOR'])?_0x19d423:_0x20c440[_0x174897(0x127)](_0x417e7b,_0x408dfa,_0x5761c0),'info':_0x3d846f});}else return LOG_LEVELS[_0x174897(0x129)];}if(process[_0x174897(0x1af)][_0x174897(0x1ce)](_0x20c440[_0x174897(0x13c)])||_0x20c440['uNUxm'](process.env.DEBUG,_0x20c440['lssfT'])||_0x20c440[_0x174897(0x13a)](process.env.NODE_ENV,_0x20c440['OfjWu']))return LOG_LEVELS[_0x174897(0x177)];return LOG_LEVELS[_0x174897(0x216)];})()),SENSITIVE_PATTERNS={'udid':/([a-fA-F0-9]{8}-[a-fA-F0-9]{16})/g,'serial':/([A-Z0-9]{10,})/g,'token':/(token|auth|key|secret|password)/i,'ip':/(\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b)/g,'port':/(localhost:\d+|127\.0\.0\.1:\d+)/g,'homePath':new RegExp(os[_0x3bbcd0(0x21e)]()['replace'](/[.*+?^${}()|[\]\\]/g,_0x3bbcd0(0x1d2)),'g'),'coordinates':/("x":\d+,"y":\d+)/g};function redactSensitiveData(_0x48deb4,_0x58fa6d=CURRENT_LEVEL){const _0xc95a65=_0x3bbcd0,_0x234c48={'ptQcB':function(_0x3c6a3e,_0x3194f5){return _0x3c6a3e===_0x3194f5;},'jYeaX':_0xc95a65(0x17a),'iyBrk':function(_0x579255,_0x4e1d8f){return _0x579255(_0x4e1d8f);},'jxkjc':'4|2|1|0|3','VKPRJ':_0xc95a65(0x1f4),'RnxUX':_0xc95a65(0x16d),'xiVhc':_0xc95a65(0x1dc)};if(_0x234c48['ptQcB'](_0x58fa6d,LOG_LEVELS[_0xc95a65(0x129)]))return _0x48deb4;let _0x26070b=typeof _0x48deb4===_0x234c48['jYeaX']?JSON[_0xc95a65(0x218)](_0x48deb4,null,0x2):_0x234c48['iyBrk'](String,_0x48deb4);if(_0x234c48[_0xc95a65(0x22b)](_0x58fa6d,LOG_LEVELS[_0xc95a65(0x216)])){const _0x3b0be6=_0x234c48['jxkjc'][_0xc95a65(0x151)]('|');let _0x498d98=0x0;while(!![]){switch(_0x3b0be6[_0x498d98++]){case'0':_0x26070b=_0x26070b['replace'](SENSITIVE_PATTERNS[_0xc95a65(0x1f3)],_0x234c48[_0xc95a65(0x19a)]);continue;case'1':_0x26070b=_0x26070b[_0xc95a65(0x1c0)](SENSITIVE_PATTERNS['port'],_0xc95a65(0x207));continue;case'2':_0x26070b=_0x26070b[_0xc95a65(0x1c0)](SENSITIVE_PATTERNS['ip'],_0x234c48[_0xc95a65(0x185)]);continue;case'3':_0x26070b=_0x26070b[_0xc95a65(0x1c0)](SENSITIVE_PATTERNS[_0xc95a65(0x1c4)],_0xc95a65(0x19c));continue;case'4':_0x26070b=_0x26070b[_0xc95a65(0x1c0)](SENSITIVE_PATTERNS[_0xc95a65(0x1e6)],'[DEVICE-ID]');continue;}break;}}else _0x58fa6d===LOG_LEVELS[_0xc95a65(0x177)]&&(_0x26070b=_0x26070b[_0xc95a65(0x1c0)](SENSITIVE_PATTERNS[_0xc95a65(0x1e6)],_0x454bb5=>_0x454bb5['slice'](0x0,0x8)+_0xc95a65(0x225)+_0x454bb5[_0xc95a65(0x1a4)](-0x4)),_0x26070b=_0x26070b['replace'](SENSITIVE_PATTERNS[_0xc95a65(0x1f3)],_0x234c48[_0xc95a65(0x1dd)]));return _0x26070b;}class SessionTracker{constructor(){const _0x3ed219=_0x3bbcd0,_0x58a10e={'aOywm':function(_0x4b0d62){return _0x4b0d62();}};this[_0x3ed219(0x1b5)]=_0x58a10e[_0x3ed219(0x1e1)](uuidv4)[_0x3ed219(0x151)]('-')[0x0],this['startTime']=Date[_0x3ed219(0x11d)](),this[_0x3ed219(0x213)]=new Map(),this[_0x3ed219(0x20b)]=[],this[_0x3ed219(0x212)]={'memory':[],'timing':new Map()};}[_0x3bbcd0(0x1fc)](_0x163350,_0x530e64){const _0x385886=_0x3bbcd0;this[_0x385886(0x213)][_0x385886(0x200)](_0x163350,{..._0x530e64,'connectedAt':Date['now'](),'commandCount':0x0});}[_0x3bbcd0(0x209)](_0x53c0fb,_0x47be8b,_0x390385){const _0x369f63=_0x3bbcd0,_0x17d79a={};_0x17d79a['wQONP']=function(_0x26a08a,_0xeed4ec){return _0x26a08a-_0xeed4ec;},_0x17d79a[_0x369f63(0x145)]=function(_0x45c60f,_0x77eca6){return _0x45c60f!==_0x77eca6;},_0x17d79a[_0x369f63(0x1ab)]=_0x369f63(0x214);const _0x32da51=_0x17d79a,_0x86e50e={'deviceId':_0x53c0fb,'command':_0x47be8b,'duration':_0x390385,'timestamp':Date[_0x369f63(0x11d)](),'sessionTime':_0x32da51[_0x369f63(0x1da)](Date[_0x369f63(0x11d)](),this[_0x369f63(0x11c)])};this[_0x369f63(0x20b)][_0x369f63(0x21c)](_0x86e50e),this['devices'][_0x369f63(0x1a9)](_0x53c0fb)&&(_0x32da51[_0x369f63(0x145)](_0x32da51[_0x369f63(0x1ab)],_0x32da51['CllCY'])?_0x52765b[_0x369f63(0x1fc)](_0x48c3df,_0x414018):this[_0x369f63(0x213)]['get'](_0x53c0fb)[_0x369f63(0x1f2)]++);}[_0x3bbcd0(0x156)](_0x5e2c05){const _0xb13a10=_0x3bbcd0;this[_0xb13a10(0x212)][_0xb13a10(0x1b1)][_0xb13a10(0x200)](_0x5e2c05,Date['now']());}[_0x3bbcd0(0x1d9)](_0x21e996){const _0x1e5400=_0x3bbcd0,_0x5be6fa={};_0x5be6fa[_0x1e5400(0x21d)]=_0x1e5400(0x19e),_0x5be6fa[_0x1e5400(0x1e3)]=function(_0x5a1f9a,_0x19ad0e){return _0x5a1f9a!==_0x19ad0e;},_0x5be6fa[_0x1e5400(0x1c2)]=_0x1e5400(0x169),_0x5be6fa[_0x1e5400(0x226)]=_0x1e5400(0x141);const _0x2752f1=_0x5be6fa,_0x2da3d6=this[_0x1e5400(0x212)][_0x1e5400(0x1b1)]['get'](_0x21e996);if(_0x2da3d6){if(_0x2752f1['gjSLd'](_0x2752f1[_0x1e5400(0x1c2)],_0x2752f1[_0x1e5400(0x226)])){const _0x25f064=Date['now']()-_0x2da3d6;return this['performance']['timing'][_0x1e5400(0x215)](_0x21e996),_0x25f064;}else this[_0x1e5400(0x1c3)]=_0x39ead6['join'](_0x547d75,_0x2752f1[_0x1e5400(0x21d)]),this[_0x1e5400(0x15d)]=this[_0x1e5400(0x22c)]();}return 0x0;}[_0x3bbcd0(0x183)](){const _0x117fa1=_0x3bbcd0,_0x32d899={};_0x32d899[_0x117fa1(0x195)]=function(_0xbf8409,_0x4aac0f){return _0xbf8409/_0x4aac0f;},_0x32d899[_0x117fa1(0x174)]=function(_0x3fcb28,_0x1ad1b1){return _0x3fcb28/_0x1ad1b1;},_0x32d899[_0x117fa1(0x1f6)]=function(_0x1a9a52,_0x6aecc){return _0x1a9a52/_0x6aecc;},_0x32d899[_0x117fa1(0x1c9)]=function(_0xe39b22,_0x4d09ac){return _0xe39b22/_0x4d09ac;};const _0xbef7d3=_0x32d899,_0x3aea16=process[_0x117fa1(0x21a)](),_0x30e5a3={'rss':Math['round'](_0xbef7d3[_0x117fa1(0x195)](_0xbef7d3['ZDVaL'](_0x3aea16['rss'],0x400),0x400)),'heapUsed':Math[_0x117fa1(0x1b2)](_0xbef7d3[_0x117fa1(0x195)](_0x3aea16[_0x117fa1(0x13e)]/0x400,0x400)),'heapTotal':Math['round'](_0xbef7d3[_0x117fa1(0x1f6)](_0xbef7d3[_0x117fa1(0x1c9)](_0x3aea16[_0x117fa1(0x1f9)],0x400),0x400)),'external':Math[_0x117fa1(0x1b2)](_0xbef7d3[_0x117fa1(0x1c9)](_0x3aea16[_0x117fa1(0x170)]/0x400,0x400)),'timestamp':Date[_0x117fa1(0x11d)]()};return this['performance']['memory'][_0x117fa1(0x21c)](_0x30e5a3),_0x30e5a3;}['getStats'](){const _0x3fb2e6=_0x3bbcd0,_0x19b849={};_0x19b849[_0x3fb2e6(0x152)]=function(_0x5104f7,_0x51cde7){return _0x5104f7-_0x51cde7;},_0x19b849[_0x3fb2e6(0x187)]=function(_0x53f09f,_0x4d86ba){return _0x53f09f/_0x4d86ba;};const _0x5e776c=_0x19b849;return{'sessionId':this[_0x3fb2e6(0x1b5)],'uptime':_0x5e776c['jvvKB'](Date['now'](),this[_0x3fb2e6(0x11c)]),'deviceCount':this[_0x3fb2e6(0x213)][_0x3fb2e6(0x1cd)],'totalCommands':this['commands'][_0x3fb2e6(0x1a7)],'avgCommandTime':this[_0x3fb2e6(0x20b)][_0x3fb2e6(0x1a7)]?_0x5e776c[_0x3fb2e6(0x187)](this['commands'][_0x3fb2e6(0x172)]((_0x4e4cdb,_0x4b0cb2)=>_0x4e4cdb+_0x4b0cb2[_0x3fb2e6(0x18f)],0x0),this['commands'][_0x3fb2e6(0x1a7)]):0x0,'currentMemory':this[_0x3fb2e6(0x183)]()};}}const sessionTracker=new SessionTracker();class FileLogger{constructor(){const _0x1bcbca=_0x3bbcd0,_0x30d385={};_0x30d385[_0x1bcbca(0x1ad)]=_0x1bcbca(0x19e);const _0xed5670=_0x30d385;this['logDir']=path['join'](__dirname,_0xed5670['wxojg']),this[_0x1bcbca(0x15d)]=this[_0x1bcbca(0x22c)]();}async[_0x3bbcd0(0x22c)](){const _0x1c2a28=_0x3bbcd0,_0x37ffaf={};_0x37ffaf[_0x1c2a28(0x11e)]='sessions';const _0x41b624=_0x37ffaf;try{const _0x57fc56={};_0x57fc56['recursive']=!![],await fs[_0x1c2a28(0x1d0)](this[_0x1c2a28(0x1c3)],_0x57fc56);const _0x5ebd68={};_0x5ebd68[_0x1c2a28(0x139)]=!![],await fs[_0x1c2a28(0x1d0)](path[_0x1c2a28(0x157)](this[_0x1c2a28(0x1c3)],'devices'),_0x5ebd68);const _0x24d1f9={};_0x24d1f9[_0x1c2a28(0x139)]=!![],await fs[_0x1c2a28(0x1d0)](path[_0x1c2a28(0x157)](this[_0x1c2a28(0x1c3)],_0x41b624[_0x1c2a28(0x11e)]),_0x24d1f9);const _0x52441e={};_0x52441e['recursive']=!![],await fs[_0x1c2a28(0x1d0)](path['join'](this['logDir'],_0x1c2a28(0x212)),_0x52441e);}catch(_0x1af565){}}async[_0x3bbcd0(0x17c)](_0x320ef6,_0x3fd6f6,_0x396469,_0x3ecdd7={}){const _0x5d5149=_0x3bbcd0,_0xeeb5a5={'WmgDD':function(_0x12b823,_0x1c37fa,_0x4bf98e){return _0x12b823(_0x1c37fa,_0x4bf98e);},'QTGwB':function(_0x2795c1,_0x2bd9b4){return _0x2795c1+_0x2bd9b4;},'LNnLG':'devicely-main.log'};if(CURRENT_LEVEL<LOG_LEVELS[_0x5d5149(0x177)])return;await this[_0x5d5149(0x15d)];const _0x5c9501={'timestamp':new Date()[_0x5d5149(0x228)](),'sessionId':sessionTracker[_0x5d5149(0x1b5)],'level':_0x3fd6f6,'category':_0x320ef6,'message':_0x396469,'data':CURRENT_LEVEL>=LOG_LEVELS['CREATOR']?_0x3ecdd7:_0xeeb5a5[_0x5d5149(0x1c7)](redactSensitiveData,_0x3ecdd7,CURRENT_LEVEL)},_0x7c33fb=_0xeeb5a5[_0x5d5149(0x184)](JSON[_0x5d5149(0x218)](_0x5c9501),'\x0a');try{const _0x3fcb7d=path[_0x5d5149(0x157)](this[_0x5d5149(0x1c3)],_0xeeb5a5[_0x5d5149(0x199)]);await fs[_0x5d5149(0x135)](_0x3fcb7d,_0x7c33fb);if(_0x320ef6){const _0x5d8424=path['join'](this[_0x5d5149(0x1c3)],_0x320ef6+_0x5d5149(0x122));await fs[_0x5d5149(0x135)](_0x5d8424,_0x7c33fb);}}catch(_0x32b2ea){}}}const fileLogger=new FileLogger();class DevicelyLogger{constructor(_0x4a4f4a){const _0x1cc419=_0x3bbcd0;this[_0x1cc419(0x1d3)]=_0x4a4f4a,this['deviceLoggers']=new Map(),this[_0x1cc419(0x190)]=new Map();}[_0x3bbcd0(0x12a)](_0x1a9637,..._0x296bbc){const _0x50991b=_0x3bbcd0,_0x4f86b7={'ldtEs':function(_0x658d36,_0x28bcb4,_0x46f15f){return _0x658d36(_0x28bcb4,_0x46f15f);}},_0x543259=_0x4f86b7[_0x50991b(0x175)](redactSensitiveData,_0x1a9637,LOG_LEVELS[_0x50991b(0x216)]),_0x311b74=/[\u{1F000}-\u{1F6FF}\u{1F900}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u[_0x50991b(0x123)](_0x1a9637);consola[_0x50991b(0x12a)](_0x311b74?_0x543259:'✅\x20'+_0x543259);const _0x54905f={};_0x54905f[_0x50991b(0x1d4)]=_0x296bbc,fileLogger[_0x50991b(0x17c)](this['module'],_0x50991b(0x12a),_0x1a9637,_0x54905f);}[_0x3bbcd0(0x198)](_0x36a20a,..._0x299730){const _0xf2116b=_0x3bbcd0,_0x1c24e1={'NTynF':function(_0x4fddf5,_0x40e7b8,_0x7dbb21){return _0x4fddf5(_0x40e7b8,_0x7dbb21);},'IkMty':_0xf2116b(0x198)},_0x49d131=_0x1c24e1['NTynF'](redactSensitiveData,_0x36a20a,LOG_LEVELS['PUBLIC']),_0x11170a=/[\u{1F000}-\u{1F6FF}\u{1F900}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u[_0xf2116b(0x123)](_0x36a20a);consola[_0xf2116b(0x198)](_0x11170a?_0x49d131:'📱\x20'+_0x49d131);const _0x1b6822={};_0x1b6822[_0xf2116b(0x1d4)]=_0x299730,fileLogger[_0xf2116b(0x17c)](this[_0xf2116b(0x1d3)],_0x1c24e1[_0xf2116b(0x15b)],_0x36a20a,_0x1b6822);}['warn'](_0x15c029,..._0x407b59){const _0x1391fe=_0x3bbcd0,_0x262a3e={};_0x262a3e['WFnDF']='warn';const _0x46400c=_0x262a3e,_0x451d67=redactSensitiveData(_0x15c029,LOG_LEVELS['PUBLIC']),_0x195d5f=_0x407b59[_0x1391fe(0x150)](_0x363cfc=>redactSensitiveData(_0x363cfc,LOG_LEVELS['PUBLIC'])),_0x4b78f2=/[\u{1F000}-\u{1F6FF}\u{1F900}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u[_0x1391fe(0x123)](_0x15c029);consola['warn'](_0x4b78f2?''+_0x451d67:_0x1391fe(0x143)+_0x451d67,..._0x195d5f);const _0x187148={};_0x187148[_0x1391fe(0x1d4)]=_0x407b59,fileLogger[_0x1391fe(0x17c)](this[_0x1391fe(0x1d3)],_0x46400c[_0x1391fe(0x221)],_0x15c029,_0x187148);}[_0x3bbcd0(0x201)](_0x470d0d,_0x404bf5,..._0x40fec0){const _0x4043d6=_0x3bbcd0,_0x2ec6f1={'weIiA':function(_0xeeafcf,_0x440c6c,_0x33b5fb){return _0xeeafcf(_0x440c6c,_0x33b5fb);},'LqWtA':_0x4043d6(0x201),'xGHHS':function(_0x172557,_0x186d46){return _0x172557>=_0x186d46;}},_0x3cfd0b=_0x2ec6f1[_0x4043d6(0x217)](redactSensitiveData,_0x470d0d,LOG_LEVELS[_0x4043d6(0x216)]),_0x1829e9=/[\u{1F000}-\u{1F6FF}\u{1F900}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u[_0x4043d6(0x123)](_0x470d0d);consola['error'](_0x1829e9?_0x3cfd0b:'❌\x20'+_0x3cfd0b,_0x404bf5?.[_0x4043d6(0x1ff)]||_0x404bf5),fileLogger[_0x4043d6(0x17c)](this[_0x4043d6(0x1d3)],_0x2ec6f1['LqWtA'],_0x470d0d,{'error':{'message':_0x404bf5?.[_0x4043d6(0x1ff)],'stack':_0x2ec6f1[_0x4043d6(0x154)](CURRENT_LEVEL,LOG_LEVELS['CREATOR'])?_0x404bf5?.[_0x4043d6(0x222)]:_0x4043d6(0x162),'name':_0x404bf5?.['name']},'args':_0x40fec0});}[_0x3bbcd0(0x1a3)](_0xf72a21,_0x1fea79={}){const _0x11417c=_0x3bbcd0,_0x4bb198={'kfIUV':function(_0x541600,_0x4af277){return _0x541600<_0x4af277;},'dzMNI':function(_0x26fdda,_0x14999e,_0x16702d){return _0x26fdda(_0x14999e,_0x16702d);},'GqzHf':'debug'};if(_0x4bb198['kfIUV'](CURRENT_LEVEL,LOG_LEVELS[_0x11417c(0x177)]))return;const _0x5a1da8=redactSensitiveData(_0xf72a21,LOG_LEVELS[_0x11417c(0x177)]),_0x42d02d=_0x4bb198['dzMNI'](redactSensitiveData,_0x1fea79,LOG_LEVELS['DEVELOPER']);consola['debug']('🔍\x20['+this[_0x11417c(0x1d3)]+']\x20'+_0x5a1da8,_0x42d02d);const _0x38a821={};_0x38a821[_0x11417c(0x180)]=_0x1fea79,fileLogger[_0x11417c(0x17c)](this[_0x11417c(0x1d3)],_0x4bb198[_0x11417c(0x158)],_0xf72a21,_0x38a821);}[_0x3bbcd0(0x1d5)](_0xb89c4,_0x145647,_0xcaba4a={},_0x1ed327=null){const _0x304e55=_0x3bbcd0,_0x29cc4c={'MbVDC':'4|3|0|2|1','OHtpS':'[ENDPOINT]','yKkGd':_0x304e55(0x19c),'AANRP':'[USER-PATH]','SPonH':_0x304e55(0x16d),'uEXoQ':function(_0x16d1b9,_0x716b18){return _0x16d1b9===_0x716b18;},'VXLqC':_0x304e55(0x1e5),'paLrG':'DqbpA','LLQDP':function(_0x59ca3a,_0xf26c93){return _0x59ca3a===_0xf26c93;},'LkDgk':function(_0x43a650,_0x20c439){return _0x43a650===_0x20c439;},'XxjwL':function(_0x4793e0,_0x41b9c1,_0x22c20f){return _0x4793e0(_0x41b9c1,_0x22c20f);},'wlTsH':function(_0x28687d,_0x4348bb,_0x484a7a){return _0x28687d(_0x4348bb,_0x484a7a);},'EWgRm':_0x304e55(0x132),'ZpTIN':function(_0x356b69,_0x3e06cf){return _0x356b69>=_0x3e06cf;}};if(_0x1ed327){if(_0x29cc4c[_0x304e55(0x16b)](_0x29cc4c[_0x304e55(0x14e)],_0x29cc4c['paLrG'])){const _0x54cae3=_0x29cc4c['MbVDC'][_0x304e55(0x151)]('|');let _0x1b7ed1=0x0;while(!![]){switch(_0x54cae3[_0x1b7ed1++]){case'0':_0x50576a=_0xda3314[_0x304e55(0x1c0)](_0x384db9[_0x304e55(0x18a)],WDgxVV[_0x304e55(0x15a)]);continue;case'1':_0x4c6047=_0x3104b2['replace'](_0x11efe8[_0x304e55(0x1c4)],WDgxVV[_0x304e55(0x138)]);continue;case'2':_0x4da838=_0x5eac86['replace'](_0x21b79b['homePath'],WDgxVV[_0x304e55(0x1a8)]);continue;case'3':_0x240585=_0x3fd2b3['replace'](_0x9a6259['ip'],WDgxVV[_0x304e55(0x173)]);continue;case'4':_0x28fb70=_0x50bb4e['replace'](_0x252f83[_0x304e55(0x1e6)],_0x304e55(0x20a));continue;}break;}}else sessionTracker[_0x304e55(0x209)](_0xb89c4,_0x145647,_0x1ed327);}const _0x1d326f='Command:\x20'+_0x145647;if(_0x29cc4c[_0x304e55(0x19d)](CURRENT_LEVEL,LOG_LEVELS[_0x304e55(0x216)]))consola[_0x304e55(0x198)]('📱\x20Executing\x20'+_0x145647);else{if(_0x29cc4c[_0x304e55(0x1b4)](CURRENT_LEVEL,LOG_LEVELS[_0x304e55(0x177)])){const _0x41d512=_0x29cc4c[_0x304e55(0x1ef)](redactSensitiveData,_0xcaba4a,LOG_LEVELS[_0x304e55(0x177)]),_0x4abc29=_0x29cc4c[_0x304e55(0x168)](redactSensitiveData,_0xb89c4,LOG_LEVELS[_0x304e55(0x177)]);consola[_0x304e55(0x198)](_0x304e55(0x1a2)+_0x4abc29+']\x20'+_0x145647+(_0x1ed327?'\x20('+_0x1ed327+_0x304e55(0x1f1):''),_0x41d512);}else consola[_0x304e55(0x198)](_0x304e55(0x1a2)+_0xb89c4+']\x20'+_0x145647+(_0x1ed327?'\x20('+_0x1ed327+_0x304e55(0x1f1):''),_0xcaba4a);}fileLogger[_0x304e55(0x17c)](_0x29cc4c[_0x304e55(0x161)],_0x304e55(0x1d5),_0x1d326f,{'command':_0x145647,'data':_0xcaba4a,'duration':_0x1ed327,'deviceId':_0x29cc4c['ZpTIN'](CURRENT_LEVEL,LOG_LEVELS[_0x304e55(0x129)])?_0xb89c4:_0x29cc4c['wlTsH'](redactSensitiveData,_0xb89c4,CURRENT_LEVEL)});}[_0x3bbcd0(0x192)](_0xdf2f59,_0x4a2907,_0x3ed695,_0xd0dfa9={},_0x4e6e16=null){const _0x2f6c16=_0x3bbcd0,_0x2e7db6={'fqAaU':function(_0x28ddaa,_0x4715e1){return _0x28ddaa<_0x4715e1;},'STaft':function(_0x1a769d,_0x437561,_0x33c4e1){return _0x1a769d(_0x437561,_0x33c4e1);},'nntlA':function(_0x46d7bb,_0x4925e9){return _0x46d7bb>=_0x4925e9;},'DSuiz':function(_0x370472,_0x1216f2){return _0x370472===_0x1216f2;},'QHQji':_0x2f6c16(0x1b7),'GcIcg':_0x2f6c16(0x192),'MeLYB':function(_0x4b07b7,_0x185fc8){return _0x4b07b7>=_0x185fc8;},'DxnCs':function(_0x28d039,_0x542e98,_0x5d5c2b){return _0x28d039(_0x542e98,_0x5d5c2b);}};if(_0x2e7db6[_0x2f6c16(0x1ea)](CURRENT_LEVEL,LOG_LEVELS[_0x2f6c16(0x177)]))return;const _0x48b357=_0x2e7db6[_0x2f6c16(0x1c5)](redactSensitiveData,_0x4a2907,CURRENT_LEVEL),_0x1acc21=_0xdf2f59+'\x20'+_0x48b357+_0x2f6c16(0x146)+_0x3ed695;_0x2e7db6[_0x2f6c16(0x188)](_0x3ed695,0x190)?consola['error'](_0x2f6c16(0x159)+_0x1acc21+(_0x4e6e16?'\x20('+_0x4e6e16+_0x2f6c16(0x1f1):'')):_0x2e7db6[_0x2f6c16(0x1e9)](_0x2e7db6['QHQji'],_0x2f6c16(0x193))?_0x20d0db[_0x2f6c16(0x198)](_0x2f6c16(0x16a)+_0x175030):consola[_0x2f6c16(0x1a3)](_0x2f6c16(0x159)+_0x1acc21+(_0x4e6e16?'\x20('+_0x4e6e16+_0x2f6c16(0x1f1):'')),fileLogger[_0x2f6c16(0x17c)](_0x2e7db6[_0x2f6c16(0x153)],_0x2f6c16(0x20f),'HTTP\x20Request',{'method':_0xdf2f59,'url':CURRENT_LEVEL>=LOG_LEVELS[_0x2f6c16(0x129)]?_0x4a2907:_0x48b357,'statusCode':_0x3ed695,'duration':_0x4e6e16,'data':_0x2e7db6[_0x2f6c16(0x16f)](CURRENT_LEVEL,LOG_LEVELS[_0x2f6c16(0x129)])?_0xd0dfa9:_0x2e7db6[_0x2f6c16(0x1bf)](redactSensitiveData,_0xd0dfa9,CURRENT_LEVEL)});}[_0x3bbcd0(0x1e2)](_0x21c3a0,_0x4694c4={}){const _0x12d0a7=_0x3bbcd0,_0x27c6b9={};_0x27c6b9['KjKbL']=function(_0x11273e,_0x3bc880){return _0x11273e<_0x3bc880;};const _0x2b1526=_0x27c6b9;if(_0x2b1526[_0x12d0a7(0x1cc)](CURRENT_LEVEL,LOG_LEVELS[_0x12d0a7(0x129)]))return;consola[_0x12d0a7(0x1a3)](_0x12d0a7(0x1e0)+this['module']+']\x20'+_0x21c3a0,_0x4694c4);const _0xdae722={};_0xdae722[_0x12d0a7(0x180)]=_0x4694c4,fileLogger[_0x12d0a7(0x17c)](this[_0x12d0a7(0x1d3)],_0x12d0a7(0x1e2),_0x21c3a0,_0xdae722);}[_0x3bbcd0(0x203)](_0x17ce6f,_0x36916d={}){const _0x4df66f=_0x3bbcd0,_0x38b170={};_0x38b170[_0x4df66f(0x1f8)]='security';const _0xa25676=_0x38b170;if(CURRENT_LEVEL<LOG_LEVELS[_0x4df66f(0x129)])return;consola[_0x4df66f(0x155)](_0x4df66f(0x196)+this[_0x4df66f(0x1d3)]+']\x20'+_0x17ce6f,_0x36916d);const _0x2eeb2a={};_0x2eeb2a[_0x4df66f(0x1bc)]=_0x36916d,fileLogger['log'](_0xa25676[_0x4df66f(0x1f8)],_0xa25676[_0x4df66f(0x1f8)],_0x17ce6f,_0x2eeb2a);}[_0x3bbcd0(0x212)](_0x4b6061,_0x545918,_0x2b37b7='ms'){const _0x3a5255=_0x3bbcd0,_0x428d6d={'Qivop':'2|1|4|0|3','DVOXt':function(_0x335344){return _0x335344();},'VjpWp':function(_0x2aaa99,_0x36118d){return _0x2aaa99>=_0x36118d;},'XtXaX':_0x3a5255(0x14d),'rvEdq':_0x3a5255(0x17b),'BOaKd':'performance','wwZYE':_0x3a5255(0x12b)};if(_0x428d6d[_0x3a5255(0x18d)](CURRENT_LEVEL,LOG_LEVELS[_0x3a5255(0x177)])){if(_0x428d6d[_0x3a5255(0x1aa)]===_0x428d6d[_0x3a5255(0x1b0)]){const _0xfde614=_0x428d6d[_0x3a5255(0x223)][_0x3a5255(0x151)]('|');let _0x4b19db=0x0;while(!![]){switch(_0xfde614[_0x4b19db++]){case'0':this[_0x3a5255(0x20b)]=[];continue;case'1':this['startTime']=_0x41d846[_0x3a5255(0x11d)]();continue;case'2':this[_0x3a5255(0x1b5)]=opkkfN[_0x3a5255(0x194)](_0xc1df97)['split']('-')[0x0];continue;case'3':this[_0x3a5255(0x212)]={'memory':[],'timing':new _0x246901()};continue;case'4':this[_0x3a5255(0x213)]=new _0x299ff2();continue;}break;}}else consola[_0x3a5255(0x1a3)](_0x3a5255(0x1a6)+_0x4b6061+':\x20'+_0x545918+_0x2b37b7);}fileLogger['log'](_0x428d6d[_0x3a5255(0x12c)],_0x428d6d[_0x3a5255(0x14f)],_0x3a5255(0x14b)+_0x4b6061,{'metric':_0x4b6061,'value':_0x545918,'unit':_0x2b37b7,'timestamp':Date[_0x3a5255(0x11d)](),'sessionId':sessionTracker[_0x3a5255(0x1b5)]});}['memory'](){const _0x1070fd=_0x3bbcd0,_0x320ca4={};_0x320ca4['fmXWr']=function(_0x21965a,_0x52bfeb){return _0x21965a<_0x52bfeb;};const _0x6eef5a=_0x320ca4;if(_0x6eef5a[_0x1070fd(0x1f5)](CURRENT_LEVEL,LOG_LEVELS[_0x1070fd(0x129)]))return;const _0x581937=sessionTracker['getMemoryUsage']();consola[_0x1070fd(0x1a3)]('💾\x20Memory:\x20'+_0x581937[_0x1070fd(0x13e)]+_0x1070fd(0x178)+_0x581937[_0x1070fd(0x1f9)]+_0x1070fd(0x219)+_0x581937[_0x1070fd(0x1b9)]+_0x1070fd(0x1b3)),this['performance'](_0x1070fd(0x210),_0x581937['heapUsed'],'MB'),this[_0x1070fd(0x212)]('memory_rss',_0x581937[_0x1070fd(0x1b9)],'MB');}[_0x3bbcd0(0x132)](_0x2e0b9c,_0x50fb54=null){const _0x345b9d=_0x3bbcd0,_0x339375={'kkEsc':function(_0x49d855,_0x168bee){return _0x49d855<_0x168bee;},'jGqhb':function(_0x22d577,_0x5d68e5){return _0x22d577===_0x5d68e5;},'EYzQC':'KDcOz','vAwfl':_0x345b9d(0x20d),'VKviZ':_0x345b9d(0x132),'TISOU':function(_0x5f1204,_0x43274c){return _0x5f1204===_0x43274c;},'DuRpp':function(_0x286a9e,_0x27c83c,_0x5bb10b){return _0x286a9e(_0x27c83c,_0x5bb10b);},'WHOTN':_0x345b9d(0x1b6),'kWIgo':function(_0x4f95d7,_0x45a5c1,_0x55390a){return _0x4f95d7(_0x45a5c1,_0x55390a);},'NDsEF':function(_0x1226a8,_0x5c12b8,_0x3b014d){return _0x1226a8(_0x5c12b8,_0x3b014d);},'bXeFK':'disconnect','bTStG':_0x345b9d(0x20c),'ibvUy':function(_0x44e73f,_0x59510e){return _0x44e73f>=_0x59510e;},'CbTAR':function(_0x3d443a,_0x580f05,_0x13dc7a){return _0x3d443a(_0x580f05,_0x13dc7a);},'TQrgB':function(_0x128a46,_0x57b866){return _0x128a46===_0x57b866;},'mFeXy':_0x345b9d(0x1fd),'rHbbf':'error','UEIBm':_0x345b9d(0x11f),'wBqQv':_0x345b9d(0x162),'kacRq':function(_0x53029f,_0x3dbf60,_0x39d21a){return _0x53029f(_0x3dbf60,_0x39d21a);},'Azihb':function(_0x2c54e4,_0x4e2cab){return _0x2c54e4!==_0x4e2cab;},'BOXhN':'QaVYX'};return _0x50fb54&&(_0x339375[_0x345b9d(0x19b)](_0x345b9d(0x131),_0x339375[_0x345b9d(0x1bb)])?_0x5b533a[_0x345b9d(0x201)](_0x345b9d(0x159)+_0x467715+(_0x394450?'\x20('+_0x4c4f8c+_0x345b9d(0x1f1):'')):sessionTracker[_0x345b9d(0x1fc)](_0x2e0b9c,_0x50fb54)),{'connect':_0x3d9523=>{const _0x62100f=_0x345b9d;if(_0x339375[_0x62100f(0x126)](_0x62100f(0x13b),_0x62100f(0x130)))this[_0x62100f(0x212)]['timing'][_0x62100f(0x200)](_0x49c783,_0x410439[_0x62100f(0x11d)]());else{if(_0x339375[_0x62100f(0x126)](CURRENT_LEVEL,LOG_LEVELS[_0x62100f(0x216)])){if(_0x339375[_0x62100f(0x126)](_0x339375[_0x62100f(0x227)],_0x339375[_0x62100f(0x1a0)])){if(wZDcOa['kkEsc'](_0x1ceb55,_0x1f5ce7[_0x62100f(0x129)]))return;_0x23520e['debug'](_0x62100f(0x1e0)+this[_0x62100f(0x1d3)]+']\x20'+_0x580169,_0xcc913c);const _0x404e37={};_0x404e37[_0x62100f(0x180)]=_0x4e210a,_0x55941e[_0x62100f(0x17c)](this[_0x62100f(0x1d3)],_0x62100f(0x1e2),_0x1a8d50,_0x404e37);}else consola[_0x62100f(0x12a)](_0x62100f(0x12d)+(_0x3d9523['platform']||_0x339375['VKviZ'])+'-'+_0x2e0b9c[_0x62100f(0x1a4)](-0x5));}else{if(_0x339375[_0x62100f(0x147)](CURRENT_LEVEL,LOG_LEVELS[_0x62100f(0x177)])){const _0x411ce0=_0x339375[_0x62100f(0x1cb)](redactSensitiveData,_0x2e0b9c,CURRENT_LEVEL);consola[_0x62100f(0x12a)](_0x62100f(0x12d)+_0x411ce0,redactSensitiveData(_0x3d9523,CURRENT_LEVEL));}else consola['success'](_0x62100f(0x12d)+_0x2e0b9c,_0x3d9523);}fileLogger[_0x62100f(0x17c)]('device',_0x62100f(0x1f7),_0x339375[_0x62100f(0x134)],{'deviceId':CURRENT_LEVEL>=LOG_LEVELS['CREATOR']?_0x2e0b9c:_0x339375[_0x62100f(0x1a5)](redactSensitiveData,_0x2e0b9c,CURRENT_LEVEL),'info':_0x3d9523});}},'disconnect':()=>{const _0xc76792=_0x345b9d;if(_0x339375[_0xc76792(0x147)](CURRENT_LEVEL,LOG_LEVELS['PUBLIC']))consola[_0xc76792(0x198)](_0xc76792(0x208));else{const _0x3d0ec7=_0x339375[_0xc76792(0x142)](redactSensitiveData,_0x2e0b9c,CURRENT_LEVEL);consola['info'](_0xc76792(0x14c)+_0x3d0ec7+_0xc76792(0x1ca));}fileLogger[_0xc76792(0x17c)](_0x339375[_0xc76792(0x211)],_0x339375[_0xc76792(0x124)],_0x339375[_0xc76792(0x144)],{'deviceId':_0x339375[_0xc76792(0x1fb)](CURRENT_LEVEL,LOG_LEVELS['CREATOR'])?_0x2e0b9c:_0x339375[_0xc76792(0x20e)](redactSensitiveData,_0x2e0b9c,CURRENT_LEVEL)});},'error':(_0x1b505f,_0x2d6266)=>{const _0x10d14f=_0x345b9d;if(_0x339375[_0x10d14f(0x229)](_0x339375[_0x10d14f(0x166)],_0x339375[_0x10d14f(0x166)])){const _0x37d55d=redactSensitiveData(_0x1b505f,LOG_LEVELS[_0x10d14f(0x216)]);consola[_0x10d14f(0x201)](_0x10d14f(0x1c1)+_0x37d55d,_0x2d6266?.[_0x10d14f(0x1ff)]||_0x2d6266),fileLogger[_0x10d14f(0x17c)](_0x10d14f(0x132),_0x339375[_0x10d14f(0x1b8)],_0x339375[_0x10d14f(0x148)],{'message':_0x1b505f,'error':{'message':_0x2d6266?.[_0x10d14f(0x1ff)],'stack':CURRENT_LEVEL>=LOG_LEVELS[_0x10d14f(0x129)]?_0x2d6266?.[_0x10d14f(0x222)]:_0x339375[_0x10d14f(0x121)]},'deviceId':CURRENT_LEVEL>=LOG_LEVELS[_0x10d14f(0x129)]?_0x2e0b9c:_0x339375[_0x10d14f(0x18b)](redactSensitiveData,_0x2e0b9c,CURRENT_LEVEL)});}else{const _0x101ce4=_0x3a5651(_0x57b139,_0xd38b82[_0x10d14f(0x216)]),_0xe4ecc2=/[\u{1F000}-\u{1F6FF}\u{1F900}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u[_0x10d14f(0x123)](_0x505a99);_0xd41ff['success'](_0xe4ecc2?_0x101ce4:'✅\x20'+_0x101ce4);const _0x44ea3f={};_0x44ea3f['args']=_0x5aef20,_0x4f08c7[_0x10d14f(0x17c)](this['module'],_0x10d14f(0x12a),_0x1578f1,_0x44ea3f);}}};}[_0x3bbcd0(0x156)](_0x306668){const _0x15df64=_0x3bbcd0,_0xc4a823={};_0xc4a823[_0x15df64(0x1e8)]=function(_0x43ebfa,_0x58f48d){return _0x43ebfa>=_0x58f48d;};const _0x55b53b=_0xc4a823;this['timers'][_0x15df64(0x200)](_0x306668,Date[_0x15df64(0x11d)]()),sessionTracker[_0x15df64(0x156)](_0x306668),_0x55b53b[_0x15df64(0x1e8)](CURRENT_LEVEL,LOG_LEVELS[_0x15df64(0x129)])&&this[_0x15df64(0x1e2)](_0x15df64(0x1ae)+_0x306668);}['endTimer'](_0x16bb2f,_0x9e2e3d=!![]){const _0x589378=_0x3bbcd0,_0xb4cb43={};_0xb4cb43[_0x589378(0x133)]=function(_0x3e12c9,_0x2e8089){return _0x3e12c9-_0x2e8089;},_0xb4cb43[_0x589378(0x13f)]=function(_0x17e02f,_0x4ea90b){return _0x17e02f>=_0x4ea90b;};const _0xddd3b7=_0xb4cb43,_0x56cd6c=this[_0x589378(0x190)][_0x589378(0x1ed)](_0x16bb2f),_0xcdb626=sessionTracker[_0x589378(0x1d9)](_0x16bb2f);if(_0x56cd6c){const _0xd6e469=_0xddd3b7[_0x589378(0x133)](Date[_0x589378(0x11d)](),_0x56cd6c);return this[_0x589378(0x190)]['delete'](_0x16bb2f),_0x9e2e3d&&_0xddd3b7['ipAII'](CURRENT_LEVEL,LOG_LEVELS[_0x589378(0x177)])&&this[_0x589378(0x212)](_0x16bb2f,_0xd6e469),_0xd6e469;}return _0xcdb626;}['getSessionStats'](){const _0x37adeb=_0x3bbcd0;return sessionTracker[_0x37adeb(0x1fa)]();}static[_0x3bbcd0(0x16e)](){const _0x308a02=_0x3bbcd0,_0x397e34={};_0x397e34['HkdjF']=function(_0x45cfb6,_0x33bfed){return _0x45cfb6>=_0x33bfed;},_0x397e34[_0x308a02(0x176)]=_0x308a02(0x1cf),_0x397e34[_0x308a02(0x163)]=function(_0x528a2,_0x7a1b37){return _0x528a2===_0x7a1b37;},_0x397e34[_0x308a02(0x181)]=_0x308a02(0x1ee),_0x397e34['CuxQs']=_0x308a02(0x18e),_0x397e34[_0x308a02(0x17d)]=function(_0x497539,_0x46929d){return _0x497539===_0x46929d;},_0x397e34[_0x308a02(0x171)]=_0x308a02(0x1ac),_0x397e34[_0x308a02(0x15e)]=_0x308a02(0x216),_0x397e34['ockkT']=_0x308a02(0x129),_0x397e34[_0x308a02(0x1ba)]=function(_0x3c33c8,_0xff08f9){return _0x3c33c8===_0xff08f9;},_0x397e34[_0x308a02(0x220)]=_0x308a02(0x1fe),_0x397e34[_0x308a02(0x120)]='🚀\x20Devicely\x20starting...',_0x397e34[_0x308a02(0x21b)]=_0x308a02(0x1f0),_0x397e34[_0x308a02(0x140)]=_0x308a02(0x160),_0x397e34['mSMbG']=function(_0x55404f,_0x575c92){return _0x55404f===_0x575c92;},_0x397e34[_0x308a02(0x128)]=function(_0x57107b,_0x4c309e){return _0x57107b>=_0x4c309e;},_0x397e34[_0x308a02(0x165)]=function(_0x10d4bc,_0x319ca8){return _0x10d4bc===_0x319ca8;},_0x397e34[_0x308a02(0x12e)]=_0x308a02(0x182);const _0x1e58a6=_0x397e34,_0x20ac57=[_0x1e58a6[_0x308a02(0x15e)],_0x308a02(0x177),_0x1e58a6[_0x308a02(0x204)]],_0x1e0abf=_0x20ac57[CURRENT_LEVEL];if(CURRENT_LEVEL===LOG_LEVELS[_0x308a02(0x216)]){if(_0x1e58a6['PBQRd']('qqmgP',_0x1e58a6[_0x308a02(0x220)]))consola[_0x308a02(0x198)](_0x1e58a6[_0x308a02(0x120)]);else return _0x153e2e[_0x308a02(0x129)];}else _0x1e58a6[_0x308a02(0x21b)]===_0x1e58a6[_0x308a02(0x21b)]?consola['box']({'title':_0x1e58a6[_0x308a02(0x140)],'message':[_0x308a02(0x1e4)+_0x1e0abf,_0x308a02(0x137)+sessionTracker[_0x308a02(0x1b5)],_0x308a02(0x1be)+(_0x1e58a6[_0x308a02(0x205)](CURRENT_LEVEL,LOG_LEVELS['CREATOR'])?'ON':_0x1e58a6[_0x308a02(0x176)]),_0x308a02(0x15f)+(CURRENT_LEVEL===LOG_LEVELS['PUBLIC']?_0x1e58a6['litRI']:_0x1e58a6[_0x308a02(0x1d1)](CURRENT_LEVEL,LOG_LEVELS[_0x308a02(0x177)])?_0x1e58a6[_0x308a02(0x21f)]:'OFF'),_0x308a02(0x224)+(_0x1e58a6[_0x308a02(0x128)](CURRENT_LEVEL,LOG_LEVELS['DEVELOPER'])?'ON':_0x1e58a6['Ezgui']),'',_0x1e58a6[_0x308a02(0x165)](CURRENT_LEVEL,LOG_LEVELS['DEVELOPER'])?_0x1e58a6[_0x308a02(0x171)]:_0x1e58a6[_0x308a02(0x12e)]][_0x308a02(0x157)]('\x0a')}):_0x1d737b[_0x308a02(0x179)]({'title':_0x308a02(0x160),'message':['📊\x20Mode:\x20'+_0x2415a1,_0x308a02(0x137)+_0x5e08b2['sessionId'],_0x308a02(0x1be)+(_0x1e58a6[_0x308a02(0x205)](_0x5534f4,_0x2bf2c2['CREATOR'])?'ON':_0x1e58a6[_0x308a02(0x176)]),_0x308a02(0x15f)+(_0x1e58a6[_0x308a02(0x163)](_0x39df8e,_0x233b09[_0x308a02(0x216)])?_0x1e58a6[_0x308a02(0x181)]:_0x1e58a6['bSdDb'](_0x5c3e79,_0x410187[_0x308a02(0x177)])?_0x1e58a6[_0x308a02(0x21f)]:_0x1e58a6[_0x308a02(0x176)]),_0x308a02(0x224)+(_0x5a3667>=_0x3d1617[_0x308a02(0x177)]?'ON':_0x1e58a6[_0x308a02(0x176)]),'',_0x1e58a6[_0x308a02(0x17d)](_0x14f3f1,_0x1e5f53[_0x308a02(0x177)])?_0x1e58a6[_0x308a02(0x171)]:'💡\x20Remove\x20--debug\x20for\x20clean\x20public\x20mode'][_0x308a02(0x157)]('\x0a')});}}DevicelyLogger[_0x3bbcd0(0x16e)]();const _0x59bee5={};function _0x4f4d(){const _0x3ed0b8=['8j+mKca','t0H0Cfm','swTnDhK','BhnZzLq','Aw5PDfbYB21PC2u','A010D2u','8j+uKIbeyxrHihjLzgfJDgLVBJOG','8j+AGcbezxzPy2vSEsbbzhzHBMnLzcbmB2DNAw5Nifn5C3rLBq','rvDNuM0','w1jfrefdvevexq','yLnKrgi','ls1KzxyTBw9Kzq','vwDmCNq','BuzLwhK','ovfNtxnRzW','D2XuC0G','yxvuEhy','8j+tSsbfEgvJDxrPBMCG','DuvyB1e','CgXHDgzVCM0','w0Lqluferfjfu1nD','C2HVD1n0yxj0Dxbcyw5Uzxi','twvmwui','zxH0zxjUywW','DfbsrLm','CMvKDwnL','u1bVBKG','wKrwyuW','Bgr0rxm','rxPNDwK','revwruXpuevs','tuiGlYa','yM94','B2jQzwn0','AfzezK0','Bg9N','zuLpD2q','mZq1odK1zg5IEMzU','BfnAtgK','zgf0yq','BgL0uKK','8j+sOsbszw1VDMuGls1Kzwj1zYbMB3iGy2XLyw4GChvIBgLJig1Vzgu','z2v0twvTB3j5vxnHz2u','uvrhD0i','uM54vvG','C2vZC2LVBLrYywnRzxi','CwzsC0O','BM50Bee','mZC2uuDpELvJ','Cg9YDa','A2fJuNe','DKzgwM4','vMPWv3a','uefsveLbta','zhvYyxrPB24','DgLTzxjZ','q1vsuKvovf9mrvzfta','BMv0D29YAW','EKHSv3m','rfzpwhq','rgv5quG','8j+uKIbBu0vdvvjjvfLDwW','mtmYmdy3mfftDg5cAW','Aw5MBW','te5UteC','vKTquKO','qxPPAgi','iNGIoLTyxsWIEsi6w1LD','teXrrfa','lI4VlI4VBg9NCW','nZHuBK95thG','DKf3zMW','mtuYnde5otbeuKrIzhe','8j+tSsbB','zgvIDwC','C2XPy2u','A1Djz28','8j+tIIa','BgvUz3rO','qufouLa','AgfZ','whryyvG','q2XSq1K','8j+sOsbvC2uGls1KzxyTBw9KzsbMB3iGzNvSBcbJCMvHDg9YigXVz2DPBMC','D3HVAMC','vgLTzxiGC3rHCNrLzdOG','yxjNDG','CNzfzhe','DgLTAw5N','CM91BMq','tuiP','tgTez2S','C2vZC2LVBKLK','rgv2AwnLignVBM5Ly3rLza','vgHus1m','CKHIyMy','CNnZ','uejruMq','qK9yAe4','zgv0ywLSCW','ls1Kzwj1zW','8j+sVIbnzw1VCNKGDhjHy2TPBMC6ia','rhHUq3m','CMvWBgfJzq','4P2mierLDMLJzsbLCNjVCJOG','zNzXEgq','Bg9NrgLY','y29VCMrPBMf0zxm','u1rHzNq','Afbgsgq','v21Nreq','zxHWB3j0CW','whDZsvi','igrPC2nVBM5Ly3rLza','rhvsCha','s2PlyKW','C2L6zq','Aw5JBhvKzxm','t0zg','BwTKAxi','BvnnyKC','xcqM','Bw9KDwXL','yxjNCW','y29TBwfUza','Du5vEg0','ndm4nJqXnerjyw9IAW','AMzsDNa','zw5KvgLTzxi','D1fptLa','BKnLrvO','FI9BlI4Uxq','EgLwAgm','Dhj1zq','zgv2zwXVCg1LBNq','8j+uPYbBvfjbq0vDwW','yu95D20','DhjHy2u','z2Pttgq','8j+tIIbnB2rLoIa','CxHHDfu','DwrPza','zwrNtue','Dwj2rLG','rfn1AxO','zNfbyvu','mtmWmdGXD1nbBNzf','te9hx0XfvKvmuW','z2v0','rLvmta','whHQD0W','rvzwv1m','BxmP','y29TBwfUzenVDw50','Ag9TzvbHDgG','w1vtrviTuefusf0','zM1yv3i','vhfwDhm','y29UBMvJDa','yK1tz0O','AgvHCfrVDgfS','z2v0u3rHDhm','Awj2vxK','ywrKrgv2AwnL','CKTNz3G','CxfTz1a','BwvZC2fNzq','C2v0','zxjYB3i','ng1jrLzPBa','C2vJDxjPDhK','B2nRA1q','sgTKAKy','y29UC29Syq','w0vorfbpsu5uxq','8j+tSsbezxzPy2uGzgLZy29UBMvJDgvK','ywrKq29TBwfUza','w0rfvKLdrs1jrf0','y29TBwfUzhm','rgv2AwnLigrPC2nVBM5Ly3rLza','yLjMsxm','q2juqvi','Ahr0Ca','BwvTB3j5x2HLyxbFDxnLza','vKT2AvO','CgvYzM9YBwfUy2u','zgv2AwnLCW','rgT0Dgu','zgvSzxrL','ufvcteLd','D2vjAue','C3rYAw5NAwz5','tuiGkfjtuZOG','BwvTB3j5vxnHz2u','DwvhwKi','ChvZAa','DNf5Chm','Ag9TzwrPCG','q3v4uxm','DK5hy2S','v0zUrey','C3rHy2S','uwL2B3a','8j+tGsbgAwXLigXVz2DPBMC6ia','lI4U','yu1LqLi','rvL6uum','Dg9ju09tDhjPBMC','vffYz0i','ChjVBwLZzxm','Chrry0i','Aw5PDgLHBgL6zq','C3rHCNruAw1L','BM93','Afv5rhe','rgv2AwnLigvYCM9Y','DuTcA0K','D0jXuxy','lMXVzW','DgvZDa','yLHLrKS','Cgf0Aa','AKDXAgi','v3vXDwK','qMzowwG','q1jfqvrpuG','C3vJy2vZCW','Bwv0CMLJ','qK9Hs2q','4PYfienVBM5Ly3rLzcb0BYa','tMjbq3i','mJC2mZu2mMLgExPfza','ywf0Cgy','uwfwwvG','zgv2AwnL','Dgrpuvy','v0Hpve4','yxbWzw5KrMLSzq','tg9Nz2vY','8j+uPYbtzxnZAw9UoIa','EuTRr2q','CMvJDxjZAxzL','qwD0ywu','tLrozMy','sNLZBwm','DxvPza','AgvHCfvZzwq','AxbbsuK','ug9xy3K','z2H6qKO','tKrZruy','4PQG77Ipica','yLrtDeC','DLfgBMy','iokgKIa','veLtt1u','vuvjqM0','otuYntvJwg10CeO','CgzOBgy','ugvYzM9YBwfUy2uGBwv0CMLJoIa','8j+tSsa','vvfurui','vLHmCum','D3DAwuu','BwfW','C3bSAxq','ANz2s0i','r2njy2C','EeDisfm','D2fYBG','C3rHCNruAw1LCG','AM9PBG','r3f6sgy'];_0x4f4d=function(){return _0x3ed0b8;};return _0x4f4d();}_0x59bee5['DevicelyLogger']=DevicelyLogger,_0x59bee5[_0x3bbcd0(0x1ec)]=LOG_LEVELS,_0x59bee5[_0x3bbcd0(0x191)]=CURRENT_LEVEL,_0x59bee5[_0x3bbcd0(0x186)]=sessionTracker,_0x59bee5[_0x3bbcd0(0x136)]=DevicelyLogger,module[_0x3bbcd0(0x1c8)]=_0x59bee5;
@@ -1,15 +1,23 @@
1
1
  // AI Provider Abstraction Layer - Enhanced Multi-Provider Support
2
- // Supports: OpenAI, Google Gemini, Anthropic Claude, GitHub Copilot, Groq, Cohere, Mistral AI
2
+ // Supports: OpenAI, Google Gemini, Anthropic Claude, GitHub Copilot, Groq, Cohere, Mistral AI, Local Built-In AI
3
3
 
4
4
  const { OpenAI } = require('openai');
5
5
  const { GoogleGenerativeAI } = require('@google/generative-ai');
6
6
  const { Anthropic } = require('@anthropic-ai/sdk');
7
7
  const { getPackageId, APP_MAPPINGS } = require('./appMappings');
8
8
 
9
+ const Logger = require('./logger');
10
+ const logger = new Logger('AiProviders');
11
+ const LocalBuiltInAI = require('./localBuiltInAI'); // NEW: Import local AI
12
+
9
13
  class AIProviderManager {
10
14
  constructor() {
11
- this.provider = process.env.AI_PROVIDER || 'gemini';
15
+ this.provider = process.env.AI_PROVIDER || 'local'; // Default to Local Built-In AI (faster, no dependencies)
12
16
  this.model = process.env.AI_MODEL || null; // Auto-select default if null
17
+
18
+ // Initialize Local Built-In AI first
19
+ this.localAI = new LocalBuiltInAI();
20
+
13
21
  this.initializeProviders();
14
22
  }
15
23
 
@@ -99,7 +107,9 @@ ${availableApps.slice(0, 20).map(app => `- ${app} -> launch ${APP_MAPPINGS[app][
99
107
  `;
100
108
  }
101
109
 
102
- return `You are a mobile device automation command converter. Convert natural language requests into executable commands for iOS and Android devices.
110
+ return `You are a COMPLETE mobile automation AI. Convert ENTIRE natural language requests to executable commands.
111
+
112
+ 🚨 CRITICAL: PROCESS THE COMPLETE INPUT - DON'T STOP EARLY! 🚨
103
113
 
104
114
  Available commands (work on both iOS & Android):
105
115
  - launch <app_name>: Launch an app using generic name (e.g., "launch settings", "launch chrome")
@@ -130,7 +140,50 @@ Android-specific commands:
130
140
  - quicksettings: Open quick settings
131
141
  ${appListSection}
132
142
 
133
- COMMON PHRASE MAPPINGS:
143
+ // 🎯 ENHANCED PHRASE MAPPINGS FOR COMPLEX SENTENCES:
144
+ - "launch X and do Y" -> launch X, WAIT, then Y commands
145
+ - "open X then scroll up" -> launch X, WAIT, swipe up
146
+ - "go to X and search Y" -> url X, WAIT, click search, WAIT, type Y
147
+ - "take photo" -> launch camera, WAIT, tap "capture button"
148
+ - "go back and open Y" -> back, WAIT, launch Y
149
+ - "scroll up and tap X" -> swipe up, WAIT, click X
150
+
151
+ // 🎯 COMPLEX SENTENCE EXAMPLES:
152
+ "launch camera and take photo" ->
153
+ launch camera
154
+ WAIT 3000
155
+ screenshot
156
+
157
+ "open settings then scroll up and go back" ->
158
+ launch settings
159
+ WAIT 2000
160
+ swipe up
161
+ WAIT 1000
162
+ back
163
+
164
+ "go to youtube.com search for cats and take screenshot" ->
165
+ url https://www.youtube.com
166
+ WAIT 3000
167
+ click "search"
168
+ WAIT 1000
169
+ type "cats"
170
+ WAIT 1000
171
+ screenshot
172
+
173
+ "launch chrome go to google.com type hello press home" ->
174
+ launch chrome
175
+ WAIT 3000
176
+ url https://www.google.com
177
+ WAIT 2000
178
+ click "search"
179
+ WAIT 1000
180
+ type "hello"
181
+ WAIT 1000
182
+ home
183
+
184
+ Convert this COMPLETE request to commands:
185
+
186
+ // 🔍 🔍 COMMON PHRASE MAPPINGS:
134
187
  - "scroll up" OR "scroll down" -> swipe up OR swipe down
135
188
  - "go to <url>" OR "open <url>" OR "visit <url>" -> url https://<url>
136
189
  - "press home" OR "go home" OR "home button" -> home
@@ -201,6 +254,10 @@ DO NOT include any other text. Start your response with the first command.`;
201
254
 
202
255
  try {
203
256
  switch (provider) {
257
+ case 'local':
258
+ case 'built-in':
259
+ case 'builtin':
260
+ return await this.convertWithLocalAI(text, platform);
204
261
  case 'openai':
205
262
  return await this.convertWithOpenAI(text, platform);
206
263
  case 'gemini':
@@ -219,7 +276,18 @@ DO NOT include any other text. Start your response with the first command.`;
219
276
  throw new Error(`Unknown AI provider: ${provider}`);
220
277
  }
221
278
  } catch (error) {
222
- console.error(`Error with ${provider}:`, error.message);
279
+ logger.error(`Error with ${provider}:`, error.message);;
280
+
281
+ // 🎯 GENIUS: Fallback to Local AI if external provider fails
282
+ if (provider !== 'local' && this.localAI) {
283
+ logger.info(`🔄 Falling back to Local Built-In AI...`);;
284
+ try {
285
+ return await this.convertWithLocalAI(text, platform);
286
+ } catch (fallbackError) {
287
+ logger.error('Local AI fallback also failed:', fallbackError.message);;
288
+ }
289
+ }
290
+
223
291
  throw new Error(`AI conversion failed (${provider}): ${error.message}`);
224
292
  }
225
293
  }
@@ -261,9 +329,16 @@ DO NOT include any other text. Start your response with the first command.`;
261
329
  });
262
330
 
263
331
  let convertedText = response.choices[0].message.content.trim();
264
- convertedText = this.cleanAIResponse(convertedText);
332
+ const cleanedResponse = this.cleanAIResponse(convertedText);
265
333
 
266
- return convertedText;
334
+ return {
335
+ success: true,
336
+ converted: cleanedResponse,
337
+ provider: 'OpenAI',
338
+ model: model,
339
+ confidence: 0.95,
340
+ processingTime: 'N/A'
341
+ };
267
342
  }
268
343
 
269
344
  async convertWithGemini(text, platform = null) {
@@ -289,18 +364,36 @@ DO NOT include any other text. Start your response with the first command.`;
289
364
  const result = await model.generateContent(sanitizedPrompt);
290
365
  const response = await result.response;
291
366
  let convertedText = response.text().trim();
292
-
293
- return this.cleanAIResponse(convertedText);
367
+
368
+ const cleanedResponse = this.cleanAIResponse(convertedText);
369
+
370
+ return {
371
+ success: true,
372
+ converted: cleanedResponse,
373
+ provider: 'Google Gemini',
374
+ model: modelName,
375
+ confidence: 0.9,
376
+ processingTime: 'N/A'
377
+ };
294
378
  } catch (error) {
295
379
  // If the model fails, try with a faster fallback
296
380
  if (modelName !== 'gemini-2.5-flash') {
297
- console.warn(`Gemini model ${modelName} failed, falling back to gemini-2.5-flash`);
381
+ logger.warn(`Gemini model ${modelName} failed, falling back to gemini-2.5-flash`);;
298
382
  const fallbackModel = this.gemini.getGenerativeModel({ model: 'gemini-2.5-flash' });
299
383
  const prompt = this.getSystemPrompt(platform).replace('{INPUT}', text);
300
384
  const sanitizedPrompt = prompt.replace(/[^\x00-\x7F]/g, " ").replace(/\s+/g, ' ').trim();
301
385
  const result = await fallbackModel.generateContent(sanitizedPrompt);
302
386
  const response = await result.response;
303
- return this.cleanAIResponse(response.text().trim());
387
+ const cleanedResponse = this.cleanAIResponse(response.text().trim());
388
+
389
+ return {
390
+ success: true,
391
+ converted: cleanedResponse,
392
+ provider: 'Google Gemini',
393
+ model: 'gemini-2.5-flash',
394
+ confidence: 0.85,
395
+ processingTime: 'N/A'
396
+ };
304
397
  }
305
398
  throw error;
306
399
  }
@@ -348,9 +441,16 @@ DO NOT include any other text. Start your response with the first command.`;
348
441
  });
349
442
 
350
443
  let convertedText = response.content[0].text.trim();
351
- convertedText = this.cleanAIResponse(convertedText);
444
+ const cleanedResponse = this.cleanAIResponse(convertedText);
352
445
 
353
- return convertedText;
446
+ return {
447
+ success: true,
448
+ converted: cleanedResponse,
449
+ provider: 'Anthropic Claude',
450
+ model: model,
451
+ confidence: 0.93,
452
+ processingTime: 'N/A'
453
+ };
354
454
  }
355
455
 
356
456
  async convertWithGroq(text, platform = null) {
@@ -371,9 +471,16 @@ DO NOT include any other text. Start your response with the first command.`;
371
471
  });
372
472
 
373
473
  let convertedText = response.choices[0].message.content.trim();
374
- convertedText = this.cleanAIResponse(convertedText);
474
+ const cleanedResponse = this.cleanAIResponse(convertedText);
375
475
 
376
- return convertedText;
476
+ return {
477
+ success: true,
478
+ converted: cleanedResponse,
479
+ provider: 'Groq',
480
+ model: model,
481
+ confidence: 0.92,
482
+ processingTime: 'N/A'
483
+ };
377
484
  }
378
485
 
379
486
  async convertWithCohere(text, platform = null) {
@@ -503,6 +610,9 @@ DO NOT include any other text. Start your response with the first command.`;
503
610
 
504
611
  getProviderName(providerId) {
505
612
  const names = {
613
+ local: 'Local Built-In AI',
614
+ 'built-in': 'Local Built-In AI',
615
+ builtin: 'Local Built-In AI',
506
616
  openai: 'OpenAI',
507
617
  gemini: 'Google Gemini',
508
618
  claude: 'Anthropic Claude',
@@ -513,6 +623,35 @@ DO NOT include any other text. Start your response with the first command.`;
513
623
  };
514
624
  return names[providerId] || 'Unknown';
515
625
  }
626
+
627
+ /**
628
+ * 🤖 LOCAL BUILT-IN AI CONVERSION METHOD
629
+ * Zero-cost, offline, lightning-fast natural language processing
630
+ */
631
+ async convertWithLocalAI(text, platform = null) {
632
+ logger.info(`🤖 Converting with Local Built-In AI: "${text}"`);;
633
+
634
+ try {
635
+ const devices = platform ? [{ platform }] : [];
636
+ const result = await this.localAI.convertCommand(text, devices);
637
+
638
+ if (result.success) {
639
+ return {
640
+ converted: result.converted,
641
+ provider: 'Local Built-In AI',
642
+ confidence: result.confidence,
643
+ processingTime: result.processingTime,
644
+ model: 'built-in-patterns',
645
+ cost: 0 // Always free!
646
+ };
647
+ } else {
648
+ throw new Error(result.error || 'Local AI conversion failed');
649
+ }
650
+ } catch (error) {
651
+ logger.error('Local AI conversion error:', error.message);;
652
+ throw error;
653
+ }
654
+ }
516
655
  }
517
656
 
518
657
  module.exports = AIProviderManager;