@loxia-labs/loxia-autopilot-one 1.0.18 → 1.0.19
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.
- package/README.md +2 -2
- package/bin/cli.js +1 -1
- package/bin/loxia-terminal-v2.js +1 -1
- package/bin/loxia-terminal.js +1 -1
- package/bin/start-with-terminal.js +1 -1
- package/package.json +1 -1
- package/scripts/install-scanners.js +1 -1
- package/src/analyzers/CSSAnalyzer.js +1 -1
- package/src/analyzers/ConfigValidator.js +1 -1
- package/src/analyzers/ESLintAnalyzer.js +1 -1
- package/src/analyzers/JavaScriptAnalyzer.js +1 -1
- package/src/analyzers/PrettierFormatter.js +1 -1
- package/src/analyzers/PythonAnalyzer.js +1 -1
- package/src/analyzers/SecurityAnalyzer.js +1 -1
- package/src/analyzers/TypeScriptAnalyzer.js +1 -1
- package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
- package/src/analyzers/codeCloneDetector/detector.js +1 -1
- package/src/analyzers/codeCloneDetector/index.js +1 -1
- package/src/analyzers/codeCloneDetector/parser.js +1 -1
- package/src/analyzers/codeCloneDetector/reporter.js +1 -1
- package/src/analyzers/codeCloneDetector/scanner.js +1 -1
- package/src/core/agentPool.js +1 -1
- package/src/core/agentScheduler.js +1 -1
- package/src/core/contextManager.js +1 -1
- package/src/core/messageProcessor.js +1 -1
- package/src/core/orchestrator.js +1 -1
- package/src/core/stateManager.js +1 -1
- package/src/index.js +1 -1
- package/src/interfaces/cli.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
- package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
- package/src/interfaces/terminal/api/apiClient.js +1 -1
- package/src/interfaces/terminal/api/messageRouter.js +1 -1
- package/src/interfaces/terminal/api/session.js +1 -1
- package/src/interfaces/terminal/api/websocket.js +1 -1
- package/src/interfaces/terminal/components/AgentCreator.js +1 -1
- package/src/interfaces/terminal/components/AgentEditor.js +1 -1
- package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
- package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
- package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
- package/src/interfaces/terminal/components/Header.js +1 -1
- package/src/interfaces/terminal/components/HelpPanel.js +1 -1
- package/src/interfaces/terminal/components/InputBox.js +1 -1
- package/src/interfaces/terminal/components/Layout.js +1 -1
- package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
- package/src/interfaces/terminal/components/MessageList.js +1 -1
- package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
- package/src/interfaces/terminal/components/SearchPanel.js +1 -1
- package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
- package/src/interfaces/terminal/components/StatusBar.js +1 -1
- package/src/interfaces/terminal/components/TextInput.js +1 -1
- package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
- package/src/interfaces/terminal/config/constants.js +1 -1
- package/src/interfaces/terminal/index.js +1 -1
- package/src/interfaces/terminal/state/useAgentControl.js +1 -1
- package/src/interfaces/terminal/state/useAgents.js +1 -1
- package/src/interfaces/terminal/state/useConnection.js +1 -1
- package/src/interfaces/terminal/state/useMessages.js +1 -1
- package/src/interfaces/terminal/state/useTools.js +1 -1
- package/src/interfaces/terminal/utils/debugLogger.js +1 -1
- package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
- package/src/interfaces/terminal/utils/theme.js +1 -1
- package/src/interfaces/webServer.js +1 -1
- package/src/modules/fileExplorer/controller.js +1 -1
- package/src/modules/fileExplorer/index.js +1 -1
- package/src/modules/fileExplorer/middleware.js +1 -1
- package/src/modules/fileExplorer/routes.js +1 -1
- package/src/services/agentActivityService.js +1 -1
- package/src/services/aiService.js +1 -1
- package/src/services/apiKeyManager.js +1 -1
- package/src/services/benchmarkService.js +1 -1
- package/src/services/budgetService.js +1 -1
- package/src/services/contextInjectionService.js +1 -1
- package/src/services/conversationCompactionService.js +1 -1
- package/src/services/errorHandler.js +1 -1
- package/src/services/fileAttachmentService.js +1 -1
- package/src/services/modelRouterService.js +1 -1
- package/src/services/modelsService.js +1 -1
- package/src/services/qualityInspector.js +1 -1
- package/src/services/tokenCountingService.js +1 -1
- package/src/tools/agentCommunicationTool.js +1 -1
- package/src/tools/agentDelayTool.js +1 -1
- package/src/tools/asyncToolManager.js +1 -1
- package/src/tools/baseTool.js +1 -1
- package/src/tools/browserTool.js +1 -1
- package/src/tools/cloneDetectionTool.js +1 -1
- package/src/tools/dependencyResolverTool.js +1 -1
- package/src/tools/fileContentReplaceTool.js +1 -1
- package/src/tools/fileSystemTool.js +1 -1
- package/src/tools/fileTreeTool.js +1 -1
- package/src/tools/imageTool.js +1 -1
- package/src/tools/importAnalyzerTool.js +1 -1
- package/src/tools/jobDoneTool.js +1 -1
- package/src/tools/seekTool.js +1 -1
- package/src/tools/staticAnalysisTool.js +1 -1
- package/src/tools/taskManagerTool.js +1 -1
- package/src/tools/terminalTool.js +1 -1
- package/src/tools/webTool.js +1 -1
- package/src/types/agent.js +1 -1
- package/src/types/contextReference.js +1 -1
- package/src/types/conversation.js +1 -1
- package/src/types/toolCommand.js +1 -1
- package/src/utilities/attachmentValidator.js +1 -1
- package/src/utilities/configManager.js +1 -1
- package/src/utilities/constants.js +1 -1
- package/src/utilities/directoryAccessManager.js +1 -1
- package/src/utilities/fileProcessor.js +1 -1
- package/src/utilities/logger.js +1 -1
- package/src/utilities/tagParser.js +1 -1
- package/src/utilities/toolConstants.js +1 -1
- package/src/utilities/userDataDir.js +1 -1
- package/web-ui/build/index.html +1 -1
- package/web-ui/build/static/{index-DL2-PyNX.js → index-CcwO7jS4.js} +8 -8
package/src/interfaces/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x287487=a0_0x43c2;(function(_0x3e2dd3,_0x175600){const _0x2e59b3=a0_0x43c2,_0x2a6728=_0x3e2dd3();while(!![]){try{const _0x100276=parseInt(_0x2e59b3(0x19b))/0x1*(parseInt(_0x2e59b3(0x1e3))/0x2)+-parseInt(_0x2e59b3(0x1d2))/0x3*(parseInt(_0x2e59b3(0x1b2))/0x4)+-parseInt(_0x2e59b3(0x1b6))/0x5+-parseInt(_0x2e59b3(0x1c9))/0x6+-parseInt(_0x2e59b3(0x1dd))/0x7+parseInt(_0x2e59b3(0x1e4))/0x8+parseInt(_0x2e59b3(0x198))/0x9;if(_0x100276===_0x175600)break;else _0x2a6728['push'](_0x2a6728['shift']());}catch(_0x1dfcb8){_0x2a6728['push'](_0x2a6728['shift']());}}}(a0_0x1370,0x7dc96));import a0_0x437662 from'readline';import{INTERFACE_TYPES,ORCHESTRATOR_ACTIONS}from'../utilities/constants.js';class CLIInterface{constructor(_0xf5c5b0,_0x2315e7,_0x4c87f5={}){const _0x15be88=a0_0x43c2;this['orchestrator']=_0xf5c5b0,this[_0x15be88(0x1d7)]=_0x2315e7,this['config']=_0x4c87f5,this['rl']=null,this[_0x15be88(0x1bc)]='cli-'+Date['now'](),this[_0x15be88(0x196)]=null,this['isRunning']=![],this[_0x15be88(0x1f7)]=_0x4c87f5['historySize']||0x3e8,this[_0x15be88(0x1c3)]=[],this[_0x15be88(0x1a6)]={'help':this['showHelp'][_0x15be88(0x1e2)](this),'exit':this[_0x15be88(0x1a4)][_0x15be88(0x1e2)](this),'quit':this['exit']['bind'](this),'status':this['showStatus'][_0x15be88(0x1e2)](this),'agents':this['listAgents']['bind'](this),'create':this[_0x15be88(0x1c2)][_0x15be88(0x1e2)](this),'switch':this['switchAgent'][_0x15be88(0x1e2)](this),'pause':this['pauseAgent']['bind'](this),'resume':this['resumeAgent']['bind'](this),'clear':this['clearScreen'][_0x15be88(0x1e2)](this),'history':this[_0x15be88(0x1da)]['bind'](this)};}async[a0_0x287487(0x1b3)](){const _0x7c4573=a0_0x287487;this['rl']=a0_0x437662[_0x7c4573(0x1c6)]({'input':process['stdin'],'output':process['stdout'],'prompt':this[_0x7c4573(0x1a3)](),'historySize':this['historySize']}),this['rl']['on']('line',this['handleInput']['bind'](this)),this['rl']['on']('close',this[_0x7c4573(0x1a4)][_0x7c4573(0x1e2)](this)),this['rl']['on']('SIGINT',()=>{const _0x45d74f=_0x7c4573;console[_0x45d74f(0x1d1)](_0x45d74f(0x1ea)),this['rl']['prompt']();}),this['isRunning']=!![],this['showWelcome'](),this['rl']['prompt']();}async['handleInput'](_0x12d64e){const _0x557aac=a0_0x287487,_0x4e5149=_0x12d64e['trim']();if(_0x4e5149['length']===0x0){this['rl'][_0x557aac(0x195)]();return;}this['commandHistory'][_0x557aac(0x1db)]({'command':_0x4e5149,'timestamp':new Date()['toISOString']()});this[_0x557aac(0x1c3)][_0x557aac(0x1e0)]>this[_0x557aac(0x1f7)]&&this[_0x557aac(0x1c3)]['shift']();try{await this['processInput'](_0x4e5149);}catch(_0xfce436){console[_0x557aac(0x1ac)]('❌\x20Error:',_0xfce436['message']),this['logger']?.['error']('CLI\x20command\x20error',{'command':_0x4e5149,'error':_0xfce436['message']});}this[_0x557aac(0x192)]&&this['rl'][_0x557aac(0x195)]();}async[a0_0x287487(0x1b9)](_0x1df921){const _0x562166=a0_0x287487;if(_0x1df921[_0x562166(0x1a5)]('/')){const _0x1370b9=_0x1df921[_0x562166(0x194)](0x1)['split']('\x20'),_0x1edecf=_0x1370b9[0x0][_0x562166(0x1d5)](),_0x100f52=_0x1370b9['slice'](0x1);if(this[_0x562166(0x1a6)][_0x1edecf]){await this['commands'][_0x1edecf](_0x100f52);return;}else{console[_0x562166(0x1d1)](_0x562166(0x1d3)+_0x1edecf),console[_0x562166(0x1d1)]('Type\x20/help\x20for\x20available\x20commands');return;}}if(!this[_0x562166(0x196)]){console['log'](_0x562166(0x199));return;}await this['sendMessageToAgent'](_0x1df921);}async['sendMessageToAgent'](_0x595805){const _0x20f4be=a0_0x287487;console[_0x20f4be(0x1d1)]('📤\x20Sending\x20to\x20agent...');try{const _0x5cde9e={'interface':INTERFACE_TYPES[_0x20f4be(0x1b1)],'sessionId':this['sessionId'],'action':ORCHESTRATOR_ACTIONS['SEND_MESSAGE'],'payload':{'agentId':this['currentAgent']['id'],'message':_0x595805,'mode':'chat'},'projectDir':process[_0x20f4be(0x1eb)]()},_0x150b9a=await this[_0x20f4be(0x1d8)][_0x20f4be(0x1f4)](_0x5cde9e);if(_0x150b9a['success']){console['log'](_0x20f4be(0x1a2)),console['log'](_0x150b9a[_0x20f4be(0x193)][_0x20f4be(0x1f3)]['content']);if(_0x150b9a[_0x20f4be(0x193)][_0x20f4be(0x1b0)]&&_0x150b9a[_0x20f4be(0x193)][_0x20f4be(0x1b0)]['length']>0x0){console[_0x20f4be(0x1d1)]('\x0a🔧\x20Tool\x20execution\x20results:');for(const _0x318087 of _0x150b9a['data']['toolResults']){console[_0x20f4be(0x1d1)]('\x20\x20'+_0x318087[_0x20f4be(0x1c7)]+':\x20'+_0x318087[_0x20f4be(0x1ef)]),_0x318087['result']&&console['log'](_0x20f4be(0x1dc)+JSON['stringify'](_0x318087['result'],null,0x2));}}}else console[_0x20f4be(0x1ac)](_0x20f4be(0x197),_0x150b9a['error']);}catch(_0x56861e){console[_0x20f4be(0x1ac)](_0x20f4be(0x1d0),_0x56861e[_0x20f4be(0x1f3)]);}}[a0_0x287487(0x1cb)](){const _0x537f0e=a0_0x287487;console[_0x537f0e(0x1d1)](''),console[_0x537f0e(0x1d1)]('🎯\x20Welcome\x20to\x20Loxia\x20Autopilot\x20One\x20CLI'),console['log'](_0x537f0e(0x1a8)),console['log'](_0x537f0e(0x1f2)),console[_0x537f0e(0x1d1)]('');}async[a0_0x287487(0x1f1)](){const _0x288575=a0_0x287487;console['log'](''),console[_0x288575(0x1d1)](_0x288575(0x1e5)),console[_0x288575(0x1d1)](''),console[_0x288575(0x1d1)]('\x20\x20/help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help\x20message'),console['log'](_0x288575(0x1ba)),console[_0x288575(0x1d1)]('\x20\x20/agents\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20List\x20all\x20agents'),console[_0x288575(0x1d1)]('\x20\x20/create\x20<name>\x20\x20\x20\x20\x20\x20\x20-\x20Create\x20a\x20new\x20agent'),console[_0x288575(0x1d1)](_0x288575(0x1cf)),console['log'](_0x288575(0x1c8)),console[_0x288575(0x1d1)]('\x20\x20/resume\x20<agent-id>\x20\x20\x20-\x20Resume\x20a\x20paused\x20agent'),console[_0x288575(0x1d1)]('\x20\x20/history\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Show\x20command\x20history'),console['log']('\x20\x20/clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Clear\x20screen'),console[_0x288575(0x1d1)]('\x20\x20/exit\x20or\x20/quit\x20\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20CLI'),console['log'](''),console[_0x288575(0x1d1)]('💬\x20Chat\x20with\x20agents:'),console[_0x288575(0x1d1)]('\x20\x20\x20Simply\x20type\x20your\x20message\x20to\x20send\x20it\x20to\x20the\x20current\x20agent'),console[_0x288575(0x1d1)](_0x288575(0x1b4)),console['log']('');}async[a0_0x287487(0x1ce)](){const _0x5905ab=a0_0x287487;try{const _0x1d8fe5={'interface':INTERFACE_TYPES['CLI'],'sessionId':this['sessionId'],'action':ORCHESTRATOR_ACTIONS['GET_SESSION_STATE'],'payload':{},'projectDir':process[_0x5905ab(0x1eb)]()},_0x35908b=await this[_0x5905ab(0x1d8)][_0x5905ab(0x1f4)](_0x1d8fe5);if(_0x35908b['success']){const _0x1ee59c=_0x35908b['data'];console[_0x5905ab(0x1d1)](''),console['log'](_0x5905ab(0x1e1)),console['log'](_0x5905ab(0x19f)+_0x1ee59c['sessionId']),console[_0x5905ab(0x1d1)]('\x20\x20\x20Project:\x20'+_0x1ee59c['projectDir']),console['log']('\x20\x20\x20Agents:\x20'+_0x1ee59c['agents'][_0x5905ab(0x1e0)]),console[_0x5905ab(0x1d1)]('\x20\x20\x20Current\x20Agent:\x20'+(this[_0x5905ab(0x196)]?this[_0x5905ab(0x196)]['name']:'None')),console[_0x5905ab(0x1d1)]('');if(_0x1ee59c[_0x5905ab(0x1d6)][_0x5905ab(0x1e0)]>0x0){console[_0x5905ab(0x1d1)](_0x5905ab(0x1d9));for(const _0x99b2dd of _0x1ee59c[_0x5905ab(0x1d6)]){const _0x7494c3=_0x99b2dd[_0x5905ab(0x1a0)]?_0x99b2dd[_0x5905ab(0x1ef)]+_0x5905ab(0x1df)+_0x99b2dd[_0x5905ab(0x1d4)]+')':_0x99b2dd[_0x5905ab(0x1ef)];console['log']('\x20\x20\x20'+_0x99b2dd['id']+':\x20'+_0x99b2dd[_0x5905ab(0x1e7)]+'\x20('+_0x7494c3+')');}console['log']('');}}else console['error'](_0x5905ab(0x1cc),_0x35908b[_0x5905ab(0x1ac)]);}catch(_0x44e9d8){console[_0x5905ab(0x1ac)](_0x5905ab(0x1a9),_0x44e9d8[_0x5905ab(0x1f3)]);}}async['listAgents'](){const _0x53cd79=a0_0x287487;try{const _0x1b1c99={'interface':INTERFACE_TYPES['CLI'],'sessionId':this[_0x53cd79(0x1bc)],'action':ORCHESTRATOR_ACTIONS[_0x53cd79(0x1e8)],'payload':{},'projectDir':process[_0x53cd79(0x1eb)]()},_0x34c4b5=await this[_0x53cd79(0x1d8)]['processRequest'](_0x1b1c99);if(_0x34c4b5['success']){const _0x24d968=_0x34c4b5['data'];console['log']('');if(_0x24d968['length']===0x0)console[_0x53cd79(0x1d1)]('📭\x20No\x20agents\x20created\x20yet'),console[_0x53cd79(0x1d1)]('\x20\x20\x20Use\x20/create\x20<name>\x20to\x20create\x20your\x20first\x20agent');else{console['log'](_0x53cd79(0x1e6));for(const _0x109650 of _0x24d968){const _0x2635ca=this[_0x53cd79(0x196)]&&this['currentAgent']['id']===_0x109650['id']?'\x20(current)':'',_0x348ee1=_0x109650['isPaused']?_0x109650[_0x53cd79(0x1ef)]+'\x20(until\x20'+_0x109650[_0x53cd79(0x1d4)]+')':_0x109650[_0x53cd79(0x1ef)];console[_0x53cd79(0x1d1)]('\x20\x20\x20'+_0x109650['id']+':\x20'+_0x109650['name']+_0x2635ca),console['log'](_0x53cd79(0x1bf)+_0x348ee1),console['log']('\x20\x20\x20\x20\x20Model:\x20'+_0x109650['currentModel']),console['log']('\x20\x20\x20\x20\x20Messages:\x20'+_0x109650[_0x53cd79(0x1b5)]),console[_0x53cd79(0x1d1)]('');}}}else console[_0x53cd79(0x1ac)]('❌\x20Failed\x20to\x20list\x20agents:',_0x34c4b5['error']);}catch(_0x3cad97){console[_0x53cd79(0x1ac)](_0x53cd79(0x19e),_0x3cad97['message']);}}async['createAgent'](_0x338b91){const _0x5860d3=a0_0x287487;if(_0x338b91['length']===0x0){console['log']('❌\x20Usage:\x20/create\x20<agent-name>\x20[model]');return;}const _0x38454d=_0x338b91[0x0],_0x41ee64=_0x338b91[0x1]||'anthropic-sonnet';console[_0x5860d3(0x1d1)](_0x5860d3(0x1de)+_0x38454d+'\x22\x20with\x20model\x20'+_0x41ee64+'...');try{const _0x38eac9={'interface':INTERFACE_TYPES['CLI'],'sessionId':this[_0x5860d3(0x1bc)],'action':ORCHESTRATOR_ACTIONS['CREATE_AGENT'],'payload':{'name':_0x38454d,'systemPrompt':'You\x20are\x20'+_0x38454d+_0x5860d3(0x1b7),'model':_0x41ee64,'capabilities':[_0x5860d3(0x1c1),_0x5860d3(0x1ca),_0x5860d3(0x1e9),_0x5860d3(0x1aa)]},'projectDir':process[_0x5860d3(0x1eb)]()},_0x2c8a39=await this[_0x5860d3(0x1d8)]['processRequest'](_0x38eac9);if(_0x2c8a39[_0x5860d3(0x1f5)]){const _0x2cef63=_0x2c8a39[_0x5860d3(0x193)];this[_0x5860d3(0x196)]=_0x2cef63,console[_0x5860d3(0x1d1)](_0x5860d3(0x1af)),console['log']('\x20\x20\x20ID:\x20'+_0x2cef63['id']),console[_0x5860d3(0x1d1)](_0x5860d3(0x1ec)+_0x2cef63[_0x5860d3(0x1e7)]),console['log']('\x20\x20\x20Model:\x20'+_0x2cef63[_0x5860d3(0x1f0)]),console[_0x5860d3(0x1d1)]('\x20\x20\x20Switched\x20to\x20this\x20agent\x20automatically'),this['rl'][_0x5860d3(0x1f6)](this['getPrompt']());}else console['error'](_0x5860d3(0x1c0),_0x2c8a39['error']);}catch(_0x533008){console[_0x5860d3(0x1ac)](_0x5860d3(0x1a7),_0x533008['message']);}}async['switchAgent'](_0x4122b6){const _0x58267c=a0_0x287487;if(_0x4122b6[_0x58267c(0x1e0)]===0x0){console['log']('❌\x20Usage:\x20/switch\x20<agent-id>');return;}const _0x4d1c4c=_0x4122b6[0x0];try{const _0x2d9c9c={'interface':INTERFACE_TYPES['CLI'],'sessionId':this['sessionId'],'action':ORCHESTRATOR_ACTIONS['GET_AGENT_STATUS'],'payload':{'agentId':_0x4d1c4c},'projectDir':process[_0x58267c(0x1eb)]()},_0x4852cc=await this['orchestrator']['processRequest'](_0x2d9c9c);_0x4852cc[_0x58267c(0x1f5)]?(this['currentAgent']=_0x4852cc[_0x58267c(0x193)],console['log'](_0x58267c(0x19d)+this['currentAgent'][_0x58267c(0x1e7)]+'\x20('+this[_0x58267c(0x196)]['id']+')'),this['rl'][_0x58267c(0x1f6)](this['getPrompt']())):console['error']('❌\x20Failed\x20to\x20switch\x20agent:',_0x4852cc[_0x58267c(0x1ac)]);}catch(_0x426446){console[_0x58267c(0x1ac)](_0x58267c(0x19c),_0x426446[_0x58267c(0x1f3)]);}}async[a0_0x287487(0x1bd)](_0x4b6c63){const _0xa4671f=a0_0x287487;if(_0x4b6c63['length']===0x0){console[_0xa4671f(0x1d1)](_0xa4671f(0x1ad));return;}const _0x5c3e8f=_0x4b6c63[0x0],_0x2460ed=parseInt(_0x4b6c63[0x1])||0x3c,_0x2cd97b=_0x4b6c63[_0xa4671f(0x194)](0x2)['join']('\x20')||'Manual pause from CLI';try{const _0x257d95={'interface':INTERFACE_TYPES[_0xa4671f(0x1b1)],'sessionId':this[_0xa4671f(0x1bc)],'action':ORCHESTRATOR_ACTIONS[_0xa4671f(0x19a)],'payload':{'agentId':_0x5c3e8f,'duration':_0x2460ed,'reason':_0x2cd97b},'projectDir':process['cwd']()},_0x254415=await this['orchestrator']['processRequest'](_0x257d95);_0x254415[_0xa4671f(0x1f5)]?(console[_0xa4671f(0x1d1)](_0xa4671f(0x1be)+_0x2460ed+_0xa4671f(0x1a1)),console[_0xa4671f(0x1d1)]('\x20\x20\x20Reason:\x20'+_0x2cd97b)):console[_0xa4671f(0x1ac)]('❌\x20Failed\x20to\x20pause\x20agent:',_0x254415[_0xa4671f(0x1ac)]);}catch(_0x4ed340){console['error']('❌\x20Pause\x20agent\x20command\x20failed:',_0x4ed340['message']);}}async['resumeAgent'](_0x816106){const _0xc8ae72=a0_0x287487;if(_0x816106['length']===0x0){console['log']('❌\x20Usage:\x20/resume\x20<agent-id>');return;}const _0x152f9a=_0x816106[0x0];try{const _0x2614ab={'interface':INTERFACE_TYPES['CLI'],'sessionId':this['sessionId'],'action':ORCHESTRATOR_ACTIONS[_0xc8ae72(0x1ed)],'payload':{'agentId':_0x152f9a},'projectDir':process[_0xc8ae72(0x1eb)]()},_0x9cf62c=await this[_0xc8ae72(0x1d8)]['processRequest'](_0x2614ab);_0x9cf62c['success']?console['log'](_0xc8ae72(0x1c4)):console[_0xc8ae72(0x1ac)]('❌\x20Failed\x20to\x20resume\x20agent:',_0x9cf62c[_0xc8ae72(0x1ac)]);}catch(_0x55a14f){console['error'](_0xc8ae72(0x1bb),_0x55a14f[_0xc8ae72(0x1f3)]);}}async[a0_0x287487(0x1da)](){const _0x19cafe=a0_0x287487;console[_0x19cafe(0x1d1)](''),console[_0x19cafe(0x1d1)]('📜\x20Command\x20History:');if(this[_0x19cafe(0x1c3)][_0x19cafe(0x1e0)]===0x0)console['log']('\x20\x20\x20No\x20commands\x20executed\x20yet');else{const _0x16c436=this['commandHistory'][_0x19cafe(0x194)](-0xa);for(let _0x190641=0x0;_0x190641<_0x16c436[_0x19cafe(0x1e0)];_0x190641++){const _0x275f3c=_0x16c436[_0x190641],_0x375158=new Date(_0x275f3c['timestamp'])[_0x19cafe(0x1b8)]();console[_0x19cafe(0x1d1)]('\x20\x20\x20'+(_0x190641+0x1)+'.\x20['+_0x375158+']\x20'+_0x275f3c['command']);}this[_0x19cafe(0x1c3)]['length']>0xa&&console['log'](_0x19cafe(0x1cd)+(this['commandHistory']['length']-0xa)+'\x20more\x20commands');}console['log']('');}async[a0_0x287487(0x1ab)](){const _0x38ceec=a0_0x287487;console[_0x38ceec(0x1c5)](),this[_0x38ceec(0x1cb)]();}async[a0_0x287487(0x1a4)](){const _0x4bd7e7=a0_0x287487;this['isRunning']&&(console[_0x4bd7e7(0x1d1)]('\x0a👋\x20Goodbye!'),this['isRunning']=![],this['rl']&&this['rl']['close']());}['getPrompt'](){const _0x2e484b=a0_0x287487,_0x15f573=this[_0x2e484b(0x196)]?this['currentAgent']['name']:'no-agent';return _0x2e484b(0x1ee)+_0x15f573+'>\x20';}async[a0_0x287487(0x1ae)](){await this['exit']();}}function a0_0x43c2(_0x3187d4,_0x1b5c25){_0x3187d4=_0x3187d4-0x192;const _0x137029=a0_0x1370();let _0x43c2ea=_0x137029[_0x3187d4];if(a0_0x43c2['ZuQhvb']===undefined){var _0x31d06c=function(_0x3364cb){const _0x58254a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x437662='',_0xf5c5b0='';for(let _0x2315e7=0x0,_0x4c87f5,_0x12d64e,_0x4e5149=0x0;_0x12d64e=_0x3364cb['charAt'](_0x4e5149++);~_0x12d64e&&(_0x4c87f5=_0x2315e7%0x4?_0x4c87f5*0x40+_0x12d64e:_0x12d64e,_0x2315e7++%0x4)?_0x437662+=String['fromCharCode'](0xff&_0x4c87f5>>(-0x2*_0x2315e7&0x6)):0x0){_0x12d64e=_0x58254a['indexOf'](_0x12d64e);}for(let _0xfce436=0x0,_0x1df921=_0x437662['length'];_0xfce436<_0x1df921;_0xfce436++){_0xf5c5b0+='%'+('00'+_0x437662['charCodeAt'](_0xfce436)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xf5c5b0);};a0_0x43c2['hHQkeV']=_0x31d06c,a0_0x43c2['IABhZw']={},a0_0x43c2['ZuQhvb']=!![];}const _0x2402de=_0x137029[0x0],_0x322dc0=_0x3187d4+_0x2402de,_0x5a0c88=a0_0x43c2['IABhZw'][_0x322dc0];return!_0x5a0c88?(_0x43c2ea=a0_0x43c2['hHQkeV'](_0x43c2ea),a0_0x43c2['IABhZw'][_0x322dc0]=_0x43c2ea):_0x43c2ea=_0x5a0c88,_0x43c2ea;}export default CLIInterface;function a0_0x1370(){const _0x256ec4=['DgvYBwLUywW','y3jLyxrLqwDLBNq','y29TBwfUzeHPC3rVCNK','4PYfiefNzw50ihjLC3vTzwqGC3vJy2vZC2z1BgX5','y2XLyxi','y3jLyxrLsw50zxjMywnL','Dg9VBeLK','icaVCgf1C2uGpgfNzw50lwLKpIaGicaTifbHDxnLigfUigfNzw50','mZqZnZiYnK1MrM1ywa','zMLSzxn5C3rLBq','C2HVD1DLBgnVBwu','4P2miezHAwXLzcb0BYbNzxqGC3rHDhvZoG','icaGlI4UigfUzca','C2HVD1n0yxr1CW','icaVC3DPDgnOidXHz2vUDc1Pzd4GicaTifn3AxrJAcb0BYbKAwzMzxjLBNqGywDLBNq','4P2miezHAwXLzcb0BYbZzw5Kig1LC3nHz2u6','Bg9N','nJG3yvLUv2fK','4P2mifvUA25VD24Gy29TBwfUzdOGlW','Cgf1C2vKvw50AwW','Dg9mB3DLCKnHC2u','ywDLBNrZ','Bg9Nz2vY','B3jJAgvZDhjHDg9Y','8j+KLIbby3rPDMuGqwDLBNrZoG','C2HVD0HPC3rVCNK','ChvZAa','icaGifjLC3vSDdOG','mJm5mtqYngD3D2nHyW','8j+uQcbdCMvHDgLUzYbHz2vUDcaI','icH1BNrPBca','BgvUz3rO','8j+tIIbtExn0zw0Gu3rHDhvZoG','yMLUza','ode2mdm4zvzNB2Xo','nJq4ndy0u3vHz2zK','8j+tMIbmB3HPysbbDxrVCgLSB3qGt25LienmssbdB21Tyw5KCZO','8j+KLIbbDMfPBgfIBguGqwDLBNrZoG','BMfTzq','teLtvf9br0vovfm','ywDLBNrKzwXHEq','cIHuBYbLEgL0lcb0ExbLicjLEgL0iIbVCIbWCMvZCYbdDhjSk0mGywDHAw4P','y3DK','icaGtMfTztOG','uKvtvu1fx0fhru5u','Bg94Awe6','C3rHDhvZ','ChjLzMvYCMvKtw9KzwW','C2HVD0HLBha','icaGvhLWzsaVy3jLyxrLidXUyw1LpIb0BYbJCMvHDguGEw91CIbMAxjZDcbHz2vUDa','BwvZC2fNzq','ChjVy2vZC1jLCxvLC3q','C3vJy2vZCW','C2v0uhjVBxb0','AgLZDg9YEvnPEMu','AxnsDw5UAw5N','zgf0yq','C2XPy2u','ChjVBxb0','y3vYCMvUDefNzw50','4P2miefNzw50ihjLC3bVBNnLigzHAwXLzdO','mJiZodK3ndfWy05svxG','8j+sOsboBYbHz2vUDcbZzwXLy3rLzc4Gq3jLyxrLigfUigfNzw50igzPCNn0ihDPDgG6ic9JCMvHDguGpgfNzw50lw5HBwu+','uefvu0vFquDftLq','mwHtD2Xeyq','4P2mifn3AxrJAcbHz2vUDcbJB21Tyw5KigzHAwXLzdO','4PYfifn3AxrJAgvKihrVigfNzw50oIa','4P2mieXPC3qGywDLBNrZignVBw1HBMqGzMfPBgvKoG','icaGu2vZC2LVBIbjrdOG','AxnqyxvZzwq','ihnLy29Uzhm','8j+KLIbbz2vUDcbYzxnWB25ZztO','z2v0uhjVBxb0','zxHPDa','C3rHCNrZv2L0Aa','y29TBwfUzhm','4P2mienYzwf0zsbHz2vUDcbJB21Tyw5KigzHAwXLzdO','icaGvhLWzsaVAgvSCcbMB3iGyxzHAwXHyMXLignVBw1HBMrZ','4P2mifn0yxr1CYbJB21Tyw5KigzHAwXLzdO','yNjVD3nLCG','y2XLyxjty3jLzw4','zxjYB3i','4P2mifvZywDLoIaVCgf1C2uGpgfNzw50lwLKpIbBzhvYyxrPB25DifTYzwfZB25D','C2H1DgrVD24','4PYfiefNzw50ignYzwf0zwqGC3vJy2vZC2z1BgX5iq','Dg9VBfjLC3vSDhm','q0Xj','mtuYnZzXuwL3A0G','Aw5PDgLHBgL6zq','icaGqwDLBNrZignHBIb1C2uGDg9VBhmGyw5KignVBw11BMLJyxrLihDPDgGGB3rOzxiGywDLBNrZ','BwvZC2fNzunVDw50','mZm2mJC1mhrrDwLYyq','lcbHBIbbssbHC3nPC3rHBNqGy3jLyxrLzcbPBIb0AguGtg94AweGqxv0B3bPBg90ie9UzsbZExn0zw0UifLVDsbJyw4GAgvSCcb3AxrOignVzgLUzYWGyw5HBhLZAxmSigfUzcb2yxjPB3vZihrHC2TZihvZAw5NihrOzsbHDMfPBgfIBguGDg9VBhmU','Dg9mB2nHBgvuAw1Lu3rYAw5N','ChjVy2vZC0LUChv0','icaVC3rHDhvZicaGicaGicaGicaGicaTifnOB3CGC3LZDgvTihn0yxr1CW','4P2mifjLC3vTzsbHz2vUDcbJB21Tyw5KigzHAwXLzdO','C2vZC2LVBKLK','Cgf1C2vbz2vUDa','4PYfiefNzw50ihbHDxnLzcbMB3iG','icaGicbtDgf0Dxm6ia','4P2miezHAwXLzcb0BYbJCMvHDguGywDLBNq6'];a0_0x1370=function(){return _0x256ec4;};return a0_0x1370();}
|
|
1
|
+
const a0_0x5491c7=a0_0x4a2a;(function(_0x3df693,_0x2c163b){const _0x364317=a0_0x4a2a,_0x698454=_0x3df693();while(!![]){try{const _0x43ce35=-parseInt(_0x364317(0x100))/0x1*(-parseInt(_0x364317(0xcb))/0x2)+parseInt(_0x364317(0xbe))/0x3+parseInt(_0x364317(0xf2))/0x4+-parseInt(_0x364317(0xd1))/0x5+parseInt(_0x364317(0x10b))/0x6+parseInt(_0x364317(0xc3))/0x7+-parseInt(_0x364317(0xbf))/0x8;if(_0x43ce35===_0x2c163b)break;else _0x698454['push'](_0x698454['shift']());}catch(_0x2ad4ed){_0x698454['push'](_0x698454['shift']());}}}(a0_0x3a3a,0x7de08));function a0_0x4a2a(_0x4d6334,_0x58f19e){_0x4d6334=_0x4d6334-0xb5;const _0x3a3a99=a0_0x3a3a();let _0x4a2ae1=_0x3a3a99[_0x4d6334];if(a0_0x4a2a['eHqnXY']===undefined){var _0x271152=function(_0x28039f){const _0x5ebf0b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49ce5c='',_0x2da541='';for(let _0x1de79b=0x0,_0x4ab114,_0x571554,_0xf945a5=0x0;_0x571554=_0x28039f['charAt'](_0xf945a5++);~_0x571554&&(_0x4ab114=_0x1de79b%0x4?_0x4ab114*0x40+_0x571554:_0x571554,_0x1de79b++%0x4)?_0x49ce5c+=String['fromCharCode'](0xff&_0x4ab114>>(-0x2*_0x1de79b&0x6)):0x0){_0x571554=_0x5ebf0b['indexOf'](_0x571554);}for(let _0x1ccba9=0x0,_0x314458=_0x49ce5c['length'];_0x1ccba9<_0x314458;_0x1ccba9++){_0x2da541+='%'+('00'+_0x49ce5c['charCodeAt'](_0x1ccba9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2da541);};a0_0x4a2a['hHEKkk']=_0x271152,a0_0x4a2a['eEtOqx']={},a0_0x4a2a['eHqnXY']=!![];}const _0x379b05=_0x3a3a99[0x0],_0x36f33e=_0x4d6334+_0x379b05,_0x1e6400=a0_0x4a2a['eEtOqx'][_0x36f33e];return!_0x1e6400?(_0x4a2ae1=a0_0x4a2a['hHEKkk'](_0x4a2ae1),a0_0x4a2a['eEtOqx'][_0x36f33e]=_0x4a2ae1):_0x4a2ae1=_0x1e6400,_0x4a2ae1;}import a0_0x49ce5c from'readline';import{INTERFACE_TYPES,ORCHESTRATOR_ACTIONS}from'../utilities/constants.js';class CLIInterface{constructor(_0x2da541,_0x1de79b,_0x4ab114={}){const _0x311fd9=a0_0x4a2a;this['orchestrator']=_0x2da541,this[_0x311fd9(0x108)]=_0x1de79b,this['config']=_0x4ab114,this['rl']=null,this['sessionId']=_0x311fd9(0xdb)+Date[_0x311fd9(0x11a)](),this[_0x311fd9(0xbc)]=null,this[_0x311fd9(0xd5)]=![],this['historySize']=_0x4ab114[_0x311fd9(0xc1)]||0x3e8,this['commandHistory']=[],this[_0x311fd9(0x104)]={'help':this['showHelp']['bind'](this),'exit':this[_0x311fd9(0x102)][_0x311fd9(0xf5)](this),'quit':this['exit'][_0x311fd9(0xf5)](this),'status':this['showStatus'][_0x311fd9(0xf5)](this),'agents':this[_0x311fd9(0x10a)][_0x311fd9(0xf5)](this),'create':this['createAgent']['bind'](this),'switch':this[_0x311fd9(0xb5)][_0x311fd9(0xf5)](this),'pause':this[_0x311fd9(0xf1)]['bind'](this),'resume':this[_0x311fd9(0x110)]['bind'](this),'clear':this['clearScreen']['bind'](this),'history':this['showHistory']['bind'](this)};}async['initialize'](){const _0x3e8482=a0_0x4a2a;this['rl']=a0_0x49ce5c[_0x3e8482(0xce)]({'input':process['stdin'],'output':process['stdout'],'prompt':this[_0x3e8482(0xc8)](),'historySize':this[_0x3e8482(0xc1)]}),this['rl']['on']('line',this['handleInput']['bind'](this)),this['rl']['on'](_0x3e8482(0xbd),this[_0x3e8482(0x102)][_0x3e8482(0xf5)](this)),this['rl']['on'](_0x3e8482(0x114),()=>{console['log']('\x0a(To\x20exit,\x20type\x20\x22exit\x22\x20or\x20press\x20Ctrl+C\x20again)'),this['rl']['prompt']();}),this[_0x3e8482(0xd5)]=!![],this['showWelcome'](),this['rl'][_0x3e8482(0xc4)]();}async['handleInput'](_0x571554){const _0x4b6651=a0_0x4a2a,_0xf945a5=_0x571554['trim']();if(_0xf945a5['length']===0x0){this['rl']['prompt']();return;}this['commandHistory'][_0x4b6651(0xc2)]({'command':_0xf945a5,'timestamp':new Date()[_0x4b6651(0xd3)]()});this[_0x4b6651(0xee)]['length']>this[_0x4b6651(0xc1)]&&this['commandHistory'][_0x4b6651(0xba)]();try{await this[_0x4b6651(0xb8)](_0xf945a5);}catch(_0x1ccba9){console['error']('❌\x20Error:',_0x1ccba9[_0x4b6651(0xc7)]),this[_0x4b6651(0x108)]?.[_0x4b6651(0xf6)](_0x4b6651(0x10f),{'command':_0xf945a5,'error':_0x1ccba9['message']});}this['isRunning']&&this['rl']['prompt']();}async['processInput'](_0x314458){const _0x45854b=a0_0x4a2a;if(_0x314458[_0x45854b(0xe2)]('/')){const _0x29e334=_0x314458['slice'](0x1)['split']('\x20'),_0x5576e0=_0x29e334[0x0]['toLowerCase'](),_0x81e4ad=_0x29e334['slice'](0x1);if(this['commands'][_0x5576e0]){await this[_0x45854b(0x104)][_0x5576e0](_0x81e4ad);return;}else{console['log'](_0x45854b(0x116)+_0x5576e0),console['log'](_0x45854b(0xcc));return;}}if(!this[_0x45854b(0xbc)]){console['log']('💡\x20No\x20agent\x20selected.\x20Create\x20an\x20agent\x20first\x20with:\x20/create\x20<agent-name>');return;}await this['sendMessageToAgent'](_0x314458);}async[a0_0x5491c7(0xf3)](_0x16efa9){const _0x23fdeb=a0_0x5491c7;console[_0x23fdeb(0xfb)]('📤\x20Sending\x20to\x20agent...');try{const _0x16021a={'interface':INTERFACE_TYPES[_0x23fdeb(0xed)],'sessionId':this['sessionId'],'action':ORCHESTRATOR_ACTIONS['SEND_MESSAGE'],'payload':{'agentId':this['currentAgent']['id'],'message':_0x16efa9,'mode':'chat'},'projectDir':process[_0x23fdeb(0xd4)]()},_0x4bfda5=await this['orchestrator'][_0x23fdeb(0xec)](_0x16021a);if(_0x4bfda5[_0x23fdeb(0xea)]){console['log'](_0x23fdeb(0xe4)),console[_0x23fdeb(0xfb)](_0x4bfda5['data'][_0x23fdeb(0xc7)][_0x23fdeb(0xe6)]);if(_0x4bfda5[_0x23fdeb(0xf0)]['toolResults']&&_0x4bfda5['data']['toolResults'][_0x23fdeb(0x117)]>0x0){console[_0x23fdeb(0xfb)]('\x0a🔧\x20Tool\x20execution\x20results:');for(const _0x54f779 of _0x4bfda5['data'][_0x23fdeb(0xd8)]){console['log']('\x20\x20'+_0x54f779['toolId']+':\x20'+_0x54f779['status']),_0x54f779['result']&&console[_0x23fdeb(0xfb)](_0x23fdeb(0x119)+JSON[_0x23fdeb(0xff)](_0x54f779[_0x23fdeb(0xe7)],null,0x2));}}}else console['error'](_0x23fdeb(0x103),_0x4bfda5[_0x23fdeb(0xf6)]);}catch(_0x9caccf){console[_0x23fdeb(0xf6)]('❌\x20Failed\x20to\x20send\x20message:',_0x9caccf['message']);}}['showWelcome'](){const _0x2717d1=a0_0x5491c7;console['log'](''),console['log'](_0x2717d1(0xef)),console[_0x2717d1(0xfb)]('\x20\x20\x20Type\x20/help\x20for\x20available\x20commands'),console['log']('\x20\x20\x20Type\x20/create\x20<name>\x20to\x20create\x20your\x20first\x20agent'),console['log']('');}async[a0_0x5491c7(0xe3)](){const _0x363318=a0_0x5491c7;console['log'](''),console['log']('📚\x20Loxia\x20Autopilot\x20One\x20CLI\x20Commands:'),console[_0x363318(0xfb)](''),console['log']('\x20\x20/help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help\x20message'),console[_0x363318(0xfb)](_0x363318(0xfa)),console[_0x363318(0xfb)](_0x363318(0x112)),console['log'](_0x363318(0xf7)),console['log']('\x20\x20/switch\x20<agent-id>\x20\x20\x20-\x20Switch\x20to\x20different\x20agent'),console[_0x363318(0xfb)](_0x363318(0x109)),console[_0x363318(0xfb)](_0x363318(0xfe)),console['log'](_0x363318(0x113)),console[_0x363318(0xfb)](_0x363318(0xd9)),console['log']('\x20\x20/exit\x20or\x20/quit\x20\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20CLI'),console[_0x363318(0xfb)](''),console['log']('💬\x20Chat\x20with\x20agents:'),console['log'](_0x363318(0xc6)),console[_0x363318(0xfb)]('\x20\x20\x20Agents\x20can\x20use\x20tools\x20and\x20communicate\x20with\x20other\x20agents'),console['log']('');}async['showStatus'](){const _0x502a56=a0_0x5491c7;try{const _0xe80100={'interface':INTERFACE_TYPES[_0x502a56(0xed)],'sessionId':this['sessionId'],'action':ORCHESTRATOR_ACTIONS[_0x502a56(0xe0)],'payload':{},'projectDir':process['cwd']()},_0x485590=await this[_0x502a56(0xf9)]['processRequest'](_0xe80100);if(_0x485590[_0x502a56(0xea)]){const _0x39a4d1=_0x485590['data'];console[_0x502a56(0xfb)](''),console[_0x502a56(0xfb)]('📊\x20System\x20Status:'),console[_0x502a56(0xfb)](_0x502a56(0x10e)+_0x39a4d1[_0x502a56(0xb9)]),console[_0x502a56(0xfb)]('\x20\x20\x20Project:\x20'+_0x39a4d1['projectDir']),console[_0x502a56(0xfb)](_0x502a56(0x118)+_0x39a4d1['agents']['length']),console[_0x502a56(0xfb)]('\x20\x20\x20Current\x20Agent:\x20'+(this[_0x502a56(0xbc)]?this['currentAgent']['name']:'None')),console['log']('');if(_0x39a4d1['agents']['length']>0x0){console[_0x502a56(0xfb)]('🤖\x20Active\x20Agents:');for(const _0x55e174 of _0x39a4d1[_0x502a56(0x107)]){const _0x10ba15=_0x55e174[_0x502a56(0xca)]?_0x55e174['status']+'\x20(until\x20'+_0x55e174[_0x502a56(0xb6)]+')':_0x55e174['status'];console[_0x502a56(0xfb)]('\x20\x20\x20'+_0x55e174['id']+':\x20'+_0x55e174['name']+'\x20('+_0x10ba15+')');}console['log']('');}}else console[_0x502a56(0xf6)](_0x502a56(0xe5),_0x485590['error']);}catch(_0x34c1d7){console[_0x502a56(0xf6)](_0x502a56(0xc0),_0x34c1d7['message']);}}async[a0_0x5491c7(0x10a)](){const _0x1018a5=a0_0x5491c7;try{const _0x23b7da={'interface':INTERFACE_TYPES['CLI'],'sessionId':this[_0x1018a5(0xb9)],'action':ORCHESTRATOR_ACTIONS['LIST_AGENTS'],'payload':{},'projectDir':process[_0x1018a5(0xd4)]()},_0x2d9289=await this['orchestrator'][_0x1018a5(0xec)](_0x23b7da);if(_0x2d9289['success']){const _0x5054b1=_0x2d9289[_0x1018a5(0xf0)];console[_0x1018a5(0xfb)]('');if(_0x5054b1['length']===0x0)console['log'](_0x1018a5(0xda)),console[_0x1018a5(0xfb)]('\x20\x20\x20Use\x20/create\x20<name>\x20to\x20create\x20your\x20first\x20agent');else{console[_0x1018a5(0xfb)](_0x1018a5(0xc9));for(const _0x5814de of _0x5054b1){const _0x5ed8de=this[_0x1018a5(0xbc)]&&this[_0x1018a5(0xbc)]['id']===_0x5814de['id']?'\x20(current)':'',_0x5a9d14=_0x5814de['isPaused']?_0x5814de[_0x1018a5(0xd7)]+'\x20(until\x20'+_0x5814de[_0x1018a5(0xb6)]+')':_0x5814de['status'];console[_0x1018a5(0xfb)]('\x20\x20\x20'+_0x5814de['id']+':\x20'+_0x5814de['name']+_0x5ed8de),console[_0x1018a5(0xfb)]('\x20\x20\x20\x20\x20Status:\x20'+_0x5a9d14),console[_0x1018a5(0xfb)]('\x20\x20\x20\x20\x20Model:\x20'+_0x5814de[_0x1018a5(0xfd)]),console['log']('\x20\x20\x20\x20\x20Messages:\x20'+_0x5814de['messageCount']),console[_0x1018a5(0xfb)]('');}}}else console['error']('❌\x20Failed\x20to\x20list\x20agents:',_0x2d9289[_0x1018a5(0xf6)]);}catch(_0x73edc2){console['error']('❌\x20List\x20agents\x20command\x20failed:',_0x73edc2['message']);}}async['createAgent'](_0x2ee4e9){const _0x490274=a0_0x5491c7;if(_0x2ee4e9[_0x490274(0x117)]===0x0){console[_0x490274(0xfb)](_0x490274(0xe8));return;}const _0x4a16a1=_0x2ee4e9[0x0],_0x234a27=_0x2ee4e9[0x1]||_0x490274(0xe1);console['log'](_0x490274(0xdf)+_0x4a16a1+_0x490274(0x10d)+_0x234a27+_0x490274(0xd0));try{const _0x343ba4={'interface':INTERFACE_TYPES[_0x490274(0xed)],'sessionId':this[_0x490274(0xb9)],'action':ORCHESTRATOR_ACTIONS['CREATE_AGENT'],'payload':{'name':_0x4a16a1,'systemPrompt':'You\x20are\x20'+_0x4a16a1+',\x20an\x20AI\x20assistant\x20created\x20in\x20the\x20Loxia\x20Autopilot\x20One\x20system.\x20You\x20can\x20help\x20with\x20coding,\x20analysis,\x20and\x20various\x20tasks\x20using\x20the\x20available\x20tools.','model':_0x234a27,'capabilities':['terminal',_0x490274(0xcd),'agentdelay','browser']},'projectDir':process['cwd']()},_0x491979=await this[_0x490274(0xf9)][_0x490274(0xec)](_0x343ba4);if(_0x491979['success']){const _0x108de3=_0x491979[_0x490274(0xf0)];this['currentAgent']=_0x108de3,console['log'](_0x490274(0xb7)),console[_0x490274(0xfb)](_0x490274(0xc5)+_0x108de3['id']),console['log'](_0x490274(0xf8)+_0x108de3[_0x490274(0x106)]),console['log']('\x20\x20\x20Model:\x20'+_0x108de3[_0x490274(0x10c)]),console['log']('\x20\x20\x20Switched\x20to\x20this\x20agent\x20automatically'),this['rl'][_0x490274(0xfc)](this['getPrompt']());}else console['error']('❌\x20Failed\x20to\x20create\x20agent:',_0x491979['error']);}catch(_0x1a4548){console['error'](_0x490274(0xd2),_0x1a4548[_0x490274(0xc7)]);}}async[a0_0x5491c7(0xb5)](_0xb9362a){const _0x32e927=a0_0x5491c7;if(_0xb9362a[_0x32e927(0x117)]===0x0){console['log'](_0x32e927(0xe9));return;}const _0x5c8801=_0xb9362a[0x0];try{const _0x31f5f2={'interface':INTERFACE_TYPES['CLI'],'sessionId':this['sessionId'],'action':ORCHESTRATOR_ACTIONS['GET_AGENT_STATUS'],'payload':{'agentId':_0x5c8801},'projectDir':process[_0x32e927(0xd4)]()},_0x1b16cc=await this[_0x32e927(0xf9)][_0x32e927(0xec)](_0x31f5f2);_0x1b16cc['success']?(this[_0x32e927(0xbc)]=_0x1b16cc[_0x32e927(0xf0)],console['log'](_0x32e927(0x11b)+this[_0x32e927(0xbc)][_0x32e927(0x106)]+'\x20('+this['currentAgent']['id']+')'),this['rl'][_0x32e927(0xfc)](this[_0x32e927(0xc8)]())):console[_0x32e927(0xf6)]('❌\x20Failed\x20to\x20switch\x20agent:',_0x1b16cc['error']);}catch(_0xf75d0e){console[_0x32e927(0xf6)]('❌\x20Switch\x20agent\x20command\x20failed:',_0xf75d0e[_0x32e927(0xc7)]);}}async[a0_0x5491c7(0xf1)](_0x219e90){const _0x4686e4=a0_0x5491c7;if(_0x219e90[_0x4686e4(0x117)]===0x0){console['log']('❌\x20Usage:\x20/pause\x20<agent-id>\x20[duration]\x20[reason]');return;}const _0x3a3320=_0x219e90[0x0],_0x2fa9ab=parseInt(_0x219e90[0x1])||0x3c,_0x1e63da=_0x219e90['slice'](0x2)['join']('\x20')||'Manual pause from CLI';try{const _0x43e609={'interface':INTERFACE_TYPES['CLI'],'sessionId':this[_0x4686e4(0xb9)],'action':ORCHESTRATOR_ACTIONS[_0x4686e4(0xeb)],'payload':{'agentId':_0x3a3320,'duration':_0x2fa9ab,'reason':_0x1e63da},'projectDir':process['cwd']()},_0x459833=await this['orchestrator']['processRequest'](_0x43e609);_0x459833['success']?(console['log']('✅\x20Agent\x20paused\x20for\x20'+_0x2fa9ab+_0x4686e4(0x101)),console['log']('\x20\x20\x20Reason:\x20'+_0x1e63da)):console['error'](_0x4686e4(0xcf),_0x459833['error']);}catch(_0x5bc366){console['error'](_0x4686e4(0xbb),_0x5bc366[_0x4686e4(0xc7)]);}}async[a0_0x5491c7(0x110)](_0x292a59){const _0x29593a=a0_0x5491c7;if(_0x292a59['length']===0x0){console['log']('❌\x20Usage:\x20/resume\x20<agent-id>');return;}const _0x10b973=_0x292a59[0x0];try{const _0x40ccaa={'interface':INTERFACE_TYPES[_0x29593a(0xed)],'sessionId':this[_0x29593a(0xb9)],'action':ORCHESTRATOR_ACTIONS[_0x29593a(0x111)],'payload':{'agentId':_0x10b973},'projectDir':process['cwd']()},_0x4a4f80=await this[_0x29593a(0xf9)]['processRequest'](_0x40ccaa);_0x4a4f80['success']?console['log']('✅\x20Agent\x20resumed\x20successfully'):console['error'](_0x29593a(0x105),_0x4a4f80['error']);}catch(_0x4d889a){console['error']('❌\x20Resume\x20agent\x20command\x20failed:',_0x4d889a[_0x29593a(0xc7)]);}}async['showHistory'](){const _0x2efa4b=a0_0x5491c7;console[_0x2efa4b(0xfb)](''),console['log'](_0x2efa4b(0x115));if(this['commandHistory']['length']===0x0)console['log']('\x20\x20\x20No\x20commands\x20executed\x20yet');else{const _0x57ddec=this['commandHistory']['slice'](-0xa);for(let _0x9611ab=0x0;_0x9611ab<_0x57ddec[_0x2efa4b(0x117)];_0x9611ab++){const _0x4e6432=_0x57ddec[_0x9611ab],_0x247248=new Date(_0x4e6432[_0x2efa4b(0xdd)])['toLocaleTimeString']();console['log'](_0x2efa4b(0xd6)+(_0x9611ab+0x1)+'.\x20['+_0x247248+']\x20'+_0x4e6432['command']);}this['commandHistory']['length']>0xa&&console['log']('\x20\x20\x20...\x20and\x20'+(this['commandHistory']['length']-0xa)+'\x20more\x20commands');}console[_0x2efa4b(0xfb)]('');}async['clearScreen'](){const _0x3b7e84=a0_0x5491c7;console['clear'](),this[_0x3b7e84(0xf4)]();}async['exit'](){const _0x218ea3=a0_0x5491c7;this[_0x218ea3(0xd5)]&&(console['log'](_0x218ea3(0xdc)),this['isRunning']=![],this['rl']&&this['rl'][_0x218ea3(0xbd)]());}['getPrompt'](){const _0x5e11d2=a0_0x5491c7,_0xea6a7d=this[_0x5e11d2(0xbc)]?this[_0x5e11d2(0xbc)][_0x5e11d2(0x106)]:'no-agent';return'loxia:'+_0xea6a7d+'>\x20';}async[a0_0x5491c7(0xde)](){await this['exit']();}}function a0_0x3a3a(){const _0x3b5bcb=['yw50AhjVCgLJlxnVBM5LDa','C3rHCNrZv2L0Aa','C2HVD0HLBha','8j+KLIbbz2vUDcbYzxnWB25ZztO','4P2miezHAwXLzcb0BYbNzxqGC3rHDhvZoG','y29UDgvUDa','CMvZDwX0','4P2mifvZywDLoIaVy3jLyxrLidXHz2vUDc1Uyw1LpIbBBw9KzwXD','4P2mifvZywDLoIaVC3DPDgnOidXHz2vUDc1Pzd4','C3vJy2vZCW','uefvu0vFquDftLq','ChjVy2vZC1jLCxvLC3q','q0Xj','y29TBwfUzeHPC3rVCNK','8j+oRYbxzwXJB21LihrVieXVEgLHief1Dg9WAwXVDcbpBMuGq0Xj','zgf0yq','Cgf1C2vbz2vUDa','mJe5ntaXnK5lAfnwzW','C2vUze1LC3nHz2vuB0fNzw50','C2HVD1DLBgnVBwu','yMLUza','zxjYB3i','icaVy3jLyxrLidXUyw1LpIaGicaGicaTienYzwf0zsbHig5LDYbHz2vUDa','icaGtMfTztOG','B3jJAgvZDhjHDg9Y','icaVC3rHDhvZicaGicaGicaGicaGicaTifnOB3CGC3LZDgvTihn0yxr1CW','Bg9N','C2v0uhjVBxb0','y3vYCMvUDe1VzgvS','icaVCMvZDw1LidXHz2vUDc1Pzd4GicaTifjLC3vTzsbHihbHDxnLzcbHz2vUDa','C3rYAw5NAwz5','ntKYEhf2CMHj','ihnLy29Uzhm','zxHPDa','4P2miefNzw50ihjLC3bVBNnLigzHAwXLzdO','y29TBwfUzhm','4P2miezHAwXLzcb0BYbYzxn1BwuGywDLBNq6','BMfTzq','ywDLBNrZ','Bg9Nz2vY','icaVCgf1C2uGpgfNzw50lwLKpIaGicaTifbHDxnLigfUigfNzw50','BgLZDefNzw50CW','mZiZndu3mgvXB3PLvG','ChjLzMvYCMvKtw9KzwW','iIb3AxrOig1VzgvSia','icaGu2vZC2LVBIbjrdOG','q0XjignVBw1HBMqGzxjYB3i','CMvZDw1LqwDLBNq','uKvtvu1fx0fhru5u','icaVywDLBNrZicaGicaGicaGicaGicaTieXPC3qGywXSigfNzw50CW','icaVAgLZDg9YEsaGicaGicaGicaGicaTifnOB3CGy29TBwfUzcbOAxn0B3j5','u0Lhsu5u','8j+tNcbdB21Tyw5KieHPC3rVCNK6','4P2mifvUA25VD24Gy29TBwfUzdOGlW','BgvUz3rO','icaGqwDLBNrZoIa','icaGifjLC3vSDdOG','BM93','4PYfifn3AxrJAgvKihrVigfNzw50oIa','C3DPDgnOqwDLBNq','Cgf1C2vKvw50AwW','4PYfiefNzw50ignYzwf0zwqGC3vJy2vZC2z1BgX5iq','ChjVy2vZC0LUChv0','C2vZC2LVBKLK','C2HPzNq','4P2mifbHDxnLigfNzw50ignVBw1HBMqGzMfPBgvKoG','y3vYCMvUDefNzw50','y2XVC2u','nZGZodC2Cxb4yujh','mtq0mdmYndHpA2Dyrxe','4P2mifn0yxr1CYbJB21Tyw5KigzHAwXLzdO','AgLZDg9YEvnPEMu','ChvZAa','mZKZmZGXmuPfuNrkua','ChjVBxb0','icaGsuq6ia','icaGu2LTCgX5ihr5CguGEw91CIbTzxnZywDLihrVihnLBMqGAxqGDg8GDgHLign1CNjLBNqGywDLBNq','BwvZC2fNzq','z2v0uhjVBxb0','8j+KLIbbDMfPBgfIBguGqwDLBNrZoG','AxnqyxvZzwq','mJC0nNP6uhDxvG','vhLWzsaVAgvSCcbMB3iGyxzHAwXHyMXLignVBw1HBMrZ','zMLSzxn5C3rLBq','y3jLyxrLsw50zxjMywnL','4P2miezHAwXLzcb0BYbWyxvZzsbHz2vUDdO','lI4U','mJaZoty2mfzXEuTeza','4P2mienYzwf0zsbHz2vUDcbJB21Tyw5KigzHAwXLzdO','Dg9ju09tDhjPBMC','y3DK','AxnsDw5UAw5N','icaG','C3rHDhvZ','Dg9VBfjLC3vSDhm','icaVy2XLyxiGicaGicaGicaGicaGicaTienSzwfYihnJCMvLBG','8j+tRsboBYbHz2vUDhmGy3jLyxrLzcb5zxq','y2XPlq','cVcFKySGr29Vzgj5zse','DgLTzxn0yw1W','C2H1DgrVD24','8j+uQcbdCMvHDgLUzYbHz2vUDcaI','r0vux1nfu1njt05Fu1rbveu'];a0_0x3a3a=function(){return _0x3b5bcb;};return a0_0x3a3a();}export default CLIInterface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x3f778f=a0_0x1100;(function(_0x135772,_0xf84635){const _0xa3baaf=a0_0x1100,_0x8e8163=_0x135772();while(!![]){try{const _0x47a123=parseInt(_0xa3baaf(0x9d))/0x1*(-parseInt(_0xa3baaf(0xbd))/0x2)+-parseInt(_0xa3baaf(0xac))/0x3*(parseInt(_0xa3baaf(0xba))/0x4)+-parseInt(_0xa3baaf(0x9e))/0x5*(-parseInt(_0xa3baaf(0xbb))/0x6)+-parseInt(_0xa3baaf(0xb4))/0x7+-parseInt(_0xa3baaf(0xaa))/0x8*(-parseInt(_0xa3baaf(0xb0))/0x9)+-parseInt(_0xa3baaf(0xc7))/0xa+parseInt(_0xa3baaf(0xa4))/0xb*(parseInt(_0xa3baaf(0xae))/0xc);if(_0x47a123===_0xf84635)break;else _0x8e8163['push'](_0x8e8163['shift']());}catch(_0x50beb8){_0x8e8163['push'](_0x8e8163['shift']());}}}(a0_0x4152,0x52c5a));import{describe,test,expect}from'@jest/globals';function a0_0x4152(){const _0x2d8d84=['lI4VlI4Vy29TCg9Uzw50CY9bz2vUDfn3AxrJAgvYlMPZ','qwDLBNrdCMvHDg9Y','lI4VlI4Vy29TCg9Uzw50CY9myxLVDxqUANm','qwDLBNrdCMvHDg9YigrLzMLUzxmGC3rLCcbJB25ZDgfUDhm','u2v0DgLUz3nqyw5LBcbPCYbHigz1BMn0Aw9UignVBxbVBMvUDa','ugHHC2uGmtaGlsbbz2vUDfn3AxrJAgvYic0Gu3rYDwn0DxjL','qwDLBNrtD2L0y2HLCIbPCYbHigz1BMn0Aw9UignVBxbVBMvUDa','Dg9czurLzMLUzwq','CMvUzgvY','mty1nZuYmfvmzxbZsG','zNvUy3rPB24','sgvSCfbHBMvSigLZigeGzNvUy3rPB24Gy29TCg9Uzw50','qwDLBNrtD2L0y2HLCG','nta5mZK1D3nlrvbf','nJm1mdq1qKTktwXW','vgv4Da','zgvMyxvSDa','u2v0DgLUz3nqyw5LBcbKzwzPBMvZignHDgvNB3j5ignVBNn0yw50CW','ywXS','C2L6zq','mJa5nZDArLzurgi','Dg9czvvUzgvMAw5Lza','ugHHC2uGmtaGlsbjBNrLz3jHDgLVBIb3AxrOieXHEw91Da','lI4VlI4Vy29TCg9Uzw50CY9tzwfYy2Hqyw5LBc5QCW','ugHHC2uGmtaGlsbbz2vUDenYzwf0B3iGlsbtDhj1y3r1CMu','A2v5CW','mZa2oti4EenpDxrb','u2vHCMnOugfUzwW','mZzlr3fgDvm','ugHHC2uGmtaGlsbbzhzHBMnLzcbgzwf0DxjLCYaTieLTCg9YDhm','mZa4ngv0ENvrEG','qwXSifbOyxnLideWignVBxbVBMvUDhmGDxnLifjLywn0igfUzcbjBMS','mte3AhvZsK5d','u2v0DgLUz3nqyw5LBa','lI4VlI4Vy29TCg9Uzw50CY9izwXWugfUzwWUANm','ChjVDg90ExbL','mJGYmtq4m0Hlzhzeuq','sgvSCfbHBMvS','BwfW','lI4VlI4Vy29TCg9Uzw50CY9bz2vUDenYzwf0B3iUANm','Dg9czq','lI4VlI4Vy29TCg9Uzw50CY9tzxr0Aw5NC1bHBMvSlMPZ','nJG4odrIugv5Ag4','mZbqufHzEvm','ugHHC2uGmtaGlsbizwXWugfUzwWGlsbtDhj1y3r1CMu','mMfyAgPIuG'];a0_0x4152=function(){return _0x2d8d84;};return a0_0x4152();}function a0_0x1100(_0x503e9d,_0x1228af){_0x503e9d=_0x503e9d-0x9a;const _0x415290=a0_0x4152();let _0x1100b7=_0x415290[_0x503e9d];if(a0_0x1100['LKLVFQ']===undefined){var _0x36b2d8=function(_0x275bc8){const _0x47a561='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x19c870='',_0x423ecd='';for(let _0x531e77=0x0,_0x5432e0,_0x5a5257,_0x199461=0x0;_0x5a5257=_0x275bc8['charAt'](_0x199461++);~_0x5a5257&&(_0x5432e0=_0x531e77%0x4?_0x5432e0*0x40+_0x5a5257:_0x5a5257,_0x531e77++%0x4)?_0x19c870+=String['fromCharCode'](0xff&_0x5432e0>>(-0x2*_0x531e77&0x6)):0x0){_0x5a5257=_0x47a561['indexOf'](_0x5a5257);}for(let _0x5538f6=0x0,_0x568903=_0x19c870['length'];_0x5538f6<_0x568903;_0x5538f6++){_0x423ecd+='%'+('00'+_0x19c870['charCodeAt'](_0x5538f6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x423ecd);};a0_0x1100['pEZNzH']=_0x36b2d8,a0_0x1100['kCxwLM']={},a0_0x1100['LKLVFQ']=!![];}const _0x372329=_0x415290[0x0],_0x4ca67b=_0x503e9d+_0x372329,_0xb49109=a0_0x1100['kCxwLM'][_0x4ca67b];return!_0xb49109?(_0x1100b7=a0_0x1100['pEZNzH'](_0x1100b7),a0_0x1100['kCxwLM'][_0x4ca67b]=_0x1100b7):_0x1100b7=_0xb49109,_0x1100b7;}describe(a0_0x3f778f(0xad),()=>{test('AgentSwitcher component can be imported',async()=>{const _0x2d3d8e=a0_0x1100,{AgentSwitcher:_0x19c870}=await import('../../components/AgentSwitcher.js');expect(_0x19c870)['toBeDefined'](),expect(typeof _0x19c870)[_0x2d3d8e(0xb8)]('function');},0x7530),test('AgentCreator component can be imported',async()=>{const _0x424afa=a0_0x1100,{AgentCreator:_0x423ecd}=await import(_0x424afa(0xb7));expect(_0x423ecd)['toBeDefined'](),expect(typeof _0x423ecd)[_0x424afa(0xb8)](_0x424afa(0x9a));}),test('SettingsPanel component can be imported',async()=>{const _0x503984=a0_0x1100,{SettingsPanel:_0x531e77}=await import(_0x503984(0xb9));expect(_0x531e77)['toBeDefined'](),expect(typeof _0x531e77)[_0x503984(0xb8)]('function');}),test('SearchPanel component can be imported',async()=>{const _0x513900=a0_0x1100,{SearchPanel:_0x5432e0}=await import(_0x513900(0xa7));expect(_0x5432e0)[_0x513900(0xc5)](),expect(typeof _0x5432e0)['toBe']('function');}),test('HelpPanel component can be imported',async()=>{const _0x33c30b=a0_0x1100,{HelpPanel:_0x5a5257}=await import(_0x33c30b(0xb2));expect(_0x5a5257)[_0x33c30b(0xc5)](),expect(typeof _0x5a5257)['toBe']('function');});}),describe(a0_0x3f778f(0xc3),()=>{const _0x50723d=a0_0x3f778f;test(_0x50723d(0xc4),async()=>{const _0x440253=_0x50723d,{AgentSwitcher:_0x199461}=await import(_0x440253(0xbe));expect(typeof _0x199461)[_0x440253(0xb8)](_0x440253(0x9a)),expect(_0x199461['prototype']?.[_0x440253(0xc6)])['toBeUndefined']();}),test('AgentSwitcher is default export',async()=>{const _0x37a6be=_0x50723d,module=await import(_0x37a6be(0xbe));expect(module['default'])['toBeDefined'](),expect(module[_0x37a6be(0xa0)])[_0x37a6be(0xb8)](module[_0x37a6be(0x9c)]);});}),describe(a0_0x3f778f(0xa8),()=>{test('AgentCreator\x20is\x20a\x20function\x20component',async()=>{const _0x5369f2=a0_0x1100,{AgentCreator:_0x5538f6}=await import(_0x5369f2(0xb7));expect(typeof _0x5538f6)[_0x5369f2(0xb8)](_0x5369f2(0x9a)),expect(_0x5538f6['prototype']?.['render'])[_0x5369f2(0xa5)]();}),test('AgentCreator is default export',async()=>{const _0x12fe98=a0_0x1100,module=await import(_0x12fe98(0xb7));expect(module[_0x12fe98(0xa0)])[_0x12fe98(0xc5)](),expect(module['default'])['toBe'](module[_0x12fe98(0xbf)]);});}),describe('Phase\x2010\x20-\x20SettingsPanel\x20-\x20Structure',()=>{const _0x258969=a0_0x3f778f;test(_0x258969(0xc2),async()=>{const _0x3f6ca0=_0x258969,{SettingsPanel:_0x568903}=await import(_0x3f6ca0(0xb9));expect(typeof _0x568903)['toBe'](_0x3f6ca0(0x9a)),expect(_0x568903['prototype']?.[_0x3f6ca0(0xc6)])['toBeUndefined']();}),test('SettingsPanel is default export',async()=>{const _0x1ecef1=_0x258969,module=await import(_0x1ecef1(0xb9));expect(module['default'])['toBeDefined'](),expect(module[_0x1ecef1(0xa0)])['toBe'](module['SettingsPanel']);});}),describe('Phase\x2010\x20-\x20SearchPanel\x20-\x20Structure',()=>{test('SearchPanel\x20is\x20a\x20function\x20component',async()=>{const _0x253043=a0_0x1100,{SearchPanel:_0x41ad8c}=await import('../../components/SearchPanel.js');expect(typeof _0x41ad8c)['toBe'](_0x253043(0x9a)),expect(_0x41ad8c[_0x253043(0xb3)]?.['render'])[_0x253043(0xa5)]();}),test('SearchPanel is default export',async()=>{const _0xf9b024=a0_0x1100,module=await import(_0xf9b024(0xa7));expect(module[_0xf9b024(0xa0)])[_0xf9b024(0xc5)](),expect(module['default'])['toBe'](module['SearchPanel']);});}),describe(a0_0x3f778f(0xbc),()=>{const _0x3ee3fc=a0_0x3f778f;test(_0x3ee3fc(0x9b),async()=>{const _0x52d513=_0x3ee3fc,{HelpPanel:_0x19b293}=await import(_0x52d513(0xb2));expect(typeof _0x19b293)[_0x52d513(0xb8)]('function'),expect(_0x19b293['prototype']?.[_0x52d513(0xc6)])['toBeUndefined']();}),test('HelpPanel is default export',async()=>{const _0x276286=_0x3ee3fc,module=await import(_0x276286(0xb2));expect(module[_0x276286(0xa0)])[_0x276286(0xc5)](),expect(module['default'])['toBe'](module[_0x276286(0xb5)]);});}),describe(a0_0x3f778f(0xa6),()=>{const _0x816578=a0_0x3f778f;test('Layout component can import all Phase 10 components',async()=>{const _0xb97157=a0_0x1100,[_0x42113a,_0x20fe75,_0x5dddd9,_0x3c6e8f,_0x3c4245]=await Promise[_0xb97157(0xa2)]([import(_0xb97157(0xbe)),import('../../components/AgentCreator.js'),import(_0xb97157(0xb9)),import('../../components/SearchPanel.js'),import('../../components/HelpPanel.js')]);expect(_0x42113a[_0xb97157(0x9c)])['toBeDefined'](),expect(_0x20fe75['AgentCreator'])['toBeDefined'](),expect(_0x5dddd9[_0xb97157(0xb1)])[_0xb97157(0xc5)](),expect(_0x3c6e8f[_0xb97157(0xab)])['toBeDefined'](),expect(_0x3c4245['HelpPanel'])['toBeDefined']();}),test('Layout\x20component\x20still\x20loads\x20after\x20Phase\x2010\x20additions',async()=>{const _0x4f1e99=a0_0x1100,{Layout:_0x4a4fc3}=await import(_0x4f1e99(0xc0));expect(_0x4a4fc3)[_0x4f1e99(0xc5)](),expect(typeof _0x4a4fc3)['toBe']('function');}),test(_0x816578(0xaf),async()=>{const _0x44f160=_0x816578,_0x314f5f=await import('react'),_0x133380=await import('ink');expect(_0x314f5f['createElement'])[_0x44f160(0xc5)](),expect(_0x314f5f['useState'])[_0x44f160(0xc5)](),expect(_0x133380['Box'])['toBeDefined'](),expect(_0x133380[_0x44f160(0x9f)])['toBeDefined'](),expect(_0x133380['useInput'])[_0x44f160(0xc5)]();});}),describe('Phase\x2010\x20-\x20Component\x20Constants\x20and\x20Configurations',()=>{const _0x11aa3b=a0_0x3f778f;test(_0x11aa3b(0xc1),async()=>{const _0x3aa566=_0x11aa3b,module=await import('../../components/AgentCreator.js');expect(module['AgentCreator'])[_0x3aa566(0xc5)]();}),test(_0x11aa3b(0xa1),async()=>{const _0xfe779f=_0x11aa3b,module=await import(_0xfe779f(0xb9));expect(module['SettingsPanel'])[_0xfe779f(0xc5)]();}),test('HelpPanel\x20defines\x20shortcut\x20configurations',async()=>{const _0x3891e6=_0x11aa3b,module=await import(_0x3891e6(0xb2));expect(module[_0x3891e6(0xb5)])['toBeDefined']();});}),describe('Phase\x2010\x20-\x20All\x20Components\x20Export\x20Correctly',()=>{test('All components can be imported together without conflicts',async()=>{const _0x41958f=a0_0x1100,_0x3c451b=await Promise[_0x41958f(0xa2)]([import(_0x41958f(0xbe)),import(_0x41958f(0xb7)),import(_0x41958f(0xb9)),import('../../components/SearchPanel.js'),import(_0x41958f(0xb2))]),_0x5fc251=_0x3c451b[_0x41958f(0xb6)](_0x39b119=>Object[_0x41958f(0xa9)](_0x39b119)[0x0]),_0x5aa784=new Set(_0x5fc251);expect(_0x5aa784[_0x41958f(0xa3)])['toBe'](_0x5fc251['length']);});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x5d8718=a0_0x1d88;(function(_0x3950d6,_0x3c1d9e){const _0x19bfc3=a0_0x1d88,_0x12db8a=_0x3950d6();while(!![]){try{const _0x5639f3=-parseInt(_0x19bfc3(0x127))/0x1+-parseInt(_0x19bfc3(0x147))/0x2+parseInt(_0x19bfc3(0x153))/0x3+-parseInt(_0x19bfc3(0x12f))/0x4*(parseInt(_0x19bfc3(0x13d))/0x5)+parseInt(_0x19bfc3(0x140))/0x6+-parseInt(_0x19bfc3(0x137))/0x7+parseInt(_0x19bfc3(0x138))/0x8;if(_0x5639f3===_0x3c1d9e)break;else _0x12db8a['push'](_0x12db8a['shift']());}catch(_0x28c24c){_0x12db8a['push'](_0x12db8a['shift']());}}}(a0_0x145c,0xc22bb));import{describe,test,expect}from'@jest/globals';function a0_0x145c(){const _0x1ca71e=['DxnLqwDLBNrdB250CM9SihjLDhvYBNmGzxHWzwn0zwqGAw50zxjMywnLihnOyxbL','quDftLrFtu9ersbZDxbWB3j0CYb0B2DNBgLUzYbIzxr3zwvUig1VzgvZ','lI4VlI4VyxbPl3DLyNnVy2TLDc5QCW','zgvMyxvSDa','y2XHDwrLltmTns1ZB25Uzxq','Dg9dB250ywLU','teXnx01prevmuW','t1bftKfj','odm5odu5rhHXwMnr','revfufnfruS','quDftLrtx01prevFu0vu','tuLduK9tt0zu','DxnLqwDLBNrdB250CM9S','zNvUy3rPB24','tu9eruXFq0furuDpuLKGy29UC3rHBNrZigfYzsbKzwzPBMvK','Dg9mB3DLCKnHC2u','ntC0ntC2nejMqMPQvW','lI4VlI4VyxbPl21LC3nHz2vsB3v0zxiUANm','lI4VlI4VyxbPl3nLC3nPB24UANm','v1nFtuvtu0fhrv9uwvbfigLUy2X1zgvZig1VzguGyw5Kig1VzgvSignOyw5NzsbLDMvUDhm','B3bLBMfP','t3jJAgvZDhjHDg9YigvUzhbVAw50igv4Axn0CYbMB3iGBw9KzwWGyw5KignVBMzPzYbVCgvYyxrPB25Z','q0Hbva','Dg9czurLzMLUzwq','odyYoduZnMPUt2v4yG','mJmYotqXotjfsgXHtNy','tu9eruXFq0furuDpuLKGy2fUigjLihvZzwqGDg8GzMLSDgvYig1VzgvSCYbIEsbJyxrLz29YEq','quDftLrFtu9erv9dsefor0ve','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gsw50zwDYyxrPB24','z3b0ltq','nxDRvfH2Ea','quDftLq','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gtw9KzwWGrMLSDgvYAw5N','mJmZodq1mM5svgjKqG','A2v5CW','DxnLqwDLBNrdB250CM9SigHVB2SGAw50zwDYyxrLCYb3AxrOifnLC3nPB24Gyw5Kie1LC3nHz2vsB3v0zxi','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gsg9VAYbjBNrLCMzHy2uGvMvYAwzPy2f0Aw9U','zMLSDgvY','Bg9JywXOB3n0','qu5usfjpueLd','ndaXmti4Chz6Cuzv','Dg9czq','zgvLChnLzwS','quDftLrFtu9erq','BgvUz3rO','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gsw1WB3j0CW','tu9eruXFq0furuDpuLK','Dg9vChbLCKnHC2u','twvZC2fNzvjVDxrLCG','l2fWAs9Hz2vUDhmVoMfNzw50swqVBw9Kzq','lI4VlI4Vy29UzMLNl2nVBNn0yw50CY5QCW','tu9eruXFq0furuDpuLKGAw5JBhvKzxmGBwfQB3iGteXnihbYB3zPzgvYCW','mZyWotK1n3b4rgrVDa'];a0_0x145c=function(){return _0x1ca71e;};return a0_0x145c();}function a0_0x1d88(_0x524dd9,_0x5b4b71){_0x524dd9=_0x524dd9-0x121;const _0x145cbd=a0_0x145c();let _0x1d8874=_0x145cbd[_0x524dd9];if(a0_0x1d88['sQtoUk']===undefined){var _0xfcd132=function(_0x2a10ca){const _0x49e5df='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xaa4986='',_0x5d160e='';for(let _0x515264=0x0,_0x25ba9,_0x597bf4,_0x567e7c=0x0;_0x597bf4=_0x2a10ca['charAt'](_0x567e7c++);~_0x597bf4&&(_0x25ba9=_0x515264%0x4?_0x25ba9*0x40+_0x597bf4:_0x597bf4,_0x515264++%0x4)?_0xaa4986+=String['fromCharCode'](0xff&_0x25ba9>>(-0x2*_0x515264&0x6)):0x0){_0x597bf4=_0x49e5df['indexOf'](_0x597bf4);}for(let _0x420f45=0x0,_0x5198c9=_0xaa4986['length'];_0x420f45<_0x5198c9;_0x420f45++){_0x5d160e+='%'+('00'+_0xaa4986['charCodeAt'](_0x420f45)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5d160e);};a0_0x1d88['QCILGL']=_0xfcd132,a0_0x1d88['pNsfET']={},a0_0x1d88['sQtoUk']=!![];}const _0x25e7ac=_0x145cbd[0x0],_0x1c295c=_0x524dd9+_0x25e7ac,_0x28d0df=a0_0x1d88['pNsfET'][_0x1c295c];return!_0x28d0df?(_0x1d8874=a0_0x1d88['QCILGL'](_0x1d8874),a0_0x1d88['pNsfET'][_0x1c295c]=_0x1d8874):_0x1d8874=_0x28d0df,_0x1d8874;}describe(a0_0x5d8718(0x14c),()=>{test('useAgentControl hook can be imported',async()=>{const _0x732863=a0_0x1d88,{useAgentControl:_0xaa4986}=await import('../../state/useAgentControl.js');expect(_0xaa4986)['toBeDefined'](),expect(typeof _0xaa4986)['toBe'](_0x732863(0x12c));}),test('useAgentControl is default export',async()=>{const _0x311453=a0_0x1d88,module=await import('../../state/useAgentControl.js');expect(module['default'])['toBeDefined'](),expect(typeof module['default'])['toBe']('function'),expect(module[_0x311453(0x122)])['toBe'](module[_0x311453(0x12b)]);});}),describe('Agent\x20Control\x20Management\x20-\x20Constants',()=>{const _0x4cc6d3=a0_0x5d8718;test('AGENT_MODE\x20constants\x20are\x20defined',async()=>{const _0x13798e=a0_0x1d88,{AGENT_MODE:_0x5d160e}=await import('../../config/constants.js');expect(_0x5d160e)['toBeDefined'](),expect(_0x5d160e['CHAT'])['toBe']('CHAT'),expect(_0x5d160e[_0x13798e(0x13e)])[_0x13798e(0x148)](_0x13798e(0x13e));}),test(_0x4cc6d3(0x12d),async()=>{const _0x381587=_0x4cc6d3,{MODEL_CATEGORY:_0x515264}=await import(_0x381587(0x151));expect(_0x515264)['toBeDefined'](),expect(_0x515264['ANTHROPIC'])['toBe']('anthropic'),expect(_0x515264[_0x381587(0x126)])[_0x381587(0x148)]('openai'),expect(_0x515264['DEEPSEEK'])['toBe'](_0x381587(0x149)),expect(_0x515264[_0x381587(0x12a)])['toBe']('microsoft');}),test('Mode\x20and\x20model\x20API\x20endpoints\x20are\x20defined',async()=>{const _0x40269a=_0x4cc6d3,{API_ENDPOINTS:_0x25ba9}=await import('../../config/constants.js');expect(_0x25ba9[_0x40269a(0x129)])[_0x40269a(0x148)](_0x40269a(0x150)),expect(_0x25ba9['AGENTS_MODE_GET'])['toBe'](_0x40269a(0x150)),expect(_0x25ba9[_0x40269a(0x125)])['toBe']('/api/llm/models');}),test(_0x4cc6d3(0x132),async()=>{const _0x327495=_0x4cc6d3,{WS_MESSAGE_TYPE:_0x597bf4}=await import(_0x327495(0x151));expect(_0x597bf4)[_0x327495(0x136)](),expect(_0x597bf4[_0x327495(0x13a)])[_0x327495(0x148)]('agent_mode_changed');});}),describe(a0_0x5d8718(0x13b),()=>{const _0x3d3153=a0_0x5d8718;test(_0x3d3153(0x142),async()=>{const _0x1cc2af=_0x3d3153,{useAgentControl:_0x567e7c}=await import('../../state/useAgentControl.js'),{SessionManager:_0x420f45}=await import('../../api/session.js'),{MessageRouter:_0x5198c9}=await import('../../api/messageRouter.js'),{WebSocketManager:_0x5b66ad}=await import('../../api/websocket.js'),_0x4e466e=new _0x420f45('localhost',0x1f90),_0x47e7cd=new _0x5b66ad(_0x1cc2af(0x145),0x1f90),_0x337e3d=new _0x5198c9(_0x47e7cd);expect(_0x4e466e)[_0x1cc2af(0x136)](),expect(_0x337e3d)[_0x1cc2af(0x136)](),expect(typeof _0x567e7c)[_0x1cc2af(0x148)](_0x1cc2af(0x12c));}),test('Full agent control stack can be imported together',async()=>{const _0xb77dfc=_0x3d3153,[_0x5a2e63,_0x549803,_0x23c5ea,_0x158f84,_0x4170cc]=await Promise['all']([import('../../config/constants.js'),import(_0xb77dfc(0x131)),import(_0xb77dfc(0x121)),import(_0xb77dfc(0x130)),import('../../state/useAgentControl.js')]);expect(_0x5a2e63[_0xb77dfc(0x14a)])['toBeDefined'](),expect(_0x5a2e63[_0xb77dfc(0x14d)])['toBeDefined'](),expect(_0x5a2e63['API_ENDPOINTS'])[_0xb77dfc(0x136)](),expect(_0x549803['SessionManager'])['toBeDefined'](),expect(_0x23c5ea['WebSocketManager'])[_0xb77dfc(0x136)](),expect(_0x158f84[_0xb77dfc(0x14f)])[_0xb77dfc(0x136)](),expect(_0x4170cc[_0xb77dfc(0x12b)])['toBeDefined']();});}),describe('Agent\x20Control\x20Management\x20-\x20API\x20Endpoints\x20Validation',()=>{const _0x58f62f=a0_0x5d8718;test('Agent\x20mode\x20endpoints\x20follow\x20RESTful\x20pattern',async()=>{const _0xe5597b=a0_0x1d88,{API_ENDPOINTS:_0x3f232f}=await import(_0xe5597b(0x151));expect(_0x3f232f['AGENTS_MODE_SET'])['toMatch'](/^\/api\/agents/),expect(_0x3f232f['AGENTS_MODE_GET'])['toMatch'](/^\/api\/agents/),expect(_0x3f232f[_0xe5597b(0x129)])[_0xe5597b(0x124)](':agentId'),expect(_0x3f232f['AGENTS_MODE_GET'])['toContain'](':agentId');}),test('LLM\x20models\x20endpoint\x20exists',async()=>{const _0x34fb3d=a0_0x1d88,{API_ENDPOINTS:_0x35d1f2}=await import(_0x34fb3d(0x151));expect(_0x35d1f2[_0x34fb3d(0x125)])[_0x34fb3d(0x136)](),expect(_0x35d1f2[_0x34fb3d(0x125)])['toBe']('/api/llm/models');}),test(_0x58f62f(0x134),async()=>{const _0x5d60ae=_0x58f62f,{API_ENDPOINTS:_0x4b9d5a}=await import(_0x5d60ae(0x151));expect(_0x4b9d5a['ORCHESTRATOR'])[_0x5d60ae(0x136)](),expect(_0x4b9d5a['ORCHESTRATOR'])['toBe']('/api/orchestrator');});}),describe(a0_0x5d8718(0x143),()=>{const _0x1a67f5=a0_0x5d8718;test(_0x1a67f5(0x154),async()=>{const _0x22aa0e=_0x1a67f5,{useAgentControl:_0x136111}=await import('../../state/useAgentControl.js');expect(_0x136111[_0x22aa0e(0x14b)])['toBe'](0x3);});}),describe('Agent\x20Control\x20Management\x20-\x20Constants\x20Validation',()=>{const _0x1c89d8=a0_0x5d8718;test('AGENT_MODE\x20has\x20exactly\x20two\x20modes',async()=>{const _0x556a8e=a0_0x1d88,{AGENT_MODE:_0x4063ea}=await import(_0x556a8e(0x151)),_0x3ad4d7=Object[_0x556a8e(0x141)](_0x4063ea);expect(_0x3ad4d7['length'])['toBe'](0x2),expect(_0x3ad4d7)['toContain'](_0x556a8e(0x135)),expect(_0x3ad4d7)[_0x556a8e(0x124)](_0x556a8e(0x13e));}),test('AGENT_MODE\x20values\x20are\x20uppercase',async()=>{const _0xdf8444=a0_0x1d88,{AGENT_MODE:_0x562c2b}=await import(_0xdf8444(0x151));expect(_0x562c2b['CHAT'])[_0xdf8444(0x148)]('CHAT'),expect(_0x562c2b['AGENT'])[_0xdf8444(0x148)]('AGENT'),expect(_0x562c2b[_0xdf8444(0x135)])['toBe'](_0x562c2b['CHAT'][_0xdf8444(0x14e)]()),expect(_0x562c2b['AGENT'])[_0xdf8444(0x148)](_0x562c2b[_0xdf8444(0x13e)]['toUpperCase']());}),test('MODEL_CATEGORY\x20values\x20are\x20lowercase',async()=>{const _0x5977e8=a0_0x1d88,{MODEL_CATEGORY:_0x4c32ef}=await import(_0x5977e8(0x151));expect(_0x4c32ef['ANTHROPIC'])['toBe']('anthropic'),expect(_0x4c32ef['OPENAI'])['toBe'](_0x5977e8(0x133)),expect(_0x4c32ef['DEEPSEEK'])['toBe']('deepseek'),expect(_0x4c32ef[_0x5977e8(0x12a)])['toBe']('microsoft'),expect(_0x4c32ef[_0x5977e8(0x146)])[_0x5977e8(0x148)](_0x4c32ef[_0x5977e8(0x146)][_0x5977e8(0x12e)]()),expect(_0x4c32ef[_0x5977e8(0x126)])['toBe'](_0x4c32ef[_0x5977e8(0x126)][_0x5977e8(0x12e)]());}),test(_0x1c89d8(0x152),async()=>{const _0x17c263=_0x1c89d8,{MODEL_CATEGORY:_0x59afc8}=await import(_0x17c263(0x151)),_0x49aa79=Object[_0x17c263(0x141)](_0x59afc8);expect(_0x49aa79)[_0x17c263(0x124)]('ANTHROPIC'),expect(_0x49aa79)[_0x17c263(0x124)](_0x17c263(0x126)),expect(_0x49aa79)[_0x17c263(0x124)]('DEEPSEEK'),expect(_0x49aa79)[_0x17c263(0x124)](_0x17c263(0x12a));});}),describe('Agent\x20Control\x20Management\x20-\x20WebSocket\x20Event\x20Handlers',()=>{test('MessageRouter\x20has\x20mode\x20change\x20event\x20handler\x20registered',async()=>{const _0x3f6810=a0_0x1d88,{MessageRouter:_0x466cc5}=await import('../../api/messageRouter.js'),{WebSocketManager:_0xdd91eb}=await import(_0x3f6810(0x121)),{WS_MESSAGE_TYPE:_0x3d18c4}=await import('../../config/constants.js'),_0xa70284=new _0xdd91eb('localhost',0x1f90),_0x1a0c5a=new _0x466cc5(_0xa70284);expect(_0x1a0c5a['hasHandler'](_0x3d18c4['AGENT_MODE_CHANGED']))['toBe'](!![]);});}),describe('Agent\x20Control\x20Management\x20-\x20Mode\x20Switching\x20Logic',()=>{const _0x245965=a0_0x5d8718;test(_0x245965(0x155),async()=>{const _0x567d16=_0x245965,{AGENT_MODE:_0x21c1f5}=await import('../../config/constants.js');let _0x406bd4=_0x21c1f5[_0x567d16(0x135)],_0x3f2aa7=_0x406bd4===_0x21c1f5[_0x567d16(0x135)]?_0x21c1f5[_0x567d16(0x13e)]:_0x21c1f5[_0x567d16(0x135)];expect(_0x3f2aa7)[_0x567d16(0x148)](_0x21c1f5[_0x567d16(0x13e)]),_0x406bd4=_0x21c1f5['AGENT'],_0x3f2aa7=_0x406bd4===_0x21c1f5[_0x567d16(0x135)]?_0x21c1f5['AGENT']:_0x21c1f5[_0x567d16(0x135)],expect(_0x3f2aa7)[_0x567d16(0x148)](_0x21c1f5['CHAT']);});}),describe(a0_0x5d8718(0x13f),()=>{const _0x1f368e=a0_0x5d8718;test(_0x1f368e(0x139),async()=>{const _0x480013=_0x1f368e,{MODEL_CATEGORY:_0x4e3902}=await import('../../config/constants.js'),_0x1cd5ae=[{'id':_0x480013(0x123),'category':_0x4e3902[_0x480013(0x146)]},{'id':'gpt-4','category':_0x4e3902['OPENAI']},{'id':'deepseek-chat','category':_0x4e3902[_0x480013(0x128)]}],_0xa5dee8=_0x1cd5ae[_0x480013(0x144)](_0x3b11c1=>_0x3b11c1['category']===_0x4e3902['ANTHROPIC']),_0x432739=_0x1cd5ae['filter'](_0x3902c9=>_0x3902c9['category']===_0x4e3902['OPENAI']);expect(_0xa5dee8['length'])[_0x480013(0x148)](0x1),expect(_0xa5dee8[0x0]['id'])['toBe'](_0x480013(0x123)),expect(_0x432739[_0x480013(0x14b)])[_0x480013(0x148)](0x1),expect(_0x432739[0x0]['id'])['toBe'](_0x480013(0x13c));});});
|
|
1
|
+
function a0_0x4a47(){const _0x2d1099=['zNvUy3rPB24','tu9eruXFq0furuDpuLKGAw5JBhvKzxmGBwfQB3iGteXnihbYB3zPzgvYCW','nJe4ndGWCLfeBK9j','mvr6yunHtq','zgvLChnLzwSTy2HHDa','l2fWAs9VCMnOzxn0CMf0B3i','y2f0zwDVCNK','ntu2D0npuvzw','A2v5CW','Bg9JywXOB3n0','Dg9czurLzMLUzwq','lI4VlI4VyxbPl3DLyNnVy2TLDc5QCW','tuLduK9tt0zu','qvbjx0vorfbpsu5uuW','teXnx01prevmuW','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gtw9KzsbtD2L0y2HPBMCGtg9NAwm','Dg9czq','lI4VlI4VC3rHDguVDxnLqwDLBNrdB250CM9SlMPZ','y2XHDwrLltmTns1ZB25Uzxq','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gsw50zwDYyxrPB24','BgvUz3rO','DxnLqwDLBNrdB250CM9SigHVB2SGAw50zwDYyxrLCYb3AxrOifnLC3nPB24Gyw5Kie1LC3nHz2vsB3v0zxi','revfufnfruS','zgvMyxvSDa','nZm1mJq1AgjhDgHU','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gsg9VAYbjBNrLCMzHy2uGvMvYAwzPy2f0Aw9U','B3bLBMfP','quDftLrFtu9erv9dsefor0ve','quDftLrtx01prevFu0vu','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gv2vIu29JA2v0iev2zw50ieHHBMrSzxjZ','l2fWAs9Hz2vUDhmVoMfNzw50swqVBw9Kzq','BwLJCM9ZB2z0','Dg9dB250ywLU','Dg9mB3DLCKnHC2u','nJi2ntKWq2DfyNjf','oMfNzw50swq','Dg9nyxrJAa','u2vZC2LVBK1HBMfNzxi','v2vIu29JA2v0twfUywDLCG','DxnLqwDLBNrdB250CM9SihjLDhvYBNmGzxHWzwn0zwqGAw50zxjMywnLihnOyxbL','lI4VlI4Vy29UzMLNl2nVBNn0yw50CY5QCW','lI4VlI4VyxbPl3nLC3nPB24UANm','zMLSDgvY','ow1uCvb1uW','Dg9vChbLCKnHC2u','quDftLrtx01prevFr0vu','lI4VlI4VyxbPl21LC3nHz2vsB3v0zxiUANm','qwDLBNqGBw9KzsbLBMrWB2LUDhmGzM9SBg93ifjfu1rMDwWGCgf0DgvYBG','mte1nu5qBuXWzG','tu9eruXFq0furuDpuLKGy2fUigjLihvZzwqGDg8GzMLSDgvYig1VzgvSCYbIEsbJyxrLz29YEq','l2fWAs9SBg0VBw9KzwXZ','qu5usfjpueLd','nduXnZi1CeLis3Lq','tu9eruXFq0furuDpuLK','twvZC2fNzvjVDxrLCG','z3b0ltq','q0Hbva','mZaZotm4BxrnzNPV','tu9eruXFq0furuDpuLKGDMfSDwvZigfYzsbSB3DLCMnHC2u','ndu2mtjruvHlzee','qwDLBNqGq29UDhjVBcbnyw5Hz2vTzw50ic0Gtw9KzwWGrMLSDgvYAw5N','t1bftKfj','zgvLChnLzwS','quDftLq','v1nFtuvtu0fhrv9uwvbfigLUy2X1zgvZig1VzguGyw5Kig1VzgvSignOyw5NzsbLDMvUDhm','AgfZsgfUzgXLCG','DxnLqwDLBNrdB250CM9S'];a0_0x4a47=function(){return _0x2d1099;};return a0_0x4a47();}const a0_0x47ffb2=a0_0x4f5f;(function(_0x3ce806,_0x5a03a4){const _0x77c155=a0_0x4f5f,_0x551460=_0x3ce806();while(!![]){try{const _0x495087=parseInt(_0x77c155(0xd1))/0x1*(parseInt(_0x77c155(0xc4))/0x2)+parseInt(_0x77c155(0xbb))/0x3*(-parseInt(_0x77c155(0xd5))/0x4)+-parseInt(_0x77c155(0xbf))/0x5+parseInt(_0x77c155(0xc6))/0x6+parseInt(_0x77c155(0xa3))/0x7+parseInt(_0x77c155(0xd0))/0x8+parseInt(_0x77c155(0xb6))/0x9*(-parseInt(_0x77c155(0xad))/0xa);if(_0x495087===_0x5a03a4)break;else _0x551460['push'](_0x551460['shift']());}catch(_0x13ed22){_0x551460['push'](_0x551460['shift']());}}}(a0_0x4a47,0x210e5));function a0_0x4f5f(_0x47ecdc,_0x478863){_0x47ecdc=_0x47ecdc-0x99;const _0x4a47ee=a0_0x4a47();let _0x4f5f2a=_0x4a47ee[_0x47ecdc];if(a0_0x4f5f['NMaskR']===undefined){var _0x2ecaca=function(_0xd8a28b){const _0x253f3d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x54e76f='',_0x2cc5e9='';for(let _0x37f837=0x0,_0x1214fe,_0x5ed2a2,_0x33c402=0x0;_0x5ed2a2=_0xd8a28b['charAt'](_0x33c402++);~_0x5ed2a2&&(_0x1214fe=_0x37f837%0x4?_0x1214fe*0x40+_0x5ed2a2:_0x5ed2a2,_0x37f837++%0x4)?_0x54e76f+=String['fromCharCode'](0xff&_0x1214fe>>(-0x2*_0x37f837&0x6)):0x0){_0x5ed2a2=_0x253f3d['indexOf'](_0x5ed2a2);}for(let _0x5a0bf1=0x0,_0x4a3610=_0x54e76f['length'];_0x5a0bf1<_0x4a3610;_0x5a0bf1++){_0x2cc5e9+='%'+('00'+_0x54e76f['charCodeAt'](_0x5a0bf1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2cc5e9);};a0_0x4f5f['HoEdEz']=_0x2ecaca,a0_0x4f5f['sWZepd']={},a0_0x4f5f['NMaskR']=!![];}const _0x3f875c=_0x4a47ee[0x0],_0x381b31=_0x47ecdc+_0x3f875c,_0x55ddef=a0_0x4f5f['sWZepd'][_0x381b31];return!_0x55ddef?(_0x4f5f2a=a0_0x4f5f['HoEdEz'](_0x4f5f2a),a0_0x4f5f['sWZepd'][_0x381b31]=_0x4f5f2a):_0x4f5f2a=_0x55ddef,_0x4f5f2a;}import{describe,test,expect}from'@jest/globals';describe('Agent\x20Control\x20Management\x20-\x20Imports',()=>{test('useAgentControl hook can be imported',async()=>{const _0x550a05=a0_0x4f5f,{useAgentControl:_0x54e76f}=await import('../../state/useAgentControl.js');expect(_0x54e76f)['toBeDefined'](),expect(typeof _0x54e76f)[_0x550a05(0x9b)](_0x550a05(0xce));}),test('useAgentControl is default export',async()=>{const _0x23c137=a0_0x4f5f,module=await import('../../state/useAgentControl.js');expect(module['default'])[_0x23c137(0xd8)](),expect(typeof module['default'])['toBe']('function'),expect(module[_0x23c137(0xa2)])[_0x23c137(0x9b)](module[_0x23c137(0xcd)]);});}),describe('Agent\x20Control\x20Management\x20-\x20Constants',()=>{const _0x176251=a0_0x4f5f;test('AGENT_MODE\x20constants\x20are\x20defined',async()=>{const _0x44166b=a0_0x4f5f,{AGENT_MODE:_0x2cc5e9}=await import('../../config/constants.js');expect(_0x2cc5e9)['toBeDefined'](),expect(_0x2cc5e9['CHAT'])['toBe']('CHAT'),expect(_0x2cc5e9[_0x44166b(0xca)])[_0x44166b(0x9b)](_0x44166b(0xca));}),test('MODEL_CATEGORY\x20constants\x20are\x20defined',async()=>{const _0x4a57fe=a0_0x4f5f,{MODEL_CATEGORY:_0x37f837}=await import('../../config/constants.js');expect(_0x37f837)['toBeDefined'](),expect(_0x37f837[_0x4a57fe(0xbe)])[_0x4a57fe(0x9b)]('anthropic'),expect(_0x37f837[_0x4a57fe(0xc8)])['toBe'](_0x4a57fe(0xa5)),expect(_0x37f837['DEEPSEEK'])[_0x4a57fe(0x9b)](_0x4a57fe(0xc9)),expect(_0x37f837['MICROSOFT'])[_0x4a57fe(0x9b)](_0x4a57fe(0xaa));}),test('Mode\x20and\x20model\x20API\x20endpoints\x20are\x20defined',async()=>{const _0x26f0ff=a0_0x4f5f,{API_ENDPOINTS:_0x1214fe}=await import(_0x26f0ff(0xb3));expect(_0x1214fe[_0x26f0ff(0xa7)])['toBe'](_0x26f0ff(0xa9)),expect(_0x1214fe[_0x26f0ff(0xb8)])[_0x26f0ff(0x9b)](_0x26f0ff(0xa9)),expect(_0x1214fe['LLM_MODELS'])[_0x26f0ff(0x9b)](_0x26f0ff(0xbd));}),test(_0x176251(0xcb),async()=>{const _0x49e281=_0x176251,{WS_MESSAGE_TYPE:_0x5ed2a2}=await import(_0x49e281(0xb3));expect(_0x5ed2a2)['toBeDefined'](),expect(_0x5ed2a2['AGENT_MODE_CHANGED'])['toBe']('agent_mode_changed');});}),describe(a0_0x47ffb2(0x9e),()=>{const _0x4811a1=a0_0x47ffb2;test(_0x4811a1(0xa0),async()=>{const _0x5eb6f1=_0x4811a1,{useAgentControl:_0x33c402}=await import('../../state/useAgentControl.js'),{SessionManager:_0x5a0bf1}=await import(_0x5eb6f1(0xb4)),{MessageRouter:_0x4a3610}=await import('../../api/messageRouter.js'),{WebSocketManager:_0x245d3a}=await import('../../api/websocket.js'),_0x4846ae=new _0x5a0bf1(_0x5eb6f1(0xd7),0x1f90),_0x5d3e34=new _0x245d3a(_0x5eb6f1(0xd7),0x1f90),_0x74d07b=new _0x4a3610(_0x5d3e34);expect(_0x4846ae)['toBeDefined'](),expect(_0x74d07b)['toBeDefined'](),expect(typeof _0x33c402)[_0x5eb6f1(0x9b)](_0x5eb6f1(0xce));}),test('Full agent control stack can be imported together',async()=>{const _0x4afc80=_0x4811a1,[_0x23e518,_0x21804b,_0x1f02ab,_0x30f88e,_0x24bef6]=await Promise['all']([import('../../config/constants.js'),import('../../api/session.js'),import(_0x4afc80(0xd9)),import(_0x4afc80(0xb9)),import(_0x4afc80(0x9c))]);expect(_0x23e518['AGENT_MODE'])[_0x4afc80(0xd8)](),expect(_0x23e518[_0x4afc80(0xc0)])[_0x4afc80(0xd8)](),expect(_0x23e518[_0x4afc80(0xdb)])[_0x4afc80(0xd8)](),expect(_0x21804b[_0x4afc80(0xb0)])[_0x4afc80(0xd8)](),expect(_0x1f02ab[_0x4afc80(0xb1)])[_0x4afc80(0xd8)](),expect(_0x30f88e[_0x4afc80(0xc1)])['toBeDefined'](),expect(_0x24bef6[_0x4afc80(0xcd)])['toBeDefined']();});}),describe('Agent\x20Control\x20Management\x20-\x20API\x20Endpoints\x20Validation',()=>{const _0xf5eca7=a0_0x47ffb2;test(_0xf5eca7(0xba),async()=>{const _0x1aacc4=_0xf5eca7,{API_ENDPOINTS:_0x130708}=await import('../../config/constants.js');expect(_0x130708['AGENTS_MODE_SET'])[_0x1aacc4(0xaf)](/^\/api\/agents/),expect(_0x130708['AGENTS_MODE_GET'])[_0x1aacc4(0xaf)](/^\/api\/agents/),expect(_0x130708[_0x1aacc4(0xa7)])['toContain'](':agentId'),expect(_0x130708['AGENTS_MODE_GET'])['toContain'](_0x1aacc4(0xae));}),test('LLM\x20models\x20endpoint\x20exists',async()=>{const _0x4fa0b9=_0xf5eca7,{API_ENDPOINTS:_0x488897}=await import(_0x4fa0b9(0xb3));expect(_0x488897[_0x4fa0b9(0x99)])[_0x4fa0b9(0xd8)](),expect(_0x488897['LLM_MODELS'])[_0x4fa0b9(0x9b)]('/api/llm/models');}),test('Orchestrator\x20endpoint\x20exists\x20for\x20model\x20and\x20config\x20operations',async()=>{const _0x512cbe=_0xf5eca7,{API_ENDPOINTS:_0x69dc35}=await import(_0x512cbe(0xb3));expect(_0x69dc35['ORCHESTRATOR'])[_0x512cbe(0xd8)](),expect(_0x69dc35['ORCHESTRATOR'])['toBe'](_0x512cbe(0xd3));});}),describe(a0_0x47ffb2(0xa4),()=>{const _0x1c9819=a0_0x47ffb2;test(_0x1c9819(0xb2),async()=>{const _0x53b665=_0x1c9819,{useAgentControl:_0xc80d4}=await import('../../state/useAgentControl.js');expect(_0xc80d4[_0x53b665(0x9f)])['toBe'](0x3);});}),describe('Agent\x20Control\x20Management\x20-\x20Constants\x20Validation',()=>{const _0x13738b=a0_0x47ffb2;test('AGENT_MODE\x20has\x20exactly\x20two\x20modes',async()=>{const _0x18b0d5=a0_0x4f5f,{AGENT_MODE:_0x3971d0}=await import('../../config/constants.js'),_0x2a3a79=Object['keys'](_0x3971d0);expect(_0x2a3a79[_0x18b0d5(0x9f)])[_0x18b0d5(0x9b)](0x2),expect(_0x2a3a79)[_0x18b0d5(0xab)]('CHAT'),expect(_0x2a3a79)['toContain'](_0x18b0d5(0xca));}),test('AGENT_MODE\x20values\x20are\x20uppercase',async()=>{const _0x25b0cb=a0_0x4f5f,{AGENT_MODE:_0x163de2}=await import(_0x25b0cb(0xb3));expect(_0x163de2['CHAT'])[_0x25b0cb(0x9b)]('CHAT'),expect(_0x163de2[_0x25b0cb(0xca)])['toBe'](_0x25b0cb(0xca)),expect(_0x163de2['CHAT'])[_0x25b0cb(0x9b)](_0x163de2['CHAT'][_0x25b0cb(0xb7)]()),expect(_0x163de2['AGENT'])[_0x25b0cb(0x9b)](_0x163de2[_0x25b0cb(0xca)][_0x25b0cb(0xb7)]());}),test(_0x13738b(0xc5),async()=>{const _0x2c6903=_0x13738b,{MODEL_CATEGORY:_0x41048b}=await import('../../config/constants.js');expect(_0x41048b['ANTHROPIC'])[_0x2c6903(0x9b)]('anthropic'),expect(_0x41048b['OPENAI'])['toBe']('openai'),expect(_0x41048b[_0x2c6903(0xa1)])[_0x2c6903(0x9b)]('deepseek'),expect(_0x41048b[_0x2c6903(0xda)])[_0x2c6903(0x9b)]('microsoft'),expect(_0x41048b[_0x2c6903(0xbe)])[_0x2c6903(0x9b)](_0x41048b[_0x2c6903(0xbe)][_0x2c6903(0xac)]()),expect(_0x41048b[_0x2c6903(0xc8)])[_0x2c6903(0x9b)](_0x41048b[_0x2c6903(0xc8)][_0x2c6903(0xac)]());}),test(_0x13738b(0xcf),async()=>{const _0xc4b9e4=_0x13738b,{MODEL_CATEGORY:_0x5dd4ff}=await import('../../config/constants.js'),_0x256abb=Object[_0xc4b9e4(0xd6)](_0x5dd4ff);expect(_0x256abb)['toContain'](_0xc4b9e4(0xbe)),expect(_0x256abb)['toContain'](_0xc4b9e4(0xc8)),expect(_0x256abb)[_0xc4b9e4(0xab)](_0xc4b9e4(0xa1)),expect(_0x256abb)[_0xc4b9e4(0xab)]('MICROSOFT');});}),describe(a0_0x47ffb2(0xa8),()=>{test('MessageRouter\x20has\x20mode\x20change\x20event\x20handler\x20registered',async()=>{const _0x183aca=a0_0x4f5f,{MessageRouter:_0x1b329d}=await import(_0x183aca(0xb9)),{WebSocketManager:_0x712a7a}=await import(_0x183aca(0xd9)),{WS_MESSAGE_TYPE:_0x31a40f}=await import(_0x183aca(0xb3)),_0x51c322=new _0x712a7a('localhost',0x1f90),_0x542240=new _0x1b329d(_0x51c322);expect(_0x542240[_0x183aca(0xcc)](_0x31a40f[_0x183aca(0xa6)]))[_0x183aca(0x9b)](!![]);});}),describe(a0_0x47ffb2(0x9a),()=>{test('AGENT_MODE\x20supports\x20toggling\x20between\x20modes',async()=>{const _0x293bbb=a0_0x4f5f,{AGENT_MODE:_0x54e360}=await import('../../config/constants.js');let _0x2f3b49=_0x54e360['CHAT'],_0x3b6a3e=_0x2f3b49===_0x54e360['CHAT']?_0x54e360[_0x293bbb(0xca)]:_0x54e360['CHAT'];expect(_0x3b6a3e)[_0x293bbb(0x9b)](_0x54e360[_0x293bbb(0xca)]),_0x2f3b49=_0x54e360['AGENT'],_0x3b6a3e=_0x2f3b49===_0x54e360[_0x293bbb(0xc3)]?_0x54e360[_0x293bbb(0xca)]:_0x54e360['CHAT'],expect(_0x3b6a3e)['toBe'](_0x54e360['CHAT']);});}),describe(a0_0x47ffb2(0xc7),()=>{const _0x42ed92=a0_0x47ffb2;test(_0x42ed92(0xbc),async()=>{const _0x1634e1=_0x42ed92,{MODEL_CATEGORY:_0x48436c}=await import('../../config/constants.js'),_0x73fb57=[{'id':_0x1634e1(0x9d),'category':_0x48436c['ANTHROPIC']},{'id':_0x1634e1(0xc2),'category':_0x48436c[_0x1634e1(0xc8)]},{'id':_0x1634e1(0xd2),'category':_0x48436c[_0x1634e1(0xa1)]}],_0x1637f5=_0x73fb57[_0x1634e1(0xb5)](_0x130b31=>_0x130b31[_0x1634e1(0xd4)]===_0x48436c['ANTHROPIC']),_0x2994bb=_0x73fb57['filter'](_0x2e84e5=>_0x2e84e5['category']===_0x48436c['OPENAI']);expect(_0x1637f5['length'])[_0x1634e1(0x9b)](0x1),expect(_0x1637f5[0x0]['id'])[_0x1634e1(0x9b)]('claude-3-5-sonnet'),expect(_0x2994bb[_0x1634e1(0x9f)])[_0x1634e1(0x9b)](0x1),expect(_0x2994bb[0x0]['id'])[_0x1634e1(0x9b)]('gpt-4');});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x479a6b=a0_0x5bed;(function(_0x34a34c,_0x4317d5){const _0x5a9301=a0_0x5bed,_0x25e792=_0x34a34c();while(!![]){try{const _0x3294d0=-parseInt(_0x5a9301(0x1b2))/0x1+-parseInt(_0x5a9301(0x1c8))/0x2+-parseInt(_0x5a9301(0x1a5))/0x3*(parseInt(_0x5a9301(0x1b3))/0x4)+-parseInt(_0x5a9301(0x1ae))/0x5+-parseInt(_0x5a9301(0x1a6))/0x6*(parseInt(_0x5a9301(0x1b4))/0x7)+parseInt(_0x5a9301(0x1c2))/0x8+parseInt(_0x5a9301(0x1c5))/0x9;if(_0x3294d0===_0x4317d5)break;else _0x25e792['push'](_0x25e792['shift']());}catch(_0x3c2f0f){_0x25e792['push'](_0x25e792['shift']());}}}(a0_0xbc27,0xec066));function a0_0x5bed(_0x5845ea,_0x5f46d1){_0x5845ea=_0x5845ea-0x1a4;const _0xbc2775=a0_0xbc27();let _0x5bed07=_0xbc2775[_0x5845ea];if(a0_0x5bed['XkjqLe']===undefined){var _0x37a08d=function(_0x45fcfb){const _0x58c529='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x530200='',_0x5b461d='';for(let _0x2edcfb=0x0,_0x2b8086,_0x55dad5,_0x3e0a58=0x0;_0x55dad5=_0x45fcfb['charAt'](_0x3e0a58++);~_0x55dad5&&(_0x2b8086=_0x2edcfb%0x4?_0x2b8086*0x40+_0x55dad5:_0x55dad5,_0x2edcfb++%0x4)?_0x530200+=String['fromCharCode'](0xff&_0x2b8086>>(-0x2*_0x2edcfb&0x6)):0x0){_0x55dad5=_0x58c529['indexOf'](_0x55dad5);}for(let _0x4c3545=0x0,_0x508873=_0x530200['length'];_0x4c3545<_0x508873;_0x4c3545++){_0x5b461d+='%'+('00'+_0x530200['charCodeAt'](_0x4c3545)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5b461d);};a0_0x5bed['feJDOy']=_0x37a08d,a0_0x5bed['xVTEKc']={},a0_0x5bed['XkjqLe']=!![];}const _0x3a46c7=_0xbc2775[0x0],_0x4cb013=_0x5845ea+_0x3a46c7,_0x380c49=a0_0x5bed['xVTEKc'][_0x4cb013];return!_0x380c49?(_0x5bed07=a0_0x5bed['feJDOy'](_0x5bed07),a0_0x5bed['xVTEKc'][_0x4cb013]=_0x5bed07):_0x5bed07=_0x380c49,_0x5bed07;}import{describe,test,expect}from'@jest/globals';function a0_0xbc27(){const _0x56d6d7=['l2fWAs9VCMnOzxn0CMf0B3i','quDftLrtx0fwquLmqujmrq','u1Ltvevnx0fetuLosvnuuKfut1i','Dg9dB250ywLU','quDftLrtx01prevFr0vu','quDftLq','ntqWmdu1mKfTwuXsrq','quDftLrtx01fvefeqvrb','DxnLqwDLBNrZigHVB2SGAw50zwDYyxrLCYb3AxrOifnLC3nPB24Gyw5Kie1LC3nHz2vsB3v0zxi','ntm5mdaYodbKyMXbz2G','l2fWAs9Hz2vUDhmVyxzHAwXHyMXL','AwrSzq','mZu1nZy5mMX2tuf2CW','quDftLrFtu9ersbJB25ZDgfUDhmGyxjLigrLzMLUzwq','refuqv9btKfmwvnu','DxnLqwDLBNrZ','quDftLrtx01prevFu0vu','lI4VlI4VyxbPl21LC3nHz2vsB3v0zxiUANm','qwDLBNqGtwfUywDLBwvUDcaTieLUDgvNCMf0Aw9U','l2fWAs9Hz2vUDhmVoMfNzw50swqVC3rVCa','rvjst1i','quDftLrtx0Lnue9sva','q0Hbva','C3LZDgvTlwfKBwLUAxn0CMf0B3i','yxjJAgL2zwq','y3vZDg9T','y29KAw5NlwfZC2LZDgfUDa','lI4VlI4VyxbPl3DLyNnVy2TLDc5QCW','nJG0mZnNtMfVq3e','nJm5mhnpswLIEG','lI4VlI4VC3rHDguVDxnLqwDLBNrZlMPZ','l2fWAs9Hz2vUDhmVoMfNzw50swqVBw9Kzq','Cgf1C2vK','lI4VlI4VyxbPl3nLC3nPB24UANm','v2vIu29JA2v0twfUywDLCG','Dg9czurLzMLUzwq','q1vtve9n','mZK5mJGXnvHOEvPstW','qwDLBNqGtwfUywDLBwvUDcaTieLTCg9YDhm','lI4VlI4Vy29UzMLNl2nVBNn0yw50CY5QCW','oMfNzw50swq','mtyXnJm4mfbyzwHeDW','mtG4C1H2Cgfm','mJGZnwnVBufsyq','ywXS','zNvUy3rPB24','Dg9czq','quDftLrFvevnueXbvevtignVBNn0yw50CYbHCMuGzgvMAw5Lza','zxjYB3i','uefvu0ve','Dg9nyxrJAa'];a0_0xbc27=function(){return _0x56d6d7;};return a0_0xbc27();}describe(a0_0x479a6b(0x1af),()=>{test('useAgents hook can be imported',async()=>{const _0x143b10=a0_0x5bed,{useAgents:_0x530200}=await import(_0x143b10(0x1a7));expect(_0x530200)['toBeDefined'](),expect(typeof _0x530200)[_0x143b10(0x1b7)]('function');}),test('useAgents is default export',async()=>{const _0x4593e8=a0_0x5bed,module=await import(_0x4593e8(0x1a7));expect(module['default'])['toBeDefined'](),expect(typeof module['default'])['toBe'](_0x4593e8(0x1b6)),expect(module['default'])[_0x4593e8(0x1b7)](module[_0x4593e8(0x1cb)]);});}),describe('Agent\x20Management\x20-\x20Constants',()=>{const _0x193611=a0_0x479a6b;test(_0x193611(0x1c9),async()=>{const _0x36ba25=_0x193611,{AGENT_MODE:_0x5b461d}=await import(_0x36ba25(0x1b0));expect(_0x5b461d)[_0x36ba25(0x1ac)](),expect(_0x5b461d[_0x36ba25(0x1d2)])['toBe']('CHAT'),expect(_0x5b461d['AGENT'])['toBe'](_0x36ba25(0x1c1));}),test('AGENT_STATUS\x20constants\x20are\x20defined',async()=>{const _0x477e88=_0x193611,{AGENT_STATUS:_0x2edcfb}=await import(_0x477e88(0x1b0));expect(_0x2edcfb)['toBeDefined'](),expect(_0x2edcfb['ACTIVE'])['toBe']('active'),expect(_0x2edcfb[_0x477e88(0x1ba)])['toBe'](_0x477e88(0x1a9)),expect(_0x2edcfb['IDLE'])['toBe'](_0x477e88(0x1c7)),expect(_0x2edcfb[_0x477e88(0x1d0)])[_0x477e88(0x1b7)](_0x477e88(0x1b9)),expect(_0x2edcfb['ARCHIVED'])['toBe'](_0x477e88(0x1d4));}),test('Agent\x20API\x20endpoints\x20are\x20defined',async()=>{const _0x2b68be=_0x193611,{API_ENDPOINTS:_0x2b8086}=await import(_0x2b68be(0x1b0));expect(_0x2b8086[_0x2b68be(0x1bd)])[_0x2b68be(0x1b7)](_0x2b68be(0x1c6)),expect(_0x2b8086['AGENTS_METADATA'])['toBe']('/api/agents/:agentId/metadata'),expect(_0x2b8086[_0x2b68be(0x1d1)])[_0x2b68be(0x1b7)]('/api/agents/import'),expect(_0x2b8086['AGENTS_MODE_SET'])['toBe'](_0x2b68be(0x1a8)),expect(_0x2b8086[_0x2b68be(0x1c0)])['toBe']('/api/agents/:agentId/mode'),expect(_0x2b8086['AGENTS_STOP'])[_0x2b68be(0x1b7)](_0x2b68be(0x1cf));}),test(_0x193611(0x1b8),async()=>{const _0x4283ff=_0x193611,{AGENT_TEMPLATES:_0x55dad5}=await import(_0x4283ff(0x1b0));expect(_0x55dad5)[_0x4283ff(0x1ac)](),expect(_0x55dad5['CODING_ASSISTANT'])['toBe'](_0x4283ff(0x1d6)),expect(_0x55dad5[_0x4283ff(0x1ca)])[_0x4283ff(0x1b7)]('data-analyst'),expect(_0x55dad5['CREATIVE_WRITER'])[_0x4283ff(0x1b7)]('creative-writer'),expect(_0x55dad5[_0x4283ff(0x1be)])['toBe'](_0x4283ff(0x1d3)),expect(_0x55dad5[_0x4283ff(0x1ad)])[_0x4283ff(0x1b7)](_0x4283ff(0x1d5));});}),describe(a0_0x479a6b(0x1ce),()=>{const _0x4b0115=a0_0x479a6b;test(_0x4b0115(0x1c4),async()=>{const _0x4e8780=_0x4b0115,{useAgents:_0x3e0a58}=await import('../../state/useAgents.js'),{SessionManager:_0x4c3545}=await import(_0x4e8780(0x1aa)),{MessageRouter:_0x508873}=await import(_0x4e8780(0x1cd)),{WebSocketManager:_0x3b09a3}=await import('../../api/websocket.js'),_0x49faff=new _0x4c3545('localhost',0x1f90),_0x13d6d0=new _0x3b09a3('localhost',0x1f90),_0x578d66=new _0x508873(_0x13d6d0);expect(_0x49faff)['toBeDefined'](),expect(_0x578d66)[_0x4e8780(0x1ac)](),expect(typeof _0x3e0a58)['toBe']('function');}),test('Full agent management stack can be imported together',async()=>{const _0xff64d6=_0x4b0115,[_0x20e84a,_0x2ff8a4,_0x1ed004,_0x1f60d8,_0x15c05e]=await Promise[_0xff64d6(0x1b5)]([import(_0xff64d6(0x1b0)),import(_0xff64d6(0x1aa)),import(_0xff64d6(0x1a4)),import(_0xff64d6(0x1cd)),import('../../state/useAgents.js')]);expect(_0x20e84a['AGENT_MODE'])['toBeDefined'](),expect(_0x2ff8a4['SessionManager'])['toBeDefined'](),expect(_0x1ed004[_0xff64d6(0x1ab)])[_0xff64d6(0x1ac)](),expect(_0x1f60d8['MessageRouter'])['toBeDefined'](),expect(_0x15c05e[_0xff64d6(0x1cb)])['toBeDefined']();});}),describe('Agent\x20Management\x20-\x20API\x20Endpoints\x20Validation',()=>{test('All\x20agent\x20endpoints\x20follow\x20RESTful\x20pattern',async()=>{const _0xe9a396=a0_0x5bed,{API_ENDPOINTS:_0x5b276f}=await import(_0xe9a396(0x1b0));expect(_0x5b276f[_0xe9a396(0x1bd)])['toMatch'](/^\/api\/agents/),expect(_0x5b276f[_0xe9a396(0x1c3)])['toMatch'](/^\/api\/agents/),expect(_0x5b276f[_0xe9a396(0x1d1)])[_0xe9a396(0x1bb)](/^\/api\/agents/),expect(_0x5b276f['AGENTS_MODE_SET'])['toMatch'](/^\/api\/agents/),expect(_0x5b276f[_0xe9a396(0x1c0)])['toMatch'](/^\/api\/agents/),expect(_0x5b276f['AGENTS_STOP'])[_0xe9a396(0x1bb)](/^\/api\/agents/),expect(_0x5b276f[_0xe9a396(0x1c3)])['toContain'](_0xe9a396(0x1b1)),expect(_0x5b276f[_0xe9a396(0x1cc)])[_0xe9a396(0x1bf)](_0xe9a396(0x1b1)),expect(_0x5b276f['AGENTS_MODE_GET'])[_0xe9a396(0x1bf)](_0xe9a396(0x1b1)),expect(_0x5b276f['AGENTS_STOP'])[_0xe9a396(0x1bf)](_0xe9a396(0x1b1));}),test('Orchestrator\x20endpoint\x20exists\x20for\x20agent\x20operations',async()=>{const _0x2ef2e2=a0_0x5bed,{API_ENDPOINTS:_0x424886}=await import('../../config/constants.js');expect(_0x424886['ORCHESTRATOR'])['toBeDefined'](),expect(_0x424886['ORCHESTRATOR'])[_0x2ef2e2(0x1b7)](_0x2ef2e2(0x1bc));});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a0_0x2d460c=a0_0x9b3d;(function(_0xe8ef8d,_0x5e7fa1){const _0x51e2b3=a0_0x9b3d,_0x12d1b6=_0xe8ef8d();while(!![]){try{const _0x88ec7a=parseInt(_0x51e2b3(0x18a))/0x1*(parseInt(_0x51e2b3(0x191))/0x2)+parseInt(_0x51e2b3(0x187))/0x3*(-parseInt(_0x51e2b3(0x196))/0x4)+parseInt(_0x51e2b3(0x190))/0x5*(parseInt(_0x51e2b3(0x189))/0x6)+-parseInt(_0x51e2b3(0x188))/0x7*(-parseInt(_0x51e2b3(0x195))/0x8)+parseInt(_0x51e2b3(0x185))/0x9+-parseInt(_0x51e2b3(0x17e))/0xa*(-parseInt(_0x51e2b3(0x18b))/0xb)+-parseInt(_0x51e2b3(0x199))/0xc;if(_0x88ec7a===_0x5e7fa1)break;else _0x12d1b6['push'](_0x12d1b6['shift']());}catch(_0x5c450b){_0x12d1b6['push'](_0x12d1b6['shift']());}}}(a0_0x6234,0xc67e9));function a0_0x9b3d(_0x421c96,_0x3a97d8){_0x421c96=_0x421c96-0x17d;const _0x6234da=a0_0x6234();let _0x9b3d5c=_0x6234da[_0x421c96];if(a0_0x9b3d['CDCKjv']===undefined){var _0x536d4d=function(_0x20b84f){const _0x337edf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x181888='',_0x436e54='';for(let _0x1ee272=0x0,_0x4cec25,_0x23ce95,_0x2a9ed1=0x0;_0x23ce95=_0x20b84f['charAt'](_0x2a9ed1++);~_0x23ce95&&(_0x4cec25=_0x1ee272%0x4?_0x4cec25*0x40+_0x23ce95:_0x23ce95,_0x1ee272++%0x4)?_0x181888+=String['fromCharCode'](0xff&_0x4cec25>>(-0x2*_0x1ee272&0x6)):0x0){_0x23ce95=_0x337edf['indexOf'](_0x23ce95);}for(let _0x350333=0x0,_0x3d886c=_0x181888['length'];_0x350333<_0x3d886c;_0x350333++){_0x436e54+='%'+('00'+_0x181888['charCodeAt'](_0x350333)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x436e54);};a0_0x9b3d['LUiWTN']=_0x536d4d,a0_0x9b3d['JYkgQo']={},a0_0x9b3d['CDCKjv']=!![];}const _0x4597ef=_0x6234da[0x0],_0x400a62=_0x421c96+_0x4597ef,_0x53fb42=a0_0x9b3d['JYkgQo'][_0x400a62];return!_0x53fb42?(_0x9b3d5c=a0_0x9b3d['LUiWTN'](_0x9b3d5c),a0_0x9b3d['JYkgQo'][_0x400a62]=_0x9b3d5c):_0x9b3d5c=_0x53fb42,_0x9b3d5c;}import{describe,test,expect}from'@jest/globals';function a0_0x6234(){const _0x420a2e=['tgf5B3v0','mteWmtq2ntLerLLQBei','sw5WDxrcB3G','odqWmdaZwu5jrMLo','nduYmZrkAxrRzum','mZK2mJeXoerUywDIza','mtfSuKP1vu8','mJC1mJe2n2zbzKXYvG','q29TCg9Uzw50ie1HBMfNzw1LBNqGlsbjBNrLz3jHDgLVBG','u3rHDhvZqMfY','Dg9czurLzMLUzwq','CMvHy3q','mtbdrvzNzvy','ntm4ntr2r2jQsha','q29TCg9Uzw50ie1HBMfNzw1LBNqGlsbjBxbVCNrZ','q29TCg9Uzw50ie1HBMfNzw1LBNqGlsbszwfJDc9jBMSGrgvWzw5Kzw5JAwvZ','zNvUy3rPB24','oty4BeXiz1jv','ne5usLHUra','zgvMyxvSDa','lI4VlI4Vy29TCg9Uzw50CY9myxLVDxqUANm','mZyZnJaXotjHCujQAMW','lI4VlI4Vy29TCg9Uzw50CY9tDgf0DxncyxiUANm','mJbAwg93AKS','tgf5B3v0ignVBxbVBMvUDcbPBNrLz3jHDgvZihDPDgGGywXSihn0yxrLigHVB2TZ','sgvHzgvY','lI4VlI4Vy29TCg9Uzw50CY9jBNb1DejVEc5QCW','Dg9czq','twvZC2fNzuXPC3q'];a0_0x6234=function(){return _0x420a2e;};return a0_0x6234();}describe(a0_0x2d460c(0x192),()=>{test('Layout component can be imported',async()=>{const {Layout:_0x181888}=await import('../../components/Layout.js');expect(_0x181888)['toBeDefined'](),expect(typeof _0x181888)['toBe']('function');}),test('Layout is default export',async()=>{const _0x125458=a0_0x9b3d,module=await import('../../components/Layout.js');expect(module['default'])['toBeDefined'](),expect(typeof module['default'])[_0x125458(0x182)](_0x125458(0x194)),expect(module['default'])[_0x125458(0x182)](module[_0x125458(0x184)]);}),test('Header component can be imported',async()=>{const _0x3ed599=a0_0x9b3d,{Header:_0x436e54}=await import('../../components/Header.js');expect(_0x436e54)[_0x3ed599(0x18e)](),expect(typeof _0x436e54)[_0x3ed599(0x182)]('function');}),test('Header is default export',async()=>{const _0x9e8f1a=a0_0x9b3d,module=await import('../../components/Header.js');expect(module['default'])['toBeDefined'](),expect(module[_0x9e8f1a(0x197)])[_0x9e8f1a(0x182)](module['Header']);}),test('StatusBar component can be imported',async()=>{const _0x305ff4=a0_0x9b3d,{StatusBar:_0x1ee272}=await import(_0x305ff4(0x17d));expect(_0x1ee272)[_0x305ff4(0x18e)](),expect(typeof _0x1ee272)[_0x305ff4(0x182)]('function');}),test('StatusBar is default export',async()=>{const _0x38fdf8=a0_0x9b3d,module=await import('../../components/StatusBar.js');expect(module[_0x38fdf8(0x197)])['toBeDefined'](),expect(module['default'])['toBe'](module[_0x38fdf8(0x18d)]);}),test('MessageList component can be imported',async()=>{const _0x565274=a0_0x9b3d,{MessageList:_0x4cec25}=await import('../../components/MessageList.js');expect(_0x4cec25)[_0x565274(0x18e)](),expect(typeof _0x4cec25)[_0x565274(0x182)](_0x565274(0x194));}),test('MessageList is default export',async()=>{const _0x154d62=a0_0x9b3d,module=await import('../../components/MessageList.js');expect(module[_0x154d62(0x197)])['toBeDefined'](),expect(module['default'])[_0x154d62(0x182)](module[_0x154d62(0x183)]);}),test('InputBox component can be imported',async()=>{const _0x241bdd=a0_0x9b3d,{InputBox:_0x23ce95}=await import('../../components/InputBox.js');expect(_0x23ce95)['toBeDefined'](),expect(typeof _0x23ce95)[_0x241bdd(0x182)](_0x241bdd(0x194));}),test('InputBox is default export',async()=>{const _0x55c3da=a0_0x9b3d,module=await import(_0x55c3da(0x181));expect(module[_0x55c3da(0x197)])['toBeDefined'](),expect(module['default'])['toBe'](module[_0x55c3da(0x186)]);});}),describe(a0_0x2d460c(0x18c),()=>{const _0x3391e7=a0_0x2d460c;test('All components can be imported together',async()=>{const _0xabc45a=a0_0x9b3d,[_0x2a9ed1,_0x350333,_0x3d886c,_0x39cea1,_0x43ce6e]=await Promise['all']([import(_0xabc45a(0x198)),import('../../components/Header.js'),import('../../components/StatusBar.js'),import('../../components/MessageList.js'),import('../../components/InputBox.js')]);expect(_0x2a9ed1['Layout'])['toBeDefined'](),expect(_0x350333[_0xabc45a(0x180)])[_0xabc45a(0x18e)](),expect(_0x3d886c['StatusBar'])[_0xabc45a(0x18e)](),expect(_0x39cea1[_0xabc45a(0x183)])['toBeDefined'](),expect(_0x43ce6e['InputBox'])[_0xabc45a(0x18e)]();}),test(_0x3391e7(0x17f),async()=>{const _0x5be80c=_0x3391e7,{Layout:_0x58a25f}=await import(_0x5be80c(0x198)),{useConnection:_0x525964}=await import('../../state/useConnection.js'),{useAgents:_0x8d3a57}=await import('../../state/useAgents.js'),{useMessages:_0x51685f}=await import('../../state/useMessages.js'),{useAgentControl:_0x2bf106}=await import('../../state/useAgentControl.js'),{useTools:_0xb958b8}=await import('../../state/useTools.js');expect(_0x58a25f)['toBeDefined'](),expect(_0x525964)['toBeDefined'](),expect(_0x8d3a57)[_0x5be80c(0x18e)](),expect(_0x51685f)['toBeDefined'](),expect(_0x2bf106)[_0x5be80c(0x18e)](),expect(_0xb958b8)[_0x5be80c(0x18e)]();});}),describe(a0_0x2d460c(0x193),()=>{test('Ink components can be imported',async()=>{const _0x207b58=a0_0x9b3d,{Box:_0x493e22,Text:_0xf6ebef}=await import('ink');expect(_0x493e22)['toBeDefined'](),expect(_0xf6ebef)[_0x207b58(0x18e)]();}),test('React can be imported',async()=>{const _0x30efdf=a0_0x9b3d,_0x51db25=await import(_0x30efdf(0x18f));expect(_0x51db25[_0x30efdf(0x197)])[_0x30efdf(0x18e)](),expect(_0x51db25['useState'])[_0x30efdf(0x18e)](),expect(_0x51db25['useEffect'])[_0x30efdf(0x18e)]();});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a0_0x142e(){const _0x189302=['v2vIu29JA2v0twfUywDLCIbOyxmGzxzLBNqGzw1PDhrLCIbTzxrOB2rZ','nJGXmtu3mhHPCgzWDG','uKvdt05orunusu5h','nZi1nZy5mfftAKPTEq','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gq29UC3rHBNrZ','uKvdt05orunux0nptKzjrYbJB25ZDgfUDhmGyxjLigrLzMLUzwq','qKfds09grL9nvuXusvbmsuvs','v2vIu29JA2v0twfUywDLCG','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gq29UBMvJDgLVBIbjBMzV','ndy4mtu4nhbLEK1Hsa','Dg9mB3DLCKnHC2u','mZmYmZG1nxLoBNzsvq','mJa0vgTws0jb','odi5ntjYCvzRtuC','zgLZy29UBMvJDgvK','Dg9czuXLC3nuAgfUt3jfCxvHBa','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gv2vIu29JA2v0iev2zw50ieLUDgvNCMf0Aw9U','Dg9dB250ywLU','mtm3mZmZC01SBwz1','Dg9czuDYzwf0zxjuAgfU','CMvJB25Uzwn0Aw5N','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gu3rHDhvZifzHBhvLCW','q29UBMvJDgLVBIbPBMzVihnOB3vSzcbJB250ywLUigfSBcbTzxrYAwnZ','Dg9czq','zgvMyxvSDa','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gsg9VAYbjBNrLCMzHy2uGvMvYAwzPy2f0Aw9U','Bg9JywXOB3n0','DgvZDc1ZzxnZAw9UlteYmW','lI4VlI4VyxbPl3nLC3nPB24UANm','lI4VlI4VyxbPl3DLyNnVy2TLDc5QCW','BM93','AxndB25Uzwn0zwq','mZnwtuXfqvK','u2vZC2LVBIbZDgf0zsbZAg91BgqGDhjHy2SGDMfSAwrPDhK','mtq5ntzys3nnt0W','u2vZC2LVBK1HBMfNzxi','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gq29UBMvJDgLVBIbtDgf0DxmGvhjHBNnPDgLVBNm','su5jveLbtf9eruXbwq','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gq29UBMvJDgLVBIbnzxrYAwnZ','uMvJB25Uzwn0Aw9UihnOB3vSzcbZDg9WigfMDgvYig1HEcbHDhrLBxb0CW','C3rYAw5N','ntaXDNbPzvzP','lI4VlI4Vy29UzMLNl2nVBNn0yw50CY5QCW','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gsw50zwDYyxrPB24','nfb2z3rrAq','zNvUy3rPB24','lI4VlI4VC3rHDguVDxnLq29UBMvJDgLVBI5QCW','q09otKvdveLorW','BwLU','y29UBMvJDgvK','tufyx0rftefz','DxnLq29UBMvJDgLVBIbYzxr1CM5Zigv4CgvJDgvKigLUDgvYzMfJzsbZAgfWzq','tufyx0fuvevnufrt','q29UBMvJDgLVBIb1ChrPBwuGy2fUigjLihrYywnRzwq','q09otKvdveLptL9tvefuvvmGDMfSDwvZigfYzsbSB3DLCMnHC2uGC3rYAw5NCW','q09otKvdveve','Dg9czurLzMLUzwq','Cg93'];a0_0x142e=function(){return _0x189302;};return a0_0x142e();}const a0_0x1608cc=a0_0x6c50;function a0_0x6c50(_0x47c465,_0x4c56b2){_0x47c465=_0x47c465-0xfd;const _0x142e22=a0_0x142e();let _0x6c50bf=_0x142e22[_0x47c465];if(a0_0x6c50['jrLKFp']===undefined){var _0x249ffa=function(_0x12c48f){const _0x4fefa3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57d63f='',_0x354d81='';for(let _0x18384d=0x0,_0x185f6a,_0x37eac3,_0x131802=0x0;_0x37eac3=_0x12c48f['charAt'](_0x131802++);~_0x37eac3&&(_0x185f6a=_0x18384d%0x4?_0x185f6a*0x40+_0x37eac3:_0x37eac3,_0x18384d++%0x4)?_0x57d63f+=String['fromCharCode'](0xff&_0x185f6a>>(-0x2*_0x18384d&0x6)):0x0){_0x37eac3=_0x4fefa3['indexOf'](_0x37eac3);}for(let _0x5e8deb=0x0,_0x5c3e77=_0x57d63f['length'];_0x5e8deb<_0x5c3e77;_0x5e8deb++){_0x354d81+='%'+('00'+_0x57d63f['charCodeAt'](_0x5e8deb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x354d81);};a0_0x6c50['siDmdf']=_0x249ffa,a0_0x6c50['rNyHla']={},a0_0x6c50['jrLKFp']=!![];}const _0x4d3525=_0x142e22[0x0],_0x1ad7f3=_0x47c465+_0x4d3525,_0x277c17=a0_0x6c50['rNyHla'][_0x1ad7f3];return!_0x277c17?(_0x6c50bf=a0_0x6c50['siDmdf'](_0x6c50bf),a0_0x6c50['rNyHla'][_0x1ad7f3]=_0x6c50bf):_0x6c50bf=_0x277c17,_0x6c50bf;}(function(_0x185609,_0x57b725){const _0x237f37=a0_0x6c50,_0x5b5ba5=_0x185609();while(!![]){try{const _0x2368d4=parseInt(_0x237f37(0x114))/0x1+-parseInt(_0x237f37(0x129))/0x2*(-parseInt(_0x237f37(0x130))/0x3)+parseInt(_0x237f37(0x133))/0x4*(-parseInt(_0x237f37(0x112))/0x5)+-parseInt(_0x237f37(0x113))/0x6*(parseInt(_0x237f37(0x119))/0x7)+-parseInt(_0x237f37(0x110))/0x8+-parseInt(_0x237f37(0x10a))/0x9+-parseInt(_0x237f37(0x108))/0xa*(-parseInt(_0x237f37(0x127))/0xb);if(_0x2368d4===_0x57b725)break;else _0x5b5ba5['push'](_0x5b5ba5['shift']());}catch(_0x1e0726){_0x5b5ba5['push'](_0x5b5ba5['shift']());}}}(a0_0x142e,0x9f230));import{describe,test,expect}from'@jest/globals';describe('Connection\x20Management\x20-\x20Imports',()=>{test('useConnection hook can be imported',async()=>{const _0x3d79c=a0_0x6c50,{useConnection:_0x57d63f}=await import('../../state/useConnection.js');expect(_0x57d63f)[_0x3d79c(0x105)](),expect(typeof _0x57d63f)[_0x3d79c(0x11e)]('function');}),test('useConnection is default export',async()=>{const _0xa42eef=a0_0x6c50,module=await import(_0xa42eef(0x135));expect(module['default'])['toBeDefined'](),expect(typeof module['default'])[_0xa42eef(0x11e)](_0xa42eef(0x134)),expect(module[_0xa42eef(0x11f)])[_0xa42eef(0x11e)](module['useConnection']);});}),describe(a0_0x1608cc(0x10b),()=>{const _0xe6abd5=a0_0x1608cc;test('CONNECTION_STATUS\x20constants\x20are\x20defined',async()=>{const _0x5f3131=a0_0x6c50,{CONNECTION_STATUS:_0x354d81}=await import(_0x5f3131(0x131));expect(_0x354d81)[_0x5f3131(0x105)](),expect(_0x354d81['CONNECTING'])[_0x5f3131(0x11e)]('connecting'),expect(_0x354d81['CONNECTED'])[_0x5f3131(0x11e)]('connected'),expect(_0x354d81['DISCONNECTED'])['toBe']('disconnected'),expect(_0x354d81[_0x5f3131(0x109)])[_0x5f3131(0x11e)]('reconnecting');}),test('CONNECTION_STATUS\x20is\x20alias\x20for\x20CONNECTION_STATE',async()=>{const _0x56de87=a0_0x6c50,{CONNECTION_STATUS:_0x18384d,CONNECTION_STATE:_0x185f6a}=await import(_0x56de87(0x131));expect(_0x18384d)['toBe'](_0x185f6a);}),test(_0xe6abd5(0x10c),async()=>{const _0x4b30ae=_0xe6abd5,{RECONNECT_CONFIG:_0x37eac3}=await import(_0x4b30ae(0x131));expect(_0x37eac3)['toBeDefined'](),expect(_0x37eac3['INITIAL_DELAY'])[_0x4b30ae(0x105)](),expect(_0x37eac3[_0x4b30ae(0xff)])[_0x4b30ae(0x105)](),expect(_0x37eac3[_0x4b30ae(0x10d)])['toBeDefined'](),expect(_0x37eac3[_0x4b30ae(0x101)])['toBeDefined']();}),test('RECONNECT_CONFIG\x20values\x20are\x20reasonable',async()=>{const _0x3ed843=_0xe6abd5,{RECONNECT_CONFIG:_0x131802}=await import('../../config/constants.js');expect(_0x131802[_0x3ed843(0x12c)])['toBeGreaterThan'](0x0),expect(_0x131802['MAX_DELAY'])[_0x3ed843(0x11a)](_0x131802[_0x3ed843(0x12c)]),expect(_0x131802[_0x3ed843(0x10d)])['toBeGreaterThan'](0x1),expect(_0x131802[_0x3ed843(0x101)])['toBeGreaterThan'](0x0);});}),describe(a0_0x1608cc(0x132),()=>{test('useConnection\x20hook\x20integrates\x20with\x20SessionManager\x20and\x20WebSocketManager',async()=>{const _0x3cc92c=a0_0x6c50,{useConnection:_0x5e8deb}=await import('../../state/useConnection.js'),{SessionManager:_0x5c3e77}=await import(_0x3cc92c(0x123)),{WebSocketManager:_0x2c65ff}=await import('../../api/websocket.js'),_0x3595e6=new _0x5c3e77('localhost',0x1f90),_0x4688a7=new _0x2c65ff(_0x3cc92c(0x121),0x1f90);expect(_0x3595e6)['toBeDefined'](),expect(_0x4688a7)[_0x3cc92c(0x105)](),expect(typeof _0x5e8deb)['toBe'](_0x3cc92c(0x134));}),test('Full connection stack can be imported together',async()=>{const _0x1dc470=a0_0x6c50,[_0x301b5a,_0x5dc03f,_0xbd5580,_0x22b0de]=await Promise['all']([import('../../config/constants.js'),import('../../api/session.js'),import('../../api/websocket.js'),import(_0x1dc470(0x135))]);expect(_0x301b5a['CONNECTION_STATUS'])[_0x1dc470(0x105)](),expect(_0x301b5a['RECONNECT_CONFIG'])['toBeDefined'](),expect(_0x5dc03f[_0x1dc470(0x12a)])[_0x1dc470(0x105)](),expect(_0xbd5580[_0x1dc470(0x10e)])[_0x1dc470(0x105)](),expect(_0x22b0de['useConnection'])['toBeDefined']();});}),describe(a0_0x1608cc(0x120),()=>{const _0x36f787=a0_0x1608cc;test(_0x36f787(0x100),async()=>{const _0x1e0bb9=_0x36f787,{useConnection:_0x382da8}=await import('../../state/useConnection.js');expect(_0x382da8['length'])[_0x1e0bb9(0x11e)](0x2);});}),describe(a0_0x1608cc(0x11c),()=>{const _0xac3060=a0_0x1608cc;test(_0xac3060(0x103),async()=>{const _0xc35604=_0xac3060,{CONNECTION_STATUS:_0x16e444}=await import(_0xc35604(0x131));expect(typeof _0x16e444['CONNECTING'])[_0xc35604(0x11e)](_0xc35604(0x12f)),expect(typeof _0x16e444[_0xc35604(0x104)])[_0xc35604(0x11e)](_0xc35604(0x12f)),expect(typeof _0x16e444['DISCONNECTED'])[_0xc35604(0x11e)](_0xc35604(0x12f)),expect(typeof _0x16e444[_0xc35604(0x109)])['toBe']('string'),expect(_0x16e444['CONNECTING'])[_0xc35604(0x11e)](_0x16e444[_0xc35604(0x136)][_0xc35604(0x111)]()),expect(_0x16e444['CONNECTED'])[_0xc35604(0x11e)](_0x16e444['CONNECTED'][_0xc35604(0x111)]());}),test('CONNECTION_STATUS\x20has\x20all\x20required\x20states',async()=>{const _0x520f93=_0xac3060,{CONNECTION_STATUS:_0x4c5dc1}=await import(_0x520f93(0x131)),_0x3400a8=Object['keys'](_0x4c5dc1);expect(_0x3400a8)['toContain']('CONNECTING'),expect(_0x3400a8)['toContain'](_0x520f93(0x104)),expect(_0x3400a8)[_0x520f93(0x118)]('DISCONNECTED'),expect(_0x3400a8)[_0x520f93(0x118)](_0x520f93(0x109));});}),describe('Connection\x20Management\x20-\x20Exponential\x20Backoff\x20Logic',()=>{test('Exponential\x20backoff\x20delay\x20calculation\x20works\x20correctly',async()=>{const {RECONNECT_CONFIG:_0x507d97}=await import('../../config/constants.js'),_0x5c00fa=_0x587749=>{const _0x3ae6d8=a0_0x6c50;return Math[_0x3ae6d8(0xfd)](_0x507d97['INITIAL_DELAY']*Math[_0x3ae6d8(0x106)](_0x507d97['BACKOFF_MULTIPLIER'],_0x587749),_0x507d97[_0x3ae6d8(0xff)]);},_0x593323=_0x5c00fa(0x0),_0x57a82c=_0x5c00fa(0x1),_0x54b327=_0x5c00fa(0x2);expect(_0x593323)['toBe'](_0x507d97['INITIAL_DELAY']),expect(_0x57a82c)['toBeGreaterThan'](_0x593323),expect(_0x54b327)['toBeGreaterThan'](_0x57a82c);}),test('Exponential\x20backoff\x20respects\x20max\x20delay',async()=>{const _0x316680=a0_0x6c50,{RECONNECT_CONFIG:_0x5a6f87}=await import(_0x316680(0x131)),_0x4b29b8=_0x490d50=>{const _0x9fbe22=_0x316680;return Math['min'](_0x5a6f87[_0x9fbe22(0x12c)]*Math[_0x9fbe22(0x106)](_0x5a6f87[_0x9fbe22(0x10d)],_0x490d50),_0x5a6f87[_0x9fbe22(0xff)]);},_0x17da08=_0x4b29b8(0x64);expect(_0x17da08)[_0x316680(0x11e)](_0x5a6f87['MAX_DELAY']),expect(_0x17da08)['toBeLessThanOrEqual'](_0x5a6f87[_0x316680(0xff)]);});}),describe('Connection\x20Management\x20-\x20Session\x20State',()=>{const _0xff4458=a0_0x1608cc;test(_0xff4458(0x128),async()=>{const _0x5e0614=_0xff4458;let _0x2541b5=null,_0xa0af32=![],_0xefe261=null;_0x2541b5=_0x5e0614(0x122),_0xa0af32=!![],_0xefe261=Date['now']()+0x36ee80,expect(_0x2541b5)[_0x5e0614(0x105)](),expect(_0xa0af32)['toBe'](!![]),expect(_0xefe261)['toBeGreaterThan'](Date['now']());}),test('Session\x20state\x20should\x20invalidate',async()=>{const _0x2020d4=_0xff4458;let _0x2fd69d='test-session-123',_0x1e0a8a=!![];_0x2fd69d=null,_0x1e0a8a=![],expect(_0x2fd69d)['toBeNull'](),expect(_0x1e0a8a)[_0x2020d4(0x11e)](![]);});}),describe(a0_0x1608cc(0x12d),()=>{const _0x167c71=a0_0x1608cc;test(_0x167c71(0x102),async()=>{const _0x2842ad=_0x167c71,_0x397205=Date['now']();await new Promise(_0x664059=>setTimeout(_0x664059,0x64));const _0x420859=Date[_0x2842ad(0x125)]()-_0x397205;expect(_0x420859)['toBeGreaterThan'](0x0),expect(_0x420859)['toBeGreaterThanOrEqual'](0x64);}),test('Connection\x20metrics\x20track\x20timestamps',async()=>{const _0x13a314=_0x167c71,_0x389271=Date[_0x13a314(0x125)]();await new Promise(_0x1e2bc3=>setTimeout(_0x1e2bc3,0x32));const _0x35149c=Date['now']();expect(_0x389271)[_0x13a314(0x105)](),expect(_0x35149c)['toBeDefined'](),expect(_0x35149c)['toBeGreaterThan'](_0x389271);}),test('Reconnection\x20attempts\x20can\x20be\x20tracked',async()=>{let _0x294449=0x0;_0x294449+=0x1,expect(_0x294449)['toBe'](0x1),_0x294449+=0x1,expect(_0x294449)['toBe'](0x2),_0x294449=0x0,expect(_0x294449)['toBe'](0x0);});}),describe(a0_0x1608cc(0x12b),()=>{test('Connection\x20status\x20transitions\x20follow\x20valid\x20flow',async()=>{const _0x57906f=a0_0x6c50,{CONNECTION_STATUS:_0x3bfb03}=await import('../../config/constants.js');let _0x38ffb6=_0x3bfb03['DISCONNECTED'];expect(_0x38ffb6)[_0x57906f(0x11e)]('disconnected'),_0x38ffb6=_0x3bfb03['CONNECTING'],expect(_0x38ffb6)['toBe']('connecting'),_0x38ffb6=_0x3bfb03[_0x57906f(0x104)],expect(_0x38ffb6)[_0x57906f(0x11e)]('connected'),_0x38ffb6=_0x3bfb03['DISCONNECTED'],expect(_0x38ffb6)['toBe'](_0x57906f(0x115)),_0x38ffb6=_0x3bfb03[_0x57906f(0x109)],expect(_0x38ffb6)['toBe'](_0x57906f(0x11b)),_0x38ffb6=_0x3bfb03['CONNECTED'],expect(_0x38ffb6)[_0x57906f(0x11e)](_0x57906f(0xfe));});}),describe(a0_0x1608cc(0x117),()=>{const _0x522622=a0_0x1608cc;test(_0x522622(0x107),async()=>{const _0x1d1766=_0x522622,{WebSocketManager:_0x3d0c50}=await import(_0x1d1766(0x124)),_0x38965d=new _0x3d0c50('localhost',0x1f90);expect(_0x38965d['on'])[_0x1d1766(0x105)](),expect(_0x38965d['off'])[_0x1d1766(0x105)](),expect(typeof _0x38965d['on'])[_0x1d1766(0x11e)]('function'),expect(typeof _0x38965d['off'])[_0x1d1766(0x11e)](_0x1d1766(0x134));});}),describe('Connection\x20Management\x20-\x20Max\x20Attempts\x20Limit',()=>{const _0x4fdaac=a0_0x1608cc;test(_0x4fdaac(0x12e),async()=>{const _0x4f5095=_0x4fdaac,{RECONNECT_CONFIG:_0x4d4b75}=await import('../../config/constants.js');let _0x3506c1=0x0;for(let _0x134bc0=0x0;_0x134bc0<_0x4d4b75['MAX_ATTEMPTS']+0x5;_0x134bc0++){if(_0x3506c1<_0x4d4b75[_0x4f5095(0x101)])_0x3506c1+=0x1;else break;}expect(_0x3506c1)['toBe'](_0x4d4b75[_0x4f5095(0x101)]),expect(_0x3506c1)[_0x4f5095(0x116)](_0x4d4b75['MAX_ATTEMPTS']);});}),describe(a0_0x1608cc(0x10f),()=>{const _0x2f927b=a0_0x1608cc;test(_0x2f927b(0x11d),async()=>{const _0x3f7443=_0x2f927b,{CONNECTION_STATUS:_0x43f44e}=await import(_0x3f7443(0x131)),_0x2f329f={'status':_0x43f44e[_0x3f7443(0x104)],'isConnected':!![],'isReconnecting':![],'sessionId':'test-session-123','sessionValid':!![],'sessionExpiration':Date['now']()+0x36ee80,'uptime':0x1388,'lastConnectedAt':Date[_0x3f7443(0x125)]()-0x1388,'lastDisconnectedAt':null,'reconnectAttempts':0x0};expect(_0x2f329f['status'])[_0x3f7443(0x105)](),expect(_0x2f329f[_0x3f7443(0x126)])['toBe'](!![]),expect(_0x2f329f['isReconnecting'])[_0x3f7443(0x11e)](![]),expect(_0x2f329f['sessionId'])['toBeDefined'](),expect(_0x2f329f['sessionValid'])[_0x3f7443(0x11e)](!![]),expect(_0x2f329f['uptime'])['toBeGreaterThan'](0x0);});});
|
|
1
|
+
function a0_0x10df(){const _0x587170=['Cg93','C3rYAw5N','otqYmdjez01ds2e','uKvdt05orunusu5h','reLtq09otKvdveve','mta1nJuZovHot2z0Aa','mtC0mZK5m1zxuw9qAq','C3rHDhvZ','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gu3rHDhvZifzHBhvLCW','Dg9czuXLC3nuAgfUt3jfCxvHBa','q09otKvdveLptL9tvefuvvm','BM93','q09otKvdveve','y29UBMvJDgLUzW','u2vZC2LVBIbZDgf0zsbZAg91BgqGDhjHy2SGDMfSAwrPDhK','Dg9czq','mtu4mdb4yMvKqNi','tufyx0fuvevnufrt','y29UBMvJDgvK','q29UBMvJDgLVBIbPBMzVihnOB3vSzcbJB250ywLUigfSBcbTzxrYAwnZ','q09otKvdveLorW','B2zM','A2v5CW','mLbJsNjrqG','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gq29UBMvJDgLVBIbjBMzV','mtq1mJq3nJrirLf5Cfu','DgvZDc1ZzxnZAw9UlteYmW','Dg9czu51BgW','tufyx0rftefz','zgvMyxvSDa','zNvUy3rPB24','Dg9mB3DLCKnHC2u','nJiXndaYBg1yrLjw','BwLU','C2vZC2LVBLzHBgLK','q09otKvdveLptL9tvefuvvmGy29UC3rHBNrZigfYzsbKzwzPBMvK','Bg9JywXOB3n0','q09otKvdveLptL9tvefuvvmGAxmGywXPyxmGzM9YienptK5fq1rjt05Fu1rbveu','CMvJB25Uzwn0Aw5N','uMvJB25Uzwn0Aw9UihnOB3vSzcbZDg9WigfMDgvYig1HEcbHDhrLBxb0CW','rxHWB25LBNrPywWGyMfJA29MzIbYzxnWzwn0CYbTyxGGzgvSyxK','su5jveLbtf9eruXbwq','mtbyruLot3i','mJfbzg9hBeS','AxndB25Uzwn0zwq','Dg9dB250ywLU','lI4VlI4Vy29UzMLNl2nVBNn0yw50CY5QCW','oxPmueLQDa','Dg9czuDYzwf0zxjuAgfU','zgLZy29UBMvJDgvK','v2vIu29JA2v0twfUywDLCIbOyxmGzxzLBNqGzw1PDhrLCIbTzxrOB2rZ','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gsg9VAYbjBNrLCMzHy2uGvMvYAwzPy2f0Aw9U','lI4VlI4VyxbPl3DLyNnVy2TLDc5QCW','ndbUAMfrsKK','Dg9czurLzMLUzwq','mZa3ndq2nhHmsNf6Cq','lI4VlI4VC3rHDguVDxnLq29UBMvJDgLVBI5QCW','DxnLq29UBMvJDgLVBG','AxnszwnVBM5Ly3rPBMC','q29UBMvJDgLVBIbnyw5Hz2vTzw50ic0Gq29UBMvJDgLVBIbnzxrYAwnZ','Dg9czuDYzwf0zxjuAgfUt3jfCxvHBa'];a0_0x10df=function(){return _0x587170;};return a0_0x10df();}const a0_0x9a78f2=a0_0x40c1;(function(_0x4953df,_0x86b653){const _0x403cac=a0_0x40c1,_0x1f0145=_0x4953df();while(!![]){try{const _0x2bd60f=-parseInt(_0x403cac(0x97))/0x1*(parseInt(_0x403cac(0xac))/0x2)+-parseInt(_0x403cac(0x9b))/0x3+parseInt(_0x403cac(0x8d))/0x4*(parseInt(_0x403cac(0xa5))/0x5)+parseInt(_0x403cac(0xb5))/0x6*(-parseInt(_0x403cac(0x83))/0x7)+parseInt(_0x403cac(0x8f))/0x8*(parseInt(_0x403cac(0x87))/0x9)+-parseInt(_0x403cac(0x82))/0xa*(parseInt(_0x403cac(0x9a))/0xb)+parseInt(_0x403cac(0xae))/0xc;if(_0x2bd60f===_0x86b653)break;else _0x1f0145['push'](_0x1f0145['shift']());}catch(_0x23a310){_0x1f0145['push'](_0x1f0145['shift']());}}}(a0_0x10df,0x84d16));function a0_0x40c1(_0x2ebe9a,_0x349ec4){_0x2ebe9a=_0x2ebe9a-0x80;const _0x10df23=a0_0x10df();let _0x40c129=_0x10df23[_0x2ebe9a];if(a0_0x40c1['lJGSAP']===undefined){var _0x2f72a9=function(_0x53270c){const _0x11ff01='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17144d='',_0x16dd3a='';for(let _0x3340c5=0x0,_0x52ce0e,_0x16af7b,_0x1a079b=0x0;_0x16af7b=_0x53270c['charAt'](_0x1a079b++);~_0x16af7b&&(_0x52ce0e=_0x3340c5%0x4?_0x52ce0e*0x40+_0x16af7b:_0x16af7b,_0x3340c5++%0x4)?_0x17144d+=String['fromCharCode'](0xff&_0x52ce0e>>(-0x2*_0x3340c5&0x6)):0x0){_0x16af7b=_0x11ff01['indexOf'](_0x16af7b);}for(let _0x5762ea=0x0,_0xf660a4=_0x17144d['length'];_0x5762ea<_0xf660a4;_0x5762ea++){_0x16dd3a+='%'+('00'+_0x17144d['charCodeAt'](_0x5762ea)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x16dd3a);};a0_0x40c1['ybyyFD']=_0x2f72a9,a0_0x40c1['kwYtZo']={},a0_0x40c1['lJGSAP']=!![];}const _0x1ad224=_0x10df23[0x0],_0x18c085=_0x2ebe9a+_0x1ad224,_0x56034e=a0_0x40c1['kwYtZo'][_0x18c085];return!_0x56034e?(_0x40c129=a0_0x40c1['ybyyFD'](_0x40c129),a0_0x40c1['kwYtZo'][_0x18c085]=_0x40c129):_0x40c129=_0x56034e,_0x40c129;}import{describe,test,expect}from'@jest/globals';describe('Connection\x20Management\x20-\x20Imports',()=>{test('useConnection hook can be imported',async()=>{const _0x1fcba1=a0_0x40c1,{useConnection:_0x17144d}=await import('../../state/useConnection.js');expect(_0x17144d)[_0x1fcba1(0x8e)](),expect(typeof _0x17144d)[_0x1fcba1(0xa4)]('function');}),test('useConnection is default export',async()=>{const _0x53377a=a0_0x40c1,module=await import(_0x53377a(0x90));expect(module['default'])['toBeDefined'](),expect(typeof module[_0x53377a(0xb2)])['toBe']('function'),expect(module['default'])['toBe'](module[_0x53377a(0x91)]);});}),describe('Connection\x20Management\x20-\x20Constants',()=>{const _0x77e5ca=a0_0x40c1;test(_0x77e5ca(0xb8),async()=>{const _0x3cf5ca=_0x77e5ca,{CONNECTION_STATUS:_0x16dd3a}=await import(_0x3cf5ca(0x86));expect(_0x16dd3a)[_0x3cf5ca(0x8e)](),expect(_0x16dd3a['CONNECTING'])[_0x3cf5ca(0xa4)](_0x3cf5ca(0xa2)),expect(_0x16dd3a[_0x3cf5ca(0xa1)])['toBe'](_0x3cf5ca(0xa7)),expect(_0x16dd3a['DISCONNECTED'])['toBe'](_0x3cf5ca(0x89)),expect(_0x16dd3a['RECONNECTING'])['toBe'](_0x3cf5ca(0xbb));}),test(_0x77e5ca(0xba),async()=>{const {CONNECTION_STATUS:_0x3340c5,CONNECTION_STATE:_0x52ce0e}=await import('../../config/constants.js');expect(_0x3340c5)['toBe'](_0x52ce0e);}),test('RECONNECT_CONFIG\x20constants\x20are\x20defined',async()=>{const _0x110f87=_0x77e5ca,{RECONNECT_CONFIG:_0x16af7b}=await import('../../config/constants.js');expect(_0x16af7b)['toBeDefined'](),expect(_0x16af7b['INITIAL_DELAY'])['toBeDefined'](),expect(_0x16af7b['MAX_DELAY'])['toBeDefined'](),expect(_0x16af7b['BACKOFF_MULTIPLIER'])[_0x110f87(0x8e)](),expect(_0x16af7b[_0x110f87(0xa6)])[_0x110f87(0x8e)]();}),test('RECONNECT_CONFIG\x20values\x20are\x20reasonable',async()=>{const _0x565f90=_0x77e5ca,{RECONNECT_CONFIG:_0x1a079b}=await import(_0x565f90(0x86));expect(_0x1a079b[_0x565f90(0x81)])[_0x565f90(0x88)](0x0),expect(_0x1a079b['MAX_DELAY'])['toBeGreaterThan'](_0x1a079b['INITIAL_DELAY']),expect(_0x1a079b['BACKOFF_MULTIPLIER'])['toBeGreaterThan'](0x1),expect(_0x1a079b['MAX_ATTEMPTS'])['toBeGreaterThan'](0x0);});}),describe('Connection\x20Management\x20-\x20Integration',()=>{test('useConnection\x20hook\x20integrates\x20with\x20SessionManager\x20and\x20WebSocketManager',async()=>{const _0x50a7a9=a0_0x40c1,{useConnection:_0x5762ea}=await import('../../state/useConnection.js'),{SessionManager:_0xf660a4}=await import('../../api/session.js'),{WebSocketManager:_0x4dd216}=await import('../../api/websocket.js'),_0x917930=new _0xf660a4(_0x50a7a9(0xb9),0x1f90),_0x1d7bc8=new _0x4dd216('localhost',0x1f90);expect(_0x917930)[_0x50a7a9(0x8e)](),expect(_0x1d7bc8)[_0x50a7a9(0x8e)](),expect(typeof _0x5762ea)[_0x50a7a9(0xa4)](_0x50a7a9(0xb3));}),test('Full connection stack can be imported together',async()=>{const _0x14efa2=a0_0x40c1,[_0x2414bc,_0x3f2337,_0x4b9a03,_0x338739]=await Promise['all']([import(_0x14efa2(0x86)),import('../../api/session.js'),import(_0x14efa2(0x8c)),import('../../state/useConnection.js')]);expect(_0x2414bc[_0x14efa2(0x9f)])[_0x14efa2(0x8e)](),expect(_0x2414bc['RECONNECT_CONFIG'])[_0x14efa2(0x8e)](),expect(_0x3f2337['SessionManager'])['toBeDefined'](),expect(_0x4b9a03['WebSocketManager'])[_0x14efa2(0x8e)](),expect(_0x338739[_0x14efa2(0x91)])['toBeDefined']();});}),describe(a0_0x9a78f2(0x8b),()=>{test('useConnection\x20returns\x20expected\x20interface\x20shape',async()=>{const _0x491d00=a0_0x40c1,{useConnection:_0x2b9ffc}=await import(_0x491d00(0x90));expect(_0x2b9ffc['length'])[_0x491d00(0xa4)](0x2);});}),describe(a0_0x9a78f2(0x9d),()=>{test('CONNECTION_STATUS\x20values\x20are\x20lowercase\x20strings',async()=>{const _0x395f5b=a0_0x40c1,{CONNECTION_STATUS:_0x23d8d4}=await import('../../config/constants.js');expect(typeof _0x23d8d4['CONNECTING'])['toBe']('string'),expect(typeof _0x23d8d4['CONNECTED'])[_0x395f5b(0xa4)](_0x395f5b(0x96)),expect(typeof _0x23d8d4[_0x395f5b(0x99)])['toBe']('string'),expect(typeof _0x23d8d4['RECONNECTING'])[_0x395f5b(0xa4)]('string'),expect(_0x23d8d4['CONNECTING'])[_0x395f5b(0xa4)](_0x23d8d4[_0x395f5b(0xa9)][_0x395f5b(0xb4)]()),expect(_0x23d8d4[_0x395f5b(0xa1)])['toBe'](_0x23d8d4['CONNECTED'][_0x395f5b(0xb4)]());}),test('CONNECTION_STATUS\x20has\x20all\x20required\x20states',async()=>{const _0x2e8348=a0_0x40c1,{CONNECTION_STATUS:_0x219c80}=await import(_0x2e8348(0x86)),_0x25a20c=Object[_0x2e8348(0xab)](_0x219c80);expect(_0x25a20c)[_0x2e8348(0x85)]('CONNECTING'),expect(_0x25a20c)['toContain'](_0x2e8348(0xa1)),expect(_0x25a20c)['toContain']('DISCONNECTED'),expect(_0x25a20c)['toContain'](_0x2e8348(0x98));});}),describe('Connection\x20Management\x20-\x20Exponential\x20Backoff\x20Logic',()=>{const _0x5247a7=a0_0x9a78f2;test('Exponential\x20backoff\x20delay\x20calculation\x20works\x20correctly',async()=>{const _0x3080b7=a0_0x40c1,{RECONNECT_CONFIG:_0xffedd6}=await import('../../config/constants.js'),_0x2983b8=_0x198572=>{const _0x1de04d=a0_0x40c1;return Math[_0x1de04d(0xb6)](_0xffedd6['INITIAL_DELAY']*Math[_0x1de04d(0x95)](_0xffedd6['BACKOFF_MULTIPLIER'],_0x198572),_0xffedd6[_0x1de04d(0xb1)]);},_0x62372a=_0x2983b8(0x0),_0x32a0f6=_0x2983b8(0x1),_0x123a8a=_0x2983b8(0x2);expect(_0x62372a)['toBe'](_0xffedd6[_0x3080b7(0x81)]),expect(_0x32a0f6)['toBeGreaterThan'](_0x62372a),expect(_0x123a8a)[_0x3080b7(0x88)](_0x32a0f6);}),test(_0x5247a7(0x80),async()=>{const _0x34b0e8=_0x5247a7,{RECONNECT_CONFIG:_0x43a966}=await import(_0x34b0e8(0x86)),_0x3c5b28=_0x378fd8=>{return Math['min'](_0x43a966['INITIAL_DELAY']*Math['pow'](_0x43a966['BACKOFF_MULTIPLIER'],_0x378fd8),_0x43a966['MAX_DELAY']);},_0x475f0b=_0x3c5b28(0x64);expect(_0x475f0b)[_0x34b0e8(0xa4)](_0x43a966[_0x34b0e8(0xb1)]),expect(_0x475f0b)[_0x34b0e8(0x9e)](_0x43a966[_0x34b0e8(0xb1)]);});}),describe('Connection\x20Management\x20-\x20Session\x20State',()=>{const _0x38be04=a0_0x9a78f2;test(_0x38be04(0xa3),async()=>{const _0x10860b=_0x38be04;let _0x3c5200=null,_0x335326=![],_0x4f3d6e=null;_0x3c5200=_0x10860b(0xaf),_0x335326=!![],_0x4f3d6e=Date[_0x10860b(0xa0)]()+0x36ee80,expect(_0x3c5200)['toBeDefined'](),expect(_0x335326)['toBe'](!![]),expect(_0x4f3d6e)[_0x10860b(0x88)](Date['now']());}),test('Session\x20state\x20should\x20invalidate',async()=>{const _0x2505a4=_0x38be04;let _0x44503e='test-session-123',_0x592bd1=!![];_0x44503e=null,_0x592bd1=![],expect(_0x44503e)[_0x2505a4(0xb0)](),expect(_0x592bd1)['toBe'](![]);});}),describe(a0_0x9a78f2(0x93),()=>{test('Connection\x20uptime\x20can\x20be\x20tracked',async()=>{const _0x5a657c=a0_0x40c1,_0x38af0a=Date[_0x5a657c(0xa0)]();await new Promise(_0x1991d3=>setTimeout(_0x1991d3,0x64));const _0x4a15b2=Date['now']()-_0x38af0a;expect(_0x4a15b2)[_0x5a657c(0x88)](0x0),expect(_0x4a15b2)[_0x5a657c(0x94)](0x64);}),test('Connection\x20metrics\x20track\x20timestamps',async()=>{const _0x525240=a0_0x40c1,_0x136a10=Date['now']();await new Promise(_0x48da23=>setTimeout(_0x48da23,0x32));const _0x4fbb6d=Date[_0x525240(0xa0)]();expect(_0x136a10)['toBeDefined'](),expect(_0x4fbb6d)['toBeDefined'](),expect(_0x4fbb6d)[_0x525240(0x88)](_0x136a10);}),test('Reconnection\x20attempts\x20can\x20be\x20tracked',async()=>{const _0x5dd342=a0_0x40c1;let _0x2824ea=0x0;_0x2824ea+=0x1,expect(_0x2824ea)['toBe'](0x1),_0x2824ea+=0x1,expect(_0x2824ea)[_0x5dd342(0xa4)](0x2),_0x2824ea=0x0,expect(_0x2824ea)[_0x5dd342(0xa4)](0x0);});}),describe('Connection\x20Management\x20-\x20Connection\x20Status\x20Transitions',()=>{test('Connection\x20status\x20transitions\x20follow\x20valid\x20flow',async()=>{const _0x54c537=a0_0x40c1,{CONNECTION_STATUS:_0x5a042d}=await import('../../config/constants.js');let _0x4c3cf8=_0x5a042d['DISCONNECTED'];expect(_0x4c3cf8)['toBe']('disconnected'),_0x4c3cf8=_0x5a042d[_0x54c537(0xa9)],expect(_0x4c3cf8)[_0x54c537(0xa4)](_0x54c537(0xa2)),_0x4c3cf8=_0x5a042d[_0x54c537(0xa1)],expect(_0x4c3cf8)[_0x54c537(0xa4)]('connected'),_0x4c3cf8=_0x5a042d[_0x54c537(0x99)],expect(_0x4c3cf8)[_0x54c537(0xa4)]('disconnected'),_0x4c3cf8=_0x5a042d['RECONNECTING'],expect(_0x4c3cf8)[_0x54c537(0xa4)](_0x54c537(0xbb)),_0x4c3cf8=_0x5a042d[_0x54c537(0xa1)],expect(_0x4c3cf8)[_0x54c537(0xa4)](_0x54c537(0xa7));});}),describe('Connection\x20Management\x20-\x20WebSocket\x20Event\x20Integration',()=>{const _0x4bba89=a0_0x9a78f2;test(_0x4bba89(0x8a),async()=>{const _0x4a3789=_0x4bba89,{WebSocketManager:_0x2efa88}=await import(_0x4a3789(0x8c)),_0x4e5dcc=new _0x2efa88('localhost',0x1f90);expect(_0x4e5dcc['on'])['toBeDefined'](),expect(_0x4e5dcc['off'])['toBeDefined'](),expect(typeof _0x4e5dcc['on'])['toBe'](_0x4a3789(0xb3)),expect(typeof _0x4e5dcc[_0x4a3789(0xaa)])[_0x4a3789(0xa4)](_0x4a3789(0xb3));});}),describe('Connection\x20Management\x20-\x20Max\x20Attempts\x20Limit',()=>{const _0x54fe1b=a0_0x9a78f2;test(_0x54fe1b(0xbc),async()=>{const _0x234bad=_0x54fe1b,{RECONNECT_CONFIG:_0x4a9268}=await import('../../config/constants.js');let _0x7660af=0x0;for(let _0xd77908=0x0;_0xd77908<_0x4a9268[_0x234bad(0xa6)]+0x5;_0xd77908++){if(_0x7660af<_0x4a9268[_0x234bad(0xa6)])_0x7660af+=0x1;else break;}expect(_0x7660af)['toBe'](_0x4a9268[_0x234bad(0xa6)]),expect(_0x7660af)['toBeLessThanOrEqual'](_0x4a9268[_0x234bad(0xa6)]);});}),describe(a0_0x9a78f2(0xad),()=>{const _0x22644c=a0_0x9a78f2;test(_0x22644c(0xa8),async()=>{const _0xd9029f=_0x22644c,{CONNECTION_STATUS:_0x991562}=await import('../../config/constants.js'),_0x1eb830={'status':_0x991562[_0xd9029f(0xa1)],'isConnected':!![],'isReconnecting':![],'sessionId':'test-session-123','sessionValid':!![],'sessionExpiration':Date['now']()+0x36ee80,'uptime':0x1388,'lastConnectedAt':Date[_0xd9029f(0xa0)]()-0x1388,'lastDisconnectedAt':null,'reconnectAttempts':0x0};expect(_0x1eb830[_0xd9029f(0x9c)])[_0xd9029f(0x8e)](),expect(_0x1eb830[_0xd9029f(0x84)])['toBe'](!![]),expect(_0x1eb830[_0xd9029f(0x92)])['toBe'](![]),expect(_0x1eb830['sessionId'])[_0xd9029f(0x8e)](),expect(_0x1eb830[_0xd9029f(0xb7)])['toBe'](!![]),expect(_0x1eb830['uptime'])['toBeGreaterThan'](0x0);});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x2323(){const _0x58c595=['ndC1mZDlzfDbBhy','ugHHC2uGosaTievYCM9YqM91BMrHCNKGlsbtDhj1y3r1CMu','ndK2nJiXnKHjB3zPvG','y29TCg9Uzw50rgLKq2f0y2G','Dg9czq','lI4VlI4Vy29TCg9Uzw50CY9mB2fKAw5Nu3bPBM5LCI5QCW','nda4rLf0rMLS','sw5SAw5Lu3bPBM5LCG','DxnLu3rHDgu','ugHHC2uGosaTievUAgfUy2vKiezLyxr1CMvZic0Gq29UC3rHBNrZ','odG3nZfVrgLJsKG','ChjVDg90ExbL','rxjYB3jcB3vUzgfYEsbJB21WB25LBNreAwrdyxrJAcbPCYbKzwzPBMvK','nti1ntbiwMj4t1K','Dg9czvvUzgvMAw5Lza','CMvHy3q','Dg9czurLzMLUzwq','mte3ownXvNzXzW','ywXS','mtyYodG5mZjzBNvzEve','lI4VlI4Vy29TCg9Uzw50CY9fCNjVCKjVDw5Kyxj5lMPZ','lI4VlI4Vy29TCg9Uzw50CY9jBNb1DejVEc5QCW','mtC4mtiWmK93swXtrG','rxjYB3jcB3vUzgfYEsbPCYbHignSyxnZignVBxbVBMvUDa','ndq1u2PcwNnS','tg9HzgLUz1nWAw5Uzxi','sw5WDxrcB3G','CMvUzgvY','Aw5R','zNvUy3rPB24','ohHVAwT1wG','lI4VlI4Vy29TCg9Uzw50CY9myxLVDxqUANm','ugHHC2uGosaTieXVywrPBMDtCgLUBMvYic0Gu3rYDwn0DxjL','rxjYB3jcB3vUzgfYEq','mtfTvwP5CfK','DxnLsw5WDxq','mtqWndrIBNnfwum','zgvMyxvSDa'];a0_0x2323=function(){return _0x58c595;};return a0_0x2323();}const a0_0x5205b0=a0_0x4e8c;(function(_0x5c6b9a,_0x386a74){const _0x164463=a0_0x4e8c,_0x4bc10a=_0x5c6b9a();while(!![]){try{const _0x4ad105=-parseInt(_0x164463(0x149))/0x1*(-parseInt(_0x164463(0x137))/0x2)+-parseInt(_0x164463(0x12f))/0x3+-parseInt(_0x164463(0x13d))/0x4*(-parseInt(_0x164463(0x131))/0x5)+-parseInt(_0x164463(0x145))/0x6*(-parseInt(_0x164463(0x13f))/0x7)+-parseInt(_0x164463(0x141))/0x8+parseInt(_0x164463(0x12a))/0x9*(-parseInt(_0x164463(0x126))/0xa)+-parseInt(_0x164463(0x13b))/0xb*(-parseInt(_0x164463(0x12c))/0xc);if(_0x4ad105===_0x386a74)break;else _0x4bc10a['push'](_0x4bc10a['shift']());}catch(_0x4c7174){_0x4bc10a['push'](_0x4bc10a['shift']());}}}(a0_0x2323,0x8e8a6));import{describe,test,expect}from'@jest/globals';function a0_0x4e8c(_0x28e784,_0x59b04c){_0x28e784=_0x28e784-0x124;const _0x23233b=a0_0x2323();let _0x4e8c55=_0x23233b[_0x28e784];if(a0_0x4e8c['EIFjaz']===undefined){var _0x148ee0=function(_0x5bd6e1){const _0x43af7b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xea49ac='',_0x5bdc9b='';for(let _0x4acef5=0x0,_0x5af2df,_0x4bc744,_0x20ee83=0x0;_0x4bc744=_0x5bd6e1['charAt'](_0x20ee83++);~_0x4bc744&&(_0x5af2df=_0x4acef5%0x4?_0x5af2df*0x40+_0x4bc744:_0x4bc744,_0x4acef5++%0x4)?_0xea49ac+=String['fromCharCode'](0xff&_0x5af2df>>(-0x2*_0x4acef5&0x6)):0x0){_0x4bc744=_0x43af7b['indexOf'](_0x4bc744);}for(let _0x42dcbe=0x0,_0x1bf754=_0xea49ac['length'];_0x42dcbe<_0x1bf754;_0x42dcbe++){_0x5bdc9b+='%'+('00'+_0xea49ac['charCodeAt'](_0x42dcbe)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5bdc9b);};a0_0x4e8c['DQfEBQ']=_0x148ee0,a0_0x4e8c['eyoxMa']={},a0_0x4e8c['EIFjaz']=!![];}const _0x5e3e1b=_0x23233b[0x0],_0x4bf13a=_0x28e784+_0x5e3e1b,_0x13e05b=a0_0x4e8c['eyoxMa'][_0x4bf13a];return!_0x13e05b?(_0x4e8c55=a0_0x4e8c['DQfEBQ'](_0x4e8c55),a0_0x4e8c['eyoxMa'][_0x4bf13a]=_0x4e8c55):_0x4e8c55=_0x13e05b,_0x4e8c55;}describe('Phase\x209\x20-\x20Enhanced\x20Components\x20-\x20Imports',()=>{const _0x2aea14=a0_0x4e8c;test('ErrorBoundary component can be imported',async()=>{const _0x1c450d=a0_0x4e8c,{ErrorBoundary:_0xea49ac}=await import(_0x1c450d(0x12d));expect(_0xea49ac)['toBeDefined'](),expect(typeof _0xea49ac)['toBe']('function');},0x7530),test(_0x2aea14(0x130),async()=>{const _0x50aa43=_0x2aea14,{ErrorBoundary:_0x5bdc9b}=await import(_0x50aa43(0x12d));expect(_0x5bdc9b['prototype'])['toBeDefined'](),expect(typeof _0x5bdc9b['prototype']['render'])[_0x50aa43(0x143)]('function');}),test('LoadingSpinner component can be imported',async()=>{const _0x392ba0=_0x2aea14,{LoadingSpinner:_0x4acef5}=await import(_0x392ba0(0x144));expect(_0x4acef5)[_0x392ba0(0x129)](),expect(typeof _0x4acef5)['toBe'](_0x392ba0(0x136));}),test('InlineSpinner component can be imported',async()=>{const {InlineSpinner:_0x5af2df}=await import('../../components/LoadingSpinner.js');expect(_0x5af2df)['toBeDefined'](),expect(typeof _0x5af2df)['toBe']('function');}),test('LoadingSpinner is default export',async()=>{const _0x5ed5ea=_0x2aea14,module=await import('../../components/LoadingSpinner.js');expect(module[_0x5ed5ea(0x13e)])[_0x5ed5ea(0x129)](),expect(module[_0x5ed5ea(0x13e)])[_0x5ed5ea(0x143)](module['LoadingSpinner']);}),test('Enhanced\x20InputBox\x20maintains\x20backward\x20compatibility',async()=>{const _0x3d8457=_0x2aea14,{InputBox:_0x4bc744}=await import('../../components/InputBox.js');expect(_0x4bc744)[_0x3d8457(0x129)](),expect(typeof _0x4bc744)['toBe']('function');});}),describe(a0_0x5205b0(0x140),()=>{const _0x4aea62=a0_0x5205b0;test('ErrorBoundary\x20is\x20a\x20React\x20Component\x20class',async()=>{const _0x4d78cb=a0_0x4e8c,{ErrorBoundary:_0x20ee83}=await import('../../components/ErrorBoundary.js'),_0x42dcbe=await import(_0x4d78cb(0x128));expect(_0x20ee83[_0x4d78cb(0x124)])[_0x4d78cb(0x129)](),expect(typeof _0x20ee83[_0x4d78cb(0x124)][_0x4d78cb(0x134)])[_0x4d78cb(0x143)]('function'),expect(typeof _0x20ee83[_0x4d78cb(0x124)]['componentDidCatch'])[_0x4d78cb(0x143)](_0x4d78cb(0x136));}),test('ErrorBoundary\x20has\x20getDerivedStateFromError\x20static\x20method',async()=>{const _0x306980=a0_0x4e8c,{ErrorBoundary:_0x1bf754}=await import(_0x306980(0x12d));expect(typeof _0x1bf754['getDerivedStateFromError'])[_0x306980(0x143)](_0x306980(0x136));}),test(_0x4aea62(0x125),async()=>{const _0x2be473=_0x4aea62,{ErrorBoundary:_0x362ed5}=await import(_0x2be473(0x12d));expect(typeof _0x362ed5['prototype'][_0x2be473(0x142)])[_0x2be473(0x143)](_0x2be473(0x136));});}),describe(a0_0x5205b0(0x139),()=>{test('LoadingSpinner\x20is\x20a\x20function\x20component',async()=>{const _0x531ffb=a0_0x4e8c,{LoadingSpinner:_0x3c6af1}=await import('../../components/LoadingSpinner.js');expect(typeof _0x3c6af1)['toBe'](_0x531ffb(0x136)),expect(_0x3c6af1[_0x531ffb(0x124)]?.['render'])[_0x531ffb(0x127)]();}),test('InlineSpinner\x20is\x20a\x20function\x20component',async()=>{const _0x320f41=a0_0x4e8c,{InlineSpinner:_0xf8d272}=await import(_0x320f41(0x144));expect(typeof _0xf8d272)[_0x320f41(0x143)]('function'),expect(_0xf8d272[_0x320f41(0x124)]?.['render'])['toBeUndefined']();});}),describe('Phase\x209\x20-\x20Enhanced\x20InputBox\x20-\x20History\x20Support',()=>{test('Enhanced InputBox imports useRef for history',async()=>{const _0x2fd285=a0_0x4e8c,_0x39a7a=await import(_0x2fd285(0x12e)),_0x11b4e4=await import('react');expect(_0x11b4e4[_0x2fd285(0x147)])['toBeDefined'](),expect(_0x11b4e4['useRef'])['toBeDefined']();}),test('InputBox component maintains exports',async()=>{const _0x388a10=a0_0x4e8c,module=await import('../../components/InputBox.js');expect(module[_0x388a10(0x133)])['toBeDefined'](),expect(module[_0x388a10(0x13e)])['toBeDefined'](),expect(module[_0x388a10(0x13e)])[_0x388a10(0x143)](module[_0x388a10(0x133)]);});}),describe('Phase\x209\x20-\x20Integration',()=>{test('All enhanced components can be imported together',async()=>{const _0x57e556=a0_0x4e8c,[_0x4188a8,_0x340caf,_0x4ce76f]=await Promise[_0x57e556(0x12b)]([import('../../components/ErrorBoundary.js'),import('../../components/LoadingSpinner.js'),import('../../components/InputBox.js')]);expect(_0x4188a8[_0x57e556(0x13a)])[_0x57e556(0x129)](),expect(_0x340caf[_0x57e556(0x132)])[_0x57e556(0x129)](),expect(_0x340caf[_0x57e556(0x146)])[_0x57e556(0x129)](),expect(_0x4ce76f[_0x57e556(0x133)])['toBeDefined']();}),test('Enhanced Layout component imports useInput for keyboard shortcuts',async()=>{const _0x435dbe=a0_0x4e8c,_0x5f3181=await import('react'),_0x2cb44a=await import(_0x435dbe(0x135));expect(_0x2cb44a[_0x435dbe(0x13c)])[_0x435dbe(0x129)](),expect(typeof _0x2cb44a['useInput'])['toBe']('function');}),test('Layout component can still be imported after enhancements',async()=>{const _0xb987ee=a0_0x4e8c,{Layout:_0x5e881f}=await import(_0xb987ee(0x138));expect(_0x5e881f)[_0xb987ee(0x129)](),expect(typeof _0x5e881f)['toBe'](_0xb987ee(0x136));});}),describe(a0_0x5205b0(0x148),()=>{test('InputBox\x20defines\x20MAX_HISTORY\x20constant',async()=>{const _0x3084e5=a0_0x4e8c,module=await import(_0x3084e5(0x12e));expect(module[_0x3084e5(0x133)])[_0x3084e5(0x129)]();});});
|