@wujie-shell/core 2.0.0 → 2.0.1
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 +30 -0
- package/dist/bin/wujie-shell.mjs +1 -1
- package/dist/src/agents/bundled-agent-skills.mjs +1 -0
- package/dist/src/agents/bundled-agents.mjs +1 -0
- package/dist/src/chat/media-archive.mjs +1 -0
- package/dist/src/chat/queue.mjs +1 -0
- package/dist/src/common/diagnostics.mjs +1 -0
- package/dist/src/common/logging.mjs +1 -0
- package/dist/src/common/runtime-logger.mjs +1 -0
- package/dist/src/common/user-events.mjs +1 -0
- package/dist/src/common/utils.mjs +1 -0
- package/dist/src/config/controller.mjs +1 -0
- package/dist/src/connectors/config-utils.mjs +1 -1
- package/dist/src/connectors/constants.mjs +1 -1
- package/dist/src/connectors/controller.mjs +1 -0
- package/dist/src/connectors/kdocs-cli.mjs +1 -0
- package/dist/src/electron/main.mjs +1 -1
- package/dist/src/electron/preload.mjs +1 -1
- package/dist/src/files/generated-files-store.mjs +1 -0
- package/dist/src/files/handlers.mjs +1 -0
- package/dist/src/gateway/controller.mjs +1 -0
- package/dist/src/gateway/ws-client.mjs +1 -0
- package/dist/src/index.mjs +1 -1
- package/dist/src/log-reporting/handlers.mjs +1 -0
- package/dist/src/log-reporting/report-logs.mjs +1 -0
- package/dist/src/models/handlers.mjs +1 -0
- package/dist/src/preferences/store.mjs +1 -0
- package/dist/src/runtime/index.mjs +1 -0
- package/dist/src/runtime/patch-channel-plugin-runtime.mjs +1 -0
- package/dist/src/runtime/patch-chat-history-mixed-tool-content.mjs +1 -0
- package/dist/src/runtime/plugin-sync.mjs +1 -0
- package/dist/src/sessions/agent-sessions-map-store.mjs +1 -0
- package/dist/src/skills/import.mjs +1 -0
- package/dist/src/skills/market.mjs +1 -0
- package/dist/src/terminal/manager.mjs +1 -0
- package/package.json +5 -5
- package/dist/src/agent-sessions-map-store.mjs +0 -1
- package/dist/src/bundled-agent-skills.mjs +0 -1
- package/dist/src/bundled-agents.mjs +0 -1
- package/dist/src/config-controller.mjs +0 -1
- package/dist/src/connectors/connector-controller.mjs +0 -1
- package/dist/src/gateway-controller.mjs +0 -1
- package/dist/src/gateway-ws.mjs +0 -1
- package/dist/src/generated-files-store.mjs +0 -1
- package/dist/src/logging.mjs +0 -1
- package/dist/src/openclaw-config-compat.mjs +0 -1
- package/dist/src/plugin-sync.mjs +0 -1
- package/dist/src/product-preferences-store.mjs +0 -1
- package/dist/src/runtime-logger.mjs +0 -1
- package/dist/src/runtime.mjs +0 -1
- package/dist/src/skill-import.mjs +0 -1
- package/dist/src/terminal-manager.mjs +0 -1
- package/dist/src/utils.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48e3dc=_0x5193;(function(_0x16f06a,_0x32cf16){const _0x434042=_0x5193,_0xbc0cf5=_0x16f06a();while(!![]){try{const _0x1afe9b=parseInt(_0x434042(0x2e0))/0x1*(parseInt(_0x434042(0x3da))/0x2)+parseInt(_0x434042(0x456))/0x3+-parseInt(_0x434042(0x496))/0x4+-parseInt(_0x434042(0x4a9))/0x5*(parseInt(_0x434042(0x228))/0x6)+-parseInt(_0x434042(0x342))/0x7+-parseInt(_0x434042(0x347))/0x8*(-parseInt(_0x434042(0x4ba))/0x9)+parseInt(_0x434042(0x404))/0xa;if(_0x1afe9b===_0x32cf16)break;else _0xbc0cf5['push'](_0xbc0cf5['shift']());}catch(_0x1691d8){_0xbc0cf5['push'](_0xbc0cf5['shift']());}}}(_0x7a8d,0x35ef3));import _0x5e0ff6 from'electron';import{fileURLToPath}from'node:url';import{basename,dirname,join,resolve,sep}from'node:path';import{createReadStream,existsSync,statSync}from'node:fs';function _0x5193(_0x14ed99,_0x5a3211){_0x14ed99=_0x14ed99-0x1cd;const _0x7a8d20=_0x7a8d();let _0x519345=_0x7a8d20[_0x14ed99];return _0x519345;}import{readFile,readdir,rm,stat,writeFile,mkdir}from'node:fs/promises';import{spawn}from'node:child_process';import{Readable}from'node:stream';import{homedir}from'node:os';import{loadShellConfig}from'@wujie-shell/config';import{createConfigController}from'../config-controller.mjs';import{createGatewayController}from'../gateway-controller.mjs';function _0x7a8d(){const _0x4fda0f=['ections','rnal','ell\x20gate','torConfi','te:check','e:write-','n-direct','-life-cy','text/mar','les:upse','rename','complete','200','paths','https://','context','toWeb','shuRegis','otRaw','number','dels:del',':agent-m','tp\x20','dKeys','agents:d',':save-we','ectSessi','producti','nabled','ssion','lConnect','resh-age','stringif','pdated','CliConne','logs:exp','ad-binar','open','runtimeI','est\x20star','nts','logs:rea','sourcePa','ModelId','applicat','getStatu','saveQqbo','/wj-open','+Shift+I','default','mpletion','-exit','Version','filter','register',':save-ne','sConnect','session-','object','pinnedKe','byteLeng','nfig','2040766BPDJjJ','slice','HEAD','Custom','dispose','504GvweCU','skills','command','image/we','Exceptio','\x20bytes\x20(','url','app:upda','loadFile','agents:l','extensio','tateDir','cancelFe','primary','tabs-com','nt]','shared-c','eted','\x20found:\x20','cancelWe','boot\x20ele','chat','list','models',':save','trationS','saveWeco','fig','plugin\x20e','avatar','temperat','create','matroska','video/we','reload','window:c','s-maximi','chat:abo','keys','ort\x20requ','ipc','im_chann','Name','nt-state','catch','uired','quit','skills:d','\x20log\x20rep','cCliConn','cron:run','nnelEnab','find','i-window','arch','ired','-info','agent\x20al','ap:get','上传日志失败(H','te:quit-','ncent-ex','-mail','activate','dist','window:t','odel\x20sav','inimize',':pinned-','\x20is\x20requ','onnector',':loading',':input','stration','no-store','whenRead','electron','elete','renderer',':set-clo','getFeish','onfig','path\x20is\x20','uploads','t:\x20','pping\x20ga','size','FeishuDo','unregist','files:se','.webp','all','logs\x20exp','stop','ite','huChanne','-once','settings','custom','openExte','syncRunt','fromEntr','te:downl','ory','shuDocCl','ontent-t','logs:wri','setName','plugins:','mChannel','child\x20pr','D,\x20OPTIO','output_t','ite-bina',':delete','tings','Bearer\x20','.svg','ession','runOnce',':save-qq','load','ls:delet','history','oot','ase','agents:c','upload','targetDi','ot\x20initi','hide','openai-c','writeTex','nel','info','figured:','ximize','ocsCliCo','setImCha','render-p','generate','oad','node:fs/','\x20not\x20con','e:shared','setModel','agents','147766DehfUy','\x20excepti','Not\x20foun','range','-url','pdate','setPinne','required','toLowerC','temp_fil','fromWebC','ternally','startFei','odel\x20nam','openclaw','zed','pluginId','log','wujie-ag','error','e\x20saved','warn','pper\x20not','setLogin','onfigPat','connecto','audio/aa','m-channe','files:li','temp','tate','index.ht','anthropi','maxToken','one','startWec','ion/zip','yInfo','openDire','ndows','logs:rep','data','567120IeYjom','agent\x20cr','agent\x20up','ead','h\x0aexec\x20\x22','model','\x20main\x20wi','ishu-doc','isIntege','mjs','input','select\x20d','tLogs','tup:set','manifest','hell:eve','set=utf-','dels','o\x20large:','chat:str','s:list','elSessio','code','files:re','report','ools','d\x20is\x20req','artifact','ate','range,\x20c','defaultF','nput-eve','igate','imePlugi','ext','-weixin','provider','ll-close','before\x20q','-questio','gateway-',':start','configPa','json','ile\x20comp','iled\x20to\x20','sion','then','plugin\x20c','Session','efault','detach','logs:ope','uRegistr','saveQqMa','channelI','runtime:','chrome','ion/json','isArray','has','dow\x20load','ell\x20boot','canvas','messages','app:gene','\x20log','saveDing','.mov','huDocCon','nges',':downloa',':get-clo','productN','deletedS','ell:even','d\x20failed','includes','s:upsert','ngtalk-d','promises','openFile','992832ClrelO','map','Dialog','main\x20win','isFinite',':fork','uncaught','unknown','chat-str','delete','preventD','ions-lis','les:list','ot\x20start','maxEntri','aseMailC','failed','ipc\x20requ','match','Settings','igSnapsh','idle',':complet','rControl','tChannel','orConfig','cron:cre','maximize','feishu','showSave','startKdo','openAtLo','csCliCon','resolveC','chat:his','isMaximi','ctron\x20ma',':answer-','trim','ileName','webConte','started','max\x20','image/sv','ceptions','director','\x20complet','before-i','.wav','versions','ete','e\x20direct','agent\x20id','gatewayP','enable','ettings','saveTenc','lConfig','ies','multiSel','kUserQue','odel\x20id\x20','wujiecla','-logs','72796oOEGPm','min','dir','igWriteH','e\x20url','resize','ndow','timeoutM','ontents','.mp4','before-q','gateToke','folder','status','getLogin','no-updat','filters','talkDocC','indexOf','290030VVVbIx','image/bm','writeSha','sessions','get','unref','g_conten','utf8','product','plugins','\x20shortcu','window:i','length','customPr','open\x20ext','d-local','resolveS','5337eJLSxv','audio/og','skills:u','deleteIm','-context','TTP\x20','join','send','select\x20f','nectorCo','apiKey','ready\x20ex','config:i','xOf','clawspac','in;\x20char','title','irectory','relaunch','mand','some','t-stream','modelId','is\x20requi','getVersi','chatChan','est\x20fail','agents:w','ModelSet','les:dele','openai','ile','text','logs','.png','api.open','hostname','replace','isDirect','/chat/co','orted','com-chan','dRejecti','ls:set-e','file','baseUrl','app:syst','ntext','kind','缺少日志上传服务','-session','content','lose','base64','pened','gin','video/mp','timeout','red','ort','yed',':save-fe','getPath','tabs-age','headers','openDevT','plugin\x20d','ort\x20fail','pathname','-status','length,\x20','board:wr','pop','appId','s:delete','et-setti','uri','-refresh','alized','skills:i',':gateway','feishu_d','icktime','fallback','set','ype','toISOStr','navigati','ctStatus','ted','projectR','kdocs','models:s','sender','uest-age',':choose-','ask-user','.gif','tabs:req','gate-tok','tabs:pos','getURL','cron:log','bytes','app:file','.md','saveFeis','video/qu','/upload','openPath','exec','lt\x20model','parentSe','ure','bytes\x20','main','files:wr','binary\x20f',':resize','app:tray','defaults','ai.com/v','bin','e:direct',':open-cl','ame','agent-ev','12YDTxvK','.webm','ory-info','ontext','append','wechat',':save-te','tabs:nav','wBin','customNa','app:log:','ings','get-conf','\x20a\x20provi','ove','success','imChanne','oviderNa','devtools','unique','fileName','harset=u','ishuRegi','#0000000','start','temp\x20fil','update-c','ignore','\x20file\x20to','l\x20reques','isDestro','unhandle','#f8fafc','omplete','ile\x20writ','POST','/aipc/ex','tatus',':create','message','terminal','Config','agent-','andledIn','meta','getAllWi','ssion:\x20','keyDown','markConf','tease-ma','nnectSes','groups','config','showOpen','[wujie-s','from','nfo','senderFr','/v2/gene','payload','.mp3','ted\x20conn','est\x20comp','\x20configu','path','video/x-','leted','logs:lis','ilConnec','CommandO','Unsuppor','ccept-ra','sync-bun','patch','reate','ustom-mo','setSetti','.wujieai','isabled','deleteFi','rayOnClo','audio/wa','parseInt','e\x20first.','red;\x20set','stion','getFocus','\x20main\x20bo','els','ishu-cha','/v2/claw','hatChann','content-','window:o','nectSess','nelSessi','te\x20compl','darwin','.flac','cle','custom\x20m','ectory','protocol','ion','nstall','-token','ist','setSelfO','image/jp','reasonin','hell:ipc','ocs','outputTe','\x20CLI\x20wra',':save-di','method','app:star','cron','descript','modelNam','e:open-d','.bmp','dAt','name','ested','meFilter','now','model-id','ted-stat','push','OPTIONS','dated','eam-even','\x20gone','audio/mp','disable','GET,\x20HEA','ready','-data','lect-fil','-port','models:c','dev','filePath','saveKdoc','tus','skills:s','s:reveal','rated-fi','sharedCo','canceled','file\x20rea','agent\x20de','y_name','handle','type','-request','ctory','window-a','d\x20reject','edWindow','dataDir','operated','eated','ector:\x20','getKdocs','agent','ls:list','uDocCliC','d\x20comple','emoji','uit','closeToT','atus','e\x20is\x20req','hideBySe','split','readConf','elected-','\x20file\x20pa','cron:rem','pen-devt','config:c','-by-sess','3RymdfN','agentId','string','logs\x20rep','mail','l\x20first','ged','nnel','gatewayT','t-messag','ompletio','oken','upload_f','platform','entries','files',':set-pin','ing','mport-zi','level','saveNetE','workspac','wujie-sh','test','ChannelC','invalid\x20','text/pla','ocess\x20go','ItemSett','customMo','odel\x20del','startsWi','logsDir','.mkv','upsert','les:reve'];_0x7a8d=function(){return _0x4fda0f;};return _0x7a8d();}import{deleteManagedSkill,importSkillZip,updateManagedSkillConfig}from'../skill-import.mjs';import{createGeneratedFilesStore}from'../generated-files-store.mjs';import{createProductPreferencesStore}from'../product-preferences-store.mjs';import{createAgentSessionsMapStore}from'../agent-sessions-map-store.mjs';import{createTerminalManager}from'../terminal-manager.mjs';import{createConnectorController}from'../connectors/connector-controller.mjs';import{createShellLogger,exportLogsArchive,summarizeError,summarizePayload,summarizeText,toHomePath}from'../logging.mjs';import{loadRuntimeInfo,prepareRuntime,resolveRuntimeRoot,runClawOnce}from'../runtime.mjs';const __dirname=dirname(fileURLToPath(import.meta.url)),preloadPath=join(__dirname,'preload.'+_0x48e3dc(0x40d)),{app,BrowserWindow,clipboard,dialog,globalShortcut,ipcMain,protocol,shell}=_0x5e0ff6,DEVTOOLS_ACCELERATOR=_0x48e3dc(0x26d)+_0x48e3dc(0x46d)+_0x48e3dc(0x334),CLAWSPACE_PROTOCOL_SCHEME=_0x48e3dc(0x4c8)+'e',DEBUG_STDOUT=process.env.WUJIE_SHELL_DEBUG==='1'||process.env.VITE_DEV_SERVER_URL||process.env.NODE_ENV!==_0x48e3dc(0x31f)+'on',LOCAL_FILE_MIME_TYPES=new Map([['.txt','text/pla'+_0x48e3dc(0x4c9)+_0x48e3dc(0x414)+'8'],[_0x48e3dc(0x212),_0x48e3dc(0x30c)+'kdown;\x20c'+_0x48e3dc(0x23d)+'tf-8'],['.jpg',_0x48e3dc(0x294)+'eg'],['.jpeg',_0x48e3dc(0x294)+'eg'],[_0x48e3dc(0x4dc),'image/pn'+'g'],[_0x48e3dc(0x20a),'image/gi'+'f'],[_0x48e3dc(0x2a1),_0x48e3dc(0x4aa)+'p'],[_0x48e3dc(0x3bc),_0x48e3dc(0x481)+'g+xml'],[_0x48e3dc(0x3a1),_0x48e3dc(0x34a)+'bp'],[_0x48e3dc(0x49f),_0x48e3dc(0x1e1)+'4'],[_0x48e3dc(0x448),_0x48e3dc(0x214)+_0x48e3dc(0x1fb)],['.avi','video/x-'+'msvideo'],[_0x48e3dc(0x301),_0x48e3dc(0x269)+_0x48e3dc(0x367)],[_0x48e3dc(0x229),_0x48e3dc(0x368)+'bm'],[_0x48e3dc(0x264),_0x48e3dc(0x2ae)+'eg'],[_0x48e3dc(0x486),_0x48e3dc(0x279)+'v'],['.m4a',_0x48e3dc(0x2ae)+'4'],['.aac',_0x48e3dc(0x3f4)+'c'],['.ogg',_0x48e3dc(0x4bb)+'g'],[_0x48e3dc(0x28a),'audio/fl'+'ac']]);protocol[_0x48e3dc(0x33a)+'SchemesA'+'sPrivile'+_0x48e3dc(0x2e6)]([{'scheme':CLAWSPACE_PROTOCOL_SCHEME,'privileges':{'secure':!![],'standard':!![],'supportFetchAPI':!![],'corsEnabled':!![]}}]);let mainWindow=null,shellConfig=null,configController=null,gatewayController=null,bootError=null,mainLogger=null,ipcLogger=null,filesLogger=null,rendererLogger=null,terminalManager=null,connectorController=null;function getMode(){const _0x55d88d=_0x48e3dc;return process.env.VITE_DEV_SERVER_URL?_0x55d88d(0x2b6):'prod';}function resolveProjectRoot(){return resolve(process.env.WUJIE_SHELL_PROJECT_ROOT||process['cwd']());}const MAX_STORED_FILE_SIZE=0x14*0x400*0x400;function getCanvasTempDir(){const _0x48af35=_0x48e3dc;return resolve(join(app[_0x48af35(0x1e7)]('temp'),'wujieai-'+'canvas'));}function getPersistentUploadDir(){const _0x3c7757=_0x48e3dc;return resolve(join(homedir(),_0x3c7757(0x275),_0x3c7757(0x443),_0x3c7757(0x39a)));}function getSafeStoredFileName(_0x1dd69a,_0x2d0104){const _0x59e337=_0x48e3dc,_0x1c8f6d=String(_0x1dd69a||_0x2d0104)[_0x59e337(0x1ce)](/[^a-zA-Z0-9_\-.]/g,'_')[_0x59e337(0x1ce)](/^\.+/,'_')[_0x59e337(0x47c)]();return _0x1c8f6d||_0x2d0104;}async function saveBase64File(_0x27a4c0,_0x3c2065){const _0x30af69=_0x48e3dc,_0x84caeb=String(_0x27a4c0?.[_0x30af69(0x23c)]||_0x3c2065[_0x30af69(0x1fc)+_0x30af69(0x371)]),_0x6b30e3=getSafeStoredFileName(_0x84caeb,_0x3c2065[_0x30af69(0x1fc)+_0x30af69(0x371)]),_0x52dcea=_0x3c2065[_0x30af69(0x498)]();await mkdir(_0x52dcea,{'recursive':!![]});const _0x510782=_0x3c2065[_0x30af69(0x23b)]?Date[_0x30af69(0x2a6)]()+'-'+_0x6b30e3:_0x6b30e3,_0x38f570=join(_0x52dcea,_0x510782);if(!resolve(_0x38f570)[_0x30af69(0x2ff)+'th'](_0x52dcea+sep))throw new Error(_0x30af69(0x2f9)+_0x3c2065[_0x30af69(0x1d9)]+(_0x30af69(0x2db)+'th'));const _0x54c757=String(_0x27a4c0?.[_0x30af69(0x1de)]||'')[_0x30af69(0x1ce)](/^data:[^;]+;base64,/,''),_0x1dee0e=Buffer[_0x30af69(0x25f)](_0x54c757,_0x30af69(0x1de));if(_0x1dee0e[_0x30af69(0x4b5)]>MAX_STORED_FILE_SIZE)throw new Error(_0x3c2065[_0x30af69(0x1d9)]+(_0x30af69(0x244)+_0x30af69(0x416)+'\x20')+_0x1dee0e['length']+(_0x30af69(0x34c)+_0x30af69(0x480))+MAX_STORED_FILE_SIZE+')');return await writeFile(_0x38f570,_0x1dee0e),_0x38f570;}function getLocalFileMimeType(_0x343d87){const _0x561989=_0x48e3dc;return LOCAL_FILE_MIME_TYPES[_0x561989(0x4ad)](_0x343d87['slice'](_0x343d87['lastInde'+_0x561989(0x4c7)]('.'))['toLowerC'+_0x561989(0x3c4)]())||_0x561989(0x330)+'ion/octe'+_0x561989(0x4cf);}function parseSingleRangeHeader(_0x43c151,_0x5b1b90){const _0x51e9da=_0x48e3dc,_0x233da7=/^bytes=(\d*)-(\d*)$/i[_0x51e9da(0x217)](_0x43c151[_0x51e9da(0x47c)]());if(!_0x233da7)return null;const [,_0x56e7af,_0x423180]=_0x233da7;if(!_0x56e7af&&!_0x423180)return null;if(!_0x56e7af){const _0x5e026f=Number[_0x51e9da(0x27a)](_0x423180,0xa);if(!Number['isFinite'](_0x5e026f)||_0x5e026f<=0x0)return null;const _0x4fa8c3=Math['max'](_0x5b1b90-_0x5e026f,0x0);return{'start':_0x4fa8c3,'end':_0x5b1b90-0x1};}const _0x45b6cb=Number[_0x51e9da(0x27a)](_0x56e7af,0xa);if(!Number[_0x51e9da(0x45a)](_0x45b6cb)||_0x45b6cb<0x0||_0x45b6cb>=_0x5b1b90)return null;const _0x332970=_0x423180?Number[_0x51e9da(0x27a)](_0x423180,0xa):_0x5b1b90-0x1;if(!Number['isFinite'](_0x332970)||_0x332970<_0x45b6cb)return null;return{'start':_0x45b6cb,'end':Math[_0x51e9da(0x497)](_0x332970,_0x5b1b90-0x1)};}function decodeClawspacePath(_0x276d19){const _0x2bbeed=_0x48e3dc;try{const _0x196e15=new URL(_0x276d19);if(_0x196e15[_0x2bbeed(0x28e)]!==CLAWSPACE_PROTOCOL_SCHEME+':')return null;if(_0x196e15[_0x2bbeed(0x1cd)]!=='local')return null;const _0x28d380=decodeURIComponent(_0x196e15[_0x2bbeed(0x1ed)]);if(!_0x28d380)return null;if(/^\/[A-Za-z]:\//[_0x2bbeed(0x2f7)](_0x28d380))return _0x28d380[_0x2bbeed(0x343)](0x1);return _0x28d380;}catch{return null;}}function createClawspaceHeaders(_0xc813e4={}){const _0x54030b=_0x48e3dc;return new Headers({'access-control-allow-origin':'*','access-control-allow-methods':_0x54030b(0x2b0)+_0x54030b(0x3b6)+'NS','access-control-allow-headers':_0x54030b(0x421)+_0x54030b(0x3b0)+_0x54030b(0x1fe),'access-control-expose-headers':_0x54030b(0x284)+_0x54030b(0x1ef)+_0x54030b(0x284)+'range,\x20a'+_0x54030b(0x26f)+_0x54030b(0x44a),..._0xc813e4});}function createLocalFileResponse(_0x67db33,_0x12c942){const _0x3b60b0=_0x48e3dc,_0x3470d4=statSync(_0x12c942);if(!_0x3470d4['isFile']())return new Response(_0x3b60b0(0x3dc)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':'text/pla'+_0x3b60b0(0x4c9)+_0x3b60b0(0x414)+'8'})});const _0x89007f=getLocalFileMimeType(_0x12c942),_0x304955=createClawspaceHeaders({'content-type':_0x89007f,'accept-ranges':_0x3b60b0(0x210),'cache-control':_0x3b60b0(0x391)});if(_0x67db33[_0x3b60b0(0x29b)]===_0x3b60b0(0x344))return _0x304955[_0x3b60b0(0x1fd)]('content-'+_0x3b60b0(0x4b5),String(_0x3470d4[_0x3b60b0(0x39d)])),new Response(null,{'status':0xc8,'headers':_0x304955});const _0x5132a9=_0x67db33[_0x3b60b0(0x1e9)]['get'](_0x3b60b0(0x3dd));if(!_0x5132a9)return _0x304955[_0x3b60b0(0x1fd)]('content-'+_0x3b60b0(0x4b5),String(_0x3470d4['size'])),new Response(Readable['toWeb'](createReadStream(_0x12c942)),{'status':0xc8,'headers':_0x304955});const _0x267c74=parseSingleRangeHeader(_0x5132a9,_0x3470d4[_0x3b60b0(0x39d)]);if(!_0x267c74)return new Response(null,{'status':0x1a0,'headers':createClawspaceHeaders({...Object[_0x3b60b0(0x3ac)+_0x3b60b0(0x490)](_0x304955['entries']()),'content-range':'bytes\x20*/'+_0x3470d4[_0x3b60b0(0x39d)]})});const {start:_0x4d3aa2,end:_0x592dcc}=_0x267c74,_0x5ea452=_0x592dcc-_0x4d3aa2+0x1,_0x90e2a=new Headers(_0x304955);return _0x90e2a['set'](_0x3b60b0(0x284)+_0x3b60b0(0x4b5),String(_0x5ea452)),_0x90e2a[_0x3b60b0(0x1fd)](_0x3b60b0(0x284)+'range',_0x3b60b0(0x21b)+_0x4d3aa2+'-'+_0x592dcc+'/'+_0x3470d4[_0x3b60b0(0x39d)]),new Response(Readable[_0x3b60b0(0x314)](createReadStream(_0x12c942,{'start':_0x4d3aa2,'end':_0x592dcc})),{'status':0xce,'headers':_0x90e2a});}function installClawspaceProtocolHandler(){protocol['handle'](CLAWSPACE_PROTOCOL_SCHEME,_0x3c2824=>{const _0x43636c=_0x5193;if(_0x3c2824['method']===_0x43636c(0x2aa))return new Response(null,{'status':0xcc,'headers':createClawspaceHeaders()});const _0x17fdfa=decodeClawspacePath(_0x3c2824[_0x43636c(0x34d)]);if(!_0x17fdfa)return new Response('Invalid\x20'+_0x43636c(0x4c8)+_0x43636c(0x49a),{'status':0x190,'headers':createClawspaceHeaders({'content-type':_0x43636c(0x2fa)+_0x43636c(0x4c9)+_0x43636c(0x414)+'8'})});if(!existsSync(_0x17fdfa))return new Response(_0x43636c(0x3dc)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x43636c(0x2fa)+'in;\x20char'+'set=utf-'+'8'})});return createLocalFileResponse(_0x3c2824,_0x17fdfa);});}function broadcast(_0xb26798,_0x3ecd85){const _0xad5e94=_0x48e3dc;DEBUG_STDOUT&&console[_0xad5e94(0x3cd)](_0xad5e94(0x25e)+_0xad5e94(0x413)+_0xad5e94(0x356),_0xb26798,summarizePayload(_0x3ecd85,{'maxDepth':0x2}));for(const _0x128cc9 of BrowserWindow[_0xad5e94(0x255)+_0xad5e94(0x401)]()){!_0x128cc9['webConte'+_0xad5e94(0x32c)]['isDestro'+_0xad5e94(0x1e5)]()&&_0x128cc9[_0xad5e94(0x47e)+_0xad5e94(0x32c)]['send'](_0xad5e94(0x2f6)+_0xad5e94(0x44f)+'t',{'name':_0xb26798,'payload':_0x3ecd85});}}function openDevToolsForActiveContext(){const _0x450fad=_0x48e3dc,_0x3435a4=BrowserWindow[_0x450fad(0x27e)+_0x450fad(0x2c8)]()||mainWindow;if(!_0x3435a4||_0x3435a4[_0x450fad(0x246)+'yed']())return{'ok':![]};return _0x3435a4['webConte'+_0x450fad(0x32c)][_0x450fad(0x1ea)+_0x450fad(0x41d)]({'mode':_0x450fad(0x437)}),_0x3435a4['webConte'+_0x450fad(0x32c)][_0x450fad(0x4c1)](_0x450fad(0x2f6)+_0x450fad(0x44f)+'t',{'name':_0x450fad(0x23a)+'-shortcu'+'t','payload':{'accelerator':DEVTOOLS_ACCELERATOR}}),{'ok':!![]};}function registerShellShortcuts(){const _0x53ddf7=_0x48e3dc;globalShortcut[_0x53ddf7(0x39f)+'er'](DEVTOOLS_ACCELERATOR);const _0x52f47e=globalShortcut[_0x53ddf7(0x33a)](DEVTOOLS_ACCELERATOR,openDevToolsForActiveContext);!_0x52f47e&&console[_0x53ddf7(0x3ef)](_0x53ddf7(0x25e)+'hell]\x20fa'+_0x53ddf7(0x431)+_0x53ddf7(0x33a)+_0x53ddf7(0x4b3)+_0x53ddf7(0x39b)+DEVTOOLS_ACCELERATOR);}async function getRuntimeResourceStatus(){const _0x3eb47d=_0x48e3dc;try{const _0x272e7a=await loadRuntimeInfo(shellConfig[_0x3eb47d(0x203)+_0x3eb47d(0x3c3)]),_0x1741d3=_0x272e7a[_0x3eb47d(0x412)]||{};return{'ok':!![],'runtimeRoot':_0x272e7a['runtimeR'+_0x3eb47d(0x3c3)],'openclawVersion':_0x272e7a[_0x3eb47d(0x3e8)+_0x3eb47d(0x338)],'generatedAt':_0x1741d3[_0x3eb47d(0x3d3)+_0x3eb47d(0x2a2)]||null,'pluginCount':Array[_0x3eb47d(0x43f)](_0x1741d3[_0x3eb47d(0x4b2)])?_0x1741d3[_0x3eb47d(0x4b2)][_0x3eb47d(0x4b5)]:0x0,'plugins':Array[_0x3eb47d(0x43f)](_0x1741d3[_0x3eb47d(0x4b2)])?_0x1741d3[_0x3eb47d(0x4b2)]:[],'agents':_0x1741d3['agents']||null,'skills':_0x1741d3[_0x3eb47d(0x348)]||null,'wrapper':_0x1741d3['wujiecla'+_0x3eb47d(0x230)]||null,'product':_0x1741d3[_0x3eb47d(0x4b1)]||null};}catch(_0x2125fe){return{'ok':![],'runtimeRoot':resolveRuntimeRoot(shellConfig?.[_0x3eb47d(0x203)+'oot']||resolveProjectRoot()),'error':_0x2125fe instanceof Error?_0x2125fe['message']:String(_0x2125fe)};}}async function reportLogs({description:description='',gateToken:gateToken=''}={}){const _0x1404b3=_0x48e3dc;let _0x391019='';const _0x52e680=Date[_0x1404b3(0x2a6)]();try{const _0x5765dd=await exportLogsArchive({'logsDir':configController[_0x1404b3(0x311)][_0x1404b3(0x300)],'targetDir':app['getPath'](_0x1404b3(0x3f7)),'appVersion':app[_0x1404b3(0x4d2)+'on']()});_0x391019=_0x5765dd[_0x1404b3(0x268)];const _0x2132de=await readFile(_0x391019),_0x5cbef1=new FormData();_0x5cbef1['append'](_0x1404b3(0x1d5),new Blob([_0x2132de],{'type':'applicat'+_0x1404b3(0x3fe)}),basename(_0x391019)),_0x5cbef1[_0x1404b3(0x22c)](_0x1404b3(0x483)+_0x1404b3(0x2c1),_0x1404b3(0x3ec)+'ent-logs');const _0x453112={};typeof gateToken===_0x1404b3(0x2e2)&&gateToken[_0x1404b3(0x47c)]()&&(_0x453112[_0x1404b3(0x20c)+'en']=gateToken[_0x1404b3(0x47c)]());const _0x5ec140=process.env.VITE_WUJIE_API_ENDPOINT||process.env.VITE_WUJIEAI_SERVER_URL||'';if(!_0x5ec140)throw new Error(_0x1404b3(0x1da)+'地址');const _0x489323=await fetch(_0x5ec140+(_0x1404b3(0x333)+_0x1404b3(0x262)+'ral/file'+_0x1404b3(0x215)),{'method':_0x1404b3(0x24b),'headers':_0x453112,'body':_0x5cbef1,'signal':AbortSignal[_0x1404b3(0x1e2)](0x3a98)}),_0x244597=await _0x489323[_0x1404b3(0x4da)]();let _0x4c7466={};try{_0x4c7466=JSON['parse'](_0x244597);}catch{throw new Error(_0x1404b3(0x382)+'TTP\x20'+_0x489323[_0x1404b3(0x4a3)]+')');}const _0x4ef2df=_0x4c7466?.[_0x1404b3(0x237)]===!![]||String(_0x4c7466?.[_0x1404b3(0x41a)])===_0x1404b3(0x310),_0xb09d03=_0x4c7466?.[_0x1404b3(0x403)];if(!_0x4ef2df||!_0xb09d03)throw new Error(_0x1404b3(0x382)+_0x1404b3(0x4bf)+_0x489323['status']+')');const _0x1e36be=await fetch(_0x5ec140+(_0x1404b3(0x333)+_0x1404b3(0x282)+_0x1404b3(0x24c)+_0x1404b3(0x482)),{'method':_0x1404b3(0x24b),'headers':{'Content-Type':_0x1404b3(0x330)+_0x1404b3(0x43e),..._0x453112},'body':JSON[_0x1404b3(0x324)+'y']({'packageUrl':_0xb09d03,'description':description}),'signal':AbortSignal['timeout'](0x3a98)});return mainLogger?.['info'](_0x1404b3(0x2e3)+_0x1404b3(0x1d1),{'durationMs':Date['now']()-_0x52e680,'uploadStatus':_0x489323[_0x1404b3(0x4a3)],'reportStatus':_0x1e36be[_0x1404b3(0x4a3)]}),!![];}catch(_0x2a8d83){mainLogger?.[_0x1404b3(0x3ed)]('logs\x20rep'+_0x1404b3(0x1ec)+'ed',{'durationMs':Date[_0x1404b3(0x2a6)]()-_0x52e680,'error':_0x2a8d83});throw _0x2a8d83;}finally{if(_0x391019)await rm(_0x391019,{'force':!![]})[_0x1404b3(0x373)](()=>{});}}async function createWindow(){const _0x412c37=_0x48e3dc,_0x36fd78=process.env.VITE_DEV_SERVER_URL||join(shellConfig[_0x412c37(0x203)+_0x412c37(0x3c3)],_0x412c37(0x387),_0x412c37(0x3f9)+'ml'),_0x10b731=process[_0x412c37(0x2ed)]===_0x412c37(0x289);mainLogger?.[_0x412c37(0x3cd)]('creating'+_0x412c37(0x40a)+_0x412c37(0x49c),{'rendererUrl':_0x36fd78,'mode':getMode()}),mainWindow=new BrowserWindow({'width':0x49c,'height':0x30c,'minWidth':0x384,'minHeight':0x26c,'title':shellConfig[_0x412c37(0x44d)+_0x412c37(0x226)],'backgroundColor':_0x10b731?_0x412c37(0x23f)+'0':_0x412c37(0x248),'titleBarStyle':_0x10b731?'hiddenIn'+_0x412c37(0x1fd):_0x412c37(0x335),..._0x10b731?{'trafficLightPosition':{'x':0x12,'y':0x16}}:{},..._0x10b731?{'vibrancy':'sidebar'}:{},'webPreferences':{'preload':preloadPath,'contextIsolation':!![],'nodeIntegration':![],'sandbox':![]}}),mainWindow[_0x412c37(0x47e)+'nts']['on'](_0x412c37(0x485)+_0x412c37(0x423)+'nt',_0x22d881=>{const _0x480bca=_0x412c37,_0x305c3a=_0x22d881[_0x480bca(0x40e)];if(!_0x305c3a||_0x305c3a[_0x480bca(0x2c3)]!==_0x480bca(0x257))return;const _0x26a6e0=String(_0x305c3a['key']||'')[_0x480bca(0x3e2)+_0x480bca(0x3c4)](),_0x284c0a=_0x26a6e0==='r',_0x5688d0=process[_0x480bca(0x2ed)]===_0x480bca(0x289)?_0x305c3a['meta']===!![]:_0x305c3a['control']===!![];if(!_0x284c0a||!_0x5688d0)return;_0x22d881['preventD'+_0x480bca(0x436)](),broadcast('tabs-com'+_0x480bca(0x4cd),{'type':_0x480bca(0x200)+'on','action':_0x480bca(0x369)});});const _0x5b4892=process.env.VITE_DEV_SERVER_URL;_0x5b4892?(await mainWindow['loadURL'](_0x5b4892),process.env.WUJIE_SHELL_OPEN_DEVTOOLS==='1'&&mainWindow[_0x412c37(0x47e)+'nts'][_0x412c37(0x1ea)+_0x412c37(0x41d)]({'mode':_0x412c37(0x437)})):await mainWindow[_0x412c37(0x34f)](join(shellConfig[_0x412c37(0x203)+_0x412c37(0x3c3)],_0x412c37(0x387),_0x412c37(0x3f9)+'ml')),mainLogger?.['info'](_0x412c37(0x459)+_0x412c37(0x441)+'ed',{'rendererUrl':_0x36fd78,'mode':getMode()});}function installIpcHandlers(){const _0x2aee76=_0x48e3dc,_0x449ad2=(_0x13bafb,_0x50981b)=>{const _0x20ac39=_0x5193;ipcMain[_0x20ac39(0x2c2)](_0x13bafb,async(_0x44bc6b,_0x18ba54)=>{const _0x57cc4a=_0x20ac39,_0x77d188=Date['now'](),_0x384283=_0x44bc6b[_0x57cc4a(0x261)+_0x57cc4a(0x226)]?.['url']||_0x44bc6b[_0x57cc4a(0x206)][_0x57cc4a(0x20e)]();ipcLogger?.[_0x57cc4a(0x3cd)](_0x57cc4a(0x467)+_0x57cc4a(0x32b)+_0x57cc4a(0x202),{'channel':_0x13bafb,'senderUrl':_0x384283,'payload':summarizePayload(_0x18ba54)});DEBUG_STDOUT&&console[_0x57cc4a(0x3cd)]('[wujie-s'+_0x57cc4a(0x296)+']',_0x13bafb,_0x57cc4a(0x47f),summarizePayload(_0x18ba54));try{const _0x166244=await _0x50981b(_0x44bc6b,_0x18ba54);return ipcLogger?.[_0x57cc4a(0x3cd)](_0x57cc4a(0x467)+_0x57cc4a(0x266)+_0x57cc4a(0x26a),{'channel':_0x13bafb,'durationMs':Date[_0x57cc4a(0x2a6)]()-_0x77d188,'result':summarizePayload(_0x166244,{'maxDepth':0x2})}),DEBUG_STDOUT&&console['info'](_0x57cc4a(0x25e)+'hell:ipc'+']',_0x13bafb,'complete'+'d',summarizePayload(_0x166244,{'maxDepth':0x2})),_0x166244;}catch(_0x1481a2){ipcLogger?.[_0x57cc4a(0x3ed)](_0x57cc4a(0x467)+_0x57cc4a(0x4d4)+'ed',{'channel':_0x13bafb,'durationMs':Date[_0x57cc4a(0x2a6)]()-_0x77d188,'error':summarizeError(_0x1481a2)});DEBUG_STDOUT&&console['error'](_0x57cc4a(0x25e)+'hell:ipc'+']',_0x13bafb,_0x57cc4a(0x466),summarizeError(_0x1481a2));throw _0x1481a2;}});},_0x5d5867=()=>{const _0x4f7051=_0x5193;if(!gatewayController)throw new Error(bootError?_0x4f7051(0x2f6)+_0x4f7051(0x442)+'\x20failed:'+'\x20'+bootError:_0x4f7051(0x2f6)+_0x4f7051(0x306)+'way\x20is\x20n'+_0x4f7051(0x3c8)+_0x4f7051(0x1f7));return gatewayController;};_0x449ad2('app:info',async()=>({'name':shellConfig[_0x2aee76(0x44d)+'ame'],'version':app[_0x2aee76(0x4d2)+'on'](),'appId':shellConfig[_0x2aee76(0x1f2)],'dataDir':shellConfig[_0x2aee76(0x2c9)]})),_0x449ad2('app:open'+_0x2aee76(0x3de),async(_0x69b6e6,_0x2a71a0)=>{const _0x2fc95f=_0x2aee76,_0x4a6452=typeof _0x2a71a0===_0x2fc95f(0x2e2)?_0x2a71a0:'';if(!_0x4a6452)return{'ok':![]};return filesLogger?.[_0x2fc95f(0x3cd)](_0x2fc95f(0x4b7)+'ernal\x20ur'+_0x2fc95f(0x245)+'ted',{'url':summarizeText(_0x4a6452,0xa0)}),await shell[_0x2fc95f(0x3aa)+_0x2fc95f(0x305)](_0x4a6452),{'ok':!![]};});const _0x1f362a=async()=>({...await configController[_0x2aee76(0x2d9)+_0x2aee76(0x46a)+_0x2aee76(0x316)]()[_0x2aee76(0x373)](()=>({}))}),_0x15b776=async(_0x104940,_0x3fcb59)=>{const _0x2728b8=_0x2aee76;return configController[_0x2728b8(0x258)+_0x2728b8(0x499)+_0x2728b8(0x253)+_0x2728b8(0x3e5)](),await configController['writeCon'+_0x2728b8(0x362)](_0x104940,_0x3fcb59),{'ok':!![]};},_0x5340ce=_0x50934f=>{const _0x862594=_0x2aee76,_0xa36b0b=_0x50934f[_0x862594(0x35e)]&&typeof _0x50934f[_0x862594(0x35e)]===_0x862594(0x33e)?_0x50934f['models']:{};return Array['isArray'](_0xa36b0b[_0x862594(0x2fd)+'dels'])?_0xa36b0b[_0x862594(0x2fd)+_0x862594(0x415)]:[];},_0x5a43b7=async(_0x5bf824,_0x186ee3)=>{const _0x35c4d3=_0x2aee76,_0x2fcf4c=await _0x1f362a(),_0x17e23e=_0x2fcf4c[_0x35c4d3(0x35e)]&&typeof _0x2fcf4c[_0x35c4d3(0x35e)]===_0x35c4d3(0x33e)?_0x2fcf4c[_0x35c4d3(0x35e)]:{},_0x34d27a=_0x17e23e[_0x35c4d3(0x428)+'s']&&typeof _0x17e23e[_0x35c4d3(0x428)+'s']===_0x35c4d3(0x33e)?_0x17e23e[_0x35c4d3(0x428)+'s']:{};for(const _0x4c53bb of _0x5bf824){if(!_0x4c53bb?.['id'])continue;_0x34d27a[_0x4c53bb['id']]={..._0x34d27a[_0x4c53bb['id']]||{},'apiKey':_0x4c53bb['apiKey']||'','api':_0x4c53bb['protocol']==='anthropi'+'c'?'anthropi'+'c-messag'+'es':_0x35c4d3(0x3ca)+_0x35c4d3(0x2ea)+'ns',..._0x4c53bb[_0x35c4d3(0x1d6)]?{'baseUrl':_0x4c53bb['baseUrl']}:{},'models':[{'id':_0x4c53bb[_0x35c4d3(0x29f)+'e'],'name':_0x4c53bb[_0x35c4d3(0x29f)+'e'],'reasoning':!![],'input':[_0x35c4d3(0x4da)],'cost':{'input':0x0,'output':0x0,'cacheRead':0x0,'cacheWrite':0x0},'contextWindow':0x3e800,'maxTokens':0x3e800}]};}const _0x24b3d8=new Set(_0x5bf824['map'](_0x5ca315=>_0x5ca315?.['id'])[_0x35c4d3(0x339)](Boolean));for(const _0x1cbb0c of Object[_0x35c4d3(0x36d)](_0x34d27a)){const _0x512bc6=_0x5340ce(_0x2fcf4c)[_0x35c4d3(0x4ce)](_0x15fb3e=>_0x15fb3e?.['id']===_0x1cbb0c);if(_0x512bc6&&!_0x24b3d8[_0x35c4d3(0x440)](_0x1cbb0c))delete _0x34d27a[_0x1cbb0c];}return _0x17e23e['provider'+'s']=_0x34d27a,_0x17e23e[_0x35c4d3(0x2fd)+_0x35c4d3(0x415)]=_0x5bf824,_0x2fcf4c[_0x35c4d3(0x35e)]=_0x17e23e,await _0x15b776(_0x2fcf4c,_0x186ee3),_0x5bf824;},_0x408ccb=_0x253fe7=>{const _0x64e507=_0x2aee76,_0xebe563=_0x253fe7['agents']&&typeof _0x253fe7[_0x64e507(0x3d9)]===_0x64e507(0x33e)?_0x253fe7[_0x64e507(0x3d9)]:{};return Array[_0x64e507(0x43f)](_0xebe563['list'])?_0xebe563[_0x64e507(0x35d)]:[];},_0x1f3d49=_0x42169=>{const _0x9f77f8=_0x2aee76,_0x22f622=typeof _0x42169===_0x9f77f8(0x2e2)?_0x42169[_0x9f77f8(0x47c)]():'',_0x2a778d=_0x22f622[_0x9f77f8(0x468)](/^agent:([^:]+):/);return _0x2a778d?.[0x1]||'';},_0x4f1b53=(_0x3f7a4a={},_0x12c8d6=[])=>{const _0x2025e3=_0x2aee76,_0x13042c=Array['isArray'](_0x3f7a4a[_0x2025e3(0x3d9)])?_0x3f7a4a[_0x2025e3(0x3d9)]:Array[_0x2025e3(0x43f)](_0x3f7a4a[_0x2025e3(0x35d)])?_0x3f7a4a['list']:[],_0x137885=Array[_0x2025e3(0x43f)](_0x12c8d6)?_0x12c8d6:[];return _0x13042c[_0x2025e3(0x457)](_0x47c838=>{const _0x5a044d=_0x2025e3,_0x59f59b=String(_0x47c838?.['id']||_0x47c838?.[_0x5a044d(0x2e1)]||'')['trim']();return{'agent':_0x47c838,'sessions':_0x59f59b?_0x137885['filter'](_0x456f87=>{const _0x170a2b=_0x5a044d,_0x28e3a5=String(_0x456f87?.[_0x170a2b(0x2e1)]||_0x456f87?.['agent_id']||_0x456f87?.[_0x170a2b(0x2ce)]?.['id']||_0x1f3d49(_0x456f87?.['key'])||'')['trim']();return _0x28e3a5?_0x28e3a5===_0x59f59b:_0x59f59b===_0x170a2b(0x21c);}):[]};});},_0x4e6f19=_0x47afe4=>{const _0x283caa=_0x2aee76;if(typeof _0x47afe4===_0x283caa(0x2e2))return _0x47afe4;if(!Array[_0x283caa(0x43f)](_0x47afe4))return'';return _0x47afe4[_0x283caa(0x457)](_0x394433=>{const _0x3e5325=_0x283caa;if(typeof _0x394433===_0x3e5325(0x2e2))return _0x394433;if(!_0x394433||typeof _0x394433!=='object')return'';const _0x3d0f83=typeof _0x394433['type']===_0x3e5325(0x2e2)?_0x394433[_0x3e5325(0x2c3)]['toLowerC'+_0x3e5325(0x3c4)]():'';if(_0x3d0f83&&_0x3d0f83!=='text'&&_0x3d0f83!==_0x3e5325(0x3b7)+_0x3e5325(0x426)&&_0x3d0f83!==_0x3e5325(0x24f))return'';for(const _0x21fe7c of[_0x3e5325(0x4da),_0x3e5325(0x24f),_0x3e5325(0x1dc),_0x3e5325(0x298)+'xt',_0x3e5325(0x3b7)+_0x3e5325(0x426)]){if(typeof _0x394433[_0x21fe7c]===_0x3e5325(0x2e2))return _0x394433[_0x21fe7c];}return'';})[_0x283caa(0x4c0)]('');},_0x5d6263=_0x66f413=>{const _0x13a743=_0x2aee76,_0x38d4c9=_0x66f413['connecto'+'rs']&&typeof _0x66f413[_0x13a743(0x3f3)+'rs']===_0x13a743(0x33e)?_0x66f413[_0x13a743(0x3f3)+'rs']:{},_0x2bde3e=_0x66f413[_0x13a743(0x238)+'ls']&&typeof _0x66f413[_0x13a743(0x238)+'ls']===_0x13a743(0x33e)?_0x66f413['imChanne'+'ls']:_0x66f413[_0x13a743(0x370)+_0x13a743(0x280)]&&typeof _0x66f413[_0x13a743(0x370)+_0x13a743(0x280)]===_0x13a743(0x33e)?_0x66f413[_0x13a743(0x370)+_0x13a743(0x280)]:{};return{'connectors':_0x38d4c9,'channels':_0x2bde3e};};_0x449ad2(_0x2aee76(0x34e)+'te:get-s'+_0x2aee76(0x3f8),async()=>({'status':_0x2aee76(0x46b)})),_0x449ad2(_0x2aee76(0x34e)+_0x2aee76(0x308),async()=>({'status':'idle','updateAvailable':![]})),_0x449ad2('app:upda'+_0x2aee76(0x3ad)+_0x2aee76(0x3d4),async()=>({'status':_0x2aee76(0x46b),'downloaded':![]})),_0x449ad2(_0x2aee76(0x34e)+_0x2aee76(0x383)+'and-inst'+_0x2aee76(0x3a2),async()=>({'ok':![],'reason':_0x2aee76(0x4a5)+'e'})),_0x449ad2(_0x2aee76(0x211)+':choose',async(_0x14eedb,_0x291088={})=>{const _0x20baed=_0x2aee76,_0x170eb1=await dialog[_0x20baed(0x25d)+_0x20baed(0x458)](BrowserWindow[_0x20baed(0x3e4)+_0x20baed(0x49e)](_0x14eedb[_0x20baed(0x206)])??mainWindow,{'properties':[_0x20baed(0x455),..._0x291088?.['limit']!==0x1?[_0x20baed(0x491)+_0x20baed(0x304)]:[]],'filters':_0x291088?.[_0x20baed(0x231)+'meFilter'+'s']?[{'name':_0x20baed(0x345),'extensions':_0x291088[_0x20baed(0x231)+_0x20baed(0x2a5)+'s']}]:undefined});return _0x170eb1[_0x20baed(0x2b7)+'s'][_0x20baed(0x457)](_0xa094a3=>({'path':_0xa094a3,'name':_0xa094a3[_0x20baed(0x2d8)](/[\\/]/)['pop']()||_0xa094a3}));}),_0x449ad2('app:file'+':save-te'+'mp',async(_0x18f9b4,_0x5ac542={})=>{const _0x469b45=_0x2aee76,_0x3f32d6=Date['now'](),_0x36b83d=await saveBase64File(_0x5ac542,{'kind':_0x469b45(0x3f7),'fallbackName':_0x469b45(0x3e3)+'e','dir':getCanvasTempDir,'unique':![]}),_0x3b2110=await stat(_0x36b83d)[_0x469b45(0x373)](()=>null);return filesLogger?.['info'](_0x469b45(0x241)+_0x469b45(0x3ee),{'path':toHomePath(_0x36b83d),'bytes':_0x3b2110?.[_0x469b45(0x39d)]??0x0,'durationMs':Date[_0x469b45(0x2a6)]()-_0x3f32d6}),_0x36b83d;}),_0x449ad2('app:file'+':save-up'+_0x2aee76(0x3c0),async(_0x2ebc3a,_0x2a360c={})=>{const _0x581274=_0x2aee76,_0x189fd2=Date[_0x581274(0x2a6)](),_0x2f108e=await saveBase64File(_0x2a360c,{'kind':_0x581274(0x3c6),'fallbackName':_0x581274(0x2ec)+_0x581274(0x4d9),'dir':getPersistentUploadDir,'unique':!![]}),_0x370b7d=await stat(_0x2f108e)[_0x581274(0x373)](()=>null);return filesLogger?.[_0x581274(0x3cd)]('upload\x20f'+'ile\x20save'+'d',{'path':toHomePath(_0x2f108e),'bytes':_0x370b7d?.[_0x581274(0x39d)]??0x0,'durationMs':Date[_0x581274(0x2a6)]()-_0x189fd2}),_0x2f108e;}),_0x449ad2('app:file'+_0x2aee76(0x44b)+_0x2aee76(0x4b8),async(_0x3660dd,_0x171a3d={})=>{const _0x2f8476=_0x2aee76,_0x1f1360=String(_0x171a3d['sourcePa'+'th']||'');if(!_0x1f1360)return{'success':![],'error':_0x2f8476(0x32e)+'th\x20is\x20re'+'quired'};const _0x449a24=await dialog[_0x2f8476(0x473)+_0x2f8476(0x458)](mainWindow,{'defaultPath':_0x171a3d[_0x2f8476(0x422)+_0x2f8476(0x47d)]||_0x1f1360[_0x2f8476(0x2d8)](/[\\/]/)[_0x2f8476(0x1f1)]()});if(_0x449a24[_0x2f8476(0x2be)]||!_0x449a24[_0x2f8476(0x2b7)])return{'success':![],'canceled':!![]};const {copyFile:_0x12e087}=await import(_0x2f8476(0x3d5)+_0x2f8476(0x454));return await _0x12e087(_0x1f1360,_0x449a24[_0x2f8476(0x2b7)]),{'success':!![],'filePath':_0x449a24['filePath']};});const _0x122d76=createGeneratedFilesStore({'stateDir':configController[_0x2aee76(0x4b9)+'tateDir']()});_0x449ad2(_0x2aee76(0x445)+'rated-fi'+_0x2aee76(0x462),async()=>_0x122d76[_0x2aee76(0x35d)]()),_0x449ad2(_0x2aee76(0x445)+_0x2aee76(0x2bc)+_0x2aee76(0x30d)+'rt',async(_0x57a095,_0x3886c7={})=>_0x122d76['upsert'](_0x3886c7)),_0x449ad2(_0x2aee76(0x445)+_0x2aee76(0x2bc)+'les:hide',async(_0x48a722,_0x22df73)=>_0x122d76[_0x2aee76(0x3c9)](String(_0x22df73||''))),_0x449ad2(_0x2aee76(0x445)+_0x2aee76(0x2bc)+'les:hide'+_0x2aee76(0x2df)+'ion',async(_0x23be37,_0xf6a21e)=>_0x122d76[_0x2aee76(0x2d7)+_0x2aee76(0x321)](String(_0xf6a21e||''))),_0x449ad2(_0x2aee76(0x445)+'rated-fi'+_0x2aee76(0x4d7)+'te',async(_0x4f985d,_0x249718)=>_0x122d76[_0x2aee76(0x277)+'le'](String(_0x249718||''))),_0x449ad2('app:gene'+_0x2aee76(0x2bc)+_0x2aee76(0x4d7)+_0x2aee76(0x2a8)+'e',async(_0x2dfd6d,_0xd24d70=[])=>_0x122d76[_0x2aee76(0x44e)+_0x2aee76(0x3f8)](_0xd24d70)),_0x449ad2(_0x2aee76(0x445)+'rated-fi'+_0x2aee76(0x303)+'al',async(_0xea3d13,_0x263a05)=>{const _0x2ad47c=_0x2aee76,_0x137882=await shell[_0x2ad47c(0x216)](String(_0x263a05||''));return{'ok':!_0x137882,'error':_0x137882||undefined};}),_0x449ad2(_0x2aee76(0x41f)+_0x2aee76(0x418),async()=>_0x122d76[_0x2aee76(0x35d)]()),_0x449ad2(_0x2aee76(0x41f)+_0x2aee76(0x452),async(_0x483d9c,_0x10096c={})=>_0x122d76[_0x2aee76(0x302)](_0x10096c)),_0x449ad2(_0x2aee76(0x41f)+'s:hide',async(_0x3dace6,_0x28b4a5={})=>_0x122d76[_0x2aee76(0x3c9)](String(_0x28b4a5['id']||_0x28b4a5||''))),_0x449ad2(_0x2aee76(0x41f)+_0x2aee76(0x1f3),async(_0x152a5f,_0x4316e3={})=>_0x122d76[_0x2aee76(0x277)+'le'](String(_0x4316e3['id']||_0x4316e3||''))),_0x449ad2(_0x2aee76(0x41f)+_0x2aee76(0x1f3)+'d-state',async(_0x5166e1,_0x518de3={})=>_0x122d76[_0x2aee76(0x44e)+_0x2aee76(0x3f8)](_0x518de3[_0x2aee76(0x311)]||_0x518de3)),_0x449ad2('artifact'+_0x2aee76(0x2bb),async(_0x17387f,_0x4f9357={})=>{const _0x1e7b81=_0x2aee76,_0xb6d37=typeof _0x4f9357===_0x1e7b81(0x2e2)?_0x4f9357:_0x4f9357['path']||_0x4f9357[_0x1e7b81(0x1f5)],_0x45bda4=await shell[_0x1e7b81(0x216)](String(_0xb6d37||''));return{'ok':!_0x45bda4,'error':_0x45bda4||undefined};}),_0x449ad2('app:clip'+_0x2aee76(0x1f0)+_0x2aee76(0x3a5),async(_0x5870f0,_0x342e70)=>{const _0x1333a1=_0x2aee76;return clipboard[_0x1333a1(0x3cb)+'t'](String(_0x342e70??'')),{'ok':!![]};}),_0x449ad2(_0x2aee76(0x1d7)+'em:resta'+'rt',async()=>{const _0x496f0c=_0x2aee76;return app[_0x496f0c(0x4cc)](),app['quit'](),{'ok':!![]};}),_0x449ad2(_0x2aee76(0x4b4)+_0x2aee76(0x36b)+_0x2aee76(0x3e9),_0x27e899=>Boolean(BrowserWindow['fromWebC'+_0x2aee76(0x49e)](_0x27e899[_0x2aee76(0x206)])?.[_0x2aee76(0x479)+'zed']()));const _0x5a0e02=createProductPreferencesStore({'stateDir':configController[_0x2aee76(0x4b9)+'tateDir']()});_0x449ad2('app:star'+_0x2aee76(0x411),async(_0x485239,_0x2212c0)=>{const _0x8556c=_0x2aee76;return app[_0x8556c(0x3f1)+'ItemSett'+_0x8556c(0x233)]({'openAtLogin':_0x2212c0===!![]}),{'ok':!![],'enabled':_0x2212c0===!![]};}),_0x449ad2(_0x2aee76(0x29c)+'tup:get',async()=>app[_0x2aee76(0x4a4)+_0x2aee76(0x2fc)+'ings']()[_0x2aee76(0x475)+_0x2aee76(0x1e0)]),_0x449ad2(_0x2aee76(0x220)+_0x2aee76(0x44c)+'se',async()=>_0x5a0e02['get'](_0x2aee76(0x2d4)+_0x2aee76(0x278)+'se',![])),_0x449ad2(_0x2aee76(0x220)+_0x2aee76(0x396)+'se',async(_0x34bc51,_0x22c6be)=>_0x5a0e02[_0x2aee76(0x1fd)](_0x2aee76(0x2d4)+_0x2aee76(0x278)+'se',_0x22c6be===!![])),_0x449ad2(_0x2aee76(0x211)+_0x2aee76(0x208)+'folder',async _0x3d15e0=>{const _0x4f6be4=_0x2aee76,_0x4db193=await dialog['showOpen'+'Dialog'](BrowserWindow[_0x4f6be4(0x3e4)+_0x4f6be4(0x49e)](_0x3d15e0[_0x4f6be4(0x206)])??mainWindow,{'properties':[_0x4f6be4(0x400)+'ctory']});return _0x4db193[_0x4f6be4(0x2b7)+'s'][0x0]||'';}),_0x449ad2('app:syst'+'em:open-'+_0x2aee76(0x4a2),async(_0x5df2fa,_0x517f0f)=>{const _0x72cf0=_0x2aee76,_0x4948cd=await shell[_0x72cf0(0x216)](String(_0x517f0f||''));return _0x4948cd||'';}),_0x449ad2(_0x2aee76(0x232)+_0x2aee76(0x41c),async(_0x1a52fc,_0x3d9e6)=>{const _0x2cd7be=_0x2aee76;return rendererLogger?.[_0x2cd7be(0x3cd)]('renderer'+_0x2cd7be(0x377)+_0x2cd7be(0x36e)+_0x2cd7be(0x2a4),{'description':summarizeText(String(_0x3d9e6||''),0xa0)}),!![];}),_0x449ad2(_0x2aee76(0x3e8)+_0x2aee76(0x1f9)+_0x2aee76(0x291),async()=>_0x5d5867()[_0x2aee76(0x2e8)+'oken']()),_0x449ad2(_0x2aee76(0x3e8)+':gateway'+_0x2aee76(0x2b4),async()=>_0x5d5867()[_0x2aee76(0x48b)+'ort']()),_0x449ad2('openclaw'+':run-onc'+'e',async(_0x11fbe4,_0x28a34d=[])=>{const _0x21c6f2=_0x2aee76,_0x518ca6=await runClawOnce(shellConfig[_0x21c6f2(0x203)+_0x21c6f2(0x3c3)],Array[_0x21c6f2(0x43f)](_0x28a34d)?_0x28a34d:[]);return{'ok':_0x518ca6[_0x21c6f2(0x41a)]===0x0,..._0x518ca6};}),_0x449ad2(_0x2aee76(0x2b5)+_0x2aee76(0x273)+'dels:sav'+'e',async(_0x2b736f,_0x4b3bb0={})=>{const _0x5048b6=_0x2aee76,_0x3acbbb=String(_0x4b3bb0['id']||'')[_0x5048b6(0x47c)]();if(!_0x3acbbb)throw new Error(_0x5048b6(0x28c)+'odel\x20id\x20'+_0x5048b6(0x4d1)+_0x5048b6(0x1e3));const _0x364805=await _0x1f362a(),_0x7b1d78=_0x5340ce(_0x364805),_0x574a78={'id':_0x3acbbb,'modelName':String(_0x4b3bb0[_0x5048b6(0x29f)+'e']||'')[_0x5048b6(0x47c)](),'provider':String(_0x4b3bb0['provider']||_0x5048b6(0x3a9)),..._0x4b3bb0[_0x5048b6(0x428)+_0x5048b6(0x371)]?{'providerName':String(_0x4b3bb0[_0x5048b6(0x428)+_0x5048b6(0x371)])}:{},..._0x4b3bb0[_0x5048b6(0x4b6)+'oviderNa'+'me']?{'customProviderName':String(_0x4b3bb0[_0x5048b6(0x4b6)+_0x5048b6(0x239)+'me'])}:{},'apiKey':String(_0x4b3bb0[_0x5048b6(0x4c4)]||''),'protocol':_0x4b3bb0[_0x5048b6(0x28e)]===_0x5048b6(0x3fa)+'c'?_0x5048b6(0x3fa)+'c':_0x5048b6(0x4d8),'baseUrl':String(_0x4b3bb0[_0x5048b6(0x1d6)]||'')};if(!_0x574a78[_0x5048b6(0x29f)+'e'])throw new Error(_0x5048b6(0x28c)+_0x5048b6(0x3e7)+_0x5048b6(0x2d6)+_0x5048b6(0x374));const _0x957355=_0x7b1d78['some'](_0x14e322=>_0x14e322?.['id']===_0x3acbbb)?_0x7b1d78[_0x5048b6(0x457)](_0x4b603f=>_0x4b603f?.['id']===_0x3acbbb?_0x574a78:_0x4b603f):[..._0x7b1d78,_0x574a78];return await _0x5a43b7(_0x957355,_0x5048b6(0x28c)+_0x5048b6(0x389)+'ed'),{'ok':!![],'model':_0x574a78,'models':_0x957355};}),_0x449ad2(_0x2aee76(0x2b5)+'ustom-mo'+_0x2aee76(0x318)+_0x2aee76(0x488),async(_0x10ea37,_0x12c41b={})=>{const _0x7a6628=_0x2aee76,_0x37e835=String(_0x12c41b['id']||_0x12c41b[_0x7a6628(0x4d0)]||'')[_0x7a6628(0x47c)]();if(!_0x37e835)throw new Error(_0x7a6628(0x28c)+_0x7a6628(0x493)+_0x7a6628(0x4d1)+_0x7a6628(0x1e3));const _0xc520e1=await _0x1f362a(),_0x31bbe0=_0x5340ce(_0xc520e1),_0xebc4ab=_0x31bbe0[_0x7a6628(0x339)](_0x9b7e3a=>_0x9b7e3a?.['id']!==_0x37e835);return await _0x5a43b7(_0xebc4ab,_0x7a6628(0x28c)+_0x7a6628(0x2fe)+_0x7a6628(0x358)),_0x12c41b[_0x7a6628(0x1fc)+_0x7a6628(0x4d6)+_0x7a6628(0x3ba)]&&await configController[_0x7a6628(0x3d8)+_0x7a6628(0x469)](_0x12c41b[_0x7a6628(0x1fc)+'ModelSet'+'tings'],{'restartOnChange':!![]}),{'ok':!![],'id':_0x37e835,'models':_0xebc4ab,'modelRef':_0x12c41b[_0x7a6628(0x1fc)+_0x7a6628(0x4d6)+_0x7a6628(0x3ba)]?.[_0x7a6628(0x29f)+'e']};}),_0x449ad2('sessions'+_0x2aee76(0x45b),async(_0x59b9e6,_0x2d9ec3={})=>_0x5d5867()[_0x2aee76(0x4ac)][_0x2aee76(0x366)]({..._0x2d9ec3,'parentSessionKey':_0x2d9ec3[_0x2aee76(0x219)+'ssionKey']||_0x2d9ec3['sessionK'+'ey']}));const _0xc1fcbf=createAgentSessionsMapStore({'stateDir':configController[_0x2aee76(0x4b9)+_0x2aee76(0x352)]()});_0x449ad2('sessions'+_0x2aee76(0x319)+_0x2aee76(0x381),async(_0x2563a4,_0x563363={})=>_0xc1fcbf[_0x2aee76(0x4ad)](_0x563363)),_0x449ad2(_0x2aee76(0x4ac)+_0x2aee76(0x319)+'ap:upser'+'t',async(_0x5476a5,_0x1940e6={})=>_0xc1fcbf[_0x2aee76(0x302)](_0x1940e6)),_0x449ad2(_0x2aee76(0x3c5)+_0x2aee76(0x272),async(_0x13bd2a,_0x239410={})=>{const _0x3470d0=_0x2aee76,_0x3e7e32=await _0x1f362a(),_0xa145=_0x3e7e32[_0x3470d0(0x3d9)]&&typeof _0x3e7e32[_0x3470d0(0x3d9)]==='object'?_0x3e7e32['agents']:{},_0x192ac0=_0x408ccb(_0x3e7e32),_0xe583fb=String(_0x239410['id']||_0x239410['name']||_0x3470d0(0x252)+Date[_0x3470d0(0x2a6)]())[_0x3470d0(0x47c)]()['replace'](/\s+/g,'-'),_0xc8f020={'id':_0xe583fb,'name':String(_0x239410[_0x3470d0(0x2a3)]||_0xe583fb),..._0x239410['workspac'+'e']?{'workspace':String(_0x239410[_0x3470d0(0x2f5)+'e'])}:{},..._0x239410[_0x3470d0(0x409)]?{'model':_0x239410[_0x3470d0(0x409)]}:{},..._0x239410[_0x3470d0(0x2d2)]?{'emoji':_0x239410[_0x3470d0(0x2d2)]}:{},..._0x239410['avatar']?{'avatar':_0x239410[_0x3470d0(0x364)]}:{},...Array['isArray'](_0x239410[_0x3470d0(0x348)])?{'skills':_0x239410['skills']}:{}};if(_0x192ac0['some'](_0x198d5f=>_0x198d5f?.['id']===_0xe583fb))throw new Error(_0x3470d0(0x380)+_0x3470d0(0x4c5)+'ists');return _0xa145[_0x3470d0(0x35d)]=[..._0x192ac0,_0xc8f020],_0x3e7e32['agents']=_0xa145,await _0x15b776(_0x3e7e32,_0x3470d0(0x405)+_0x3470d0(0x2cb)),{'ok':!![],'agent':_0xc8f020};}),_0x449ad2('agents:u'+_0x2aee76(0x3df),async(_0x152e36,_0x3d1b96={})=>{const _0x5b1e12=_0x2aee76,_0x1ee2ad=String(_0x3d1b96['id']||_0x3d1b96[_0x5b1e12(0x2e1)]||'')['trim']();if(!_0x1ee2ad)throw new Error('agent\x20id'+_0x5b1e12(0x38c)+'ired');const _0x24d5a3=await _0x1f362a(),_0x526077=_0x24d5a3[_0x5b1e12(0x3d9)]&&typeof _0x24d5a3[_0x5b1e12(0x3d9)]===_0x5b1e12(0x33e)?_0x24d5a3[_0x5b1e12(0x3d9)]:{},_0x329cff=_0x408ccb(_0x24d5a3),_0x3c7cc8=_0x329cff[_0x5b1e12(0x457)](_0x2ae9de=>_0x2ae9de?.['id']===_0x1ee2ad?{..._0x2ae9de,..._0x3d1b96,'id':_0x1ee2ad}:_0x2ae9de);return _0x526077[_0x5b1e12(0x35d)]=_0x3c7cc8,_0x24d5a3['agents']=_0x526077,await _0x15b776(_0x24d5a3,_0x5b1e12(0x406)+_0x5b1e12(0x2ab)),{'ok':!![],'agent':_0x3c7cc8[_0x5b1e12(0x37b)](_0x5c6c25=>_0x5c6c25?.['id']===_0x1ee2ad)||null};}),_0x449ad2(_0x2aee76(0x31c)+_0x2aee76(0x394),async(_0x14f32b,_0x2f617c={})=>{const _0xeb70e3=_0x2aee76,_0x5c55d2=String(_0x2f617c['id']||_0x2f617c['agentId']||'')['trim']();if(!_0x5c55d2)throw new Error(_0xeb70e3(0x48a)+_0xeb70e3(0x38c)+_0xeb70e3(0x37e));const _0x25001f=await _0x1f362a(),_0x1d4207=_0x25001f[_0xeb70e3(0x3d9)]&&typeof _0x25001f['agents']===_0xeb70e3(0x33e)?_0x25001f[_0xeb70e3(0x3d9)]:{};return _0x1d4207[_0xeb70e3(0x35d)]=_0x408ccb(_0x25001f)[_0xeb70e3(0x339)](_0xba96e0=>_0xba96e0?.['id']!==_0x5c55d2),_0x25001f[_0xeb70e3(0x3d9)]=_0x1d4207,await _0x15b776(_0x25001f,_0xeb70e3(0x2c0)+_0xeb70e3(0x26a)),{'ok':!![],'agentId':_0x5c55d2};}),_0x449ad2(_0x2aee76(0x4d5)+'ith-sess'+_0x2aee76(0x461)+'t',async(_0xb335ed,_0x10ef10={})=>{const _0x37a23a=_0x2aee76,[_0x4e6e6a,_0xf96587]=await Promise[_0x37a23a(0x3a2)]([_0x5d5867()[_0x37a23a(0x3d9)][_0x37a23a(0x35d)](),_0x5d5867()['sessions'][_0x37a23a(0x35d)](_0x10ef10)[_0x37a23a(0x373)](()=>({'sessions':[]}))]),_0x471267=Array[_0x37a23a(0x43f)](_0xf96587[_0x37a23a(0x4ac)])?_0xf96587[_0x37a23a(0x4ac)]:[];return{..._0x4e6e6a,'sessions':_0x471267,'groups':Array['isArray'](_0x4e6e6a[_0x37a23a(0x25b)])?_0x4e6e6a[_0x37a23a(0x25b)]:_0x4f1b53(_0x4e6e6a,_0x471267)};}),_0x449ad2(_0x2aee76(0x1f8)+_0x2aee76(0x2f2)+'p',async(_0x16b6c6,_0xabd2e0)=>importSkillZip({'payload':_0xabd2e0,'app':app,'dialog':dialog,'dialogWindow':BrowserWindow[_0x2aee76(0x3e4)+_0x2aee76(0x49e)](_0x16b6c6['sender'])||mainWindow,'configController':configController})),terminalManager=createTerminalManager({'cwd':join(configController[_0x2aee76(0x4b9)+_0x2aee76(0x352)](),_0x2aee76(0x2f5)+'e'),'emitData':_0x5bdc32=>broadcast('terminal'+_0x2aee76(0x2b2),_0x5bdc32),'emitExit':_0x4d26c8=>broadcast('terminal'+_0x2aee76(0x337),_0x4d26c8)}),_0x449ad2(_0x2aee76(0x250)+_0x2aee76(0x24e),async(_0x3d5116,_0x1db82e={})=>terminalManager[_0x2aee76(0x366)](_0x1db82e)),_0x449ad2(_0x2aee76(0x250)+_0x2aee76(0x38f),async(_0x5796d2,_0x2a18bf={})=>terminalManager['input'](_0x2a18bf)),_0x449ad2(_0x2aee76(0x250)+_0x2aee76(0x21f),async(_0x5d778c,_0x20d7d0={})=>terminalManager[_0x2aee76(0x49b)](_0x20d7d0)),_0x449ad2(_0x2aee76(0x250)+':close',async(_0x44be23,_0x4c1c82={})=>terminalManager['close'](_0x4c1c82)),connectorController=createConnectorController({'shellConfig':shellConfig,'configController':configController,'broadcast':broadcast,'shell':shell}),_0x449ad2(_0x2aee76(0x4c6)+_0x2aee76(0x3f5)+_0x2aee76(0x2cf),async()=>connectorController['listImCh'+'annelCon'+'figs']()),_0x449ad2('config:i'+_0x2aee76(0x3f5)+_0x2aee76(0x3c1)+'e',async(_0x46f07e,_0x4ca141={})=>connectorController[_0x2aee76(0x4bd)+_0x2aee76(0x2f8)+'onfig'](_0x4ca141)),_0x449ad2('config:i'+_0x2aee76(0x3f5)+_0x2aee76(0x1d4)+_0x2aee76(0x320),async(_0x35e4f0,_0x402933={})=>connectorController[_0x2aee76(0x3d1)+_0x2aee76(0x37a)+'led'](_0x402933)),_0x449ad2(_0x2aee76(0x2de)+_0x2aee76(0x38d)+_0x2aee76(0x35f),async(_0x3357e1,_0x2f9583={})=>{const _0x1f9211=_0x2aee76,_0x140f17=String(_0x2f9583['channelI'+'d']||_0x2f9583[_0x1f9211(0x263)]?.[_0x1f9211(0x43b)+'d']||_0x2f9583['payload']?.['id']||'');if(!_0x140f17)throw new Error(_0x1f9211(0x43b)+_0x1f9211(0x41e)+_0x1f9211(0x374));const _0x20d3ea=_0x2f9583[_0x1f9211(0x263)]||_0x2f9583,_0x597809={'feishu':connectorController[_0x1f9211(0x213)+_0x1f9211(0x3a6)+_0x1f9211(0x48f)],'qqbot':connectorController[_0x1f9211(0x332)+_0x1f9211(0x46e)+_0x1f9211(0x251)],'wecom':connectorController[_0x1f9211(0x361)+_0x1f9211(0x3b4)+_0x1f9211(0x251)],'qq_mail':connectorController['saveQqMa'+_0x1f9211(0x26c)+_0x1f9211(0x307)+'g'],'netease_mail':connectorController[_0x1f9211(0x2f4)+_0x1f9211(0x465)+_0x1f9211(0x38d)+_0x1f9211(0x251)],'tencent_exmail':connectorController[_0x1f9211(0x48e)+'entExmai'+_0x1f9211(0x322)+_0x1f9211(0x46f)],'feishu_doc':connectorController[_0x1f9211(0x213)+_0x1f9211(0x449)+_0x1f9211(0x4c3)+_0x1f9211(0x341)],'tencent_docs':connectorController[_0x1f9211(0x48e)+'entDocsC'+_0x1f9211(0x38d)+'Config'],'kdocs':connectorController['saveKdoc'+_0x1f9211(0x33c)+'orConfig'],'dingtalk_doc':connectorController[_0x1f9211(0x447)+_0x1f9211(0x4a7)+_0x1f9211(0x38d)+_0x1f9211(0x251)]},_0x5d0095=_0x597809[_0x140f17];if(!_0x5d0095)throw new Error(_0x1f9211(0x26e)+'ted\x20conn'+_0x1f9211(0x2cc)+_0x140f17);return _0x5d0095(_0x20d3ea);}),_0x449ad2(_0x2aee76(0x2de)+_0x2aee76(0x38d)+_0x2aee76(0x1e6)+_0x2aee76(0x281)+_0x2aee76(0x2e7),async(_0x111593,_0x443cd7={})=>connectorController[_0x2aee76(0x213)+_0x2aee76(0x3a6)+'lConfig'](_0x443cd7)),_0x449ad2('config:c'+_0x2aee76(0x38d)+_0x2aee76(0x3bf)+'bot-chan'+_0x2aee76(0x3cc),async(_0x131e12,_0x32ee8c={})=>connectorController[_0x2aee76(0x332)+_0x2aee76(0x46e)+_0x2aee76(0x251)](_0x32ee8c)),_0x449ad2('config:c'+_0x2aee76(0x38d)+_0x2aee76(0x31d)+_0x2aee76(0x1d2)+_0x2aee76(0x3cc),async(_0x3d9666,_0x43427a={})=>connectorController['saveWeco'+_0x2aee76(0x3b4)+'Config'](_0x43427a)),_0x449ad2('config:c'+_0x2aee76(0x38d)+':save-qq'+_0x2aee76(0x385),async(_0x21b4bc,_0x173f55={})=>connectorController[_0x2aee76(0x43a)+_0x2aee76(0x26c)+_0x2aee76(0x307)+'g'](_0x173f55)),_0x449ad2(_0x2aee76(0x2de)+_0x2aee76(0x38d)+_0x2aee76(0x33b)+_0x2aee76(0x259)+'il',async(_0x1425a7,_0x592d14={})=>connectorController[_0x2aee76(0x2f4)+_0x2aee76(0x465)+_0x2aee76(0x38d)+_0x2aee76(0x251)](_0x592d14)),_0x449ad2(_0x2aee76(0x2de)+'onnector'+_0x2aee76(0x22e)+_0x2aee76(0x384)+_0x2aee76(0x2e4),async(_0x2234e3,_0x24e7e2={})=>connectorController[_0x2aee76(0x48e)+'entExmai'+_0x2aee76(0x322)+_0x2aee76(0x46f)](_0x24e7e2)),_0x449ad2('config:c'+_0x2aee76(0x38d)+_0x2aee76(0x1e6)+_0x2aee76(0x40b),async(_0x2589d4,_0x5dfe8e={})=>connectorController[_0x2aee76(0x213)+_0x2aee76(0x449)+_0x2aee76(0x4c3)+'nfig'](_0x5dfe8e)),_0x449ad2('config:c'+'onnector'+_0x2aee76(0x22e)+'ncent-do'+'cs',async(_0x379903,_0xf317a9={})=>connectorController[_0x2aee76(0x48e)+'entDocsC'+_0x2aee76(0x38d)+_0x2aee76(0x251)](_0xf317a9)),_0x449ad2(_0x2aee76(0x2de)+_0x2aee76(0x38d)+':save-kd'+_0x2aee76(0x297),async(_0x37c8cf,_0x2e462e={})=>connectorController[_0x2aee76(0x2b8)+'sConnect'+_0x2aee76(0x46f)](_0x2e462e)),_0x449ad2(_0x2aee76(0x2de)+'onnector'+_0x2aee76(0x29a)+_0x2aee76(0x453)+'oc',async(_0x41c96e,_0x2fcb0f={})=>connectorController[_0x2aee76(0x447)+'talkDocC'+_0x2aee76(0x38d)+_0x2aee76(0x251)](_0x2fcb0f)),_0x449ad2('config:c'+_0x2aee76(0x38d)+_0x2aee76(0x1db)+_0x2aee76(0x42d),async(_0x3242d2,_0x59b666={})=>{const _0x25561e=_0x2aee76,_0x2fdf16=String(_0x59b666['channelI'+'d']||_0x59b666[_0x25561e(0x2c3)]||'');if(_0x2fdf16===_0x25561e(0x204))return connectorController[_0x25561e(0x474)+_0x25561e(0x476)+_0x25561e(0x286)+'ion']();if(_0x2fdf16==='feishu_d'+'oc')return connectorController['startFei'+_0x25561e(0x3af)+'iConnect'+'Session']();if(_0x2fdf16===_0x25561e(0x472))return connectorController[_0x25561e(0x3e6)+_0x25561e(0x315)+_0x25561e(0x360)+_0x25561e(0x3bd)](_0x59b666);if(_0x2fdf16==='openclaw'+_0x25561e(0x427)||_0x2fdf16===_0x25561e(0x22d))return connectorController[_0x25561e(0x3fd)+_0x25561e(0x283)+_0x25561e(0x419)+'n']({'gatewayPort':_0x5d5867()[_0x25561e(0x48b)+_0x25561e(0x1e4)](),'gatewayToken':_0x5d5867()['gatewayT'+_0x25561e(0x2eb)]()});throw new Error(_0x25561e(0x26e)+_0x25561e(0x265)+'ector\x20se'+'ssion:\x20'+(_0x2fdf16||'unknown'));}),_0x449ad2(_0x2aee76(0x2de)+_0x2aee76(0x38d)+_0x2aee76(0x1db)+':status',async(_0x135dad,_0x54289f={})=>{const _0x20ab3c=_0x2aee76,_0x448660=String(_0x54289f[_0x20ab3c(0x43b)+'d']||_0x54289f[_0x20ab3c(0x2c3)]||'');if(_0x448660==='kdocs')return connectorController[_0x20ab3c(0x2cd)+_0x20ab3c(0x326)+_0x20ab3c(0x201)](_0x54289f);if(_0x448660===_0x20ab3c(0x1fa)+'oc')return connectorController['getFeish'+_0x20ab3c(0x2d0)+'onnectSt'+_0x20ab3c(0x2d5)](_0x54289f);if(_0x448660===_0x20ab3c(0x472))return connectorController[_0x20ab3c(0x397)+_0x20ab3c(0x439)+'ationSta'+_0x20ab3c(0x2b9)](_0x54289f);throw new Error('Unsuppor'+_0x20ab3c(0x265)+'ector\x20se'+_0x20ab3c(0x256)+(_0x448660||_0x20ab3c(0x45d)));}),_0x449ad2(_0x2aee76(0x2de)+_0x2aee76(0x38d)+_0x2aee76(0x1db)+':cancel',async(_0x1bc641,_0x35f548={})=>{const _0x3943d8=_0x2aee76,_0x45b7dc=String(_0x35f548[_0x3943d8(0x43b)+'d']||_0x35f548['type']||'');if(_0x45b7dc===_0x3943d8(0x204))return connectorController['cancelKd'+_0x3943d8(0x3d0)+_0x3943d8(0x25a)+_0x3943d8(0x432)](_0x35f548);if(_0x45b7dc===_0x3943d8(0x1fa)+'oc')return connectorController[_0x3943d8(0x353)+'ishuDocC'+'liConnec'+'tSession'](_0x35f548);if(_0x45b7dc===_0x3943d8(0x472))return connectorController[_0x3943d8(0x353)+_0x3943d8(0x23e)+_0x3943d8(0x390)+_0x3943d8(0x435)](_0x35f548);if(_0x45b7dc===_0x3943d8(0x3e8)+_0x3943d8(0x427)||_0x45b7dc===_0x3943d8(0x22d))return connectorController[_0x3943d8(0x35a)+_0x3943d8(0x4d3)+_0x3943d8(0x287)+'on']();return{'ok':!![]};}),_0x449ad2('config:c'+'onnector'+_0x2aee76(0x1db)+_0x2aee76(0x46c)+'e',async(_0x2f5b36,_0x208332={})=>{const _0x435a73=_0x2aee76,_0x3420b6=String(_0x208332[_0x435a73(0x43b)+'d']||_0x208332[_0x435a73(0x2c3)]||'');if(_0x3420b6==='feishu_d'+'oc')return connectorController[_0x435a73(0x30f)+_0x435a73(0x39e)+_0x435a73(0x378)+_0x435a73(0x31e)+'on'](_0x208332);throw new Error(_0x435a73(0x26e)+_0x435a73(0x265)+'ector\x20se'+_0x435a73(0x256)+(_0x3420b6||'unknown'));}),_0x449ad2('plugins:'+_0x2aee76(0x35d),async()=>{const _0x3c12bd=_0x2aee76,_0x458f14=gatewayController?.[_0x3c12bd(0x32a)+_0x3c12bd(0x260)]?.()||{};return _0x458f14['plugins']||[];}),_0x449ad2(_0x2aee76(0x3b3)+_0x2aee76(0x234)+'ig',async(_0x422938,_0x462595={})=>{const _0x5b4660=_0x2aee76,_0x2df188=String(_0x462595[_0x5b4660(0x3ea)]||_0x462595['id']||''),_0x7a5e86=await _0x1f362a(),_0x2951a3=_0x7a5e86[_0x5b4660(0x4b2)]?.['entries']||{};return _0x2df188?_0x2951a3[_0x2df188]||null:_0x2951a3;}),_0x449ad2('plugins:'+_0x2aee76(0x242)+_0x2aee76(0x398),async(_0x8f530d,_0x283046={})=>{const _0x7743e5=_0x2aee76,_0x3cc23e=String(_0x283046['pluginId']||_0x283046['id']||'');if(!_0x3cc23e)throw new Error(_0x7743e5(0x3ea)+'\x20is\x20requ'+'ired');const _0x272f7c=await _0x1f362a(),_0x149576=_0x272f7c[_0x7743e5(0x4b2)]&&typeof _0x272f7c[_0x7743e5(0x4b2)]===_0x7743e5(0x33e)?_0x272f7c[_0x7743e5(0x4b2)]:{},_0x2060e0=_0x149576[_0x7743e5(0x2ee)]&&typeof _0x149576[_0x7743e5(0x2ee)]===_0x7743e5(0x33e)?_0x149576[_0x7743e5(0x2ee)]:{};return _0x2060e0[_0x3cc23e]={..._0x2060e0[_0x3cc23e]||{},..._0x283046[_0x7743e5(0x25c)]||_0x283046[_0x7743e5(0x271)]||{}},_0x149576[_0x7743e5(0x2ee)]=_0x2060e0,_0x272f7c[_0x7743e5(0x4b2)]=_0x149576,_0x15b776(_0x272f7c,_0x7743e5(0x434)+'onfig\x20up'+_0x7743e5(0x2ab));}),_0x449ad2(_0x2aee76(0x3b3)+_0x2aee76(0x48c),async(_0x32fa53,_0x57c946={})=>{const _0x2578d3=_0x2aee76,_0x5bdf53=String(_0x57c946[_0x2578d3(0x3ea)]||_0x57c946['id']||'');if(!_0x5bdf53)throw new Error('pluginId'+'\x20is\x20requ'+_0x2578d3(0x37e));const _0x36ed4=await _0x1f362a(),_0x5626b7=_0x36ed4[_0x2578d3(0x4b2)]&&typeof _0x36ed4[_0x2578d3(0x4b2)]===_0x2578d3(0x33e)?_0x36ed4[_0x2578d3(0x4b2)]:{},_0x92ddbd=_0x5626b7[_0x2578d3(0x2ee)]&&typeof _0x5626b7[_0x2578d3(0x2ee)]===_0x2578d3(0x33e)?_0x5626b7[_0x2578d3(0x2ee)]:{};return _0x92ddbd[_0x5bdf53]={..._0x92ddbd[_0x5bdf53]||{},'enabled':!![]},_0x5626b7[_0x2578d3(0x2ee)]=_0x92ddbd,_0x36ed4['plugins']=_0x5626b7,_0x15b776(_0x36ed4,_0x2578d3(0x363)+_0x2578d3(0x320));}),_0x449ad2(_0x2aee76(0x3b3)+_0x2aee76(0x2af),async(_0x237952,_0x589295={})=>{const _0x3dfe7f=_0x2aee76,_0x362dcc=String(_0x589295[_0x3dfe7f(0x3ea)]||_0x589295['id']||'');if(!_0x362dcc)throw new Error(_0x3dfe7f(0x3ea)+_0x3dfe7f(0x38c)+_0x3dfe7f(0x37e));const _0x1d2ea9=await _0x1f362a(),_0x51f4e0=_0x1d2ea9[_0x3dfe7f(0x4b2)]&&typeof _0x1d2ea9[_0x3dfe7f(0x4b2)]==='object'?_0x1d2ea9[_0x3dfe7f(0x4b2)]:{},_0x194a18=_0x51f4e0[_0x3dfe7f(0x2ee)]&&typeof _0x51f4e0[_0x3dfe7f(0x2ee)]===_0x3dfe7f(0x33e)?_0x51f4e0['entries']:{};return _0x194a18[_0x362dcc]={..._0x194a18[_0x362dcc]||{},'enabled':![]},_0x51f4e0['entries']=_0x194a18,_0x1d2ea9[_0x3dfe7f(0x4b2)]=_0x51f4e0,_0x15b776(_0x1d2ea9,_0x3dfe7f(0x1eb)+_0x3dfe7f(0x276));}),_0x449ad2('plugins:'+_0x2aee76(0x4a3),async(_0x9e18b2,_0x4e001e={})=>({'plugins':await((async()=>{const _0x5e2abf=_0x2aee76,_0x592300=gatewayController?.[_0x5e2abf(0x32a)+_0x5e2abf(0x260)]?.()||{};if(!_0x4e001e?.[_0x5e2abf(0x3ea)]&&!_0x4e001e?.['id'])return _0x592300[_0x5e2abf(0x4b2)]||[];const _0x305f73=String(_0x4e001e[_0x5e2abf(0x3ea)]||_0x4e001e['id']||'');return(_0x592300[_0x5e2abf(0x4b2)]||[])[_0x5e2abf(0x339)](_0x1a4eb7=>_0x1a4eb7[_0x5e2abf(0x3ea)]===_0x305f73);})())})),_0x449ad2(_0x2aee76(0x22f)+_0x2aee76(0x424),async(_0x288d74,_0x51e19e)=>({'ok':!![],'payload':_0x51e19e})),_0x449ad2(_0x2aee76(0x20d)+_0x2aee76(0x2e9)+'e',async(_0x3842ae,_0x4a006b)=>{const _0x286252=_0x2aee76;return broadcast(_0x286252(0x355)+'mand',_0x4a006b),{'ok':!![]};}),_0x449ad2(_0x2aee76(0x20b)+_0x2aee76(0x207)+_0x2aee76(0x372),async()=>{const _0xa5055=_0x2aee76;return broadcast(_0xa5055(0x1e8)+_0xa5055(0x372)+_0xa5055(0x2c4),{}),{'ok':!![]};}),_0x449ad2('tabs:ref'+_0x2aee76(0x323)+'nt-state',async(_0x15d8df,_0x21c399={})=>{const _0x217fd5=_0x2aee76;return broadcast(_0x217fd5(0x1e8)+_0x217fd5(0x372)+_0x217fd5(0x1f6)+_0x217fd5(0x2c4),_0x21c399),{'ok':!![]};}),_0x449ad2('window:m'+_0x2aee76(0x38a),_0x507f56=>{const _0x1e66aa=_0x2aee76;return BrowserWindow[_0x1e66aa(0x3e4)+_0x1e66aa(0x49e)](_0x507f56['sender'])?.['minimize'](),{'ok':!![]};}),_0x449ad2(_0x2aee76(0x388)+'oggle-ma'+_0x2aee76(0x3cf),_0x182a62=>{const _0x43547f=_0x2aee76,_0x5e7478=BrowserWindow[_0x43547f(0x3e4)+_0x43547f(0x49e)](_0x182a62[_0x43547f(0x206)]);if(!_0x5e7478)return{'isMaximized':![]};if(_0x5e7478[_0x43547f(0x479)+_0x43547f(0x3e9)]())_0x5e7478['unmaximi'+'ze']();else _0x5e7478[_0x43547f(0x471)]();return{'isMaximized':_0x5e7478[_0x43547f(0x479)+_0x43547f(0x3e9)]()};}),_0x449ad2(_0x2aee76(0x36a)+_0x2aee76(0x1dd),_0x436141=>{const _0x70a84e=_0x2aee76;return BrowserWindow[_0x70a84e(0x3e4)+'ontents'](_0x436141['sender'])?.['close'](),{'ok':!![]};}),_0x449ad2(_0x2aee76(0x285)+_0x2aee76(0x2dd)+_0x2aee76(0x41d),()=>openDevToolsForActiveContext()),_0x449ad2('openclaw'+':runtime'+_0x2aee76(0x37f),()=>_0x5d5867()[_0x2aee76(0x32a)+'nfo']()),_0x449ad2(_0x2aee76(0x3e8)+':gateway'+_0x2aee76(0x1ee),()=>_0x5d5867()[_0x2aee76(0x331)+'s']()),_0x449ad2(_0x2aee76(0x3e8)+':gateway'+'-restart',()=>_0x5d5867()['restart'](_0x2aee76(0x395)+'\x20request')),_0x449ad2('openclaw'+_0x2aee76(0x38e)+_0x2aee76(0x30b)+_0x2aee76(0x28b),async()=>({'loadingLifeCycle':_0x2aee76(0x2b1),'message':'','updatedAt':new Date()[_0x2aee76(0x1ff)+_0x2aee76(0x2f1)]()})),_0x449ad2(_0x2aee76(0x3e8)+_0x2aee76(0x1f9)+_0x2aee76(0x495),(_0x5d93a0,_0x540c5a={})=>_0x5d5867()['getRecen'+_0x2aee76(0x410)](_0x540c5a?.['limit']??0xc8)),_0x449ad2(_0x2aee76(0x3e8)+_0x2aee76(0x47b)+_0x2aee76(0x209)+_0x2aee76(0x42b)+'n',(_0xf3b9dc,_0x39afe1)=>_0x5d5867()['answerAs'+_0x2aee76(0x492)+_0x2aee76(0x27d)](_0x39afe1)),_0x449ad2('openclaw'+_0x2aee76(0x225)+_0x2aee76(0x37c),async()=>{const _0xf4893a=_0x2aee76,_0x532f43=join(resolveRuntimeRoot(shellConfig['projectR'+'oot']),_0xf4893a(0x223),_0xf4893a(0x494)+'w');if(!existsSync(_0x532f43))throw new Error(_0xf4893a(0x3e8)+_0xf4893a(0x299)+_0xf4893a(0x3f0)+_0xf4893a(0x359)+_0x532f43+('.\x20Run\x20wu'+'jie-shel'+'l\x20prepar'+_0xf4893a(0x27b)));const _0x4637fa=join(app['getPath']('temp'),'wujie-sh'+'ell-cli.'+_0xf4893a(0x349));await writeFile(_0x4637fa,'#!/bin/s'+_0xf4893a(0x408)+_0x532f43[_0xf4893a(0x1ce)](/\\/g,'\x5c\x5c')['replace'](/"/g,'\x5c\x22')+'\x22\x0a',{'mode':0x1ed});const _0x34221f=spawn(_0xf4893a(0x329),['-a','Terminal',_0x4637fa],{'detached':!![],'stdio':_0xf4893a(0x243)});return _0x34221f[_0xf4893a(0x4ae)](),{'ok':!![],'cliPath':_0x532f43};}),_0x449ad2(_0x2aee76(0x350)+_0x2aee76(0x292),()=>_0x5d5867()[_0x2aee76(0x3d9)][_0x2aee76(0x35d)]()),_0x449ad2(_0x2aee76(0x2ba)+_0x2aee76(0x24d),(_0x1dae80,_0x3e8b0c)=>_0x5d5867()[_0x2aee76(0x348)][_0x2aee76(0x4a3)](_0x3e8b0c)),_0x449ad2(_0x2aee76(0x4ac)+':create',(_0x5b0020,_0x5c973c)=>_0x5d5867()[_0x2aee76(0x4ac)]['create'](_0x5c973c)),_0x449ad2('sessions'+':list',(_0x42aad5,_0x41fd83)=>_0x5d5867()[_0x2aee76(0x4ac)][_0x2aee76(0x35d)](_0x41fd83)),_0x449ad2('sessions'+_0x2aee76(0x3b9),(_0x26c0c9,_0x3afb43)=>_0x5d5867()['sessions'][_0x2aee76(0x45f)](_0x3afb43)),_0x449ad2(_0x2aee76(0x417)+'eam',(_0x3edaac,_0x640724)=>_0x5d5867()[_0x2aee76(0x35c)]['stream'](_0x640724)),_0x449ad2(_0x2aee76(0x36c)+'rt',(_0xc1e402,_0x33be8d)=>_0x5d5867()[_0x2aee76(0x35c)]['abort'](_0x33be8d)),_0x449ad2(_0x2aee76(0x478)+'tory',(_0x436164,_0x5ef702)=>_0x5d5867()[_0x2aee76(0x35c)][_0x2aee76(0x3c2)](_0x5ef702)),_0x449ad2(_0x2aee76(0x3b1)+'te',async(_0x4c17c3,_0x1fb8d3={})=>{const _0x4d6a39=_0x2aee76,_0x394bcc=typeof _0x1fb8d3[_0x4d6a39(0x2f3)]===_0x4d6a39(0x2e2)?_0x1fb8d3['level']:_0x4d6a39(0x3cd),_0x3d60a8=typeof _0x1fb8d3[_0x4d6a39(0x24f)]===_0x4d6a39(0x2e2)?_0x1fb8d3['message']:'renderer'+_0x4d6a39(0x446),_0x1cb136=typeof _0x1fb8d3[_0x4d6a39(0x313)]===_0x4d6a39(0x2e2)&&_0x1fb8d3[_0x4d6a39(0x313)]['trim']()?_0x4d6a39(0x395)+':'+_0x1fb8d3['context'][_0x4d6a39(0x47c)]():_0x4d6a39(0x395),_0x491169=_0x1fb8d3['meta']&&typeof _0x1fb8d3[_0x4d6a39(0x254)]===_0x4d6a39(0x33e)?{...summarizePayload(_0x1fb8d3[_0x4d6a39(0x254)]),'context':_0x1cb136}:{'context':_0x1cb136},_0x2085e8=rendererLogger;if(_0x2085e8?.[_0x394bcc])await _0x2085e8[_0x394bcc](_0x3d60a8,_0x491169);else await _0x2085e8?.['info'](_0x3d60a8,_0x491169);return{'ok':!![]};}),_0x449ad2(_0x2aee76(0x327)+_0x2aee76(0x1e4),async(_0x10d150,_0x32e89a={})=>{const _0x165794=_0x2aee76,_0x412581=typeof _0x32e89a[_0x165794(0x3c7)+'r']===_0x165794(0x2e2)&&_0x32e89a['targetDi'+'r'][_0x165794(0x47c)]()?_0x32e89a[_0x165794(0x3c7)+'r']:undefined,_0x3c9dc1=await exportLogsArchive({'logsDir':configController[_0x165794(0x311)][_0x165794(0x300)],'targetDir':_0x412581,'appVersion':app['getVersi'+'on']()});return mainLogger?.[_0x165794(0x3cd)](_0x165794(0x3a3)+_0x165794(0x1d1),{'path':toHomePath(_0x3c9dc1[_0x165794(0x268)])}),_0x3c9dc1;}),_0x449ad2(_0x2aee76(0x402)+_0x2aee76(0x1e4),async(_0x3a0b5c,_0x2c32c={})=>reportLogs({'description':typeof _0x2c32c[_0x2aee76(0x29e)+_0x2aee76(0x28f)]===_0x2aee76(0x2e2)?_0x2c32c[_0x2aee76(0x29e)+_0x2aee76(0x28f)]:'','gateToken':typeof _0x2c32c[_0x2aee76(0x4a1)+'n']===_0x2aee76(0x2e2)?_0x2c32c[_0x2aee76(0x4a1)+'n']:''})),_0x449ad2(_0x2aee76(0x438)+_0x2aee76(0x30a)+'ory',async()=>{const _0x18dc21=_0x2aee76;return await shell[_0x18dc21(0x216)](configController[_0x18dc21(0x311)][_0x18dc21(0x300)]),mainLogger?.[_0x18dc21(0x3cd)]('logs\x20dir'+'ectory\x20o'+_0x18dc21(0x1df),{'logsDir':toHomePath(configController[_0x18dc21(0x311)][_0x18dc21(0x300)])}),{'ok':!![],'path':configController['paths'][_0x18dc21(0x300)]};}),_0x449ad2(_0x2aee76(0x26b)+'t',async()=>{const _0x5786dc=_0x2aee76,_0x580e6c=await readdir(configController[_0x5786dc(0x311)][_0x5786dc(0x300)],{'recursive':!![]})[_0x5786dc(0x373)](()=>[]);return _0x580e6c;}),_0x449ad2(_0x2aee76(0x32d)+'d',async(_0x16d662,_0x24ebc5={})=>{const _0x382c38=_0x2aee76,_0x4ff5ba=String(_0x24ebc5[_0x382c38(0x268)]||'');if(!_0x4ff5ba)throw new Error(_0x382c38(0x399)+_0x382c38(0x3e1));return readFile(_0x4ff5ba,_0x382c38(0x4b0));}),_0x449ad2(_0x2aee76(0x41b)+'ad',async(_0x460f73,_0x45e243)=>{const _0x28d311=_0x2aee76,_0x34cd5e=Date[_0x28d311(0x2a6)]();try{const _0x45a04e=await readFile(_0x45e243,_0x28d311(0x4b0));return filesLogger?.['info'](_0x28d311(0x2bf)+_0x28d311(0x2d1)+_0x28d311(0x202),{'path':toHomePath(_0x45e243),'bytes':Buffer[_0x28d311(0x340)+'th'](_0x45a04e),'durationMs':Date[_0x28d311(0x2a6)]()-_0x34cd5e}),_0x45a04e;}catch(_0x5095d8){filesLogger?.[_0x28d311(0x3ed)](_0x28d311(0x2bf)+_0x28d311(0x450),{'path':toHomePath(_0x45e243),'durationMs':Date[_0x28d311(0x2a6)]()-_0x34cd5e,'error':summarizeError(_0x5095d8)});throw _0x5095d8;}}),_0x449ad2(_0x2aee76(0x41b)+_0x2aee76(0x328)+'y',async(_0xe1154b,_0xe7f3d4)=>{const _0x45fe63=_0x2aee76,_0x455bcc=Date[_0x45fe63(0x2a6)]();try{const _0x4254dd=await readFile(_0xe7f3d4);return filesLogger?.[_0x45fe63(0x3cd)](_0x45fe63(0x21e)+'ile\x20read'+_0x45fe63(0x484)+'ed',{'path':toHomePath(_0xe7f3d4),'bytes':_0x4254dd[_0x45fe63(0x340)+'th'],'durationMs':Date['now']()-_0x455bcc}),new Uint8Array(_0x4254dd);}catch(_0x1ee1a3){filesLogger?.[_0x45fe63(0x3ed)](_0x45fe63(0x21e)+'ile\x20read'+'\x20failed',{'path':toHomePath(_0xe7f3d4),'durationMs':Date[_0x45fe63(0x2a6)]()-_0x455bcc,'error':summarizeError(_0x1ee1a3)});throw _0x1ee1a3;}}),_0x449ad2('files:wr'+_0x2aee76(0x3a5),async(_0x4de584,_0x5d4bcd={})=>{const _0x5dc177=_0x2aee76,_0x238521=Date[_0x5dc177(0x2a6)]();return await writeFile(_0x5d4bcd[_0x5dc177(0x268)],_0x5d4bcd[_0x5dc177(0x1dc)]??'','utf8'),filesLogger?.[_0x5dc177(0x3cd)]('file\x20wri'+_0x5dc177(0x288)+_0x5dc177(0x358),{'path':toHomePath(_0x5d4bcd[_0x5dc177(0x268)]),'bytes':Buffer[_0x5dc177(0x340)+'th'](String(_0x5d4bcd[_0x5dc177(0x1dc)]??'')),'durationMs':Date[_0x5dc177(0x2a6)]()-_0x238521}),{'ok':!![]};}),_0x449ad2(_0x2aee76(0x21d)+_0x2aee76(0x3b8)+'ry',async(_0x4bb6df,_0x545894={})=>{const _0x2b187f=_0x2aee76,_0x28671e=Date[_0x2b187f(0x2a6)]();await writeFile(_0x545894[_0x2b187f(0x268)],Buffer[_0x2b187f(0x25f)](_0x545894[_0x2b187f(0x1dc)]??[]));const _0x34735e=await stat(_0x545894[_0x2b187f(0x268)])[_0x2b187f(0x373)](()=>null);return filesLogger?.[_0x2b187f(0x3cd)]('binary\x20f'+_0x2b187f(0x24a)+'e\x20comple'+_0x2b187f(0x202),{'path':toHomePath(_0x545894['path']),'bytes':_0x34735e?.[_0x2b187f(0x39d)]??0x0,'durationMs':Date['now']()-_0x28671e}),{'ok':!![]};}),_0x449ad2('files:se'+_0x2aee76(0x2b3)+'e',async(_0x38aaa1,_0x4518a0={})=>{const _0xaeeb5b=_0x2aee76,_0x425c4f=await dialog[_0xaeeb5b(0x25d)+'Dialog'](BrowserWindow[_0xaeeb5b(0x3e4)+'ontents'](_0x38aaa1[_0xaeeb5b(0x206)])??mainWindow,{'title':typeof _0x4518a0['title']===_0xaeeb5b(0x2e2)?_0x4518a0[_0xaeeb5b(0x4ca)]:undefined,'properties':[_0xaeeb5b(0x455),..._0x4518a0[_0xaeeb5b(0x491)+_0xaeeb5b(0x304)]?[_0xaeeb5b(0x491)+_0xaeeb5b(0x304)]:[]],'filters':Array[_0xaeeb5b(0x43f)](_0x4518a0[_0xaeeb5b(0x4a6)])?_0x4518a0['filters']:undefined});return filesLogger?.[_0xaeeb5b(0x3cd)](_0xaeeb5b(0x4c2)+_0xaeeb5b(0x430)+_0xaeeb5b(0x26a),{'canceled':_0x425c4f['canceled'],'count':_0x425c4f['filePath'+'s'][_0xaeeb5b(0x4b5)],'paths':_0x425c4f[_0xaeeb5b(0x2b7)+'s'][_0xaeeb5b(0x457)](toHomePath)}),{'canceled':_0x425c4f[_0xaeeb5b(0x2be)],'paths':_0x425c4f['filePath'+'s']};}),_0x449ad2(_0x2aee76(0x3f6)+'st-direc'+'tory',async(_0x150ea3,_0x35d6e5={})=>{const _0x11436b=_0x2aee76,_0x4f8303=resolve(String(_0x35d6e5[_0x11436b(0x268)]||'')),_0x5a5c7e=_0x35d6e5['recursiv'+'e']!==![],_0x2ecde7=Array[_0x11436b(0x43f)](_0x35d6e5[_0x11436b(0x351)+'ns'])?_0x35d6e5[_0x11436b(0x351)+'ns'][_0x11436b(0x457)](_0x2eef98=>String(_0x2eef98)[_0x11436b(0x3e2)+_0x11436b(0x3c4)]()[_0x11436b(0x1ce)](/^\./,''))[_0x11436b(0x339)](Boolean):null,_0x258881=Number[_0x11436b(0x40c)+'r'](_0x35d6e5[_0x11436b(0x464)+'es'])&&_0x35d6e5[_0x11436b(0x464)+'es']>0x0?_0x35d6e5[_0x11436b(0x464)+'es']:0xc350,_0x117d66=[];let _0x2ad50c=![];async function _0x82b922(_0x4cf6b2){const _0x3e85f3=_0x11436b;if(_0x2ad50c)return;let _0x4182a9;try{_0x4182a9=await readdir(_0x4cf6b2,{'withFileTypes':!![]});}catch{return;}for(const _0x24d3ca of _0x4182a9){if(_0x2ad50c)return;if(_0x24d3ca[_0x3e85f3(0x2a3)]['startsWi'+'th']('.'))continue;const _0x3ecfaf=join(_0x4cf6b2,_0x24d3ca[_0x3e85f3(0x2a3)]);if(_0x24d3ca[_0x3e85f3(0x1cf)+_0x3e85f3(0x3ae)]()){if(_0x5a5c7e)await _0x82b922(_0x3ecfaf);continue;}if(!_0x24d3ca['isFile']())continue;if(_0x2ecde7){const _0x37610d=_0x24d3ca[_0x3e85f3(0x2a3)]['lastInde'+_0x3e85f3(0x4c7)]('.'),_0x45acdf=_0x37610d>=0x0?_0x24d3ca['name'][_0x3e85f3(0x343)](_0x37610d+0x1)[_0x3e85f3(0x3e2)+_0x3e85f3(0x3c4)]():'';if(!_0x2ecde7[_0x3e85f3(0x451)](_0x45acdf))continue;}if(_0x117d66[_0x3e85f3(0x4b5)]>=_0x258881){_0x2ad50c=!![];return;}_0x117d66[_0x3e85f3(0x2a9)]({'name':_0x24d3ca[_0x3e85f3(0x2a3)],'path':_0x3ecfaf});}}return await _0x82b922(_0x4f8303),{'path':_0x4f8303,'entries':_0x117d66,'truncated':_0x2ad50c};}),_0x449ad2(_0x2aee76(0x3a0)+'lect-dir'+_0x2aee76(0x28d),async(_0x464ea6,_0x54bd2d={})=>{const _0x255dab=_0x2aee76,_0x9cca5=await dialog[_0x255dab(0x25d)+_0x255dab(0x458)](BrowserWindow[_0x255dab(0x3e4)+_0x255dab(0x49e)](_0x464ea6[_0x255dab(0x206)])??mainWindow,{'title':typeof _0x54bd2d[_0x255dab(0x4ca)]===_0x255dab(0x2e2)?_0x54bd2d['title']:undefined,'properties':[_0x255dab(0x400)+_0x255dab(0x2c5)]});return filesLogger?.[_0x255dab(0x3cd)](_0x255dab(0x40f)+'irectory'+'\x20complet'+'ed',{'canceled':_0x9cca5[_0x255dab(0x2be)],'count':_0x9cca5[_0x255dab(0x2b7)+'s'][_0x255dab(0x4b5)],'paths':_0x9cca5[_0x255dab(0x2b7)+'s'][_0x255dab(0x457)](toHomePath)}),{'canceled':_0x9cca5[_0x255dab(0x2be)],'paths':_0x9cca5[_0x255dab(0x2b7)+'s']};}),_0x449ad2(_0x2aee76(0x2f5)+_0x2aee76(0x224)+_0x2aee76(0x22a),()=>_0x5d5867()['workspac'+'e']['director'+_0x2aee76(0x3ff)]()),_0x449ad2('workspac'+_0x2aee76(0x2a0)+_0x2aee76(0x4cb),async()=>{const _0x49718a=_0x2aee76,_0x39e5dd=await _0x5d5867()[_0x49718a(0x2f5)+'e'][_0x49718a(0x483)+'yInfo']();return await shell[_0x49718a(0x216)](_0x39e5dd[_0x49718a(0x268)]),filesLogger?.[_0x49718a(0x3cd)](_0x49718a(0x2f5)+_0x49718a(0x489)+'ory\x20open'+'ed',{'path':toHomePath(_0x39e5dd['path'])}),{'ok':!![],'path':_0x39e5dd[_0x49718a(0x268)]};}),_0x449ad2(_0x2aee76(0x2f5)+_0x2aee76(0x3d7)+_0x2aee76(0x4be),()=>_0x5d5867()[_0x2aee76(0x2f5)+'e'][_0x2aee76(0x2bd)+_0x2aee76(0x1d8)]()),_0x449ad2('workspac'+_0x2aee76(0x309)+_0x2aee76(0x357)+_0x2aee76(0x22b),(_0x1a529e,_0x57f731)=>_0x5d5867()[_0x2aee76(0x2f5)+'e'][_0x2aee76(0x4ab)+'redConte'+'xt'](_0x57f731)),_0x449ad2(_0x2aee76(0x4ac)+':rename',(_0x34d3fd,_0x55ea30)=>_0x5d5867()['sessions'][_0x2aee76(0x30e)](_0x55ea30)),_0x449ad2(_0x2aee76(0x4ac)+_0x2aee76(0x38b)+'keys',()=>_0x5d5867()[_0x2aee76(0x4ac)][_0x2aee76(0x33f)+'ys']()),_0x449ad2(_0x2aee76(0x4ac)+_0x2aee76(0x2f0)+'ned-keys',(_0x14394d,_0x49bc55)=>_0x5d5867()[_0x2aee76(0x4ac)][_0x2aee76(0x3e0)+_0x2aee76(0x31b)](_0x49bc55)),_0x449ad2(_0x2aee76(0x1f8)+_0x2aee76(0x290),(_0x2540db,_0x1bb8ef)=>_0x5d5867()['skills']['install'](_0x1bb8ef)),_0x449ad2(_0x2aee76(0x4bc)+_0x2aee76(0x3df),(_0x46dc4d,_0x3ad419)=>updateManagedSkillConfig({'payload':_0x3ad419,'configController':configController})),_0x449ad2(_0x2aee76(0x376)+_0x2aee76(0x394),(_0x36625b,_0x583fb8)=>deleteManagedSkill({'payload':_0x583fb8,'gateway':_0x5d5867(),'configController':configController})),_0x449ad2('cron:lis'+'t',(_0x439e0b,_0x11ece8)=>_0x5d5867()[_0x2aee76(0x29d)][_0x2aee76(0x35d)](_0x11ece8)),_0x449ad2(_0x2aee76(0x470)+_0x2aee76(0x420),(_0x5d3981,_0x38b9f2)=>_0x5d5867()['cron'][_0x2aee76(0x366)](_0x38b9f2)),_0x449ad2('cron:upd'+_0x2aee76(0x420),(_0x2f484e,_0x897413)=>_0x5d5867()[_0x2aee76(0x29d)]['update'](_0x897413)),_0x449ad2(_0x2aee76(0x2dc)+_0x2aee76(0x236),(_0x35c584,_0x1121dd)=>_0x5d5867()[_0x2aee76(0x29d)]['remove'](_0x1121dd)),_0x449ad2(_0x2aee76(0x379)+_0x2aee76(0x3a7),(_0xbf9575,_0x25004f)=>_0x5d5867()['cron'][_0x2aee76(0x3be)](_0x25004f)),_0x449ad2(_0x2aee76(0x20f)+'s',(_0x2dc37d,_0x51fd16)=>_0x5d5867()[_0x2aee76(0x29d)][_0x2aee76(0x4db)](_0x51fd16)),_0x449ad2(_0x2aee76(0x2b5)+_0x2aee76(0x249),async(_0x38db8f,_0x5df2d0={})=>{const _0x3df95f=_0x2aee76,_0x71cc57=configController[_0x3df95f(0x477)+_0x3df95f(0x3f2)+'h'](),_0x42e44c=JSON['parse'](await readFile(_0x71cc57,_0x3df95f(0x4b0))),_0x45098a=_0x42e44c?.['models']?.[_0x3df95f(0x428)+'s']&&typeof _0x42e44c[_0x3df95f(0x35e)][_0x3df95f(0x428)+'s']==='object'?_0x42e44c[_0x3df95f(0x35e)][_0x3df95f(0x428)+'s']:{},_0x10cc55=typeof _0x42e44c?.[_0x3df95f(0x3d9)]?.[_0x3df95f(0x221)]?.[_0x3df95f(0x409)]?.['primary']==='string'?_0x42e44c[_0x3df95f(0x3d9)][_0x3df95f(0x221)]['model'][_0x3df95f(0x354)]:'',_0x21d0db=String(_0x5df2d0[_0x3df95f(0x409)]||_0x10cc55||'');if(!_0x21d0db[_0x3df95f(0x451)]('/'))throw new Error('no\x20defau'+_0x3df95f(0x218)+_0x3df95f(0x267)+_0x3df95f(0x27c)+_0x3df95f(0x235)+'der/mode'+_0x3df95f(0x2e5));const _0x56f35e=_0x21d0db[_0x3df95f(0x4a8)]('/'),_0x15f584=_0x21d0db[_0x3df95f(0x343)](0x0,_0x56f35e),_0x5f05a1=_0x21d0db['slice'](_0x56f35e+0x1),_0x2e53b1=_0x45098a[_0x15f584];if(!_0x2e53b1||typeof _0x2e53b1!==_0x3df95f(0x33e))throw new Error(_0x3df95f(0x428)+_0x3df95f(0x3d6)+_0x3df95f(0x3ce)+'\x20'+_0x15f584);const _0x4d5b1d=String(_0x2e53b1[_0x3df95f(0x1d6)]||_0x3df95f(0x312)+_0x3df95f(0x4dd)+_0x3df95f(0x222)+'1')[_0x3df95f(0x47c)]()[_0x3df95f(0x1ce)](/\/$/,''),_0x20e976=await fetch(_0x4d5b1d+(_0x3df95f(0x1d0)+_0x3df95f(0x336)+'s'),{'method':_0x3df95f(0x24b),'headers':{'content-type':_0x3df95f(0x330)+_0x3df95f(0x43e),'Authorization':_0x3df95f(0x3bb)+(_0x2e53b1['apiKey']||''),..._0x2e53b1[_0x3df95f(0x1e9)]&&typeof _0x2e53b1[_0x3df95f(0x1e9)]===_0x3df95f(0x33e)?_0x2e53b1[_0x3df95f(0x1e9)]:{}},'body':JSON['stringif'+'y']({'model':_0x5f05a1,'max_tokens':Number[_0x3df95f(0x40c)+'r'](_0x5df2d0['maxToken'+'s'])?_0x5df2d0[_0x3df95f(0x3fb)+'s']:0x400,'temperature':typeof _0x5df2d0[_0x3df95f(0x365)+_0x3df95f(0x21a)]===_0x3df95f(0x317)?_0x5df2d0[_0x3df95f(0x365)+_0x3df95f(0x21a)]:undefined,'messages':Array['isArray'](_0x5df2d0[_0x3df95f(0x444)])?_0x5df2d0['messages']:[]}),'signal':AbortSignal[_0x3df95f(0x1e2)](Number['isIntege'+'r'](_0x5df2d0[_0x3df95f(0x49d)+'s'])?_0x5df2d0[_0x3df95f(0x49d)+'s']:0x1d4c0)});if(!_0x20e976['ok']){const _0xd1b6d1=await _0x20e976['text']();throw new Error('model\x20ht'+_0x3df95f(0x31a)+_0x20e976[_0x3df95f(0x4a3)]+':\x20'+_0xd1b6d1['slice'](0x0,0x190));}const _0x399ece=await _0x20e976[_0x3df95f(0x42f)](),_0x3c056c=_0x399ece?.['choices']?.[0x0]?.[_0x3df95f(0x24f)]??{};return{'content':_0x4e6f19(_0x3c056c[_0x3df95f(0x1dc)]),'reasoning':typeof _0x3c056c[_0x3df95f(0x295)+_0x3df95f(0x4af)+'t']===_0x3df95f(0x2e2)?_0x3c056c[_0x3df95f(0x295)+_0x3df95f(0x4af)+'t']:'','model':_0x399ece?.[_0x3df95f(0x409)]||_0x5f05a1};}),_0x449ad2(_0x2aee76(0x205)+_0x2aee76(0x48d),()=>_0x5d5867()[_0x2aee76(0x35e)][_0x2aee76(0x3a8)]()),_0x449ad2(_0x2aee76(0x205)+_0x2aee76(0x1f4)+'ngs',(_0x830074,_0x180db0)=>_0x5d5867()[_0x2aee76(0x35e)][_0x2aee76(0x274)+'ngs'](_0x180db0)),_0x449ad2(_0x2aee76(0x205)+'et-self-'+_0x2aee76(0x2ca),(_0x337e88,_0xf464b0)=>_0x5d5867()['models'][_0x2aee76(0x293)+'peratedM'+'odels'](_0xf464b0)),_0x449ad2(_0x2aee76(0x205)+_0x2aee76(0x2da)+_0x2aee76(0x2a7),()=>_0x5d5867()[_0x2aee76(0x35e)]['selected'+_0x2aee76(0x32f)]()),_0x449ad2(_0x2aee76(0x2b5)+_0x2aee76(0x273)+_0x2aee76(0x415),()=>_0x5d5867()['models'][_0x2aee76(0x2fd)+_0x2aee76(0x415)]()),_0x449ad2('config:r'+_0x2aee76(0x407),()=>connectorController[_0x2aee76(0x2d9)+'igSnapsh'+'ot']()),_0x449ad2(_0x2aee76(0x43c)+_0x2aee76(0x270)+'dled-res'+'ources',async()=>{const _0x3ada60=_0x2aee76,_0xb468b0=await prepareRuntime(shellConfig,{'syncOnly':!![]});return await configController[_0x3ada60(0x3ab)+_0x3ada60(0x425)+'ns'](),{'ok':!![],'syncedAt':new Date()[_0x3ada60(0x1ff)+'ing'](),'manifest':_0xb468b0,'status':await getRuntimeResourceStatus()};}),_0x449ad2(_0x2aee76(0x43c)+'resource'+_0x2aee76(0x1ee),async()=>getRuntimeResourceStatus());}async function boot(){const _0x45af60=_0x48e3dc;shellConfig=await loadShellConfig(resolveProjectRoot()),app[_0x45af60(0x3b2)](shellConfig['productN'+'ame']),configController=createConfigController(shellConfig),mainLogger=createShellLogger(configController[_0x45af60(0x311)],_0x45af60(0x21c)),ipcLogger=createShellLogger(configController[_0x45af60(0x311)],_0x45af60(0x36f)),filesLogger=createShellLogger(configController[_0x45af60(0x311)],_0x45af60(0x2ef)),rendererLogger=createShellLogger(configController['paths'],_0x45af60(0x395)),registerProcessLogHooks(),mainLogger?.[_0x45af60(0x3cd)](_0x45af60(0x393)+_0x45af60(0x27f)+_0x45af60(0x463)+'ed',{'appVersion':app[_0x45af60(0x4d2)+'on'](),'electronVersion':process[_0x45af60(0x487)][_0x45af60(0x393)],'nodeVersion':process[_0x45af60(0x487)]['node'],'chromeVersion':process[_0x45af60(0x487)][_0x45af60(0x43d)],'platform':process[_0x45af60(0x2ed)],'arch':process[_0x45af60(0x37d)],'mode':getMode(),'projectRoot':shellConfig[_0x45af60(0x203)+_0x45af60(0x3c3)],'configPath':shellConfig[_0x45af60(0x42e)+'th'],'dataDir':shellConfig['dataDir'],'logsDir':configController[_0x45af60(0x311)][_0x45af60(0x300)],'rendererUrl':process.env.VITE_DEV_SERVER_URL||join(shellConfig['projectR'+'oot'],_0x45af60(0x387),_0x45af60(0x3f9)+'ml')}),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app['getVersi'+'on']()});for(const _0x1efc83 of[_0x45af60(0x42c)+_0x45af60(0x4a3),'gateway-'+_0x45af60(0x3eb),_0x45af60(0x45e)+_0x45af60(0x2ac)+'t',_0x45af60(0x33d)+'updated',_0x45af60(0x227)+'ent','agents-u'+_0x45af60(0x325),'ask-user'+_0x45af60(0x42b)+'n']){gatewayController['on'](_0x1efc83,_0x540541=>broadcast(_0x1efc83,_0x540541));}installIpcHandlers(),installClawspaceProtocolHandler(),registerShellShortcuts(),await createWindow(),await gatewayController[_0x45af60(0x240)](),mainLogger?.[_0x45af60(0x3cd)](_0x45af60(0x393)+_0x45af60(0x27f)+'ot\x20compl'+_0x45af60(0x358));}function registerProcessLogHooks(){const _0x2b5a09=_0x48e3dc;if(registerProcessLogHooks[_0x2b5a09(0x33a)+'ed'])return;registerProcessLogHooks[_0x2b5a09(0x33a)+'ed']=!![],process['on'](_0x2b5a09(0x45c)+_0x2b5a09(0x34b)+'n',_0x58c6b2=>{const _0x3085e2=_0x2b5a09;mainLogger?.['error'](_0x3085e2(0x45c)+_0x3085e2(0x3db)+'on',summarizeError(_0x58c6b2));}),process['on']('unhandle'+_0x2b5a09(0x1d3)+'on',_0x33476c=>{const _0xace6f3=_0x2b5a09;mainLogger?.[_0xace6f3(0x3ed)](_0xace6f3(0x247)+_0xace6f3(0x2c7)+'ion',summarizeError(_0x33476c));}),app['on'](_0x2b5a09(0x3d2)+'rocess-g'+_0x2b5a09(0x3fc),(_0x5bab1a,_0x4adb5a,_0x26350f)=>{const _0x63e09=_0x2b5a09;mainLogger?.[_0x63e09(0x3ed)](_0x63e09(0x395)+'\x20process'+_0x63e09(0x2ad),{'url':_0x4adb5a['getURL'](),'details':_0x26350f});}),app['on']('child-pr'+'ocess-go'+'ne',(_0x2607d9,_0x44dcdf)=>{const _0x17fc11=_0x2b5a09;mainLogger?.[_0x17fc11(0x3ed)](_0x17fc11(0x3b5)+_0x17fc11(0x2fb)+'ne',{'details':_0x44dcdf});});}app['on'](_0x48e3dc(0x2c6)+_0x48e3dc(0x429)+'d',()=>{const _0x179e7c=_0x48e3dc;if(process[_0x179e7c(0x2ed)]!=='darwin')app[_0x179e7c(0x375)]();}),app['on'](_0x48e3dc(0x386),async()=>{const _0x4fe221=_0x48e3dc;BrowserWindow[_0x4fe221(0x255)+_0x4fe221(0x401)]()[_0x4fe221(0x4b5)]===0x0&&shellConfig&&await createWindow();}),app['on'](_0x48e3dc(0x4a0)+_0x48e3dc(0x2d3),_0x31d420=>{const _0x3eaf2d=_0x48e3dc;terminalManager?.[_0x3eaf2d(0x346)](),terminalManager=null,connectorController?.[_0x3eaf2d(0x346)](),connectorController=null;if(!gatewayController)return;mainLogger?.[_0x3eaf2d(0x3cd)](_0x3eaf2d(0x42a)+'uit:\x20sto'+_0x3eaf2d(0x39c)+'teway'),_0x31d420[_0x3eaf2d(0x460)+_0x3eaf2d(0x436)](),void gatewayController[_0x3eaf2d(0x3a4)]()['finally'](()=>{const _0x37fe71=_0x3eaf2d;gatewayController=null,mainLogger?.[_0x37fe71(0x3cd)]('gateway\x20'+'stopped\x20'+_0x37fe71(0x42a)+_0x37fe71(0x2d3)),app[_0x37fe71(0x375)]();});}),app['on']('will-qui'+'t',()=>{const _0x47362e=_0x48e3dc;globalShortcut[_0x47362e(0x39f)+'er'](DEVTOOLS_ACCELERATOR);}),app[_0x48e3dc(0x392)+'y']()[_0x48e3dc(0x433)](boot)[_0x48e3dc(0x373)](_0x204741=>{const _0x2d2985=_0x48e3dc;bootError=_0x204741 instanceof Error?_0x204741[_0x2d2985(0x24f)]:String(_0x204741),mainLogger?.[_0x2d2985(0x3ed)](_0x2d2985(0x393)+_0x2d2985(0x27f)+'ot\x20faile'+'d',summarizeError(_0x204741)),console[_0x2d2985(0x3ed)]('[wujie-s'+'hell]\x20fa'+_0x2d2985(0x431)+_0x2d2985(0x35b)+_0x2d2985(0x47a)+'in',_0x204741);});
|
|
1
|
+
const _0x285fc1=_0x4f83;(function(_0x248738,_0x167021){const _0x43ee2=_0x4f83,_0xc67da4=_0x248738();while(!![]){try{const _0x2bf44f=-parseInt(_0x43ee2(0x206))/0x1+-parseInt(_0x43ee2(0x2b9))/0x2*(parseInt(_0x43ee2(0x290))/0x3)+parseInt(_0x43ee2(0x442))/0x4+-parseInt(_0x43ee2(0x229))/0x5*(parseInt(_0x43ee2(0x408))/0x6)+-parseInt(_0x43ee2(0x161))/0x7*(parseInt(_0x43ee2(0x2e4))/0x8)+-parseInt(_0x43ee2(0x208))/0x9*(parseInt(_0x43ee2(0x287))/0xa)+parseInt(_0x43ee2(0x30b))/0xb;if(_0x2bf44f===_0x167021)break;else _0xc67da4['push'](_0xc67da4['shift']());}catch(_0x2894a5){_0xc67da4['push'](_0xc67da4['shift']());}}}(_0x4c7f,0xb278b));import _0x3d539c from'electron';import{fileURLToPath,pathToFileURL}from'node:url';import{dirname,join,resolve,sep}from'node:path';import{createReadStream,existsSync,statSync}from'node:fs';import{readFile,readdir,stat,writeFile}from'node:fs/promises';import{spawn}from'node:child_process';import{Readable}from'node:stream';import{loadShellConfig}from'@wujie-shell/config';import{createConfigController}from'../config/controller.mjs';import{createGatewayController}from'../gateway/controller.mjs';import{deleteManagedSkill,importSkillZip,updateManagedSkillConfig}from'../skills/import.mjs';import{deleteMarketSkillRegistryEntry,importMarketSkillZip}from'../skills/market.mjs';import{createAgentSessionsMapStore}from'../sessions/agent-sessions-map-store.mjs';import{createTerminalManager}from'../terminal/manager.mjs';function _0x4f83(_0x1e28f0,_0x3efb67){_0x1e28f0=_0x1e28f0-0x144;const _0x4c7f46=_0x4c7f();let _0x4f8356=_0x4c7f46[_0x1e28f0];return _0x4f8356;}import{createShellLogger,exportLogsArchive,summarizeError,summarizePayload,summarizeText,toHomePath}from'../common/logging.mjs';import{createDiagnosticsWriter,diagnosticEventFromError}from'../common/diagnostics.mjs';import{createUserEventWriter}from'../common/user-events.mjs';import{createConnectorController}from'../connectors/controller.mjs';import{resolveRuntimeKdocsCliCommand}from'../connectors/kdocs-cli.mjs';import{createGeneratedFilesStore}from'../files/generated-files-store.mjs';import{registerFileHandlers}from'../files/handlers.mjs';import{registerProductLogHandlers}from'../log-reporting/handlers.mjs';import{resolveWujieApiEndpoint}from'../log-reporting/report-logs.mjs';import{extractModelMessageContent,registerModelHandlers}from'../models/handlers.mjs';import{createPreferencesStore}from'../preferences/store.mjs';import{loadRuntimeInfo,prepareRuntime,resolveRuntimeRoot,getRuntimeSpawnContext,resolveRuntimeLarkCliCommand,runClawOnce}from'../runtime/index.mjs';const __dirname=dirname(fileURLToPath(import.meta.url)),preloadPath=join(__dirname,_0x285fc1(0x1f0)+_0x285fc1(0x3ff)),{app,BrowserWindow,clipboard,dialog,globalShortcut,ipcMain,protocol,shell}=_0x3d539c,DEVTOOLS_ACCELERATOR=_0x285fc1(0x1e7)+'rControl'+_0x285fc1(0x175),CLAWSPACE_PROTOCOL_SCHEME=_0x285fc1(0x447)+'e',DEBUG_STDOUT=process.env.WUJIE_SHELL_DEBUG==='1'||process.env.VITE_DEV_SERVER_URL||process.env.NODE_ENV!==_0x285fc1(0x36e)+'on',LOCAL_FILE_MIME_TYPES=new Map([[_0x285fc1(0x21a),_0x285fc1(0x25e)+_0x285fc1(0x331)+_0x285fc1(0x382)+'8'],['.md',_0x285fc1(0x16e)+_0x285fc1(0x28a)+'harset=u'+_0x285fc1(0x1f9)],['.jpg',_0x285fc1(0x15f)+'eg'],[_0x285fc1(0x1a2),'image/jp'+'eg'],[_0x285fc1(0x285),_0x285fc1(0x22d)+'g'],[_0x285fc1(0x233),_0x285fc1(0x1f3)+'f'],['.bmp',_0x285fc1(0x1e1)+'p'],['.svg',_0x285fc1(0x2e8)+_0x285fc1(0x26c)],[_0x285fc1(0x41e),_0x285fc1(0x3d3)+'bp'],[_0x285fc1(0x234),_0x285fc1(0x1a8)+'4'],[_0x285fc1(0x252),_0x285fc1(0x318)+_0x285fc1(0x29f)],['.avi',_0x285fc1(0x346)+_0x285fc1(0x1ab)],[_0x285fc1(0x365),_0x285fc1(0x346)+'matroska'],[_0x285fc1(0x366),_0x285fc1(0x28b)+'bm'],['.mp3','audio/mp'+'eg'],[_0x285fc1(0x43c),_0x285fc1(0x384)+'v'],['.m4a',_0x285fc1(0x2ba)+'4'],[_0x285fc1(0x230),_0x285fc1(0x18d)+'c'],['.ogg',_0x285fc1(0x30e)+'g'],[_0x285fc1(0x3fa),_0x285fc1(0x2c7)+'ac']]);protocol[_0x285fc1(0x3c0)+_0x285fc1(0x276)+'sPrivile'+_0x285fc1(0x2a7)]([{'scheme':CLAWSPACE_PROTOCOL_SCHEME,'privileges':{'secure':!![],'standard':!![],'supportFetchAPI':!![],'corsEnabled':!![]}}]);let mainWindow=null,shellConfig=null,configController=null,gatewayController=null,bootError=null,mainLogger=null,ipcLogger=null,filesLogger=null,rendererLogger=null,terminalManager=null,connectorController=null,productRuntime=null,productRuntimeHooks={},diagnosticsWriter=null,userEventWriter=null,isQuitting=![];function attachGatewayBroadcastHandlers(_0x5e3596){const _0x4541ee=_0x285fc1;for(const _0x3449fa of[_0x4541ee(0x3b8)+_0x4541ee(0x1fe),_0x4541ee(0x3b8)+_0x4541ee(0x395),_0x4541ee(0x177)+'eam-even'+'t','session-'+_0x4541ee(0x1e2),'agent-ev'+_0x4541ee(0x379),_0x4541ee(0x19a)+'pdated',_0x4541ee(0x431)+'-questio'+'n']){_0x5e3596['on'](_0x3449fa,_0xad6fb=>broadcast(_0x3449fa,_0xad6fb));}}async function ensureGatewayControllerStarted(){const _0x1f9d26=_0x285fc1;if(gatewayController)return gatewayController;if(!shellConfig||!configController)throw new Error(bootError?'wujie-sh'+_0x1f9d26(0x27c)+'\x20failed:'+'\x20'+bootError:_0x1f9d26(0x385)+_0x1f9d26(0x3f4)+'way\x20is\x20n'+_0x1f9d26(0x3e9)+_0x1f9d26(0x411));return mainLogger?.[_0x1f9d26(0x18b)](_0x1f9d26(0x232)+_0x1f9d26(0x362)+'er\x20missi'+_0x1f9d26(0x281)+_0x1f9d26(0x247)),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app[_0x1f9d26(0x1c4)+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter}),attachGatewayBroadcastHandlers(gatewayController),await gatewayController[_0x1f9d26(0x31c)](),gatewayController;}function getMode(){const _0x20f6a7=_0x285fc1;return process.env.VITE_DEV_SERVER_URL?_0x20f6a7(0x2d8):_0x20f6a7(0x267);}function getShellAppUpdateState(){const _0x5ce971=_0x285fc1;return{'supported':![],'channel':_0x5ce971(0x3b4),'phase':_0x5ce971(0x27e)+_0x5ce971(0x167),'currentVersion':app[_0x5ce971(0x1c4)+'on'](),'remoteVersion':null,'comparisonResult':_0x5ce971(0x342),'hasUpdate':![],'availableVersion':null,'downloadedVersion':null,'releaseName':null,'releaseDate':null,'releaseNotes':null,'downloadPercent':null,'bytesPerSecond':null,'transferredBytes':null,'totalBytes':null,'hasPendingPackage':![],'pendingPackageName':null,'pendingPackageBytes':null,'checkedAt':null,'message':_0x5ce971(0x329)+_0x5ce971(0x228),'error':null,'errorCode':null};}function isGatewayNotInitializedError(_0x299f05){const _0x5a41ff=_0x285fc1;return _0x299f05 instanceof Error&&_0x299f05[_0x5a41ff(0x42b)]==='wujie-sh'+_0x5a41ff(0x3f4)+_0x5a41ff(0x1c5)+_0x5a41ff(0x3e9)+'alized';}function resolveProjectRoot(){const _0x362bba=_0x285fc1;if(process.env.WUJIE_SHELL_PROJECT_ROOT)return resolve(process.env.WUJIE_SHELL_PROJECT_ROOT);if(app[_0x362bba(0x324)+'ed']&&process['resource'+_0x362bba(0x439)])return join(process[_0x362bba(0x409)+_0x362bba(0x439)],'app.asar');return resolve(process[_0x362bba(0x174)]());}function getLocalFileMimeType(_0x9f3394){const _0x48c33d=_0x285fc1;return LOCAL_FILE_MIME_TYPES[_0x48c33d(0x35d)](_0x9f3394[_0x48c33d(0x297)](_0x9f3394['lastInde'+_0x48c33d(0x23a)]('.'))[_0x48c33d(0x3cc)+'ase']())||_0x48c33d(0x1ea)+_0x48c33d(0x3f5)+_0x48c33d(0x24c);}function parseSingleRangeHeader(_0x1696da,_0x145f00){const _0x1d81a4=_0x285fc1,_0x5c878a=/^bytes=(\d*)-(\d*)$/i['exec'](_0x1696da[_0x1d81a4(0x22e)]());if(!_0x5c878a)return null;const [,_0x1188c3,_0x3f073d]=_0x5c878a;if(!_0x1188c3&&!_0x3f073d)return null;if(!_0x1188c3){const _0x17839a=Number[_0x1d81a4(0x363)](_0x3f073d,0xa);if(!Number[_0x1d81a4(0x334)](_0x17839a)||_0x17839a<=0x0)return null;const _0x38ff47=Math[_0x1d81a4(0x25a)](_0x145f00-_0x17839a,0x0);return{'start':_0x38ff47,'end':_0x145f00-0x1};}const _0x22858b=Number[_0x1d81a4(0x363)](_0x1188c3,0xa);if(!Number[_0x1d81a4(0x334)](_0x22858b)||_0x22858b<0x0||_0x22858b>=_0x145f00)return null;const _0x15a1ea=_0x3f073d?Number[_0x1d81a4(0x363)](_0x3f073d,0xa):_0x145f00-0x1;if(!Number[_0x1d81a4(0x334)](_0x15a1ea)||_0x15a1ea<_0x22858b)return null;return{'start':_0x22858b,'end':Math[_0x1d81a4(0x2c0)](_0x15a1ea,_0x145f00-0x1)};}function decodeClawspacePath(_0x3292dd){const _0x5ac211=_0x285fc1;try{const _0x13165c=new URL(_0x3292dd);if(_0x13165c[_0x5ac211(0x2b5)]!==CLAWSPACE_PROTOCOL_SCHEME+':')return null;if(_0x13165c[_0x5ac211(0x37c)]!=='local')return null;const _0x32ccef=decodeURIComponent(_0x13165c[_0x5ac211(0x424)]);if(!_0x32ccef)return null;if(/^\/[A-Za-z]:\//[_0x5ac211(0x291)](_0x32ccef))return _0x32ccef[_0x5ac211(0x297)](0x1);return _0x32ccef;}catch{return null;}}function createClawspaceHeaders(_0x2e2597={}){const _0x294679=_0x285fc1;return new Headers({'access-control-allow-origin':'*','access-control-allow-methods':_0x294679(0x298)+'D,\x20OPTIO'+'NS','access-control-allow-headers':_0x294679(0x38a)+'ontent-t'+_0x294679(0x21b),'access-control-expose-headers':_0x294679(0x389)+_0x294679(0x27b)+_0x294679(0x389)+_0x294679(0x299)+_0x294679(0x36b)+_0x294679(0x426),..._0x2e2597});}function createLocalFileResponse(_0xd7ec98,_0x3bb885){const _0x16330f=_0x285fc1,_0x5a2aa2=statSync(_0x3bb885);if(!_0x5a2aa2[_0x16330f(0x3ef)]())return new Response(_0x16330f(0x2ef)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':'text/pla'+_0x16330f(0x331)+'set=utf-'+'8'})});const _0x5f0008=getLocalFileMimeType(_0x3bb885),_0x1242de=createClawspaceHeaders({'content-type':_0x5f0008,'accept-ranges':_0x16330f(0x178),'cache-control':_0x16330f(0x2bc)});if(_0xd7ec98[_0x16330f(0x2bb)]===_0x16330f(0x356))return _0x1242de[_0x16330f(0x1d2)](_0x16330f(0x389)+'length',String(_0x5a2aa2['size'])),new Response(null,{'status':0xc8,'headers':_0x1242de});const _0x2a011a=_0xd7ec98[_0x16330f(0x155)]['get'](_0x16330f(0x28e));if(!_0x2a011a)return _0x1242de['set']('content-'+_0x16330f(0x3b3),String(_0x5a2aa2[_0x16330f(0x20a)])),new Response(Readable[_0x16330f(0x3fb)](createReadStream(_0x3bb885)),{'status':0xc8,'headers':_0x1242de});const _0x4c7158=parseSingleRangeHeader(_0x2a011a,_0x5a2aa2[_0x16330f(0x20a)]);if(!_0x4c7158)return new Response(null,{'status':0x1a0,'headers':createClawspaceHeaders({...Object[_0x16330f(0x28f)+_0x16330f(0x3e8)](_0x1242de['entries']()),'content-range':_0x16330f(0x387)+_0x5a2aa2['size']})});const {start:_0xa97678,end:_0xbbc014}=_0x4c7158,_0x1ed3d9=_0xbbc014-_0xa97678+0x1,_0x32c50d=new Headers(_0x1242de);return _0x32c50d[_0x16330f(0x1d2)](_0x16330f(0x389)+_0x16330f(0x3b3),String(_0x1ed3d9)),_0x32c50d[_0x16330f(0x1d2)]('content-'+_0x16330f(0x28e),_0x16330f(0x3c9)+_0xa97678+'-'+_0xbbc014+'/'+_0x5a2aa2[_0x16330f(0x20a)]),new Response(Readable[_0x16330f(0x3fb)](createReadStream(_0x3bb885,{'start':_0xa97678,'end':_0xbbc014})),{'status':0xce,'headers':_0x32c50d});}function installClawspaceProtocolHandler(){const _0x439c41=_0x285fc1;protocol[_0x439c41(0x1fd)](CLAWSPACE_PROTOCOL_SCHEME,_0x3f0c68=>{const _0x4ca948=_0x439c41;if(_0x3f0c68[_0x4ca948(0x2bb)]===_0x4ca948(0x1d6))return new Response(null,{'status':0xcc,'headers':createClawspaceHeaders()});const _0x45d924=decodeClawspacePath(_0x3f0c68[_0x4ca948(0x24e)]);if(!_0x45d924)return new Response(_0x4ca948(0x43f)+_0x4ca948(0x447)+_0x4ca948(0x154),{'status':0x190,'headers':createClawspaceHeaders({'content-type':_0x4ca948(0x25e)+_0x4ca948(0x331)+'set=utf-'+'8'})});if(!existsSync(_0x45d924))return new Response('Not\x20foun'+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x4ca948(0x25e)+'in;\x20char'+_0x4ca948(0x382)+'8'})});return createLocalFileResponse(_0x3f0c68,_0x45d924);});}function broadcast(_0x282c9c,_0x1cd5ee){const _0x312a6a=_0x285fc1;DEBUG_STDOUT&&console[_0x312a6a(0x24a)]('[wujie-s'+_0x312a6a(0x2fa)+_0x312a6a(0x239),_0x282c9c,summarizePayload(_0x1cd5ee,{'maxDepth':0x2}));for(const _0x2f0e96 of BrowserWindow[_0x312a6a(0x1f8)+_0x312a6a(0x2d7)]()){!_0x2f0e96[_0x312a6a(0x1cb)+_0x312a6a(0x14c)][_0x312a6a(0x427)+_0x312a6a(0x149)]()&&_0x2f0e96[_0x312a6a(0x1cb)+_0x312a6a(0x14c)][_0x312a6a(0x393)]('wujie-sh'+_0x312a6a(0x1dc)+'t',{'name':_0x282c9c,'payload':_0x1cd5ee});}}async function loadProductRuntime(){const _0x2997cc=_0x285fc1,_0x401074=[join(shellConfig[_0x2997cc(0x2e9)+'oot'],_0x2997cc(0x1df)+'ntime','index.mj'+'s'),join(app[_0x2997cc(0x2f1)+'th'](),_0x2997cc(0x1df)+_0x2997cc(0x26f),_0x2997cc(0x3d5)+'s')],_0x8cd9e3=_0x401074[_0x2997cc(0x25c)](_0x3f744a=>existsSync(_0x3f744a));if(!_0x8cd9e3)return mainLogger?.[_0x2997cc(0x24a)](_0x2997cc(0x2d0)+_0x2997cc(0x1b9)+_0x2997cc(0x3f6)+_0x2997cc(0x25f)+'und',{'runtimeCandidates':_0x401074}),{};try{const _0x547bb1=await import(pathToFileURL(_0x8cd9e3)[_0x2997cc(0x296)]);return mainLogger?.[_0x2997cc(0x24a)](_0x2997cc(0x2d0)+_0x2997cc(0x1b9)+_0x2997cc(0x3f6)+_0x2997cc(0x41a),{'runtimePath':_0x8cd9e3}),_0x547bb1;}catch(_0x362212){mainLogger?.['error'](_0x2997cc(0x2d0)+_0x2997cc(0x1b9)+_0x2997cc(0x3f6)+'n\x20failed'+'\x20to\x20load',{'runtimePath':_0x8cd9e3,'error':summarizeError(_0x362212)});throw _0x362212;}}function openDevToolsForActiveContext(){const _0x2db7f0=_0x285fc1,_0x2dbbe8=BrowserWindow[_0x2db7f0(0x1bf)+_0x2db7f0(0x30c)]()||mainWindow;if(!_0x2dbbe8||_0x2dbbe8[_0x2db7f0(0x427)+_0x2db7f0(0x149)]())return{'ok':![]};return _0x2dbbe8[_0x2db7f0(0x1cb)+_0x2db7f0(0x14c)][_0x2db7f0(0x1b1)+_0x2db7f0(0x1ee)]({'mode':'detach'}),_0x2dbbe8[_0x2db7f0(0x1cb)+_0x2db7f0(0x14c)][_0x2db7f0(0x393)](_0x2db7f0(0x385)+_0x2db7f0(0x1dc)+'t',{'name':_0x2db7f0(0x204)+_0x2db7f0(0x1a9)+'t','payload':{'accelerator':DEVTOOLS_ACCELERATOR}}),{'ok':!![]};}function registerShellShortcuts(){const _0x7e1dc9=_0x285fc1;globalShortcut[_0x7e1dc9(0x1b0)+'er'](DEVTOOLS_ACCELERATOR);const _0x27db92=globalShortcut[_0x7e1dc9(0x3c0)](DEVTOOLS_ACCELERATOR,openDevToolsForActiveContext);!_0x27db92&&console[_0x7e1dc9(0x18b)](_0x7e1dc9(0x295)+_0x7e1dc9(0x31a)+_0x7e1dc9(0x2e6)+_0x7e1dc9(0x3c0)+_0x7e1dc9(0x1be)+_0x7e1dc9(0x2d2)+DEVTOOLS_ACCELERATOR);}async function getRuntimeResourceStatus(){const _0x4251e8=_0x285fc1;try{const _0xedc834=await loadRuntimeInfo(shellConfig['projectR'+_0x4251e8(0x196)]),_0x5276ab=_0xedc834['manifest']||{};return{'ok':!![],'runtimeRoot':_0xedc834[_0x4251e8(0x359)+'oot'],'openclawVersion':_0xedc834[_0x4251e8(0x397)+_0x4251e8(0x1e5)],'generatedAt':_0x5276ab['generate'+_0x4251e8(0x23b)]||null,'pluginCount':Array[_0x4251e8(0x2f3)](_0x5276ab[_0x4251e8(0x37b)])?_0x5276ab[_0x4251e8(0x37b)][_0x4251e8(0x3b3)]:0x0,'plugins':Array[_0x4251e8(0x2f3)](_0x5276ab[_0x4251e8(0x37b)])?_0x5276ab[_0x4251e8(0x37b)]:[],'agents':_0x5276ab[_0x4251e8(0x437)]||null,'skills':_0x5276ab['skills']||null,'wrapper':_0x5276ab[_0x4251e8(0x200)+_0x4251e8(0x2ec)]||null,'product':_0x5276ab[_0x4251e8(0x2a2)]||null};}catch(_0x1755ca){return{'ok':![],'runtimeRoot':resolveRuntimeRoot(shellConfig?.['projectR'+_0x4251e8(0x196)]||resolveProjectRoot()),'error':_0x1755ca instanceof Error?_0x1755ca[_0x4251e8(0x42b)]:String(_0x1755ca)};}}async function createWindow(){const _0x4fc185=_0x285fc1,_0x3f148f=process.env.VITE_DEV_SERVER_URL||join(shellConfig[_0x4fc185(0x2e9)+_0x4fc185(0x196)],_0x4fc185(0x3f2),_0x4fc185(0x3dd)+'ml'),_0x568288=process[_0x4fc185(0x2de)]===_0x4fc185(0x271);mainLogger?.[_0x4fc185(0x24a)]('creating'+_0x4fc185(0x37a)+'ndow',{'rendererUrl':_0x3f148f,'mode':getMode()}),mainWindow=new BrowserWindow({'width':0x49c,'height':0x30c,'minWidth':0x384,'minHeight':0x26c,'title':shellConfig['productN'+_0x4fc185(0x3bd)],'backgroundColor':_0x568288?'#0000000'+'0':'#f8fafc','titleBarStyle':_0x568288?_0x4fc185(0x33f):_0x4fc185(0x29b),..._0x568288?{'titleBarOverlay':!![],'trafficLightPosition':{'x':0x10,'y':0xc}}:{},..._0x568288?{'vibrancy':_0x4fc185(0x3ba)}:{},'webPreferences':{'preload':preloadPath,'contextIsolation':!![],'nodeIntegration':![],'sandbox':![]}}),mainWindow[_0x4fc185(0x1cb)+_0x4fc185(0x14c)]['on'](_0x4fc185(0x301)+_0x4fc185(0x38e)+'nt',_0x5861b1=>{const _0x133063=_0x4fc185,_0x4de044=_0x5861b1[_0x133063(0x372)];if(!_0x4de044||_0x4de044['type']!=='keyDown')return;const _0x4c8a6d=String(_0x4de044[_0x133063(0x269)]||'')[_0x133063(0x3cc)+_0x133063(0x231)](),_0x4a56fa=_0x4c8a6d==='r',_0x342f6a=process['platform']===_0x133063(0x271)?_0x4de044[_0x133063(0x2f7)]===!![]:_0x4de044[_0x133063(0x2a6)]===!![];if(!_0x4a56fa||!_0x342f6a)return;_0x5861b1['preventD'+'efault'](),broadcast(_0x133063(0x188)+_0x133063(0x3ce),{'type':_0x133063(0x322)+'on','action':'reload'});});const _0x7b59f3=process.env.VITE_DEV_SERVER_URL;_0x7b59f3?(await mainWindow['loadURL'](_0x7b59f3),process.env.WUJIE_SHELL_OPEN_DEVTOOLS==='1'&&mainWindow['webConte'+_0x4fc185(0x14c)]['openDevT'+_0x4fc185(0x1ee)]({'mode':_0x4fc185(0x2fb)})):await mainWindow[_0x4fc185(0x170)](join(shellConfig[_0x4fc185(0x2e9)+'oot'],'dist',_0x4fc185(0x3dd)+'ml')),mainLogger?.[_0x4fc185(0x24a)]('main\x20win'+_0x4fc185(0x399)+'ed',{'rendererUrl':_0x3f148f,'mode':getMode()});}function installIpcHandlers(){const _0x5b77f8=_0x285fc1,_0x4ada6c=(_0x51e09c,_0x58b4ff)=>{const _0x255a95=_0x4f83;ipcMain[_0x255a95(0x1fd)](_0x51e09c,async(_0x334b95,_0x5302d0)=>{const _0xc47325=_0x255a95,_0x2d66b8=Date['now'](),_0x52066f=_0x334b95[_0xc47325(0x1b6)+_0xc47325(0x3bd)]?.['url']||_0x334b95[_0xc47325(0x35e)]['getURL']();ipcLogger?.['info']('ipc\x20requ'+_0xc47325(0x19c)+_0xc47325(0x167),{'channel':_0x51e09c,'senderUrl':_0x52066f,'payload':summarizePayload(_0x5302d0)});DEBUG_STDOUT&&console[_0xc47325(0x24a)](_0xc47325(0x295)+_0xc47325(0x2ff)+']',_0x51e09c,_0xc47325(0x3be),summarizePayload(_0x5302d0));try{let _0x328261;try{_0x328261=await _0x58b4ff(_0x334b95,_0x5302d0);}catch(_0x890871){if(!isGatewayNotInitializedError(_0x890871))throw _0x890871;await ensureGatewayControllerStarted(),_0x328261=await _0x58b4ff(_0x334b95,_0x5302d0);}const _0x1760c6=Date[_0xc47325(0x274)]()-_0x2d66b8;return ipcLogger?.[_0xc47325(0x24a)](_0xc47325(0x43e)+_0xc47325(0x243)+_0xc47325(0x286),{'channel':_0x51e09c,'durationMs':_0x1760c6,'result':summarizePayload(_0x328261,{'maxDepth':0x2})}),await userEventWriter?.['fromIpc']({'channel':_0x51e09c,'payload':_0x5302d0,'result':_0x328261,'durationMs':_0x1760c6,'status':_0xc47325(0x3f3)+'d'}),DEBUG_STDOUT&&console[_0xc47325(0x24a)](_0xc47325(0x295)+_0xc47325(0x2ff)+']',_0x51e09c,_0xc47325(0x3eb)+'d',summarizePayload(_0x328261,{'maxDepth':0x2})),_0x328261;}catch(_0x260252){const _0x17b2ab=Date[_0xc47325(0x274)]()-_0x2d66b8;ipcLogger?.['error']('ipc\x20requ'+_0xc47325(0x340)+'ed',{'channel':_0x51e09c,'durationMs':_0x17b2ab,'error':summarizeError(_0x260252)}),await userEventWriter?.[_0xc47325(0x249)]({'channel':_0x51e09c,'payload':_0x5302d0,'error':_0x260252,'durationMs':_0x17b2ab,'status':_0xc47325(0x403)}),await diagnosticsWriter?.[_0xc47325(0x355)+'ncident'](diagnosticEventFromError(_0x260252,{'category':_0xc47325(0x425),'event':_0xc47325(0x1a6)+_0xc47325(0x3c8)+'ed','message':_0xc47325(0x3d8)+'est\x20fail'+_0xc47325(0x3d2)+_0x51e09c,'durationMs':_0x17b2ab,'meta':{'channel':_0x51e09c,'senderUrl':_0x52066f,'payload':summarizePayload(_0x5302d0)}}));DEBUG_STDOUT&&console[_0xc47325(0x157)]('[wujie-s'+'hell:ipc'+']',_0x51e09c,'failed',summarizeError(_0x260252));throw _0x260252;}});},_0x1a10ee=()=>{const _0x32355c=_0x4f83;if(!gatewayController)throw new Error(bootError?_0x32355c(0x385)+'ell\x20boot'+_0x32355c(0x14b)+'\x20'+bootError:_0x32355c(0x385)+_0x32355c(0x3f4)+_0x32355c(0x1c5)+_0x32355c(0x3e9)+_0x32355c(0x411));return gatewayController;},_0x19558e=()=>{const _0x4e022d=_0x4f83;if(typeof productRuntime[_0x4e022d(0x3c0)+_0x4e022d(0x1c6)+_0x4e022d(0x31f)+_0x4e022d(0x36f)]!==_0x4e022d(0x23c))return;const _0x3f98b2=productRuntime[_0x4e022d(0x3c0)+_0x4e022d(0x1c6)+_0x4e022d(0x31f)+'ndlers']({'app':app,'BrowserWindow':BrowserWindow,'broadcast':broadcast,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'dialog':dialog,'exportLogsArchive':exportLogsArchive,'filesLogger':filesLogger,'getRuntimeSpawnContext':getRuntimeSpawnContext,'handle':_0x4ada6c,'mainLogger':mainLogger,'mainWindow':mainWindow,'rendererLogger':rendererLogger,'requireGateway':_0x1a10ee,'sep':sep,'openClawConfigHandlers':{'update':(..._0x4934b5)=>configController['updateOp'+_0x4e022d(0x1d7)+_0x4e022d(0x1af)](..._0x4934b5),'setPluginConfig':_0x165075=>configController[_0x4e022d(0x2b3)+_0x4e022d(0x367)+_0x4e022d(0x18a)](_0x165075),'setChannelConfig':_0x3375b9=>configController[_0x4e022d(0x2b3)+'lawChann'+'elConfig'](_0x3375b9),'deleteChannelConfig':_0x43540d=>configController[_0x4e022d(0x3c4)+_0x4e022d(0x1aa)+_0x4e022d(0x1ae)+'fig'](_0x43540d),'setSkillEntry':_0x24aea3=>configController[_0x4e022d(0x2b3)+_0x4e022d(0x209)+_0x4e022d(0x396)](_0x24aea3),'deleteSkillEntry':_0x54ee04=>configController[_0x4e022d(0x3c4)+_0x4e022d(0x38b)+_0x4e022d(0x19b)](_0x54ee04),'setMcpServer':_0x37196f=>configController['setOpenC'+'lawMcpSe'+_0x4e022d(0x309)](_0x37196f),'deleteMcpServer':_0x27ebc0=>configController['deleteOp'+_0x4e022d(0x2b6)+'pServer'](_0x27ebc0)},'shell':shell,'shellConfig':shellConfig,'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand,'summarizePayload':summarizePayload,'summarizeText':summarizeText,'toHomePath':toHomePath,'writeMutableConfig':_0xe25fa9})||{};Object['assign'](productRuntimeHooks,_0x3f98b2);};_0x4ada6c(_0x5b77f8(0x3a9),async()=>({'name':shellConfig[_0x5b77f8(0x42d)+_0x5b77f8(0x3bd)],'version':app[_0x5b77f8(0x1c4)+'on'](),'appId':shellConfig[_0x5b77f8(0x259)],'dataDir':shellConfig[_0x5b77f8(0x3a3)]})),_0x4ada6c(_0x5b77f8(0x1d4)+'-url',async(_0x48c932,_0x3ee932)=>{const _0x5b6e35=_0x5b77f8,_0x42bb27=typeof _0x3ee932===_0x5b6e35(0x2fc)?_0x3ee932:'';if(!_0x42bb27)return{'ok':![]};return filesLogger?.[_0x5b6e35(0x24a)](_0x5b6e35(0x1c3)+_0x5b6e35(0x152)+'l\x20reques'+'ted',{'url':summarizeText(_0x42bb27,0xa0)}),await shell[_0x5b6e35(0x1ce)+_0x5b6e35(0x2e5)](_0x42bb27),{'ok':!![]};});const _0xe25fa9=async(_0x32bad5,_0x30658f)=>{const _0x7e8013=_0x5b77f8;return configController[_0x7e8013(0x2f0)+'igWriteH'+_0x7e8013(0x44b)+'ternally'](),await configController[_0x7e8013(0x1c1)+'fig'](_0x32bad5,_0x30658f),{'ok':!![]};};_0x19558e(),_0x4ada6c(_0x5b77f8(0x3c3)+_0x5b77f8(0x320)+'p',async(_0x4637d3,_0x324a3c)=>importMarketSkillZip({'payload':_0x324a3c,'importSkillZip':_0x450c9f=>importSkillZip({..._0x450c9f,'app':app,'dialog':dialog,'dialogWindow':BrowserWindow['fromWebC'+_0x5b77f8(0x308)](_0x4637d3[_0x5b77f8(0x35e)])||mainWindow,'configController':configController}),'configController':configController})),_0x4ada6c(_0x5b77f8(0x343)+_0x5b77f8(0x21c),(_0x1d35f8,_0x5c7350)=>updateManagedSkillConfig({'payload':_0x5c7350,'configController':configController})),_0x4ada6c(_0x5b77f8(0x2ee)+'elete',(_0x300f60,_0x14c9c3)=>deleteMarketSkillRegistryEntry({'payload':_0x14c9c3,'deleteManagedSkill':_0x14146a=>deleteManagedSkill({..._0x14146a,'gateway':_0x1a10ee(),'configController':configController}),'configController':configController}));const _0xc72161=createGeneratedFilesStore({'stateDir':configController[_0x5b77f8(0x16c)+_0x5b77f8(0x339)]()});_0x4ada6c(_0x5b77f8(0x2fd)+_0x5b77f8(0x227)+_0x5b77f8(0x423),async()=>_0xc72161[_0x5b77f8(0x218)]()),_0x4ada6c('app:gene'+'rated-fi'+'les:upse'+'rt',async(_0x29c65e,_0x4fa8dd={})=>_0xc72161['upsert'](_0x4fa8dd)),_0x4ada6c(_0x5b77f8(0x2fd)+_0x5b77f8(0x227)+_0x5b77f8(0x3f1),async(_0xce6efb,_0x1050c0)=>_0xc72161['hide'](String(_0x1050c0||''))),_0x4ada6c(_0x5b77f8(0x2fd)+_0x5b77f8(0x227)+'les:hide'+_0x5b77f8(0x448)+_0x5b77f8(0x3df),async(_0x1f2e79,_0x2e5900)=>_0xc72161['hideBySe'+'ssion'](String(_0x2e5900||''))),_0x4ada6c(_0x5b77f8(0x2fd)+'rated-fi'+_0x5b77f8(0x436)+'te',async(_0x7ff892,_0x439c76)=>_0xc72161[_0x5b77f8(0x347)+'le'](String(_0x439c76||''))),_0x4ada6c(_0x5b77f8(0x2fd)+'rated-fi'+_0x5b77f8(0x436)+_0x5b77f8(0x2b4)+'e',async(_0x3172e1,_0x1cff23=[])=>_0xc72161[_0x5b77f8(0x38c)+_0x5b77f8(0x2ac)](_0x1cff23)),_0x4ada6c('app:gene'+_0x5b77f8(0x227)+_0x5b77f8(0x31e)+'al',async(_0x25fbf8,_0x38875a)=>{const _0xf88a1=_0x5b77f8,_0x9c77ee=await shell[_0xf88a1(0x3d7)](String(_0x38875a||''));return{'ok':!_0x9c77ee,'error':_0x9c77ee||undefined};}),_0x4ada6c(_0x5b77f8(0x26e)+'s:list',async()=>_0xc72161[_0x5b77f8(0x218)]()),_0x4ada6c('artifact'+_0x5b77f8(0x158),async(_0xe0ff36,_0x226c54={})=>_0xc72161['upsert'](_0x226c54)),_0x4ada6c(_0x5b77f8(0x26e)+_0x5b77f8(0x441),async(_0x5f5297,_0x10e785={})=>_0xc72161[_0x5b77f8(0x404)](String(_0x10e785['id']||_0x10e785||''))),_0x4ada6c(_0x5b77f8(0x26e)+_0x5b77f8(0x39b),async(_0x572795,_0x596671={})=>_0xc72161[_0x5b77f8(0x347)+'le'](String(_0x596671['id']||_0x596671||''))),_0x4ada6c(_0x5b77f8(0x26e)+_0x5b77f8(0x39b)+_0x5b77f8(0x1b7),async(_0x510fb4,_0x463b6b={})=>_0xc72161['deletedS'+_0x5b77f8(0x2ac)](_0x463b6b[_0x5b77f8(0x381)]||_0x463b6b)),_0x4ada6c('artifact'+'s:reveal',async(_0x39a157,_0x37a788={})=>{const _0x566d26=_0x5b77f8,_0x3578fc=typeof _0x37a788==='string'?_0x37a788:_0x37a788[_0x566d26(0x2a1)]||_0x37a788[_0x566d26(0x357)],_0x1d0c8a=await shell[_0x566d26(0x3d7)](String(_0x3578fc||''));return{'ok':!_0x1d0c8a,'error':_0x1d0c8a||undefined};});const _0x31c396=createPreferencesStore({'stateDir':configController[_0x5b77f8(0x16c)+_0x5b77f8(0x339)](),'storeFile':'product-'+_0x5b77f8(0x2f8)+_0x5b77f8(0x302)});_0x4ada6c(_0x5b77f8(0x168)+_0x5b77f8(0x153)+'se',async()=>_0x31c396['get'](_0x5b77f8(0x378)+_0x5b77f8(0x303)+'se',![])),_0x4ada6c(_0x5b77f8(0x168)+_0x5b77f8(0x2cb)+'se',async(_0x2ba28b,_0x58586a)=>_0x31c396[_0x5b77f8(0x1d2)]('closeToT'+_0x5b77f8(0x303)+'se',_0x58586a===!![])),registerFileHandlers({'app':app,'filesLogger':filesLogger,'handle':_0x4ada6c,'sep':sep,'toHomePath':toHomePath}),registerProductLogHandlers({'app':app,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'exportLogsArchive':exportLogsArchive,'handle':_0x4ada6c,'mainLogger':mainLogger,'rendererLogger':rendererLogger,'summarizeText':summarizeText,'toHomePath':toHomePath}),registerModelHandlers({'handle':_0x4ada6c,'modelHandlers':{'saveCustomModel':_0x2d071f=>_0x1a10ee()['models'][_0x5b77f8(0x2eb)+_0x5b77f8(0x434)](_0x2d071f),'deleteCustomModel':_0x36eb8e=>_0x1a10ee()['models'][_0x5b77f8(0x17e)+'stomMode'+'l'](_0x36eb8e)}}),connectorController=createConnectorController({'shellConfig':shellConfig,'configController':configController,'broadcast':broadcast,'shell':shell,'getRuntimeSpawnContext':getRuntimeSpawnContext,'openClawConfigHandlers':{'update':(..._0x449333)=>configController[_0x5b77f8(0x443)+_0x5b77f8(0x1d7)+_0x5b77f8(0x1af)](..._0x449333),'setPluginConfig':_0x2ad962=>configController[_0x5b77f8(0x2b3)+'lawPlugi'+'nConfig'](_0x2ad962),'setChannelConfig':_0x285bb0=>configController[_0x5b77f8(0x2b3)+_0x5b77f8(0x383)+_0x5b77f8(0x446)](_0x285bb0),'deleteChannelConfig':_0x3eb478=>configController[_0x5b77f8(0x3c4)+_0x5b77f8(0x1aa)+_0x5b77f8(0x1ae)+_0x5b77f8(0x246)](_0x3eb478),'setSkillEntry':_0x24ca26=>configController['setOpenC'+'lawSkill'+_0x5b77f8(0x396)](_0x24ca26),'deleteSkillEntry':_0x115473=>configController[_0x5b77f8(0x3c4)+'enClawSk'+_0x5b77f8(0x19b)](_0x115473),'setMcpServer':_0x1f0e93=>configController[_0x5b77f8(0x2b3)+_0x5b77f8(0x416)+_0x5b77f8(0x309)](_0x1f0e93),'deleteMcpServer':_0x5eb931=>configController[_0x5b77f8(0x3c4)+_0x5b77f8(0x2b6)+'pServer'](_0x5eb931)},'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand}),_0x4ada6c(_0x5b77f8(0x2e2)+_0x5b77f8(0x36a)+_0x5b77f8(0x307),async()=>connectorController[_0x5b77f8(0x183)+_0x5b77f8(0x1ae)+_0x5b77f8(0x3d6)]()),_0x4ada6c(_0x5b77f8(0x2e2)+_0x5b77f8(0x36a)+_0x5b77f8(0x2f5)+'e',async(_0x34f84b,_0x18166b={})=>connectorController['deleteIm'+_0x5b77f8(0x1b5)+_0x5b77f8(0x3e2)](_0x18166b)),_0x4ada6c(_0x5b77f8(0x2e2)+_0x5b77f8(0x36a)+_0x5b77f8(0x2d6)+'nabled',async(_0x1d414c,_0x3f23bc={})=>connectorController[_0x5b77f8(0x2d5)+'nnelEnab'+_0x5b77f8(0x388)](_0x3f23bc)),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x1a4),async(_0xc4dac3,_0xb64e00={})=>{const _0x311805=_0x5b77f8,_0xe4967d=String(_0xb64e00[_0x311805(0x1c2)+'d']||_0xb64e00['payload']?.[_0x311805(0x1c2)+'d']||_0xb64e00[_0x311805(0x2a0)]?.['id']||'');if(!_0xe4967d)throw new Error('channelI'+'d\x20is\x20req'+_0x311805(0x205));const _0x3d68ac=_0xb64e00[_0x311805(0x2a0)]||_0xb64e00,_0x59ec85={'feishu':connectorController['saveFeis'+'huChanne'+_0x311805(0x1ff)],'qqbot':connectorController[_0x311805(0x180)+_0x311805(0x202)+_0x311805(0x1db)],'wecom':connectorController[_0x311805(0x44a)+_0x311805(0x253)+_0x311805(0x1db)],'qq_mail':connectorController['saveQqMa'+_0x311805(0x17b)+_0x311805(0x151)+'g'],'netease_mail':connectorController['saveNetE'+_0x311805(0x42a)+'onnector'+'Config'],'tencent_exmail':connectorController[_0x311805(0x2b0)+_0x311805(0x2f4)+_0x311805(0x33d)+_0x311805(0x215)],'feishu_doc':connectorController[_0x311805(0x184)+_0x311805(0x1e3)+'nectorCo'+_0x311805(0x1af)],'tencent_docs':connectorController[_0x311805(0x2b0)+_0x311805(0x18f)+_0x311805(0x14a)+_0x311805(0x1db)],'kdocs':connectorController[_0x311805(0x224)+_0x311805(0x264)+_0x311805(0x215)],'dingtalk_doc':connectorController[_0x311805(0x270)+_0x311805(0x1cd)+_0x311805(0x14a)+_0x311805(0x1db)]},_0xd9fce6=_0x59ec85[_0xe4967d];if(!_0xd9fce6)throw new Error(_0x311805(0x3c7)+_0x311805(0x23e)+'ector:\x20'+_0xe4967d);return _0xd9fce6(_0x3d68ac);}),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+':save-fe'+_0x5b77f8(0x40a)+_0x5b77f8(0x344),async(_0x50edf3,_0x208afd={})=>connectorController[_0x5b77f8(0x184)+_0x5b77f8(0x1bb)+_0x5b77f8(0x1ff)](_0x208afd)),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x2ae)+'bot-chan'+'nel',async(_0x483a1c,_0x3f351d={})=>connectorController[_0x5b77f8(0x180)+_0x5b77f8(0x202)+_0x5b77f8(0x1db)](_0x3f351d)),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x354)+_0x5b77f8(0x1d9)+_0x5b77f8(0x256),async(_0x18175c,_0x3d0f42={})=>connectorController[_0x5b77f8(0x44a)+'mChannel'+'Config'](_0x3d0f42)),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x2ae)+_0x5b77f8(0x43a),async(_0x10be9a,_0xe769c0={})=>connectorController['saveQqMa'+_0x5b77f8(0x17b)+_0x5b77f8(0x151)+'g'](_0xe769c0)),_0x4ada6c('config:c'+_0x5b77f8(0x14a)+_0x5b77f8(0x36c)+'tease-ma'+'il',async(_0xcbef9e,_0x194923={})=>connectorController[_0x5b77f8(0x341)+_0x5b77f8(0x42a)+_0x5b77f8(0x14a)+_0x5b77f8(0x1db)](_0x194923)),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x2da)+_0x5b77f8(0x3fc)+_0x5b77f8(0x147),async(_0x426437,_0x2fe0cd={})=>connectorController[_0x5b77f8(0x2b0)+_0x5b77f8(0x2f4)+_0x5b77f8(0x33d)+_0x5b77f8(0x215)](_0x2fe0cd)),_0x4ada6c('config:c'+_0x5b77f8(0x14a)+_0x5b77f8(0x1a0)+'ishu-doc',async(_0x5c7d86,_0x38b408={})=>connectorController['saveFeis'+_0x5b77f8(0x1e3)+_0x5b77f8(0x16f)+_0x5b77f8(0x1af)](_0x38b408)),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x2da)+'ncent-do'+'cs',async(_0x5f4b49,_0x7650f3={})=>connectorController[_0x5b77f8(0x2b0)+_0x5b77f8(0x18f)+_0x5b77f8(0x14a)+_0x5b77f8(0x1db)](_0x7650f3)),_0x4ada6c('config:c'+_0x5b77f8(0x14a)+':save-kd'+_0x5b77f8(0x1c8),async(_0x14b2a6,_0x407514={})=>connectorController['saveKdoc'+_0x5b77f8(0x264)+_0x5b77f8(0x215)](_0x407514)),_0x4ada6c('config:c'+'onnector'+_0x5b77f8(0x3b1)+_0x5b77f8(0x3de)+'oc',async(_0x54463e,_0x2d2299={})=>connectorController[_0x5b77f8(0x270)+'talkDocC'+_0x5b77f8(0x14a)+_0x5b77f8(0x1db)](_0x2d2299)),_0x4ada6c(_0x5b77f8(0x3ad)+'onnector'+_0x5b77f8(0x3cd)+':start',async(_0x30aa5d,_0x2a6c9c={})=>{const _0x3ed830=_0x5b77f8,_0x17f105=String(_0x2a6c9c[_0x3ed830(0x1c2)+'d']||_0x2a6c9c[_0x3ed830(0x280)]||'');if(_0x17f105===_0x3ed830(0x369))return connectorController['startKdo'+_0x3ed830(0x244)+_0x3ed830(0x418)+_0x3ed830(0x3df)]();if(_0x17f105===_0x3ed830(0x421)+'oc')return connectorController[_0x3ed830(0x3b2)+'shuDocCl'+'iConnect'+_0x3ed830(0x191)]();if(_0x17f105===_0x3ed830(0x294))return connectorController[_0x3ed830(0x3b2)+_0x3ed830(0x2cf)+'trationS'+_0x3ed830(0x32d)](_0x2a6c9c);if(_0x17f105===_0x3ed830(0x397)+_0x3ed830(0x39c)||_0x17f105===_0x3ed830(0x392))return connectorController[_0x3ed830(0x400)+_0x3ed830(0x3ec)+_0x3ed830(0x1fa)+'n']({'gatewayPort':_0x1a10ee()[_0x3ed830(0x391)+_0x3ed830(0x300)](),'gatewayToken':_0x1a10ee()[_0x3ed830(0x3da)+_0x3ed830(0x1dd)]()});throw new Error(_0x3ed830(0x3c7)+_0x3ed830(0x23e)+'ector\x20se'+'ssion:\x20'+(_0x17f105||'unknown'));}),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x3cd)+_0x5b77f8(0x258),async(_0x45410f,_0x55eeb5={})=>{const _0x5d5689=_0x5b77f8,_0x262619=String(_0x55eeb5[_0x5d5689(0x1c2)+'d']||_0x55eeb5[_0x5d5689(0x280)]||'');if(_0x262619==='kdocs')return connectorController[_0x5d5689(0x3fd)+_0x5d5689(0x440)+'ctStatus'](_0x55eeb5);if(_0x262619===_0x5d5689(0x421)+'oc')return connectorController[_0x5d5689(0x3a0)+_0x5d5689(0x42f)+'onnectSt'+_0x5d5689(0x398)](_0x55eeb5);if(_0x262619===_0x5d5689(0x294))return connectorController[_0x5d5689(0x3a0)+_0x5d5689(0x2ab)+_0x5d5689(0x235)+_0x5d5689(0x35a)](_0x55eeb5);throw new Error('Unsuppor'+_0x5d5689(0x23e)+_0x5d5689(0x2c2)+'ssion:\x20'+(_0x262619||'unknown'));}),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x3cd)+_0x5b77f8(0x3a2),async(_0x4308db,_0x35c2e9={})=>{const _0x121aeb=_0x5b77f8,_0x4da2f4=String(_0x35c2e9[_0x121aeb(0x1c2)+'d']||_0x35c2e9[_0x121aeb(0x280)]||'');if(_0x4da2f4===_0x121aeb(0x369))return connectorController['cancelKd'+_0x121aeb(0x429)+_0x121aeb(0x414)+'sion'](_0x35c2e9);if(_0x4da2f4===_0x121aeb(0x421)+'oc')return connectorController[_0x121aeb(0x3ca)+_0x121aeb(0x37e)+_0x121aeb(0x189)+_0x121aeb(0x25d)](_0x35c2e9);if(_0x4da2f4===_0x121aeb(0x294))return connectorController['cancelFe'+_0x121aeb(0x3bb)+_0x121aeb(0x181)+_0x121aeb(0x191)](_0x35c2e9);if(_0x4da2f4===_0x121aeb(0x397)+'-weixin'||_0x4da2f4===_0x121aeb(0x392))return connectorController[_0x121aeb(0x19f)+_0x121aeb(0x3ab)+_0x121aeb(0x272)+'on']();return{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x3ad)+_0x5b77f8(0x14a)+_0x5b77f8(0x3cd)+_0x5b77f8(0x2ce)+'e',async(_0x1c863b,_0x43794a={})=>{const _0x3c3e22=_0x5b77f8,_0x40ec5f=String(_0x43794a[_0x3c3e22(0x1c2)+'d']||_0x43794a['type']||'');if(_0x40ec5f===_0x3c3e22(0x421)+'oc')return connectorController[_0x3c3e22(0x3eb)+_0x3c3e22(0x279)+_0x3c3e22(0x33e)+_0x3c3e22(0x254)+'on'](_0x43794a);throw new Error(_0x3c3e22(0x3c7)+'ted\x20conn'+_0x3c3e22(0x2c2)+_0x3c3e22(0x353)+(_0x40ec5f||'unknown'));}),_0x4ada6c(_0x5b77f8(0x2c6)+'ead',()=>connectorController[_0x5b77f8(0x192)+_0x5b77f8(0x171)+'ot']());const _0x556b48=_0x1650df=>{const _0x288981=_0x5b77f8,_0x239b1c=_0x1650df[_0x288981(0x437)]&&typeof _0x1650df[_0x288981(0x437)]===_0x288981(0x1ca)?_0x1650df[_0x288981(0x437)]:{};return Array[_0x288981(0x2f3)](_0x239b1c['list'])?_0x239b1c[_0x288981(0x218)]:[];},_0x197095=_0x4468ce=>{const _0x5c0642=_0x5b77f8,_0x51a9a9=typeof _0x4468ce===_0x5c0642(0x2fc)?_0x4468ce[_0x5c0642(0x22e)]():'',_0x3a1eae=_0x51a9a9[_0x5c0642(0x333)](/^agent:([^:]+):/);return _0x3a1eae?.[0x1]||'';},_0x1d0c8d=(_0x24f749={},_0xd3b41=[])=>{const _0x2e4356=_0x5b77f8,_0x4bcec6=Array[_0x2e4356(0x2f3)](_0x24f749[_0x2e4356(0x437)])?_0x24f749[_0x2e4356(0x437)]:Array[_0x2e4356(0x2f3)](_0x24f749[_0x2e4356(0x218)])?_0x24f749[_0x2e4356(0x218)]:[],_0x1e5bc3=Array['isArray'](_0xd3b41)?_0xd3b41:[];return _0x4bcec6[_0x2e4356(0x349)](_0x2821d3=>{const _0x2d2d5b=_0x2e4356,_0x343132=String(_0x2821d3?.['id']||_0x2821d3?.['agentId']||'')[_0x2d2d5b(0x22e)]();return{'agent':_0x2821d3,'sessions':_0x343132?_0x1e5bc3['filter'](_0x420d3d=>{const _0x316a7d=_0x2d2d5b,_0x1410c5=String(_0x420d3d?.[_0x316a7d(0x34a)]||_0x420d3d?.[_0x316a7d(0x28d)]||_0x420d3d?.[_0x316a7d(0x422)]?.['id']||_0x197095(_0x420d3d?.[_0x316a7d(0x269)])||'')[_0x316a7d(0x22e)]();return _0x1410c5?_0x1410c5===_0x343132:_0x343132===_0x316a7d(0x1e9);}):[]};});};_0x4ada6c(_0x5b77f8(0x311)+_0x5b77f8(0x32c)+_0x5b77f8(0x2ac),async()=>getShellAppUpdateState()),_0x4ada6c('app:upda'+_0x5b77f8(0x1e6),async()=>getShellAppUpdateState()),_0x4ada6c(_0x5b77f8(0x311)+_0x5b77f8(0x1de)+_0x5b77f8(0x251),async()=>getShellAppUpdateState()),_0x4ada6c(_0x5b77f8(0x311)+'te:quit-'+'and-inst'+_0x5b77f8(0x2b8),async()=>({'ok':![],'reason':'no-updat'+'e'})),_0x4ada6c(_0x5b77f8(0x160)+':choose',async(_0x203b0b,_0x10ae51={})=>{const _0x5cc1d5=_0x5b77f8,_0x5de6ce=await dialog['showOpen'+_0x5cc1d5(0x41d)](BrowserWindow[_0x5cc1d5(0x380)+'ontents'](_0x203b0b[_0x5cc1d5(0x35e)])??mainWindow,{'properties':[_0x5cc1d5(0x304),..._0x10ae51?.[_0x5cc1d5(0x3d1)]!==0x1?[_0x5cc1d5(0x316)+_0x5cc1d5(0x2ca)]:[]],'filters':_0x10ae51?.[_0x5cc1d5(0x23f)+_0x5cc1d5(0x28c)+'s']?[{'name':_0x5cc1d5(0x374),'extensions':_0x10ae51[_0x5cc1d5(0x23f)+_0x5cc1d5(0x28c)+'s']}]:undefined});return _0x5de6ce['filePath'+'s']['map'](_0x2f0989=>({'path':_0x2f0989,'name':_0x2f0989[_0x5cc1d5(0x30f)](/[\\/]/)[_0x5cc1d5(0x214)]()||_0x2f0989}));}),_0x4ada6c('app:file'+':downloa'+_0x5b77f8(0x317),async(_0x31cea2,_0x10be97={})=>{const _0x48e319=_0x5b77f8,_0x3b474c=String(_0x10be97[_0x48e319(0x2cd)+'th']||'');if(!_0x3b474c)return{'success':![],'error':'sourcePa'+'th\x20is\x20re'+'quired'};const _0x376ebb=await dialog[_0x48e319(0x323)+_0x48e319(0x41d)](mainWindow,{'defaultPath':_0x10be97['defaultF'+_0x48e319(0x222)]||_0x3b474c[_0x48e319(0x30f)](/[\\/]/)['pop']()});if(_0x376ebb[_0x48e319(0x16a)]||!_0x376ebb[_0x48e319(0x2a8)])return{'success':![],'canceled':!![]};const {copyFile:_0x582625}=await import(_0x48e319(0x190)+'promises');return await _0x582625(_0x3b474c,_0x376ebb['filePath']),{'success':!![],'filePath':_0x376ebb['filePath']};}),_0x4ada6c(_0x5b77f8(0x3ae)+_0x5b77f8(0x39e)+_0x5b77f8(0x273),async(_0x22fc80,_0x3c8e09)=>{const _0x3d9e94=_0x5b77f8;return clipboard[_0x3d9e94(0x3e4)+'t'](String(_0x3c8e09??'')),{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x3ea)+_0x5b77f8(0x1ec)+'rt',async()=>{const _0x57a26a=_0x5b77f8;return app[_0x57a26a(0x402)](),app['quit'](),{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x335)+'s-maximi'+_0x5b77f8(0x1d1),_0x3b11c9=>Boolean(BrowserWindow[_0x5b77f8(0x380)+_0x5b77f8(0x308)](_0x3b11c9[_0x5b77f8(0x35e)])?.[_0x5b77f8(0x415)+_0x5b77f8(0x1d1)]())),_0x4ada6c('app:star'+_0x5b77f8(0x3ed),async(_0x48b4f0,_0x39f7b0)=>{const _0x1bb5e1=_0x5b77f8;return app[_0x1bb5e1(0x432)+_0x1bb5e1(0x410)+_0x1bb5e1(0x37d)]({'openAtLogin':_0x39f7b0===!![]}),{'ok':!![],'enabled':_0x39f7b0===!![]};}),_0x4ada6c(_0x5b77f8(0x237)+_0x5b77f8(0x1ef),async()=>app[_0x5b77f8(0x321)+_0x5b77f8(0x410)+_0x5b77f8(0x37d)]()[_0x5b77f8(0x3cf)+_0x5b77f8(0x3d4)]),_0x4ada6c(_0x5b77f8(0x160)+':choose-'+_0x5b77f8(0x328),async _0x182663=>{const _0xd8bec2=_0x5b77f8,_0x1f585b=await dialog['showOpen'+_0xd8bec2(0x41d)](BrowserWindow['fromWebC'+_0xd8bec2(0x308)](_0x182663[_0xd8bec2(0x35e)])??mainWindow,{'properties':[_0xd8bec2(0x3ee)+'ctory']});return _0x1f585b[_0xd8bec2(0x2a8)+'s'][0x0]||'';}),_0x4ada6c('app:syst'+_0x5b77f8(0x34c)+_0x5b77f8(0x328),async(_0x9bd6a9,_0x511917)=>{const _0x291fe9=await shell['openPath'](String(_0x511917||''));return _0x291fe9||'';}),_0x4ada6c(_0x5b77f8(0x397)+_0x5b77f8(0x3c1)+_0x5b77f8(0x21e),async()=>_0x1a10ee()[_0x5b77f8(0x3da)+_0x5b77f8(0x1dd)]()),_0x4ada6c('openclaw'+_0x5b77f8(0x3c1)+_0x5b77f8(0x1d3),async()=>_0x1a10ee()[_0x5b77f8(0x391)+_0x5b77f8(0x300)]()),_0x4ada6c(_0x5b77f8(0x397)+':run-onc'+'e',async(_0x162fa5,_0x18682f=[])=>{const _0x5e9aea=_0x5b77f8,_0x16413f=await runClawOnce(shellConfig[_0x5e9aea(0x2e9)+_0x5e9aea(0x196)],Array['isArray'](_0x18682f)?_0x18682f:[]);return{'ok':_0x16413f[_0x5e9aea(0x15e)]===0x0,..._0x16413f};}),_0x4ada6c(_0x5b77f8(0x17a)+_0x5b77f8(0x312),async(_0x47626f,_0x59566a={})=>_0x1a10ee()[_0x5b77f8(0x17a)][_0x5b77f8(0x260)]({..._0x59566a,'parentSessionKey':_0x59566a['parentSe'+_0x5b77f8(0x412)]||_0x59566a['sessionK'+'ey']}));const _0x655f00=createAgentSessionsMapStore({'stateDir':configController[_0x5b77f8(0x16c)+_0x5b77f8(0x339)]()});_0x4ada6c(_0x5b77f8(0x17a)+':agent-m'+_0x5b77f8(0x159),async(_0x27bd2c,_0x461b39={})=>_0x655f00[_0x5b77f8(0x35d)](_0x461b39)),_0x4ada6c(_0x5b77f8(0x17a)+':agent-m'+_0x5b77f8(0x2d4)+'t',async(_0x22de8f,_0x19f773={})=>_0x655f00[_0x5b77f8(0x22b)](_0x19f773)),_0x4ada6c(_0x5b77f8(0x2c3)+_0x5b77f8(0x1a1),async(_0x211e6f,_0x405480={})=>{const _0x3d6dac=_0x5b77f8,_0x7e9c19=await readMutableConfig(),_0x412dd2=_0x7e9c19[_0x3d6dac(0x437)]&&typeof _0x7e9c19['agents']===_0x3d6dac(0x1ca)?_0x7e9c19[_0x3d6dac(0x437)]:{},_0x427363=_0x556b48(_0x7e9c19),_0x5e32e5=String(_0x405480['id']||_0x405480[_0x3d6dac(0x217)]||_0x3d6dac(0x156)+Date['now']())['trim']()[_0x3d6dac(0x1e4)](/\s+/g,'-'),_0x3c4b79={'id':_0x5e32e5,'name':String(_0x405480[_0x3d6dac(0x217)]||_0x5e32e5),..._0x405480[_0x3d6dac(0x34d)+'e']?{'workspace':String(_0x405480[_0x3d6dac(0x34d)+'e'])}:{},..._0x405480[_0x3d6dac(0x43d)]?{'model':_0x405480[_0x3d6dac(0x43d)]}:{},..._0x405480[_0x3d6dac(0x1ac)]?{'emoji':_0x405480['emoji']}:{},..._0x405480['avatar']?{'avatar':_0x405480[_0x3d6dac(0x18c)]}:{},...Array[_0x3d6dac(0x2f3)](_0x405480['skills'])?{'skills':_0x405480[_0x3d6dac(0x216)]}:{}};if(_0x427363['some'](_0x5609d5=>_0x5609d5?.['id']===_0x5e32e5))throw new Error(_0x3d6dac(0x1b2)+_0x3d6dac(0x1d0)+_0x3d6dac(0x358));return _0x412dd2[_0x3d6dac(0x218)]=[..._0x427363,_0x3c4b79],_0x7e9c19['agents']=_0x412dd2,await _0xe25fa9(_0x7e9c19,_0x3d6dac(0x16b)+_0x3d6dac(0x2e0)),{'ok':!![],'agent':_0x3c4b79};}),_0x4ada6c('agents:u'+_0x5b77f8(0x21c),async(_0x41b4d0,_0x91f511={})=>{const _0x1f06a5=_0x5b77f8,_0x1bde13=String(_0x91f511['id']||_0x91f511[_0x1f06a5(0x34a)]||'')[_0x1f06a5(0x22e)]();if(!_0x1bde13)throw new Error(_0x1f06a5(0x262)+_0x1f06a5(0x377)+_0x1f06a5(0x240));const _0x54296a=await readMutableConfig(),_0x59b82c=_0x54296a['agents']&&typeof _0x54296a['agents']===_0x1f06a5(0x1ca)?_0x54296a[_0x1f06a5(0x437)]:{},_0x8fe6f0=_0x556b48(_0x54296a),_0xc4cf80=_0x8fe6f0[_0x1f06a5(0x349)](_0x543570=>_0x543570?.['id']===_0x1bde13?{..._0x543570,..._0x91f511,'id':_0x1bde13}:_0x543570);return _0x59b82c['list']=_0xc4cf80,_0x54296a[_0x1f06a5(0x437)]=_0x59b82c,await _0xe25fa9(_0x54296a,'agent\x20up'+_0x1f06a5(0x2bf)),{'ok':!![],'agent':_0xc4cf80[_0x1f06a5(0x25c)](_0x393b64=>_0x393b64?.['id']===_0x1bde13)||null};}),_0x4ada6c(_0x5b77f8(0x176)+_0x5b77f8(0x293),async(_0x265002,_0x6b3d2d={})=>{const _0x2e0191=_0x5b77f8,_0x271601=String(_0x6b3d2d['id']||_0x6b3d2d['agentId']||'')[_0x2e0191(0x22e)]();if(!_0x271601)throw new Error(_0x2e0191(0x262)+_0x2e0191(0x377)+_0x2e0191(0x240));const _0x5a625b=await readMutableConfig(),_0x2176ec=_0x5a625b[_0x2e0191(0x437)]&&typeof _0x5a625b[_0x2e0191(0x437)]===_0x2e0191(0x1ca)?_0x5a625b[_0x2e0191(0x437)]:{};return _0x2176ec[_0x2e0191(0x218)]=_0x556b48(_0x5a625b)[_0x2e0191(0x22c)](_0x1f506d=>_0x1f506d?.['id']!==_0x271601),_0x5a625b[_0x2e0191(0x437)]=_0x2176ec,await _0xe25fa9(_0x5a625b,_0x2e0191(0x19e)+_0x2e0191(0x286)),{'ok':!![],'agentId':_0x271601};}),_0x4ada6c(_0x5b77f8(0x430)+_0x5b77f8(0x24b)+'ions-lis'+'t',async(_0x1bb6d3,_0x2962c1={})=>{const _0x39a3d1=_0x5b77f8,[_0x2c4e82,_0x2ea687]=await Promise[_0x39a3d1(0x2b8)]([_0x1a10ee()[_0x39a3d1(0x437)][_0x39a3d1(0x218)](),_0x1a10ee()[_0x39a3d1(0x17a)]['list'](_0x2962c1)[_0x39a3d1(0x337)](()=>({'sessions':[]}))]),_0x35a838=Array[_0x39a3d1(0x2f3)](_0x2ea687['sessions'])?_0x2ea687['sessions']:[];return{..._0x2c4e82,'sessions':_0x35a838,'groups':Array[_0x39a3d1(0x2f3)](_0x2c4e82[_0x39a3d1(0x3e1)])?_0x2c4e82[_0x39a3d1(0x3e1)]:_0x1d0c8d(_0x2c4e82,_0x35a838)};}),terminalManager=createTerminalManager({'cwd':join(configController[_0x5b77f8(0x16c)+_0x5b77f8(0x339)](),'workspac'+'e'),'emitData':_0x41fcaf=>broadcast(_0x5b77f8(0x32e)+_0x5b77f8(0x146),_0x41fcaf),'emitExit':_0x9e3cc=>broadcast(_0x5b77f8(0x32e)+_0x5b77f8(0x1a7),_0x9e3cc)}),_0x4ada6c(_0x5b77f8(0x32e)+_0x5b77f8(0x438),async(_0x3ff6b8,_0x2a0bb9={})=>terminalManager[_0x5b77f8(0x260)](_0x2a0bb9)),_0x4ada6c(_0x5b77f8(0x32e)+_0x5b77f8(0x194),async(_0x3aa178,_0x2b75a6={})=>terminalManager['input'](_0x2b75a6)),_0x4ada6c('terminal'+_0x5b77f8(0x144),async(_0x5c9cee,_0x278632={})=>terminalManager['resize'](_0x278632)),_0x4ada6c('terminal'+_0x5b77f8(0x212),async(_0x5ac67c,_0x49f1d2={})=>terminalManager[_0x5b77f8(0x2c5)](_0x49f1d2)),_0x4ada6c('plugins:'+'list',async()=>{const _0x3327a8=_0x5b77f8,_0x44380c=gatewayController?.[_0x3327a8(0x1f7)+_0x3327a8(0x1fc)]?.()||{};return _0x44380c[_0x3327a8(0x37b)]||[];}),_0x4ada6c(_0x5b77f8(0x2e1)+_0x5b77f8(0x1f1)+'ig',async(_0x334562,_0x522556={})=>{const _0x2244b3=String(_0x522556['pluginId']||_0x522556['id']||''),_0x238fcf=await readMutableConfig(),_0x3f5a90=_0x238fcf['plugins']?.['entries']||{};return _0x2244b3?_0x3f5a90[_0x2244b3]||null:_0x3f5a90;}),_0x4ada6c(_0x5b77f8(0x2e1)+_0x5b77f8(0x288)+'onfig',async(_0xbe4488,_0x10f2db={})=>{const _0x3b68d3=_0x5b77f8,_0x33e1c9=String(_0x10f2db[_0x3b68d3(0x1ad)]||_0x10f2db['id']||'');if(!_0x33e1c9)throw new Error(_0x3b68d3(0x1ad)+_0x3b68d3(0x377)+_0x3b68d3(0x240));const _0x4a5ab8=await readMutableConfig(),_0x1c7a76=_0x4a5ab8[_0x3b68d3(0x37b)]&&typeof _0x4a5ab8['plugins']===_0x3b68d3(0x1ca)?_0x4a5ab8[_0x3b68d3(0x37b)]:{},_0x4d4251=_0x1c7a76[_0x3b68d3(0x419)]&&typeof _0x1c7a76['entries']===_0x3b68d3(0x1ca)?_0x1c7a76[_0x3b68d3(0x419)]:{};return _0x4d4251[_0x33e1c9]={..._0x4d4251[_0x33e1c9]||{},..._0x10f2db[_0x3b68d3(0x306)]||_0x10f2db[_0x3b68d3(0x43b)]||{}},_0x1c7a76['entries']=_0x4d4251,_0x4a5ab8['plugins']=_0x1c7a76,_0xe25fa9(_0x4a5ab8,_0x3b68d3(0x15c)+_0x3b68d3(0x278)+_0x3b68d3(0x2bf));}),_0x4ada6c('plugins:'+_0x5b77f8(0x2f6),async(_0x22f182,_0x261ddf={})=>{const _0x5c80b1=_0x5b77f8,_0x241499=String(_0x261ddf['pluginId']||_0x261ddf['id']||'');if(!_0x241499)throw new Error('pluginId'+_0x5c80b1(0x377)+_0x5c80b1(0x240));const _0x35b45a=await readMutableConfig(),_0x59529b=_0x35b45a['plugins']&&typeof _0x35b45a[_0x5c80b1(0x37b)]===_0x5c80b1(0x1ca)?_0x35b45a[_0x5c80b1(0x37b)]:{},_0x3ace27=_0x59529b[_0x5c80b1(0x419)]&&typeof _0x59529b[_0x5c80b1(0x419)]===_0x5c80b1(0x1ca)?_0x59529b['entries']:{};return _0x3ace27[_0x241499]={..._0x3ace27[_0x241499]||{},'enabled':!![]},_0x59529b[_0x5c80b1(0x419)]=_0x3ace27,_0x35b45a[_0x5c80b1(0x37b)]=_0x59529b,_0xe25fa9(_0x35b45a,_0x5c80b1(0x3e3)+_0x5c80b1(0x22f));}),_0x4ada6c(_0x5b77f8(0x2e1)+_0x5b77f8(0x3e0),async(_0x26eba0,_0x149115={})=>{const _0x3db3e9=_0x5b77f8,_0x56eea7=String(_0x149115[_0x3db3e9(0x1ad)]||_0x149115['id']||'');if(!_0x56eea7)throw new Error(_0x3db3e9(0x1ad)+_0x3db3e9(0x377)+_0x3db3e9(0x240));const _0x2dc471=await readMutableConfig(),_0x4cc0e7=_0x2dc471[_0x3db3e9(0x37b)]&&typeof _0x2dc471[_0x3db3e9(0x37b)]==='object'?_0x2dc471[_0x3db3e9(0x37b)]:{},_0x17e08e=_0x4cc0e7[_0x3db3e9(0x419)]&&typeof _0x4cc0e7[_0x3db3e9(0x419)]===_0x3db3e9(0x1ca)?_0x4cc0e7[_0x3db3e9(0x419)]:{};return _0x17e08e[_0x56eea7]={..._0x17e08e[_0x56eea7]||{},'enabled':![]},_0x4cc0e7[_0x3db3e9(0x419)]=_0x17e08e,_0x2dc471[_0x3db3e9(0x37b)]=_0x4cc0e7,_0xe25fa9(_0x2dc471,_0x3db3e9(0x2d9)+_0x3db3e9(0x2d1));}),_0x4ada6c('plugins:'+'status',async(_0x18133f,_0xc4eabb={})=>({'plugins':await((async()=>{const _0x1edd6a=_0x5b77f8,_0x95ce51=gatewayController?.['runtimeI'+_0x1edd6a(0x1fc)]?.()||{};if(!_0xc4eabb?.['pluginId']&&!_0xc4eabb?.['id'])return _0x95ce51['plugins']||[];const _0x411eb6=String(_0xc4eabb[_0x1edd6a(0x1ad)]||_0xc4eabb['id']||'');return(_0x95ce51[_0x1edd6a(0x37b)]||[])['filter'](_0x35b0d4=>_0x35b0d4['pluginId']===_0x411eb6);})())})),_0x4ada6c(_0x5b77f8(0x33a)+_0x5b77f8(0x2a5),async(_0x41222f,_0x4f02b9)=>({'ok':!![],'payload':_0x4f02b9})),_0x4ada6c(_0x5b77f8(0x173)+_0x5b77f8(0x20f)+'e',async(_0x1d2e76,_0x4ca4c1)=>{const _0x55fa9c=_0x5b77f8;return broadcast(_0x55fa9c(0x188)+'mand',_0x4ca4c1),{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x283)+_0x5b77f8(0x444)+'nt-state',async()=>{const _0xba3e47=_0x5b77f8;return broadcast('tabs-age'+_0xba3e47(0x1f6)+_0xba3e47(0x257),{}),{'ok':!![]};}),_0x4ada6c('tabs:ref'+_0x5b77f8(0x186)+_0x5b77f8(0x1f6),async(_0x387fd3,_0x20d7ba={})=>{const _0x2daaa3=_0x5b77f8;return broadcast('tabs-age'+_0x2daaa3(0x1f6)+_0x2daaa3(0x371)+_0x2daaa3(0x257),_0x20d7ba),{'ok':!![]};}),_0x4ada6c('window:m'+_0x5b77f8(0x292),_0x5c9f89=>{const _0x1bde0e=_0x5b77f8;return BrowserWindow[_0x1bde0e(0x380)+_0x1bde0e(0x308)](_0x5c9f89[_0x1bde0e(0x35e)])?.[_0x1bde0e(0x42e)](),{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x319)+'oggle-ma'+_0x5b77f8(0x348),_0x582609=>{const _0x394fc5=_0x5b77f8,_0x4a3a98=BrowserWindow[_0x394fc5(0x380)+_0x394fc5(0x308)](_0x582609['sender']);if(!_0x4a3a98)return{'isMaximized':![]};if(_0x4a3a98['isMaximi'+_0x394fc5(0x1d1)]())_0x4a3a98[_0x394fc5(0x29a)+'ze']();else _0x4a3a98[_0x394fc5(0x179)]();return{'isMaximized':_0x4a3a98[_0x394fc5(0x415)+'zed']()};}),_0x4ada6c('window:c'+_0x5b77f8(0x3a1),_0x1a1ebf=>{const _0x4fbb35=_0x5b77f8;return BrowserWindow[_0x4fbb35(0x380)+_0x4fbb35(0x308)](_0x1a1ebf[_0x4fbb35(0x35e)])?.[_0x4fbb35(0x2c5)](),{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x406)+_0x5b77f8(0x373)+_0x5b77f8(0x1ee),()=>openDevToolsForActiveContext()),_0x4ada6c(_0x5b77f8(0x397)+_0x5b77f8(0x327)+_0x5b77f8(0x2dc),()=>_0x1a10ee()[_0x5b77f8(0x1f7)+'nfo']()),_0x4ada6c(_0x5b77f8(0x397)+_0x5b77f8(0x3c1)+_0x5b77f8(0x1bc),async()=>(await ensureGatewayControllerStarted())['getStatu'+'s']()),_0x4ada6c('openclaw'+_0x5b77f8(0x3c1)+'-restart',()=>_0x1a10ee()[_0x5b77f8(0x1d5)](_0x5b77f8(0x23d)+'\x20request')),_0x4ada6c('openclaw'+':loading'+_0x5b77f8(0x35c)+_0x5b77f8(0x30d),async()=>({'loadingLifeCycle':'ready','message':'','updatedAt':new Date()[_0x5b77f8(0x261)+_0x5b77f8(0x211)]()})),_0x4ada6c(_0x5b77f8(0x397)+_0x5b77f8(0x3c1)+'-logs',(_0xf6a708,_0x1f05fc={})=>_0x1a10ee()[_0x5b77f8(0x162)+_0x5b77f8(0x31d)](_0x1f05fc?.[_0x5b77f8(0x3d1)]??0xc8)),_0x4ada6c(_0x5b77f8(0x397)+_0x5b77f8(0x360)+'ask-user'+_0x5b77f8(0x263)+'n',(_0x5bf500,_0x365fa6)=>_0x1a10ee()[_0x5b77f8(0x26d)+'kUserQue'+_0x5b77f8(0x38d)](_0x365fa6)),_0x4ada6c(_0x5b77f8(0x397)+_0x5b77f8(0x1f2)+'i-window',async()=>{const _0x350b30=_0x5b77f8,_0x4edde2=join(resolveRuntimeRoot(shellConfig[_0x350b30(0x2e9)+_0x350b30(0x196)]),'bin',_0x350b30(0x200)+'w');if(!existsSync(_0x4edde2))throw new Error(_0x350b30(0x397)+_0x350b30(0x2f9)+_0x350b30(0x14d)+_0x350b30(0x3f8)+_0x4edde2+(_0x350b30(0x25b)+_0x350b30(0x2a9)+_0x350b30(0x1ed)+_0x350b30(0x1b4)));const _0x309b22=join(app['getPath'](_0x350b30(0x195)),_0x350b30(0x385)+_0x350b30(0x17c)+_0x350b30(0x2cc));await writeFile(_0x309b22,'#!/bin/s'+_0x350b30(0x336)+_0x4edde2[_0x350b30(0x1e4)](/\\/g,'\x5c\x5c')['replace'](/"/g,'\x5c\x22')+'\x22\x0a',{'mode':0x1ed});const _0x49958f=spawn(_0x350b30(0x166),['-a','Terminal',_0x309b22],{'detached':!![],'stdio':'ignore'});return _0x49958f[_0x350b30(0x26b)](),{'ok':!![],'cliPath':_0x4edde2};}),_0x4ada6c(_0x5b77f8(0x3d9)+_0x5b77f8(0x2ad),()=>_0x1a10ee()[_0x5b77f8(0x437)]['list']()),_0x4ada6c(_0x5b77f8(0x182)+'tatus',(_0x47c79e,_0x27dccb)=>_0x1a10ee()[_0x5b77f8(0x216)][_0x5b77f8(0x1fe)](_0x27dccb)),_0x4ada6c(_0x5b77f8(0x17a)+_0x5b77f8(0x438),(_0xee17df,_0x3a6ed9)=>_0x1a10ee()[_0x5b77f8(0x17a)][_0x5b77f8(0x260)](_0x3a6ed9)),_0x4ada6c(_0x5b77f8(0x17a)+_0x5b77f8(0x40f),(_0x5a34a1,_0x571b61)=>_0x1a10ee()[_0x5b77f8(0x17a)][_0x5b77f8(0x218)](_0x571b61)),_0x4ada6c(_0x5b77f8(0x17a)+_0x5b77f8(0x40b),(_0x18aec8,_0x4f6a18)=>_0x1a10ee()[_0x5b77f8(0x17a)][_0x5b77f8(0x164)](_0x4f6a18)),_0x4ada6c(_0x5b77f8(0x19d)+_0x5b77f8(0x22a),(_0x3a2e29,_0x1ddbbf)=>_0x1a10ee()['chat']['stream'](_0x1ddbbf)),_0x4ada6c('chat:abo'+'rt',(_0xb78499,_0x33696b)=>_0x1a10ee()[_0x5b77f8(0x1d8)][_0x5b77f8(0x27d)](_0x33696b)),_0x4ada6c(_0x5b77f8(0x361)+_0x5b77f8(0x1f5),(_0x73118a,_0x9b2afe)=>_0x1a10ee()[_0x5b77f8(0x1d8)][_0x5b77f8(0x2be)](_0x9b2afe)),_0x4ada6c(_0x5b77f8(0x17f)+'te',async(_0x535294,_0x582072={})=>{const _0x3ec6cd=_0x5b77f8,_0x33e916=typeof _0x582072['level']===_0x3ec6cd(0x2fc)?_0x582072[_0x3ec6cd(0x3b6)]:_0x3ec6cd(0x24a),_0x2a7cb9=typeof _0x582072['message']===_0x3ec6cd(0x2fc)?_0x582072['message']:_0x3ec6cd(0x23d)+_0x3ec6cd(0x1bd),_0x5ac657=typeof _0x582072[_0x3ec6cd(0x213)]===_0x3ec6cd(0x2fc)&&_0x582072[_0x3ec6cd(0x213)][_0x3ec6cd(0x22e)]()?_0x3ec6cd(0x23d)+':'+_0x582072['context'][_0x3ec6cd(0x22e)]():_0x3ec6cd(0x23d),_0x4bd725=_0x582072['meta']&&typeof _0x582072[_0x3ec6cd(0x2f7)]===_0x3ec6cd(0x1ca)?{...summarizePayload(_0x582072[_0x3ec6cd(0x2f7)]),'context':_0x5ac657}:{'context':_0x5ac657},_0x3a5bff=rendererLogger;if(_0x3a5bff?.[_0x33e916])await _0x3a5bff[_0x33e916](_0x2a7cb9,_0x4bd725);else await _0x3a5bff?.['info'](_0x2a7cb9,_0x4bd725);if(_0x582072[_0x3ec6cd(0x3b5)+'ic']===!![]||_0x5ac657===_0x3ec6cd(0x23d)+_0x3ec6cd(0x255)+_0x3ec6cd(0x2b2)){const _0x26072b=_0x582072[_0x3ec6cd(0x16d)]&&typeof _0x582072[_0x3ec6cd(0x16d)]==='object'?_0x582072[_0x3ec6cd(0x16d)]:_0x582072[_0x3ec6cd(0x2f7)]?.[_0x3ec6cd(0x16d)]&&typeof _0x582072[_0x3ec6cd(0x2f7)][_0x3ec6cd(0x16d)]==='object'?_0x582072[_0x3ec6cd(0x2f7)][_0x3ec6cd(0x16d)]:{'level':_0x33e916,'category':'renderer','event':_0x5ac657,'message':_0x2a7cb9,'meta':_0x582072[_0x3ec6cd(0x2f7)]};await diagnosticsWriter?.[_0x3ec6cd(0x428)+'nt'](_0x26072b,{'captureIncident':String(_0x26072b[_0x3ec6cd(0x3b6)]||_0x33e916)['toLowerC'+_0x3ec6cd(0x231)]()===_0x3ec6cd(0x157)||_0x582072[_0x3ec6cd(0x355)+_0x3ec6cd(0x2fe)]===!![]});}return{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x449)+_0x5b77f8(0x300),async(_0x4ed19a,_0x22b2a1={})=>{const _0x4a0d6a=_0x5b77f8,_0x403b7c=typeof _0x22b2a1[_0x4a0d6a(0x3cb)+'r']===_0x4a0d6a(0x2fc)&&_0x22b2a1[_0x4a0d6a(0x3cb)+'r'][_0x4a0d6a(0x22e)]()?_0x22b2a1[_0x4a0d6a(0x3cb)+'r']:undefined,_0x4b0867=await exportLogsArchive({'logsDir':configController[_0x4a0d6a(0x381)][_0x4a0d6a(0x3b7)],'targetDir':_0x403b7c,'appVersion':app['getVersi'+'on']()});return mainLogger?.[_0x4a0d6a(0x24a)](_0x4a0d6a(0x390)+_0x4a0d6a(0x433),{'path':toHomePath(_0x4b0867['path'])}),_0x4b0867;}),_0x4ada6c('logs:ope'+_0x5b77f8(0x350)+_0x5b77f8(0x185),async()=>{const _0x3b2acc=_0x5b77f8;return await shell[_0x3b2acc(0x3d7)](configController[_0x3b2acc(0x381)]['logsDir']),mainLogger?.[_0x3b2acc(0x24a)](_0x3b2acc(0x1cc)+'ectory\x20o'+'pened',{'logsDir':toHomePath(configController[_0x3b2acc(0x381)][_0x3b2acc(0x3b7)])}),{'ok':!![],'path':configController[_0x3b2acc(0x381)][_0x3b2acc(0x3b7)]};}),_0x4ada6c(_0x5b77f8(0x265)+'t',async()=>{const _0x5dad05=_0x5b77f8,_0x25115d=await readdir(configController[_0x5dad05(0x381)][_0x5dad05(0x3b7)],{'recursive':!![]})['catch'](()=>[]);return _0x25115d;}),_0x4ada6c(_0x5b77f8(0x3ac)+'d',async(_0x49bc1f,_0x2b627f={})=>{const _0x3e7466=_0x5b77f8,_0x2258b3=String(_0x2b627f[_0x3e7466(0x2a1)]||'');if(!_0x2258b3)throw new Error('path\x20is\x20'+_0x3e7466(0x282));return readFile(_0x2258b3,'utf8');}),_0x4ada6c('files:re'+'ad',async(_0x482f23,_0x3b6e36)=>{const _0x5be14f=_0x5b77f8,_0x2bcab7=Date['now']();try{const _0x5d680d=await readFile(_0x3b6e36,_0x5be14f(0x3d0));return filesLogger?.[_0x5be14f(0x24a)]('file\x20rea'+_0x5be14f(0x330)+'ted',{'path':toHomePath(_0x3b6e36),'bytes':Buffer[_0x5be14f(0x35f)+'th'](_0x5d680d),'durationMs':Date[_0x5be14f(0x274)]()-_0x2bcab7}),_0x5d680d;}catch(_0x3d4ed9){filesLogger?.['error']('file\x20rea'+'d\x20failed',{'path':toHomePath(_0x3b6e36),'durationMs':Date[_0x5be14f(0x274)]()-_0x2bcab7,'error':summarizeError(_0x3d4ed9)});throw _0x3d4ed9;}}),_0x4ada6c(_0x5b77f8(0x3c2)+_0x5b77f8(0x1c9)+'y',async(_0x17a0d0,_0x270a7b)=>{const _0x31e98a=_0x5b77f8,_0x416676=Date['now']();try{const _0x3b75ed=await readFile(_0x270a7b);return filesLogger?.[_0x31e98a(0x24a)](_0x31e98a(0x2df)+_0x31e98a(0x435)+_0x31e98a(0x27a)+'ed',{'path':toHomePath(_0x270a7b),'bytes':_0x3b75ed[_0x31e98a(0x35f)+'th'],'durationMs':Date[_0x31e98a(0x274)]()-_0x416676}),new Uint8Array(_0x3b75ed);}catch(_0x34d232){filesLogger?.['error']('binary\x20f'+_0x31e98a(0x435)+'\x20failed',{'path':toHomePath(_0x270a7b),'durationMs':Date[_0x31e98a(0x274)]()-_0x416676,'error':summarizeError(_0x34d232)});throw _0x34d232;}}),_0x4ada6c(_0x5b77f8(0x29e)+_0x5b77f8(0x273),async(_0x5c847b,_0x33ae27={})=>{const _0x3de408=_0x5b77f8,_0x337f9c=Date[_0x3de408(0x274)]();return await writeFile(_0x33ae27[_0x3de408(0x2a1)],_0x33ae27[_0x3de408(0x24f)]??'',_0x3de408(0x3d0)),filesLogger?.['info'](_0x3de408(0x2b1)+_0x3de408(0x3a5)+'eted',{'path':toHomePath(_0x33ae27[_0x3de408(0x2a1)]),'bytes':Buffer[_0x3de408(0x35f)+'th'](String(_0x33ae27[_0x3de408(0x24f)]??'')),'durationMs':Date[_0x3de408(0x274)]()-_0x337f9c}),{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x29e)+_0x5b77f8(0x24d)+'ry',async(_0x3fec2d,_0x45991b={})=>{const _0x1da8f2=_0x5b77f8,_0x4f534e=Date['now']();await writeFile(_0x45991b[_0x1da8f2(0x2a1)],Buffer[_0x1da8f2(0x1e0)](_0x45991b[_0x1da8f2(0x24f)]??[]));const _0x1d4809=await stat(_0x45991b[_0x1da8f2(0x2a1)])['catch'](()=>null);return filesLogger?.['info'](_0x1da8f2(0x2df)+_0x1da8f2(0x2a3)+_0x1da8f2(0x29d)+_0x1da8f2(0x167),{'path':toHomePath(_0x45991b[_0x1da8f2(0x2a1)]),'bytes':_0x1d4809?.['size']??0x0,'durationMs':Date[_0x1da8f2(0x274)]()-_0x4f534e}),{'ok':!![]};}),_0x4ada6c(_0x5b77f8(0x1a5)+'lect-fil'+'e',async(_0x1a5cb1,_0x291dd3={})=>{const _0x4d4645=_0x5b77f8,_0x15c350=await dialog['showOpen'+_0x4d4645(0x41d)](BrowserWindow[_0x4d4645(0x380)+'ontents'](_0x1a5cb1['sender'])??mainWindow,{'title':typeof _0x291dd3[_0x4d4645(0x1ba)]===_0x4d4645(0x2fc)?_0x291dd3[_0x4d4645(0x1ba)]:undefined,'properties':[_0x4d4645(0x304),..._0x291dd3[_0x4d4645(0x316)+_0x4d4645(0x2ca)]?[_0x4d4645(0x316)+_0x4d4645(0x2ca)]:[]],'filters':Array['isArray'](_0x291dd3['filters'])?_0x291dd3['filters']:undefined});return filesLogger?.['info'](_0x4d4645(0x250)+_0x4d4645(0x32b)+_0x4d4645(0x286),{'canceled':_0x15c350['canceled'],'count':_0x15c350[_0x4d4645(0x2a8)+'s']['length'],'paths':_0x15c350[_0x4d4645(0x2a8)+'s'][_0x4d4645(0x349)](toHomePath)}),{'canceled':_0x15c350[_0x4d4645(0x16a)],'paths':_0x15c350[_0x4d4645(0x2a8)+'s']};}),_0x4ada6c(_0x5b77f8(0x266)+'st-direc'+_0x5b77f8(0x1f5),async(_0x1bd11f,_0x2cbaf9={})=>{const _0x2bcbc1=_0x5b77f8,_0x3dee06=resolve(String(_0x2cbaf9['path']||'')),_0x3588c3=_0x2cbaf9[_0x2bcbc1(0x40c)+'e']!==![],_0x589e4a=Array[_0x2bcbc1(0x2f3)](_0x2cbaf9[_0x2bcbc1(0x3f6)+'ns'])?_0x2cbaf9[_0x2bcbc1(0x3f6)+'ns'][_0x2bcbc1(0x349)](_0x2c629b=>String(_0x2c629b)[_0x2bcbc1(0x3cc)+'ase']()[_0x2bcbc1(0x1e4)](/^\./,''))[_0x2bcbc1(0x22c)](Boolean):null,_0x500c32=Number[_0x2bcbc1(0x193)+'r'](_0x2cbaf9[_0x2bcbc1(0x219)+'es'])&&_0x2cbaf9[_0x2bcbc1(0x219)+'es']>0x0?_0x2cbaf9['maxEntri'+'es']:0xc350,_0x38bb68=[];let _0xe71cd6=![];async function _0x591b2c(_0x7b27b7){const _0x5ae8b0=_0x2bcbc1;if(_0xe71cd6)return;let _0x36939e;try{_0x36939e=await readdir(_0x7b27b7,{'withFileTypes':!![]});}catch{return;}for(const _0x14268b of _0x36939e){if(_0xe71cd6)return;if(_0x14268b[_0x5ae8b0(0x217)][_0x5ae8b0(0x236)+'th']('.'))continue;const _0x40de85=join(_0x7b27b7,_0x14268b['name']);if(_0x14268b['isDirect'+_0x5ae8b0(0x185)]()){if(_0x3588c3)await _0x591b2c(_0x40de85);continue;}if(!_0x14268b[_0x5ae8b0(0x3ef)]())continue;if(_0x589e4a){const _0x402f5f=_0x14268b[_0x5ae8b0(0x217)]['lastInde'+'xOf']('.'),_0x377340=_0x402f5f>=0x0?_0x14268b[_0x5ae8b0(0x217)]['slice'](_0x402f5f+0x1)[_0x5ae8b0(0x3cc)+_0x5ae8b0(0x231)]():'';if(!_0x589e4a[_0x5ae8b0(0x17d)](_0x377340))continue;}if(_0x38bb68[_0x5ae8b0(0x3b3)]>=_0x500c32){_0xe71cd6=!![];return;}_0x38bb68[_0x5ae8b0(0x40e)]({'name':_0x14268b[_0x5ae8b0(0x217)],'path':_0x40de85});}}return await _0x591b2c(_0x3dee06),{'path':_0x3dee06,'entries':_0x38bb68,'truncated':_0xe71cd6};}),_0x4ada6c(_0x5b77f8(0x1a5)+_0x5b77f8(0x163)+_0x5b77f8(0x368),async(_0x149fc3,_0x2fab13={})=>{const _0xe5c232=_0x5b77f8,_0x407eb2=await dialog[_0xe5c232(0x1e8)+_0xe5c232(0x41d)](BrowserWindow[_0xe5c232(0x380)+_0xe5c232(0x308)](_0x149fc3[_0xe5c232(0x35e)])??mainWindow,{'title':typeof _0x2fab13[_0xe5c232(0x1ba)]===_0xe5c232(0x2fc)?_0x2fab13[_0xe5c232(0x1ba)]:undefined,'properties':[_0xe5c232(0x3ee)+_0xe5c232(0x31b)]});return filesLogger?.['info']('select\x20d'+'irectory'+_0xe5c232(0x27a)+'ed',{'canceled':_0x407eb2['canceled'],'count':_0x407eb2['filePath'+'s'][_0xe5c232(0x3b3)],'paths':_0x407eb2[_0xe5c232(0x2a8)+'s'][_0xe5c232(0x349)](toHomePath)}),{'canceled':_0x407eb2['canceled'],'paths':_0x407eb2[_0xe5c232(0x2a8)+'s']};}),_0x4ada6c(_0x5b77f8(0x34d)+_0x5b77f8(0x1fb)+_0x5b77f8(0x1a3),()=>_0x1a10ee()[_0x5b77f8(0x34d)+'e'][_0x5b77f8(0x325)+_0x5b77f8(0x20b)]()),_0x4ada6c('workspac'+_0x5b77f8(0x289)+_0x5b77f8(0x1eb),async()=>{const _0x1e0b63=_0x5b77f8,_0x2c3221=await _0x1a10ee()[_0x1e0b63(0x34d)+'e'][_0x1e0b63(0x325)+'yInfo']();return await shell['openPath'](_0x2c3221[_0x1e0b63(0x2a1)]),filesLogger?.['info'](_0x1e0b63(0x34d)+'e\x20direct'+_0x1e0b63(0x226)+'ed',{'path':toHomePath(_0x2c3221['path'])}),{'ok':!![],'path':_0x2c3221[_0x1e0b63(0x2a1)]};}),_0x4ada6c(_0x5b77f8(0x34d)+_0x5b77f8(0x40d)+_0x5b77f8(0x14e),()=>_0x1a10ee()[_0x5b77f8(0x34d)+'e'][_0x5b77f8(0x34e)+_0x5b77f8(0x326)]()),_0x4ada6c(_0x5b77f8(0x34d)+_0x5b77f8(0x15b)+_0x5b77f8(0x3a7)+_0x5b77f8(0x2c9),(_0x106dd0,_0x1cbef4)=>_0x1a10ee()['workspac'+'e'][_0x5b77f8(0x2aa)+_0x5b77f8(0x1cf)+'xt'](_0x1cbef4)),_0x4ada6c(_0x5b77f8(0x17a)+_0x5b77f8(0x417),(_0x36e5a3,_0x375c8e)=>_0x1a10ee()[_0x5b77f8(0x17a)][_0x5b77f8(0x3f7)](_0x375c8e)),_0x4ada6c('sessions'+_0x5b77f8(0x277)+_0x5b77f8(0x15d),()=>_0x1a10ee()['sessions']['pinnedKe'+'ys']()),_0x4ada6c(_0x5b77f8(0x17a)+_0x5b77f8(0x3b9)+'ned-keys',(_0x47f2f3,_0xdd9f7)=>_0x1a10ee()['sessions']['setPinne'+_0x5b77f8(0x20c)](_0xdd9f7)),_0x4ada6c('skills:i'+_0x5b77f8(0x165),(_0x4f63d0,_0xeae55c)=>_0x1a10ee()[_0x5b77f8(0x216)][_0x5b77f8(0x3f0)](_0xeae55c)),_0x4ada6c('cron:lis'+'t',(_0x40c3e8,_0x15b4c5)=>_0x1a10ee()[_0x5b77f8(0x41b)][_0x5b77f8(0x218)](_0x15b4c5)),_0x4ada6c(_0x5b77f8(0x3c6)+_0x5b77f8(0x2c4),(_0xd16301,_0x4b21d9)=>_0x1a10ee()[_0x5b77f8(0x41b)]['create'](_0x4b21d9)),_0x4ada6c(_0x5b77f8(0x32a)+_0x5b77f8(0x2c4),(_0x5a83e2,_0x38c05c)=>_0x1a10ee()['cron'][_0x5b77f8(0x248)](_0x38c05c)),_0x4ada6c(_0x5b77f8(0x1c0)+_0x5b77f8(0x33b),(_0x3b7897,_0x3e1710)=>_0x1a10ee()[_0x5b77f8(0x41b)]['remove'](_0x3e1710)),_0x4ada6c(_0x5b77f8(0x39d)+_0x5b77f8(0x21f),(_0x398a96,_0x26093e)=>_0x1a10ee()[_0x5b77f8(0x41b)][_0x5b77f8(0x3e5)](_0x26093e)),_0x4ada6c(_0x5b77f8(0x150)+'s',(_0x18858f,_0x580cd5)=>_0x1a10ee()['cron'][_0x5b77f8(0x2db)](_0x580cd5)),_0x4ada6c(_0x5b77f8(0x3e7)+'omplete',async(_0x5a9921,_0x15b4af={})=>{const _0x44359d=_0x5b77f8,_0x59d96c=configController['resolveC'+_0x44359d(0x3db)+'h'](),_0x17bb10=JSON[_0x44359d(0x3e6)](await readFile(_0x59d96c,_0x44359d(0x3d0))),_0x503d14=_0x17bb10?.['models']?.[_0x44359d(0x2a4)+'s']&&typeof _0x17bb10[_0x44359d(0x34b)][_0x44359d(0x2a4)+'s']===_0x44359d(0x1ca)?_0x17bb10[_0x44359d(0x34b)]['provider'+'s']:{},_0x2ffec7=typeof _0x17bb10?.[_0x44359d(0x437)]?.[_0x44359d(0x1b3)]?.['model']?.[_0x44359d(0x352)]===_0x44359d(0x2fc)?_0x17bb10[_0x44359d(0x437)]['defaults'][_0x44359d(0x43d)][_0x44359d(0x352)]:'',_0x447da0=String(_0x15b4af['model']||_0x2ffec7||'');if(!_0x447da0['includes']('/'))throw new Error('no\x20defau'+_0x44359d(0x370)+_0x44359d(0x2ea)+_0x44359d(0x386)+_0x44359d(0x38f)+_0x44359d(0x198)+_0x44359d(0x3fe));const _0x2db6b9=_0x447da0[_0x44359d(0x376)]('/'),_0x2faec0=_0x447da0[_0x44359d(0x297)](0x0,_0x2db6b9),_0x167f65=_0x447da0['slice'](_0x2db6b9+0x1),_0x5af46b=_0x503d14[_0x2faec0];if(!_0x5af46b||typeof _0x5af46b!==_0x44359d(0x1ca))throw new Error('provider'+_0x44359d(0x39a)+_0x44359d(0x26a)+'\x20'+_0x2faec0);const _0x51456d=String(_0x5af46b[_0x44359d(0x2f2)]||_0x44359d(0x220)+_0x44359d(0x2b7)+_0x44359d(0x2af)+'1')[_0x44359d(0x22e)]()[_0x44359d(0x1e4)](/\/$/,''),_0x7a7a83=await fetch(_0x51456d+(_0x44359d(0x39f)+_0x44359d(0x34f)+'s'),{'method':_0x44359d(0x15a),'headers':{'content-type':_0x44359d(0x1ea)+_0x44359d(0x1b8),'Authorization':'Bearer\x20'+(_0x5af46b[_0x44359d(0x32f)]||''),..._0x5af46b[_0x44359d(0x155)]&&typeof _0x5af46b['headers']===_0x44359d(0x1ca)?_0x5af46b[_0x44359d(0x155)]:{}},'body':JSON[_0x44359d(0x1c7)+'y']({'model':_0x167f65,'max_tokens':Number[_0x44359d(0x193)+'r'](_0x15b4af[_0x44359d(0x42c)+'s'])?_0x15b4af[_0x44359d(0x42c)+'s']:0x400,'temperature':typeof _0x15b4af[_0x44359d(0x172)+_0x44359d(0x3bf)]===_0x44359d(0x20e)?_0x15b4af[_0x44359d(0x172)+_0x44359d(0x3bf)]:undefined,'messages':Array[_0x44359d(0x2f3)](_0x15b4af[_0x44359d(0x238)])?_0x15b4af[_0x44359d(0x238)]:[]}),'signal':AbortSignal[_0x44359d(0x29c)](Number[_0x44359d(0x193)+'r'](_0x15b4af['timeoutM'+'s'])?_0x15b4af[_0x44359d(0x187)+'s']:0x1d4c0)});if(!_0x7a7a83['ok']){const _0x5c9bca=await _0x7a7a83[_0x44359d(0x14f)]();throw new Error(_0x44359d(0x225)+'tp\x20'+_0x7a7a83['status']+':\x20'+_0x5c9bca[_0x44359d(0x297)](0x0,0x190));}const _0x5c6d04=await _0x7a7a83[_0x44359d(0x199)](),_0x23127c=_0x5c6d04?.[_0x44359d(0x223)]?.[0x0]?.['message']??{};return{'content':extractModelMessageContent(_0x23127c['content']),'reasoning':typeof _0x23127c[_0x44359d(0x37f)+_0x44359d(0x21d)+'t']==='string'?_0x23127c[_0x44359d(0x37f)+_0x44359d(0x21d)+'t']:'','model':_0x5c6d04?.[_0x44359d(0x43d)]||_0x167f65};}),_0x4ada6c(_0x5b77f8(0x338)+'ettings',()=>_0x1a10ee()[_0x5b77f8(0x34b)][_0x5b77f8(0x2e3)]()),_0x4ada6c(_0x5b77f8(0x338)+_0x5b77f8(0x2e7)+_0x5b77f8(0x3dc),(_0x5252ad,_0x8c6909)=>_0x1a10ee()[_0x5b77f8(0x34b)][_0x5b77f8(0x221)+_0x5b77f8(0x3dc)](_0x8c6909)),_0x4ada6c(_0x5b77f8(0x338)+'et-self-'+'operated',(_0x330450,_0x58f411)=>_0x1a10ee()[_0x5b77f8(0x34b)]['setSelfO'+_0x5b77f8(0x394)+_0x5b77f8(0x314)](_0x58f411)),_0x4ada6c(_0x5b77f8(0x338)+_0x5b77f8(0x207)+_0x5b77f8(0x169),()=>_0x1a10ee()[_0x5b77f8(0x34b)][_0x5b77f8(0x1f4)+_0x5b77f8(0x30a)]()),_0x4ada6c(_0x5b77f8(0x3e7)+'ustom-mo'+'dels',()=>_0x1a10ee()['models'][_0x5b77f8(0x18e)+_0x5b77f8(0x203)]()),_0x4ada6c(_0x5b77f8(0x3b0)+_0x5b77f8(0x241)+_0x5b77f8(0x332)+'ources',async()=>{const _0x2236c2=_0x5b77f8,_0x67db47=await prepareRuntime(shellConfig,{'syncOnly':!![]});return await configController[_0x2236c2(0x275)+_0x2236c2(0x268)+'ns'](),{'ok':!![],'syncedAt':new Date()[_0x2236c2(0x261)+_0x2236c2(0x211)](),'manifest':_0x67db47,'status':await getRuntimeResourceStatus()};}),_0x4ada6c(_0x5b77f8(0x3b0)+_0x5b77f8(0x409)+_0x5b77f8(0x1bc),async()=>getRuntimeResourceStatus());}function _0x4c7f(){const _0x130996=['map','agentId','models','em:open-','workspac','sharedCo','mpletion','n-direct','migrateP','primary','ssion:\x20',':save-we','captureI','HEAD','uri','ists','runtimeR','tus','\x20process','-life-cy','get','sender','byteLeng',':answer-','chat:his','controll','parseInt','dispose','.mkv','.webm','lawPlugi','ectory','kdocs','m-channe','ccept-ra',':save-ne','pping\x20ga','producti','ndlers','lt\x20model','-refresh','input','pen-devt','Custom','ot\x20start','indexOf','\x20is\x20requ','closeToT','ent','\x20main\x20wi','plugins','hostname','ings','ishuDocC','reasonin','fromWebC','paths','set=utf-','lawChann','audio/wa','wujie-sh','red;\x20set','bytes\x20*/','led','content-','range,\x20c','enClawSk','deletedS','stion','nput-eve','\x20a\x20provi','logs\x20exp','gatewayP','wechat','send','peratedM','log','Entry','openclaw','atus','dow\x20load','\x20not\x20con','s:delete','-weixin','cron:run','board:wr','/chat/co','getFeish','lose',':cancel','dataDir','ctron\x20ma','te\x20compl','finally','shared-c','dRejecti','app:info','one','chatChan','logs:rea','config:c','app:clip','preventD','runtime:',':save-di','startFei','length','latest','diagnost','level','logsDir','gateway-',':set-pin','sidebar','ishuRegi','roductCo','ame','started','ure','register',':gateway','files:re','skills:i','deleteOp','arch','cron:cre','Unsuppor','est_fail','bytes\x20','cancelFe','targetDi','toLowerC','-session','mand','openAtLo','utf8','limit','ed:\x20','image/we','gin','index.mj','figs','openPath','IPC\x20requ','agents:l','gatewayT','onfigPat','ngs','index.ht','ngtalk-d','ion','disable','groups','onfig','plugin\x20e','writeTex','runOnce','parse','models:c','ies','ot\x20initi','app:syst','complete','hatChann','tup:set','openDire','isFile','install','les:hide','dist','succeede','ell\x20gate','ion/octe','extensio','rename','\x20found:\x20','uncaught','.flac','toWeb','ncent-ex','getKdocs','l\x20first','mjs','startWec','before\x20q','relaunch','failed','hide','eted','window:o','unhandle','732PmLtHk','resource','ishu-cha',':delete','recursiv','e:shared','push',':list','ItemSett','alized','ssionKey','before-q','nnectSes','isMaximi','lawMcpSe',':rename','nectSess','entries','n\x20loaded','cron','d\x20reject','Dialog','.webp','ocess\x20go','\x20main\x20bo','feishu_d','agent','les:list','pathname','ipc','nges','isDestro','writeEve','ocsCliCo','aseMailC','message','maxToken','productN','minimize','uDocCliC','agents:w','ask-user','setLogin','orted','omModel','ile\x20read','les:dele','agents',':create','sPath','-mail','patch','.wav','model','ipc\x20requ','Invalid\x20','CliConne','s:hide','5406260ImXzqT','updateOp','uest-age','setName','elConfig','clawspac','-by-sess','logs:exp','saveWeco','andledIn',':resize','files','-data','mail','uit','yed','onnector','\x20failed:','nts','pper\x20not','-context','text','cron:log','torConfi','ernal\x20ur',':get-clo','e\x20url','headers','agent-','error','s:upsert','ap:get','POST','e:write-','plugin\x20c','keys','code','image/jp','app:file','43939ceBNuc','getRecen','lect-dir','delete','nstall','open','ted','app:tray','model-id','canceled','agent\x20cr','resolveS','record','text/mar','nectorCo','loadFile','igSnapsh','temperat','tabs:pos','cwd','+Shift+I','agents:d','chat-str','bytes','maximize','sessions','ilConnec','ell-cli.','includes','deleteCu','logs:wri','saveQqbo','stration','skills:s','listImCh','saveFeis','ory','resh-age','timeoutM','tabs-com','liConnec','nConfig','warn','avatar','audio/aa','customMo','entDocsC','node:fs/','Session','readConf','isIntege',':input','temp','oot','electron','der/mode','json','agents-u','illEntry','est\x20star','chat:str','agent\x20de','cancelWe',':save-fe','reate','.jpeg','ory-info',':save','files:se','ipc_requ','-exit','video/mp','-shortcu','enClawCh','msvideo','emoji','pluginId','annelCon','nfig','unregist','openDevT','agent\x20al','defaults','e\x20first.','ChannelC','senderFr','d-state','ion/json','runtime\x20','title','huChanne','-status','\x20log','\x20shortcu','getFocus','cron:rem','writeCon','channelI','open\x20ext','getVersi','way\x20is\x20n','ProductR','stringif','ocs','ad-binar','object','webConte','logs\x20dir','talkDocC','openExte','redConte','ready\x20ex','zed','set','-port','app:open','restart','OPTIONS','enClawCo','chat','com-chan','ll-close','Config','ell:even','oken','te:downl','shell-ru','from','image/bm','updated','huDocCon','replace','Version','te:check','CommandO','showOpen','main','applicat','irectory','em:resta','l\x20prepar','ools','tup:get','preload.','get-conf',':open-cl','image/gi','selected','tory','nt-state','runtimeI','getAllWi','tf-8','elSessio','e:direct','nfo','handle','status','lConfig','wujiecla','child\x20pr','tChannel','dels','devtools','uired','794278pQcAMz','elected-','9GewTSP','lawSkill','size','yInfo','dKeys','window-a','number','t-messag','chrome','ing',':close','context','pop','orConfig','skills','name','list','maxEntri','.txt','ype','pdate','g_conten','-token','-once','https://','setSetti','ileName','choices','saveKdoc','model\x20ht','ory\x20open','rated-fi','接入自动更新','56655wDoFLD','eam','upsert','filter','image/pn','trim','nabled','.aac','ase','gateway\x20','.gif','.mp4','ationSta','startsWi','app:star','messages','nt]','xOf','dAt','function','renderer','ted\x20conn','customNa','ired','sync-bun','uit:\x20sto','est\x20comp','csCliCon','rocess-g','fig','eating','update','fromIpc','info','ith-sess','t-stream','ite-bina','url','content','select\x20f','oad','.mov','mChannel','ectSessi',':diagnos','nel','-request',':status','appId','max','.\x20Run\x20wu','find','tSession','text/pla','n\x20not\x20fo','create','toISOStr','agent\x20id','-questio','sConnect','logs:lis','files:li','prod','imePlugi','key','figured:','unref','g+xml','answerAs','artifact','ntime','saveDing','darwin','nelSessi','ite','now','syncRunt','SchemesA',':pinned-','onfig\x20up','FeishuDo','\x20complet','length,\x20','ell\x20boot','abort','unsuppor','stop','type','ng;\x20recr','required','tabs:req','Exceptio','.png','leted','7814080wVSbcQ','update-c','e:open-d','kdown;\x20c','video/we','meFilter','agent_id','range','fromEntr','519UObjVU','test','inimize','elete','feishu','[wujie-s','href','slice','GET,\x20HEA','range,\x20a','unmaximi','default','timeout','e\x20comple','files:wr','icktime','payload','path','product','ile\x20writ','provider','igate','control','ged','filePath','jie-shel','writeSha','uRegistr','tate','ist',':save-qq','ai.com/v','saveTenc','file\x20wri','tic','setOpenC','ted-stat','protocol','enClawMc','api.open','all','10890VdbRgM','audio/mp','method','no-store','versions','history','dated','min','stopped\x20','ector\x20se','agents:c','ate','close','config:r','audio/fl','ocess-go','ontext','ections',':set-clo','command','sourcePa',':complet','shuRegis','product\x20','isabled','t:\x20','quit','ap:upser','setImCha','ls:set-e','ndows','dev','plugin\x20d',':save-te','logs','-info','getURL','platform','binary\x20f','eated','plugins:','config:i','settings','1200lcTOdh','rnal','iled\x20to\x20','et-setti','image/sv','projectR','\x20configu','saveCust','wBin','\x20gone','skills:d','Not\x20foun','markConf','getAppPa','baseUrl','isArray','entExmai','ls:delet','enable','meta','preferen','\x20CLI\x20wra','hell:eve','detach','string','app:gene','ncident','hell:ipc','ort','before-i','ces.json','rayOnClo','openFile','configPa','config','ls:list','ontents','rver','ModelId','46431627cyfPxi','edWindow','cle','audio/og','split','node','app:upda',':fork','\x20excepti','odels','activate','multiSel','d-local','video/qu','window:t','hell]\x20fa','ctory','start','tLogs','les:reve','untimeHa','mport-zi','getLogin','navigati','showSave','isPackag','director','ntext',':runtime','folder','Shell\x20暂未','cron:upd','ile\x20comp','te:get-s','ession','terminal','apiKey','d\x20comple','in;\x20char','dled-res','match','isFinite','window:i','h\x0aexec\x20\x22','catch','models:s','tateDir','tabs:nav','ove','will-qui','lConnect','cCliConn','hidden','est\x20fail','saveNetE','unknown','skills:u','nnel','ot\x20compl','video/x-','deleteFi','ximize'];_0x4c7f=function(){return _0x130996;};return _0x4c7f();}async function boot(){const _0x3ccdaa=_0x285fc1;shellConfig=await loadShellConfig(resolveProjectRoot()),app[_0x3ccdaa(0x445)](shellConfig[_0x3ccdaa(0x42d)+_0x3ccdaa(0x3bd)]),configController=createConfigController(shellConfig),mainLogger=createShellLogger(configController[_0x3ccdaa(0x381)],_0x3ccdaa(0x1e9)),ipcLogger=createShellLogger(configController[_0x3ccdaa(0x381)],_0x3ccdaa(0x425)),filesLogger=createShellLogger(configController[_0x3ccdaa(0x381)],_0x3ccdaa(0x145)),rendererLogger=createShellLogger(configController[_0x3ccdaa(0x381)],_0x3ccdaa(0x23d)),productRuntime=await loadProductRuntime();const _0xfa1b12=resolveWujieApiEndpoint();diagnosticsWriter=createDiagnosticsWriter({'logsDir':configController[_0x3ccdaa(0x381)][_0x3ccdaa(0x3b7)],'appContext':{'productName':shellConfig[_0x3ccdaa(0x42d)+_0x3ccdaa(0x3bd)],'appId':shellConfig['appId'],'appVersion':app[_0x3ccdaa(0x1c4)+'on'](),'platform':process[_0x3ccdaa(0x2de)],'arch':process['arch'],..._0xfa1b12?{'apiEndpoint':_0xfa1b12}:{}}}),userEventWriter=createUserEventWriter({'logsDir':configController['paths']['logsDir'],'diagnosticsWriter':diagnosticsWriter}),registerProcessLogHooks(),mainLogger?.[_0x3ccdaa(0x24a)](_0x3ccdaa(0x197)+_0x3ccdaa(0x420)+_0x3ccdaa(0x375)+'ed',{'appVersion':app[_0x3ccdaa(0x1c4)+'on'](),'electronVersion':process[_0x3ccdaa(0x2bd)][_0x3ccdaa(0x197)],'nodeVersion':process['versions'][_0x3ccdaa(0x310)],'chromeVersion':process[_0x3ccdaa(0x2bd)][_0x3ccdaa(0x210)],'platform':process[_0x3ccdaa(0x2de)],'arch':process[_0x3ccdaa(0x3c5)],'mode':getMode(),'projectRoot':shellConfig[_0x3ccdaa(0x2e9)+'oot'],'configPath':shellConfig[_0x3ccdaa(0x305)+'th'],'dataDir':shellConfig[_0x3ccdaa(0x3a3)],'logsDir':configController[_0x3ccdaa(0x381)]['logsDir'],'rendererUrl':process.env.VITE_DEV_SERVER_URL||join(shellConfig['projectR'+_0x3ccdaa(0x196)],_0x3ccdaa(0x3f2),_0x3ccdaa(0x3dd)+'ml')}),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app[_0x3ccdaa(0x1c4)+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter}),typeof productRuntime[_0x3ccdaa(0x351)+_0x3ccdaa(0x3bc)+_0x3ccdaa(0x1af)]===_0x3ccdaa(0x23c)&&await productRuntime[_0x3ccdaa(0x351)+_0x3ccdaa(0x3bc)+_0x3ccdaa(0x1af)]({'configController':configController,'mainLogger':mainLogger}),attachGatewayBroadcastHandlers(gatewayController),installIpcHandlers(),installClawspaceProtocolHandler(),registerShellShortcuts(),await createWindow(),await gatewayController[_0x3ccdaa(0x31c)](),mainLogger?.['info'](_0x3ccdaa(0x197)+'\x20main\x20bo'+_0x3ccdaa(0x345)+_0x3ccdaa(0x405));}function registerProcessLogHooks(){const _0x1252ec=_0x285fc1;if(registerProcessLogHooks['register'+'ed'])return;registerProcessLogHooks[_0x1252ec(0x3c0)+'ed']=!![],process['on'](_0x1252ec(0x3f9)+_0x1252ec(0x284)+'n',_0x5e4393=>{const _0x4d897c=_0x1252ec;mainLogger?.[_0x4d897c(0x157)]('uncaught'+_0x4d897c(0x313)+'on',summarizeError(_0x5e4393));}),process['on'](_0x1252ec(0x407)+_0x1252ec(0x3a8)+'on',_0x48326a=>{const _0x27b55c=_0x1252ec;mainLogger?.[_0x27b55c(0x157)](_0x27b55c(0x407)+_0x27b55c(0x41c)+_0x27b55c(0x3df),summarizeError(_0x48326a));}),app['on']('render-p'+_0x1252ec(0x245)+_0x1252ec(0x3aa),(_0x5c512d,_0x46d004,_0x4f34a4)=>{const _0x40e840=_0x1252ec;mainLogger?.['error'](_0x40e840(0x23d)+_0x40e840(0x35b)+_0x40e840(0x2ed),{'url':_0x46d004[_0x40e840(0x2dd)](),'details':_0x4f34a4});}),app['on']('child-pr'+_0x1252ec(0x2c8)+'ne',(_0x317b1c,_0x2c4b16)=>{const _0x5eece1=_0x1252ec;mainLogger?.[_0x5eece1(0x157)](_0x5eece1(0x201)+_0x5eece1(0x41f)+'ne',{'details':_0x2c4b16});});}app['on'](_0x285fc1(0x20d)+_0x285fc1(0x1da)+'d',()=>{const _0x3ebc17=_0x285fc1;if(process[_0x3ebc17(0x2de)]!==_0x3ebc17(0x271))app[_0x3ebc17(0x2d3)]();}),app['on'](_0x285fc1(0x315),async()=>{const _0x7c13c2=_0x285fc1;if(isQuitting){app['quit']();return;}BrowserWindow[_0x7c13c2(0x1f8)+_0x7c13c2(0x2d7)]()['length']===0x0&&shellConfig&&await createWindow();}),app['on'](_0x285fc1(0x413)+_0x285fc1(0x148),_0x1930bf=>{const _0x58d0a1=_0x285fc1;isQuitting=!![],terminalManager?.[_0x58d0a1(0x364)](),terminalManager=null,productRuntimeHooks?.[_0x58d0a1(0x364)]?.();for(const _0xc4c814 of Object['keys'](productRuntimeHooks))delete productRuntimeHooks[_0xc4c814];if(!gatewayController)return;mainLogger?.['info'](_0x58d0a1(0x401)+_0x58d0a1(0x242)+_0x58d0a1(0x36d)+'teway'),_0x1930bf[_0x58d0a1(0x3af)+'efault'](),void gatewayController[_0x58d0a1(0x27f)]()[_0x58d0a1(0x3a6)](()=>{const _0x4ef177=_0x58d0a1;gatewayController=null,mainLogger?.['info'](_0x4ef177(0x232)+_0x4ef177(0x2c1)+_0x4ef177(0x401)+_0x4ef177(0x148)),app['quit']();});}),app['on'](_0x285fc1(0x33c)+'t',()=>{const _0x2efe6c=_0x285fc1;globalShortcut[_0x2efe6c(0x1b0)+'er'](DEVTOOLS_ACCELERATOR);}),app['whenRead'+'y']()['then'](boot)[_0x285fc1(0x337)](_0x29b904=>{const _0x40c1bf=_0x285fc1;bootError=_0x29b904 instanceof Error?_0x29b904[_0x40c1bf(0x42b)]:String(_0x29b904),mainLogger?.[_0x40c1bf(0x157)](_0x40c1bf(0x197)+_0x40c1bf(0x420)+'ot\x20faile'+'d',summarizeError(_0x29b904)),console[_0x40c1bf(0x157)]('[wujie-s'+'hell]\x20fa'+'iled\x20to\x20'+'boot\x20ele'+_0x40c1bf(0x3a4)+'in',_0x29b904);});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2a46(_0x254fd6,_0x206a64){_0x254fd6=_0x254fd6-0x18c;const _0x5b9800=_0x5b98();let _0x2a4637=_0x5b9800[_0x254fd6];return _0x2a4637;}function _0x5b98(){const _0x3794ee=['876OWTaVe','logs:lis','ead','ory','-mail','logs:ope','et-self-','wechat-l','mport-zi','rcode',':open-cl','cron:log',':fork','agents:l','8jDiWNJ','s:upsert','app:upda','ory-info','ishu-cha','chat:str','ettings','invoke','-url','board:wr','ned-keys','s:delete','ion','-info','pdated','ete','window:i',':agent-m','75euKOAX','gateway-','tabs-com','-exit','skills:d','dels:del','agents:w','agents:d','-restart','les:dele',':rename','disable','mand','chat-str','agents:c','ent','agents-u','lose','d-state','all','igate','artifact','files:se','tabs:nav','tease-ma','getPathF','ocs','uest-age','220eQefnK','st-direc','loading-','mail','skills:i',':save','s:list',':status','app:file','40513YDEGzq','devtools',':save-fe','-context',':set-clo','nnel','te:get-s','ontext','openclaw',':save-ne','et-setti','load','tup:set','sessions','omplete','ort','dled-res','cron:run','ectory','terminal','orFile','les:hide',':get-clo',':delete','plugins:','ist','1137283NRNzvs','config:c','-session','operated','wechat-s','cron:upd','ap:get','-once','logs:rep','rams','nel',':answer-',':gateway','cron:rem','775892atTsFP','off','-by-sess','tabs-age','s:hide','t-messag','lect-fil','dels','chat:abo','elected-','feishu_d','app:gene','ate','com-chan','tabs:req','irectory','skills:u','cron:lis','n-direct','-data','-questio','-status','em:open-','ls:list','tup:get','set','ell:even','ources',':save-kd','get-conf',':start','e:write-',':resize','te:quit-','app:wind','m-channe','ncent-do','ustom-mo','zed','wechat-q','i-window','ove','exposeIn','app:clip','82189dsKefR','workspac','models:s','onfig','eam','feishu','keys','resource','files:li','bot-chan',':save-we','name','nt-state','d-local','config:i','models:c','dels:sav','te:downl',':choose',':choose-','lect-dir','searchPa','life-cyc','ools',':list','e:open-d','e:direct','te-state','app:syst','s:reveal',':save-te','rated-fi',':save-di','oad','nabled','ask-user','folder','10814CXMbIv','83583QzehzL','skills:s','ls:delet','les:reve','5rdluId',':cancel','cle','list','les:upse','runtime:','wujie-sh','em:resta','window:t','status',':create','app:tray','resh-age',':save-qq','ions-lis','ngs','305808Uorwop','te:check',':loading','-token','app:open','files:wr','and-inst','delete','app:star','ncent-ex','agent-ev','platform','kdocs','ngtalk-d','onnector','-logs','elete',':pinned-','model-id','eam-even','tabs:ref','MainWorl','s-maximi','ishu-doc','chat:his','ap:upser','logs:wri',':set-pin'];_0x5b98=function(){return _0x3794ee;};return _0x5b98();}const _0x4f7e13=_0x2a46;(function(_0x347ea3,_0x2a84e8){const _0x3f0a24=_0x2a46,_0x276b42=_0x347ea3();while(!![]){try{const _0x1535b9=-parseInt(_0x3f0a24(0x201))/0x1+parseInt(_0x3f0a24(0x226))/0x2*(parseInt(_0x3f0a24(0x277))/0x3)+-parseInt(_0x3f0a24(0x1d5))/0x4*(parseInt(_0x3f0a24(0x22b))/0x5)+-parseInt(_0x3f0a24(0x23b))/0x6+parseInt(_0x3f0a24(0x1c7))/0x7*(-parseInt(_0x3f0a24(0x265))/0x8)+-parseInt(_0x3f0a24(0x227))/0x9*(-parseInt(_0x3f0a24(0x1a4))/0xa)+-parseInt(_0x3f0a24(0x1ad))/0xb*(-parseInt(_0x3f0a24(0x257))/0xc);if(_0x1535b9===_0x2a84e8)break;else _0x276b42['push'](_0x276b42['shift']());}catch(_0x17b9bb){_0x276b42['push'](_0x276b42['shift']());}}}(_0x5b98,0x1cfdd));import _0x17e996 from'electron';const {contextBridge,ipcRenderer,webUtils}=_0x17e996,eventListeners=new Map();function invoke(_0x39052b,_0x1c6563){const _0x41e4a2=_0x2a46;return ipcRenderer[_0x41e4a2(0x26c)](_0x39052b,_0x1c6563);}function subscribe(_0x4ef1a1,_0x43a245){const _0xa6868a=_0x2a46;if(typeof _0x43a245!=='function')return()=>{};const _0x2e1075=(_0xf36edf,_0x13ae95)=>{const _0x7bbe6a=_0x2a46;if(_0x13ae95?.[_0x7bbe6a(0x20c)]===_0x4ef1a1)_0x43a245(_0x13ae95['payload']);};return ipcRenderer['on']('wujie-sh'+_0xa6868a(0x1ef)+'t',_0x2e1075),eventListeners[_0xa6868a(0x1ee)](_0x43a245,_0x2e1075),()=>{const _0x280806=_0xa6868a,_0x562efe=eventListeners['get'](_0x43a245)||_0x2e1075;ipcRenderer[_0x280806(0x1d6)](_0x280806(0x231)+_0x280806(0x1ef)+'t',_0x562efe),eventListeners[_0x280806(0x242)](_0x43a245);};}const wujieShell={'app':{'info':()=>invoke('app:info'),'openUrl':_0x52ef11=>invoke(_0x4f7e13(0x23f)+_0x4f7e13(0x26d),_0x52ef11),'restart':()=>invoke(_0x4f7e13(0x21d)+_0x4f7e13(0x232)+'rt'),'onProtocolUrl':_0x6c61d4=>subscribe('app:prot'+'ocol-url',_0x6c61d4)},'update':{'state':()=>invoke(_0x4f7e13(0x267)+'te:get-s'+'tate'),'check':()=>invoke(_0x4f7e13(0x267)+_0x4f7e13(0x23c)),'download':()=>invoke(_0x4f7e13(0x267)+_0x4f7e13(0x212)+_0x4f7e13(0x222)),'quitAndInstall':()=>invoke(_0x4f7e13(0x267)+_0x4f7e13(0x1f6)+_0x4f7e13(0x241)+'all'),'onState':_0x252748=>subscribe(_0x4f7e13(0x267)+_0x4f7e13(0x21c),_0x252748)},'updates':{'state':()=>invoke('app:upda'+_0x4f7e13(0x1b3)+'tate'),'check':()=>invoke(_0x4f7e13(0x267)+_0x4f7e13(0x23c)),'download':()=>invoke(_0x4f7e13(0x267)+_0x4f7e13(0x212)+_0x4f7e13(0x222)),'quitAndInstall':()=>invoke(_0x4f7e13(0x267)+_0x4f7e13(0x1f6)+'and-inst'+_0x4f7e13(0x19b)),'onState':_0x594521=>subscribe('app:upda'+_0x4f7e13(0x21c),_0x594521)},'window':{'minimize':()=>invoke('window:m'+'inimize'),'toggleMaximize':()=>invoke(_0x4f7e13(0x233)+'oggle-ma'+'ximize'),'close':()=>invoke('window:c'+_0x4f7e13(0x199)),'isMaximized':()=>invoke(_0x4f7e13(0x275)+_0x4f7e13(0x251)+_0x4f7e13(0x1fb)),'onStateChange':_0x4e0573=>subscribe(_0x4f7e13(0x1f7)+'ow-state',_0x4e0573),'openDevTools':()=>invoke('window:o'+'pen-devt'+_0x4f7e13(0x218)),'onDevToolsShortcut':_0x729554=>subscribe(_0x4f7e13(0x1ae)+'-shortcu'+'t',_0x729554)},'files':{'read':_0x1382a5=>invoke('files:re'+'ad',_0x1382a5),'readBinary':_0x38262c=>invoke('files:re'+'ad-binar'+'y',_0x38262c),'write':(_0x2366e3,_0x278ae4)=>invoke(_0x4f7e13(0x240)+'ite',{'path':_0x2366e3,'content':_0x278ae4}),'writeBinary':(_0x53408,_0x2fd34d)=>invoke(_0x4f7e13(0x240)+'ite-bina'+'ry',{'path':_0x53408,'content':_0x2fd34d}),'selectFile':_0x177fc6=>invoke('files:se'+_0x4f7e13(0x1db)+'e',_0x177fc6),'selectDirectory':_0x158ffc=>invoke(_0x4f7e13(0x19e)+_0x4f7e13(0x215)+_0x4f7e13(0x1bf),_0x158ffc),'listDirectory':_0x4d8c2f=>invoke(_0x4f7e13(0x209)+_0x4f7e13(0x1a5)+'tory',_0x4d8c2f),'getPathForFile':_0x487841=>webUtils[_0x4f7e13(0x1a1)+_0x4f7e13(0x1c1)](_0x487841),'choose':_0x508df0=>invoke(_0x4f7e13(0x1ac)+_0x4f7e13(0x213),_0x508df0),'chooseFolder':()=>invoke(_0x4f7e13(0x1ac)+_0x4f7e13(0x214)+_0x4f7e13(0x225)),'saveTemp':_0x2bfde9=>invoke(_0x4f7e13(0x1ac)+_0x4f7e13(0x21f)+'mp',_0x2bfde9),'saveUpload':_0x13dedc=>invoke('app:file'+':save-up'+_0x4f7e13(0x1b8),_0x13dedc),'downloadLocal':_0x5f2df6=>invoke(_0x4f7e13(0x1ac)+':downloa'+_0x4f7e13(0x20e),_0x5f2df6),'reveal':_0x2c0761=>invoke(_0x4f7e13(0x1e0)+_0x4f7e13(0x220)+'les:reve'+'al',_0x2c0761)},'generatedFiles':{'list':()=>invoke(_0x4f7e13(0x1e0)+'rated-fi'+'les:list'),'upsert':_0x140df3=>invoke(_0x4f7e13(0x1e0)+_0x4f7e13(0x220)+_0x4f7e13(0x22f)+'rt',_0x140df3),'hide':_0x2a3f44=>invoke('app:gene'+_0x4f7e13(0x220)+'les:hide',_0x2a3f44),'hideBySession':_0x39a99a=>invoke(_0x4f7e13(0x1e0)+_0x4f7e13(0x220)+_0x4f7e13(0x1c2)+_0x4f7e13(0x1d7)+_0x4f7e13(0x271),_0x39a99a),'delete':_0x2ce91c=>invoke(_0x4f7e13(0x1e0)+_0x4f7e13(0x220)+_0x4f7e13(0x191)+'te',_0x2ce91c),'deletedState':_0xa95cc8=>invoke(_0x4f7e13(0x1e0)+_0x4f7e13(0x220)+_0x4f7e13(0x191)+'ted-stat'+'e',_0xa95cc8),'reveal':_0x253e84=>invoke(_0x4f7e13(0x1e0)+_0x4f7e13(0x220)+_0x4f7e13(0x22a)+'al',_0x253e84)},'artifacts':{'list':_0x47165b=>invoke(_0x4f7e13(0x19d)+_0x4f7e13(0x1aa),_0x47165b),'upsert':_0x1c7d6d=>invoke(_0x4f7e13(0x19d)+_0x4f7e13(0x266),_0x1c7d6d),'hide':_0x4dd941=>invoke(_0x4f7e13(0x19d)+_0x4f7e13(0x1d9),_0x4dd941),'delete':_0x10eaa9=>invoke('artifact'+_0x4f7e13(0x270),_0x10eaa9),'reveal':_0x17a32b=>invoke(_0x4f7e13(0x19d)+_0x4f7e13(0x21e),_0x17a32b),'getDeletedState':_0x23c10e=>invoke(_0x4f7e13(0x19d)+_0x4f7e13(0x270)+_0x4f7e13(0x19a),_0x23c10e)},'clipboard':{'writeText':_0x12bf70=>invoke(_0x4f7e13(0x200)+_0x4f7e13(0x26e)+'ite',_0x12bf70)},'system':{'openFolder':_0x10ce1f=>invoke(_0x4f7e13(0x21d)+_0x4f7e13(0x1eb)+_0x4f7e13(0x225),_0x10ce1f),'restart':()=>invoke('app:syst'+_0x4f7e13(0x232)+'rt')},'startup':{'setEnabled':_0x5196dd=>invoke(_0x4f7e13(0x243)+_0x4f7e13(0x1b9),_0x5196dd),'isEnabled':()=>invoke('app:star'+_0x4f7e13(0x1ed))},'tray':{'getCloseOnCloseEnabled':()=>invoke(_0x4f7e13(0x236)+_0x4f7e13(0x1c3)+'se'),'setCloseOnCloseEnabled':_0x10c38e=>invoke(_0x4f7e13(0x236)+_0x4f7e13(0x1b1)+'se',_0x10c38e)},'workspace':{'directoryInfo':()=>invoke(_0x4f7e13(0x202)+_0x4f7e13(0x21b)+_0x4f7e13(0x268)),'openDirectory':()=>invoke('workspac'+_0x4f7e13(0x21a)+_0x4f7e13(0x1e4)),'sharedContext':()=>invoke(_0x4f7e13(0x202)+'e:shared'+_0x4f7e13(0x1b0)),'writeSharedContext':_0x2606b4=>invoke(_0x4f7e13(0x202)+_0x4f7e13(0x1f4)+'shared-c'+_0x4f7e13(0x1b4),_0x2606b4)},'openclaw':{'runtimeInfo':()=>invoke(_0x4f7e13(0x1b5)+':runtime'+_0x4f7e13(0x272)),'runOnce':(_0x179fbc=[])=>invoke(_0x4f7e13(0x1b5)+':run-onc'+'e',_0x179fbc),'gatewayStatus':()=>invoke(_0x4f7e13(0x1b5)+_0x4f7e13(0x1d3)+_0x4f7e13(0x1ea)),'gatewayToken':()=>invoke('openclaw'+_0x4f7e13(0x1d3)+_0x4f7e13(0x23e)),'gatewayPort':()=>invoke(_0x4f7e13(0x1b5)+_0x4f7e13(0x1d3)+'-port'),'gatewayRestart':()=>invoke(_0x4f7e13(0x1b5)+_0x4f7e13(0x1d3)+_0x4f7e13(0x190)),'gatewayLogs':_0x289a96=>invoke(_0x4f7e13(0x1b5)+_0x4f7e13(0x1d3)+_0x4f7e13(0x24a),_0x289a96),'onGatewayStatus':_0xf073c=>subscribe(_0x4f7e13(0x278)+'status',_0xf073c),'onGatewayLog':_0x4b4cbc=>subscribe('gateway-'+'log',_0x4b4cbc),'onAgentEvent':_0x3f2b8d=>subscribe(_0x4f7e13(0x245)+_0x4f7e13(0x197),_0x3f2b8d),'onAgentsUpdated':_0x16396f=>subscribe(_0x4f7e13(0x198)+_0x4f7e13(0x273),_0x16396f),'onAskUserQuestion':_0x293055=>subscribe(_0x4f7e13(0x224)+_0x4f7e13(0x1e9)+'n',_0x293055),'loadingLifeCycle':()=>invoke(_0x4f7e13(0x1b5)+_0x4f7e13(0x23d)+'-life-cy'+_0x4f7e13(0x22d)),'onLoadingLifeCycle':_0x1f87a8=>subscribe(_0x4f7e13(0x1a6)+_0x4f7e13(0x217)+'le',_0x1f87a8),'answerAskUserQuestion':_0x712b4b=>invoke(_0x4f7e13(0x1b5)+_0x4f7e13(0x1d2)+_0x4f7e13(0x224)+_0x4f7e13(0x1e9)+'n',_0x712b4b),'openCliWindow':()=>invoke(_0x4f7e13(0x1b5)+_0x4f7e13(0x261)+_0x4f7e13(0x1fd))},'terminal':{'create':_0x45087c=>invoke('terminal'+_0x4f7e13(0x235),_0x45087c),'input':_0x13e971=>invoke(_0x4f7e13(0x1c0)+':input',_0x13e971),'resize':_0x5f5c7d=>invoke('terminal'+_0x4f7e13(0x1f5),_0x5f5c7d),'close':_0x2ca2e6=>invoke(_0x4f7e13(0x1c0)+':close',_0x2ca2e6),'onData':_0x29e3cc=>subscribe(_0x4f7e13(0x1c0)+_0x4f7e13(0x1e8),_0x29e3cc),'onExit':_0x1ebe45=>subscribe(_0x4f7e13(0x1c0)+_0x4f7e13(0x27a),_0x1ebe45)},'agents':{'list':()=>invoke(_0x4f7e13(0x264)+_0x4f7e13(0x1c6)),'create':_0x549f4a=>invoke(_0x4f7e13(0x196)+'reate',_0x549f4a),'update':_0x36217f=>invoke('agents:u'+'pdate',_0x36217f),'delete':_0x43805f=>invoke(_0x4f7e13(0x18f)+_0x4f7e13(0x24b),_0x43805f),'withSessionsList':_0x250cb0=>invoke(_0x4f7e13(0x18e)+'ith-sess'+_0x4f7e13(0x239)+'t',_0x250cb0)},'skills':{'status':_0x17453c=>invoke(_0x4f7e13(0x228)+'tatus',_0x17453c),'importZip':_0x13663c=>invoke(_0x4f7e13(0x1a8)+_0x4f7e13(0x25f)+'p',_0x13663c),'install':_0x27c7b7=>invoke('skills:i'+'nstall',_0x27c7b7),'update':_0x102ea7=>invoke(_0x4f7e13(0x1e5)+'pdate',_0x102ea7),'delete':_0xf13a60=>invoke(_0x4f7e13(0x18c)+'elete',_0xf13a60)},'sessions':{'create':_0x1a711c=>invoke(_0x4f7e13(0x1ba)+':create',_0x1a711c),'list':_0x5ab339=>invoke(_0x4f7e13(0x1ba)+_0x4f7e13(0x219),_0x5ab339),'delete':_0x575b38=>invoke('sessions'+_0x4f7e13(0x1c4),_0x575b38),'rename':_0x83c372=>invoke(_0x4f7e13(0x1ba)+_0x4f7e13(0x192),_0x83c372),'pinnedKeys':()=>invoke(_0x4f7e13(0x1ba)+_0x4f7e13(0x24c)+_0x4f7e13(0x207)),'setPinnedKeys':_0x2d720c=>invoke('sessions'+_0x4f7e13(0x256)+_0x4f7e13(0x26f),_0x2d720c),'fork':_0x268949=>invoke(_0x4f7e13(0x1ba)+_0x4f7e13(0x263),_0x268949),'agentSessionsMapGet':_0x2ed393=>invoke(_0x4f7e13(0x1ba)+_0x4f7e13(0x276)+_0x4f7e13(0x1cd),_0x2ed393),'agentSessionsMapUpsert':_0x9e3d46=>invoke('sessions'+_0x4f7e13(0x276)+_0x4f7e13(0x254)+'t',_0x9e3d46),'onUpdated':_0x163201=>subscribe('session-'+'updated',_0x163201)},'cron':{'list':_0x534e71=>invoke(_0x4f7e13(0x1e6)+'t',_0x534e71),'create':_0x59974c=>invoke('cron:cre'+_0x4f7e13(0x1e1),_0x59974c),'update':_0x3b4ff1=>invoke(_0x4f7e13(0x1cc)+_0x4f7e13(0x1e1),_0x3b4ff1),'remove':_0x9f427d=>invoke(_0x4f7e13(0x1d4)+_0x4f7e13(0x1fe),_0x9f427d),'runOnce':_0x158ccf=>invoke(_0x4f7e13(0x1be)+_0x4f7e13(0x1ce),_0x158ccf),'logs':_0x80d637=>invoke(_0x4f7e13(0x262)+'s',_0x80d637)},'models':{'complete':_0x53868a=>invoke(_0x4f7e13(0x210)+_0x4f7e13(0x1bb),_0x53868a),'settings':()=>invoke(_0x4f7e13(0x203)+_0x4f7e13(0x26b)),'setSettings':_0xe9e698=>invoke('models:s'+_0x4f7e13(0x1b7)+_0x4f7e13(0x23a),_0xe9e698),'setSelfOperatedModels':_0x289a0d=>invoke(_0x4f7e13(0x203)+_0x4f7e13(0x25d)+_0x4f7e13(0x1ca),_0x289a0d),'selectedModelId':()=>invoke('models:s'+_0x4f7e13(0x1de)+_0x4f7e13(0x24d)),'customModels':()=>invoke(_0x4f7e13(0x210)+_0x4f7e13(0x1fa)+_0x4f7e13(0x1dc)),'saveCustomModel':_0x53b86a=>invoke(_0x4f7e13(0x210)+_0x4f7e13(0x1fa)+_0x4f7e13(0x211)+'e',_0x53b86a),'deleteCustomModel':_0x517d4d=>invoke(_0x4f7e13(0x210)+_0x4f7e13(0x1fa)+_0x4f7e13(0x18d)+_0x4f7e13(0x274),_0x517d4d)},'config':{'read':()=>invoke('config:r'+_0x4f7e13(0x259))},'plugins':{'list':()=>invoke('plugins:'+_0x4f7e13(0x22e)),'getConfig':_0x1b081d=>invoke(_0x4f7e13(0x1c5)+_0x4f7e13(0x1f2)+'ig',_0x1b081d),'updateConfig':_0x4e0b87=>invoke(_0x4f7e13(0x1c5)+'update-c'+_0x4f7e13(0x204),_0x4e0b87),'enable':_0x5b87b6=>invoke(_0x4f7e13(0x1c5)+'enable',_0x5b87b6),'disable':_0x254996=>invoke('plugins:'+_0x4f7e13(0x193),_0x254996),'status':_0x15386d=>invoke(_0x4f7e13(0x1c5)+_0x4f7e13(0x234),_0x15386d)},'imChannels':{'list':()=>invoke('config:i'+_0x4f7e13(0x1f8)+'ls:list'),'delete':_0x14eef5=>invoke(_0x4f7e13(0x20f)+_0x4f7e13(0x1f8)+_0x4f7e13(0x229)+'e',_0x14eef5),'setEnabled':_0x62ea0c=>invoke(_0x4f7e13(0x20f)+_0x4f7e13(0x1f8)+'ls:set-e'+_0x4f7e13(0x223),_0x62ea0c)},'connectors':{'save':_0x4cfd00=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x1a9),_0x4cfd00),'startSession':_0x29d80a=>invoke('config:c'+_0x4f7e13(0x249)+_0x4f7e13(0x1c9)+':start',_0x29d80a),'sessionStatus':_0x52f004=>invoke(_0x4f7e13(0x1c8)+'onnector'+'-session'+_0x4f7e13(0x1ab),_0x52f004),'cancelSession':_0x57208e=>invoke('config:c'+_0x4f7e13(0x249)+_0x4f7e13(0x1c9)+_0x4f7e13(0x22c),_0x57208e),'saveFeishuChannelConfig':_0x39bb74=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x1af)+_0x4f7e13(0x269)+_0x4f7e13(0x1b2),_0x39bb74),'saveQqbotChannelConfig':_0x3dfb74=>invoke('config:c'+_0x4f7e13(0x249)+_0x4f7e13(0x238)+_0x4f7e13(0x20a)+_0x4f7e13(0x1d1),_0x3dfb74),'saveQqMailConnectorConfig':_0x5e3925=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x238)+_0x4f7e13(0x25b),_0x5e3925),'saveNetEaseMailConnectorConfig':_0x56d5d4=>invoke('config:c'+_0x4f7e13(0x249)+_0x4f7e13(0x1b6)+_0x4f7e13(0x1a0)+'il',_0x56d5d4),'saveTencentExmailConnectorConfig':_0xebf11=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+':save-te'+_0x4f7e13(0x244)+_0x4f7e13(0x1a7),_0xebf11),'saveFeishuDocConnectorConfig':_0xe3dfcf=>invoke(_0x4f7e13(0x1c8)+'onnector'+_0x4f7e13(0x1af)+_0x4f7e13(0x252),_0xe3dfcf),'saveTencentDocsConnectorConfig':_0x11986c=>invoke(_0x4f7e13(0x1c8)+'onnector'+_0x4f7e13(0x21f)+_0x4f7e13(0x1f9)+'cs',_0x11986c),'saveKdocsConnectorConfig':_0x45ccce=>invoke('config:c'+_0x4f7e13(0x249)+_0x4f7e13(0x1f1)+_0x4f7e13(0x1a2),_0x45ccce),'saveDingtalkDocConnectorConfig':_0x411e36=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x221)+_0x4f7e13(0x248)+'oc',_0x411e36),'saveWecomChannelConfig':_0x48ee32=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x20b)+_0x4f7e13(0x1e2)+_0x4f7e13(0x1d1),_0x48ee32),'kdocsCliConnectStart':()=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+'-session'+_0x4f7e13(0x1f3),{'channelId':_0x4f7e13(0x247)}),'kdocsCliConnectStatus':_0x211d46=>invoke('config:c'+_0x4f7e13(0x249)+'-session'+_0x4f7e13(0x1ab),{'channelId':_0x4f7e13(0x247),..._0x211d46}),'kdocsCliConnectCancel':_0x31450f=>invoke('config:c'+_0x4f7e13(0x249)+'-session'+_0x4f7e13(0x22c),{'channelId':'kdocs',..._0x31450f}),'feishuDocCliConnectStart':()=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+'-session'+_0x4f7e13(0x1f3),{'channelId':_0x4f7e13(0x1df)+'oc'}),'feishuDocCliConnectStatus':_0x9c2128=>invoke('config:c'+_0x4f7e13(0x249)+_0x4f7e13(0x1c9)+_0x4f7e13(0x1ab),{'channelId':_0x4f7e13(0x1df)+'oc',..._0x9c2128}),'feishuDocCliConnectCancel':_0x5c7ebe=>invoke(_0x4f7e13(0x1c8)+'onnector'+_0x4f7e13(0x1c9)+_0x4f7e13(0x22c),{'channelId':_0x4f7e13(0x1df)+'oc',..._0x5c7ebe}),'feishuDocCliConnectComplete':_0x3d5402=>invoke('config:c'+_0x4f7e13(0x249)+'-session'+':complet'+'e',{'channelId':_0x4f7e13(0x1df)+'oc',..._0x3d5402}),'feishuRegistrationStart':_0x3e0bb4=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x1c9)+_0x4f7e13(0x1f3),{'channelId':_0x4f7e13(0x206),..._0x3e0bb4}),'feishuRegistrationStatus':_0x19f4d2=>invoke('config:c'+'onnector'+_0x4f7e13(0x1c9)+_0x4f7e13(0x1ab),{'channelId':'feishu',..._0x19f4d2}),'feishuRegistrationCancel':_0x5d5060=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x1c9)+_0x4f7e13(0x22c),{'channelId':_0x4f7e13(0x206),..._0x5d5060}),'imChannelsList':()=>invoke('config:i'+'m-channe'+_0x4f7e13(0x1ec)),'imChannelsDelete':_0x19249a=>invoke('config:i'+_0x4f7e13(0x1f8)+_0x4f7e13(0x229)+'e',_0x19249a),'imChannelsSetEnabled':_0x1ff9c9=>invoke('config:i'+'m-channe'+'ls:set-e'+_0x4f7e13(0x223),_0x1ff9c9),'wechatChannelStart':_0x56045a=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x1c9)+_0x4f7e13(0x1f3),{'channelId':'openclaw'+'-weixin',..._0x56045a}),'wechatChannelCancel':_0x1de46e=>invoke(_0x4f7e13(0x1c8)+_0x4f7e13(0x249)+_0x4f7e13(0x1c9)+_0x4f7e13(0x22c),{'channelId':_0x4f7e13(0x1b5)+'-weixin',..._0x1de46e}),'onWechatQrcode':_0xf039f8=>subscribe(_0x4f7e13(0x1fc)+_0x4f7e13(0x260),_0xf039f8),'onWechatStatus':_0x64efa4=>subscribe(_0x4f7e13(0x1cb)+'tatus',_0x64efa4),'onWechatLog':_0x14a5ac=>subscribe(_0x4f7e13(0x25e)+'og',_0x14a5ac)},'logs':{'write':_0x5af4dd=>invoke(_0x4f7e13(0x255)+'te',_0x5af4dd),'list':_0x2d979f=>invoke(_0x4f7e13(0x258)+'t',_0x2d979f),'read':_0x2b8129=>invoke('logs:rea'+'d',_0x2b8129),'export':_0xc772a5=>invoke('logs:exp'+_0x4f7e13(0x1bc),_0xc772a5),'report':_0x1c3147=>invoke(_0x4f7e13(0x1cf)+'ort',_0x1c3147),'openDirectory':()=>invoke(_0x4f7e13(0x25c)+_0x4f7e13(0x1e7)+_0x4f7e13(0x25a))},'chat':{'stream':_0x1a82a5=>invoke(_0x4f7e13(0x26a)+_0x4f7e13(0x205),_0x1a82a5),'abort':_0x1018d1=>invoke(_0x4f7e13(0x1dd)+'rt',_0x1018d1),'history':_0x3b0285=>invoke(_0x4f7e13(0x253)+'tory',_0x3b0285),'onStreamEvent':_0x18770d=>subscribe(_0x4f7e13(0x195)+_0x4f7e13(0x24e)+'t',_0x18770d)},'tabs':{'navigate':_0x3e7467=>invoke(_0x4f7e13(0x19f)+_0x4f7e13(0x19c),_0x3e7467),'postMessage':_0x5ddaed=>invoke('tabs:pos'+_0x4f7e13(0x1da)+'e',_0x5ddaed),'onCommand':_0x495b6c=>subscribe(_0x4f7e13(0x279)+_0x4f7e13(0x194),_0x495b6c),'isWebviewShell':()=>{const _0x521b90=_0x4f7e13;try{return new URL(location['href'])[_0x521b90(0x216)+_0x521b90(0x1d0)]['get']('webviewS'+'hell')==='1';}catch{return![];}},'onAgentState':_0x3a1684=>subscribe(_0x4f7e13(0x1d8)+'nt-state',_0x3a1684),'requestAgentState':()=>invoke(_0x4f7e13(0x1e3)+_0x4f7e13(0x1a3)+_0x4f7e13(0x20d)),'refreshAgentState':_0x45f214=>invoke(_0x4f7e13(0x24f)+_0x4f7e13(0x237)+_0x4f7e13(0x20d),_0x45f214)},'runtime':{'syncBundledResources':_0x2c56d8=>invoke('runtime:'+'sync-bun'+_0x4f7e13(0x1bd)+_0x4f7e13(0x1f0),_0x2c56d8),'resourceStatus':_0x2a66c6=>invoke(_0x4f7e13(0x230)+_0x4f7e13(0x208)+'-status',_0x2a66c6)},'platform':process[_0x4f7e13(0x246)]};contextBridge[_0x4f7e13(0x1ff)+_0x4f7e13(0x250)+'d']('wujieShe'+'ll',wujieShell);
|
|
1
|
+
const _0x120bc0=_0x9e87;(function(_0x31d894,_0x54e461){const _0x5c8bf8=_0x9e87,_0x41f6bc=_0x31d894();while(!![]){try{const _0x2dfd2b=parseInt(_0x5c8bf8(0x235))/0x1+parseInt(_0x5c8bf8(0x1b4))/0x2*(-parseInt(_0x5c8bf8(0x1f1))/0x3)+-parseInt(_0x5c8bf8(0x1c4))/0x4+parseInt(_0x5c8bf8(0x1f2))/0x5*(parseInt(_0x5c8bf8(0x1d9))/0x6)+parseInt(_0x5c8bf8(0x252))/0x7+parseInt(_0x5c8bf8(0x1b6))/0x8+parseInt(_0x5c8bf8(0x18c))/0x9*(parseInt(_0x5c8bf8(0x1c1))/0xa);if(_0x2dfd2b===_0x54e461)break;else _0x41f6bc['push'](_0x41f6bc['shift']());}catch(_0x4b9c09){_0x41f6bc['push'](_0x41f6bc['shift']());}}}(_0x2e86,0xba951));import _0x16d476 from'electron';const {contextBridge,ipcRenderer,webUtils}=_0x16d476,eventListeners=new Map();function _0x2e86(){const _0x1fa1d6=[':create','eam-even','-data','agents:c',':downloa','agents:u',':set-clo','gateway-','-mail','platform','chat-str','resource','wechat-l','tabs:req','ishu-doc','rated-fi','app:tray','et-setti',':agent-m','dels:sav',':rename','les:dele','ory-info','orFile','ngs',':status','ls:list','igate','models:s','ell:even','te:quit-','get','ow-state','getPathF','tease-ma','tabs-age',':save-qq','pdate','tabs:nav','ettings',':save','s:hide','board:wr','app:info',':close','ate','ximize','ite-bina','sync-bun','-status','dels','window:c','-info','feishu','s:upsert','shared-c','wujie-sh','openclaw','ectory','st-direc','4206EfBIUV','payload','models:c','bot-chan','et-self-','nabled','logs:ope','s-maximi','-once','window:i','ustom-mo','hell','workspac','cron:log','app:open','-life-cy','tabs:pos','enable','session-','chat:his','files:re','ask-user','dled-res','set','em:resta','e:write-','app:gene','pen-devt','wechat-s','1601985vQXHnl','-shortcu','agents:w','app:syst','status','nt-state','ap:get','wechat-q','m-channe','lect-dir','onnector','te:check',':open-cl','app:upda','elete',':save-fe','te:downl','skills:i','nel','em:open-','app:star','e:direct','config:i','model-id',':choose-','ent','app:clip','skills:u','app:wind','ources',':choose','tup:get','tate','list','uest-age','1006461hmagtO','-url',':gateway','config:c','ontext','kdocs','eam','rams','ete','ead','ist','zed','ngtalk-d','searchPa','e:open-d','les:reve','-exit','-session','tory',':complet','sessions','s:delete','onfig','keys','webviewS','-weixin','lose','mail','-restart','chat:abo',':save-up','wujieShe',':runtime','ith-sess','resh-age','tup:set','life-cyc','function','window:t','ishu-cha','2mzXCYt','update-c','11539328OLFvUN',':loading','cle','plugins:','oggle-ma','logs:wri','name','and-inst','chat:str','les:upse','app:file','10WYnfuE','ort','all','4484272KzsOPy','cron:run','ls:delet','d-state','rcode',':run-onc','tatus',':start','logs:exp','agents-u','omplete','cron:lis','feishu_d','ite','files:se','-logs','disable','les:hide','cron:cre','ad-binar',':cancel','1476pKZnOn','ion','t-messag','les:list','ocs','agents:l','artifact','nstall',':fork','te-state','ove',':input','ncent-do','nnel','-token',':save-te','pdated','reate','te:get-s','lect-fil','window:o','terminal','runtime:','agent-ev','3200421ahCsfX','23675IXKTFT',':get-clo','folder','inimize','window:m','agents:d','logs:rep'];_0x2e86=function(){return _0x1fa1d6;};return _0x2e86();}function _0x9e87(_0x2da27a,_0x1ce3ee){_0x2da27a=_0x2da27a-0x17d;const _0x2e86be=_0x2e86();let _0x9e87c0=_0x2e86be[_0x2da27a];return _0x9e87c0;}function invoke(_0x50b235,_0x292acb){return ipcRenderer['invoke'](_0x50b235,_0x292acb);}function subscribe(_0x443334,_0x590922){const _0x5be75f=_0x9e87;if(typeof _0x590922!==_0x5be75f(0x1b1))return()=>{};const _0x52467b=(_0x1b3913,_0x1a5af4)=>{const _0x5b2e6a=_0x5be75f;if(_0x1a5af4?.[_0x5b2e6a(0x1bc)]===_0x443334)_0x590922(_0x1a5af4[_0x5b2e6a(0x236)]);};return ipcRenderer['on']('wujie-sh'+_0x5be75f(0x216)+'t',_0x52467b),eventListeners[_0x5be75f(0x24c)](_0x590922,_0x52467b),()=>{const _0x50a1a3=_0x5be75f,_0x2f68fe=eventListeners[_0x50a1a3(0x218)](_0x590922)||_0x52467b;ipcRenderer['off'](_0x50a1a3(0x231)+_0x50a1a3(0x216)+'t',_0x2f68fe),eventListeners['delete'](_0x590922);};}const wujieShell={'app':{'info':()=>invoke(_0x120bc0(0x224)),'openUrl':_0x422cad=>invoke(_0x120bc0(0x243)+_0x120bc0(0x18d),_0x422cad),'restart':()=>invoke(_0x120bc0(0x255)+_0x120bc0(0x24d)+'rt'),'onProtocolUrl':_0x39562a=>subscribe('app:prot'+'ocol-url',_0x39562a)},'update':{'state':()=>invoke(_0x120bc0(0x25f)+_0x120bc0(0x1eb)+_0x120bc0(0x189)),'check':()=>invoke('app:upda'+_0x120bc0(0x25d)),'download':()=>invoke(_0x120bc0(0x25f)+_0x120bc0(0x262)+'oad'),'quitAndInstall':()=>invoke(_0x120bc0(0x25f)+_0x120bc0(0x217)+_0x120bc0(0x1bd)+_0x120bc0(0x1c3)),'onState':_0x51376c=>subscribe(_0x120bc0(0x25f)+_0x120bc0(0x1e2),_0x51376c)},'updates':{'state':()=>invoke(_0x120bc0(0x25f)+'te:get-s'+_0x120bc0(0x189)),'check':()=>invoke('app:upda'+_0x120bc0(0x25d)),'download':()=>invoke('app:upda'+_0x120bc0(0x262)+'oad'),'quitAndInstall':()=>invoke(_0x120bc0(0x25f)+_0x120bc0(0x217)+'and-inst'+_0x120bc0(0x1c3)),'onState':_0x18a7e4=>subscribe(_0x120bc0(0x25f)+'te-state',_0x18a7e4)},'window':{'minimize':()=>invoke(_0x120bc0(0x1f6)+_0x120bc0(0x1f5)),'toggleMaximize':()=>invoke(_0x120bc0(0x1b2)+_0x120bc0(0x1ba)+_0x120bc0(0x227)),'close':()=>invoke(_0x120bc0(0x22c)+_0x120bc0(0x1a6)),'isMaximized':()=>invoke(_0x120bc0(0x23e)+_0x120bc0(0x23c)+_0x120bc0(0x197)),'onStateChange':_0x537059=>subscribe(_0x120bc0(0x185)+_0x120bc0(0x219),_0x537059),'openDevTools':()=>invoke(_0x120bc0(0x1ed)+_0x120bc0(0x250)+'ools'),'onDevToolsShortcut':_0x6a133d=>subscribe('devtools'+_0x120bc0(0x253)+'t',_0x6a133d)},'files':{'read':_0x54f8c7=>invoke(_0x120bc0(0x249)+'ad',_0x54f8c7),'readBinary':_0x4ae467=>invoke(_0x120bc0(0x249)+_0x120bc0(0x1d7)+'y',_0x4ae467),'write':(_0x49575f,_0x4163ff)=>invoke('files:wr'+_0x120bc0(0x1d1),{'path':_0x49575f,'content':_0x4163ff}),'writeBinary':(_0x1d2072,_0xc809a9)=>invoke('files:wr'+_0x120bc0(0x228)+'ry',{'path':_0x1d2072,'content':_0xc809a9}),'selectFile':_0x2479cf=>invoke(_0x120bc0(0x1d2)+_0x120bc0(0x1ec)+'e',_0x2479cf),'selectDirectory':_0x1766b9=>invoke(_0x120bc0(0x1d2)+_0x120bc0(0x25b)+_0x120bc0(0x233),_0x1766b9),'listDirectory':_0x5ea3aa=>invoke('files:li'+_0x120bc0(0x234)+'tory',_0x5ea3aa),'getPathForFile':_0x43d2d3=>webUtils[_0x120bc0(0x21a)+_0x120bc0(0x210)](_0x43d2d3),'choose':_0x458b00=>invoke('app:file'+_0x120bc0(0x187),_0x458b00),'chooseFolder':()=>invoke('app:file'+_0x120bc0(0x181)+_0x120bc0(0x1f4)),'saveTemp':_0xa8f658=>invoke(_0x120bc0(0x1c0)+':save-te'+'mp',_0xa8f658),'saveUpload':_0x429783=>invoke(_0x120bc0(0x1c0)+_0x120bc0(0x1aa)+'load',_0x429783),'downloadLocal':_0x202ac1=>invoke(_0x120bc0(0x1c0)+_0x120bc0(0x1fd)+'d-local',_0x202ac1),'reveal':_0x2a051e=>invoke(_0x120bc0(0x24f)+_0x120bc0(0x208)+_0x120bc0(0x19b)+'al',_0x2a051e)},'generatedFiles':{'list':()=>invoke(_0x120bc0(0x24f)+_0x120bc0(0x208)+_0x120bc0(0x1dc)),'upsert':_0x35006b=>invoke(_0x120bc0(0x24f)+_0x120bc0(0x208)+_0x120bc0(0x1bf)+'rt',_0x35006b),'hide':_0x4212c5=>invoke(_0x120bc0(0x24f)+_0x120bc0(0x208)+_0x120bc0(0x1d5),_0x4212c5),'hideBySession':_0x5dfcb9=>invoke(_0x120bc0(0x24f)+_0x120bc0(0x208)+_0x120bc0(0x1d5)+'-by-sess'+_0x120bc0(0x1da),_0x5dfcb9),'delete':_0x431593=>invoke(_0x120bc0(0x24f)+_0x120bc0(0x208)+_0x120bc0(0x20e)+'te',_0x431593),'deletedState':_0x2a36dd=>invoke('app:gene'+_0x120bc0(0x208)+_0x120bc0(0x20e)+'ted-stat'+'e',_0x2a36dd),'reveal':_0x181271=>invoke(_0x120bc0(0x24f)+_0x120bc0(0x208)+_0x120bc0(0x19b)+'al',_0x181271)},'artifacts':{'list':_0x142cb2=>invoke(_0x120bc0(0x1df)+'s:list',_0x142cb2),'upsert':_0x12221c=>invoke('artifact'+_0x120bc0(0x22f),_0x12221c),'hide':_0x1b1120=>invoke(_0x120bc0(0x1df)+_0x120bc0(0x222),_0x1b1120),'delete':_0x27729e=>invoke(_0x120bc0(0x1df)+'s:delete',_0x27729e),'reveal':_0x4159c0=>invoke(_0x120bc0(0x1df)+'s:reveal',_0x4159c0),'getDeletedState':_0x24342a=>invoke(_0x120bc0(0x1df)+_0x120bc0(0x1a1)+_0x120bc0(0x1c7),_0x24342a)},'clipboard':{'writeText':_0x32efc6=>invoke(_0x120bc0(0x183)+_0x120bc0(0x223)+_0x120bc0(0x1d1),_0x32efc6)},'system':{'openFolder':_0xe0d74c=>invoke('app:syst'+_0x120bc0(0x265)+_0x120bc0(0x1f4),_0xe0d74c),'restart':()=>invoke(_0x120bc0(0x255)+_0x120bc0(0x24d)+'rt')},'startup':{'setEnabled':_0x5a27f2=>invoke(_0x120bc0(0x17d)+_0x120bc0(0x1af),_0x5a27f2),'isEnabled':()=>invoke('app:star'+_0x120bc0(0x188))},'tray':{'getCloseOnCloseEnabled':()=>invoke(_0x120bc0(0x209)+_0x120bc0(0x1f3)+'se'),'setCloseOnCloseEnabled':_0x333e0d=>invoke('app:tray'+_0x120bc0(0x1ff)+'se',_0x333e0d)},'workspace':{'directoryInfo':()=>invoke(_0x120bc0(0x241)+_0x120bc0(0x17e)+_0x120bc0(0x20f)),'openDirectory':()=>invoke(_0x120bc0(0x241)+_0x120bc0(0x19a)+'irectory'),'sharedContext':()=>invoke(_0x120bc0(0x241)+'e:shared'+'-context'),'writeSharedContext':_0x5a57e0=>invoke(_0x120bc0(0x241)+_0x120bc0(0x24e)+_0x120bc0(0x230)+_0x120bc0(0x190),_0x5a57e0)},'openclaw':{'runtimeInfo':()=>invoke('openclaw'+_0x120bc0(0x1ac)+_0x120bc0(0x22d)),'runOnce':(_0x5100a6=[])=>invoke(_0x120bc0(0x232)+_0x120bc0(0x1c9)+'e',_0x5100a6),'gatewayStatus':()=>invoke(_0x120bc0(0x232)+_0x120bc0(0x18e)+_0x120bc0(0x22a)),'gatewayToken':()=>invoke(_0x120bc0(0x232)+_0x120bc0(0x18e)+_0x120bc0(0x1e7)),'gatewayPort':()=>invoke(_0x120bc0(0x232)+_0x120bc0(0x18e)+'-port'),'gatewayRestart':()=>invoke(_0x120bc0(0x232)+_0x120bc0(0x18e)+_0x120bc0(0x1a8)),'gatewayLogs':_0x2a65b7=>invoke(_0x120bc0(0x232)+':gateway'+_0x120bc0(0x1d3),_0x2a65b7),'onGatewayStatus':_0xd3bf43=>subscribe(_0x120bc0(0x200)+_0x120bc0(0x256),_0xd3bf43),'onGatewayLog':_0xf45255=>subscribe(_0x120bc0(0x200)+'log',_0xf45255),'onAgentEvent':_0x45dc6b=>subscribe(_0x120bc0(0x1f0)+_0x120bc0(0x182),_0x45dc6b),'onAgentsUpdated':_0x2ec276=>subscribe(_0x120bc0(0x1cd)+_0x120bc0(0x1e9),_0x2ec276),'onAskUserQuestion':_0x2e104e=>subscribe(_0x120bc0(0x24a)+'-questio'+'n',_0x2e104e),'loadingLifeCycle':()=>invoke(_0x120bc0(0x232)+_0x120bc0(0x1b7)+_0x120bc0(0x244)+_0x120bc0(0x1b8)),'onLoadingLifeCycle':_0x4a1813=>subscribe('loading-'+_0x120bc0(0x1b0)+'le',_0x4a1813),'answerAskUserQuestion':_0x386b99=>invoke('openclaw'+':answer-'+'ask-user'+'-questio'+'n',_0x386b99),'openCliWindow':()=>invoke(_0x120bc0(0x232)+_0x120bc0(0x25e)+'i-window')},'terminal':{'create':_0x2e1e71=>invoke(_0x120bc0(0x1ee)+_0x120bc0(0x1f9),_0x2e1e71),'input':_0x1b6c13=>invoke(_0x120bc0(0x1ee)+_0x120bc0(0x1e4),_0x1b6c13),'resize':_0x2f51e5=>invoke('terminal'+':resize',_0x2f51e5),'close':_0x25c5eb=>invoke(_0x120bc0(0x1ee)+_0x120bc0(0x225),_0x25c5eb),'onData':_0xe18c19=>subscribe(_0x120bc0(0x1ee)+_0x120bc0(0x1fb),_0xe18c19),'onExit':_0x274d30=>subscribe('terminal'+_0x120bc0(0x19c),_0x274d30)},'agents':{'list':()=>invoke(_0x120bc0(0x1de)+_0x120bc0(0x196)),'create':_0x84ed40=>invoke(_0x120bc0(0x1fc)+_0x120bc0(0x1ea),_0x84ed40),'update':_0x4609d2=>invoke(_0x120bc0(0x1fe)+_0x120bc0(0x21e),_0x4609d2),'delete':_0x55c75b=>invoke(_0x120bc0(0x1f7)+_0x120bc0(0x260),_0x55c75b),'withSessionsList':_0x156b16=>invoke(_0x120bc0(0x254)+_0x120bc0(0x1ad)+'ions-lis'+'t',_0x156b16)},'skills':{'status':_0x24e091=>invoke('skills:s'+_0x120bc0(0x1ca),_0x24e091),'importZip':_0x52f2c6=>invoke('skills:i'+'mport-zi'+'p',_0x52f2c6),'install':_0x24d70c=>invoke(_0x120bc0(0x263)+_0x120bc0(0x1e0),_0x24d70c),'update':_0x113d91=>invoke(_0x120bc0(0x184)+_0x120bc0(0x21e),_0x113d91),'delete':_0x3c8969=>invoke('skills:d'+_0x120bc0(0x260),_0x3c8969)},'sessions':{'create':_0x459cc8=>invoke(_0x120bc0(0x1a0)+_0x120bc0(0x1f9),_0x459cc8),'list':_0x2131fc=>invoke('sessions'+':list',_0x2131fc),'delete':_0x3c309b=>invoke(_0x120bc0(0x1a0)+':delete',_0x3c309b),'rename':_0xd467c2=>invoke('sessions'+_0x120bc0(0x20d),_0xd467c2),'pinnedKeys':()=>invoke(_0x120bc0(0x1a0)+':pinned-'+_0x120bc0(0x1a3)),'setPinnedKeys':_0xbd1028=>invoke('sessions'+':set-pin'+'ned-keys',_0xbd1028),'fork':_0x57808=>invoke('sessions'+_0x120bc0(0x1e1),_0x57808),'agentSessionsMapGet':_0x168287=>invoke(_0x120bc0(0x1a0)+_0x120bc0(0x20b)+_0x120bc0(0x258),_0x168287),'agentSessionsMapUpsert':_0x16e542=>invoke(_0x120bc0(0x1a0)+_0x120bc0(0x20b)+'ap:upser'+'t',_0x16e542),'onUpdated':_0xd35af4=>subscribe(_0x120bc0(0x247)+'updated',_0xd35af4)},'cron':{'list':_0x1f7895=>invoke(_0x120bc0(0x1cf)+'t',_0x1f7895),'create':_0x1c380d=>invoke(_0x120bc0(0x1d6)+_0x120bc0(0x226),_0x1c380d),'update':_0x2df618=>invoke('cron:upd'+_0x120bc0(0x226),_0x2df618),'remove':_0x407f40=>invoke('cron:rem'+_0x120bc0(0x1e3),_0x407f40),'runOnce':_0x1e0fc7=>invoke(_0x120bc0(0x1c5)+_0x120bc0(0x23d),_0x1e0fc7),'logs':_0x566a6f=>invoke(_0x120bc0(0x242)+'s',_0x566a6f)},'models':{'complete':_0x2f681f=>invoke('models:c'+_0x120bc0(0x1ce),_0x2f681f),'settings':()=>invoke(_0x120bc0(0x215)+_0x120bc0(0x220)),'setSettings':_0x3c335a=>invoke('models:s'+_0x120bc0(0x20a)+_0x120bc0(0x211),_0x3c335a),'setSelfOperatedModels':_0x429ece=>invoke('models:s'+_0x120bc0(0x239)+'operated',_0x429ece),'selectedModelId':()=>invoke('models:s'+'elected-'+_0x120bc0(0x180)),'customModels':()=>invoke(_0x120bc0(0x237)+_0x120bc0(0x23f)+_0x120bc0(0x22b)),'saveCustomModel':_0x2bc86e=>invoke(_0x120bc0(0x237)+_0x120bc0(0x23f)+_0x120bc0(0x20c)+'e',_0x2bc86e),'deleteCustomModel':_0x465393=>invoke(_0x120bc0(0x237)+_0x120bc0(0x23f)+'dels:del'+_0x120bc0(0x194),_0x465393)},'config':{'read':()=>invoke('config:r'+_0x120bc0(0x195))},'plugins':{'list':()=>invoke('plugins:'+_0x120bc0(0x18a)),'getConfig':_0x85c4c=>invoke(_0x120bc0(0x1b9)+'get-conf'+'ig',_0x85c4c),'updateConfig':_0x2bfb67=>invoke(_0x120bc0(0x1b9)+_0x120bc0(0x1b5)+_0x120bc0(0x1a2),_0x2bfb67),'enable':_0x2e4e25=>invoke(_0x120bc0(0x1b9)+_0x120bc0(0x246),_0x2e4e25),'disable':_0x1ac0f2=>invoke(_0x120bc0(0x1b9)+_0x120bc0(0x1d4),_0x1ac0f2),'status':_0xad09a0=>invoke('plugins:'+_0x120bc0(0x256),_0xad09a0)},'imChannels':{'list':()=>invoke(_0x120bc0(0x17f)+'m-channe'+_0x120bc0(0x213)),'delete':_0x58d520=>invoke('config:i'+'m-channe'+_0x120bc0(0x1c6)+'e',_0x58d520),'setEnabled':_0x5f2302=>invoke(_0x120bc0(0x17f)+'m-channe'+'ls:set-e'+_0x120bc0(0x23a),_0x5f2302)},'connectors':{'save':_0x10b101=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x221),_0x10b101),'startSession':_0x4dc6de=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x19d)+':start',_0x4dc6de),'sessionStatus':_0x3d6dc3=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x19d)+_0x120bc0(0x212),_0x3d6dc3),'cancelSession':_0x4797c4=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x19d)+':cancel',_0x4797c4),'saveFeishuChannelConfig':_0x1ba3d4=>invoke(_0x120bc0(0x18f)+'onnector'+_0x120bc0(0x261)+_0x120bc0(0x1b3)+_0x120bc0(0x1e6),_0x1ba3d4),'saveQqbotChannelConfig':_0x912f70=>invoke(_0x120bc0(0x18f)+'onnector'+':save-qq'+_0x120bc0(0x238)+_0x120bc0(0x264),_0x912f70),'saveQqMailConnectorConfig':_0x348fb0=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x21d)+_0x120bc0(0x201),_0x348fb0),'saveNetEaseMailConnectorConfig':_0x436135=>invoke('config:c'+_0x120bc0(0x25c)+':save-ne'+_0x120bc0(0x21b)+'il',_0x436135),'saveTencentExmailConnectorConfig':_0x3b9cd0=>invoke('config:c'+_0x120bc0(0x25c)+_0x120bc0(0x1e8)+'ncent-ex'+_0x120bc0(0x1a7),_0x3b9cd0),'saveFeishuDocConnectorConfig':_0x3754f4=>invoke('config:c'+_0x120bc0(0x25c)+_0x120bc0(0x261)+_0x120bc0(0x207),_0x3754f4),'saveTencentDocsConnectorConfig':_0x3975d0=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x1e8)+_0x120bc0(0x1e5)+'cs',_0x3975d0),'saveKdocsConnectorConfig':_0x13a9fe=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+':save-kd'+_0x120bc0(0x1dd),_0x13a9fe),'saveDingtalkDocConnectorConfig':_0x19ea06=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+':save-di'+_0x120bc0(0x198)+'oc',_0x19ea06),'saveWecomChannelConfig':_0xaee4ea=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+':save-we'+'com-chan'+_0x120bc0(0x264),_0xaee4ea),'kdocsCliConnectStart':()=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x19d)+_0x120bc0(0x1cb),{'channelId':'kdocs'}),'kdocsCliConnectStatus':_0x27d6f6=>invoke('config:c'+_0x120bc0(0x25c)+_0x120bc0(0x19d)+_0x120bc0(0x212),{'channelId':_0x120bc0(0x191),..._0x27d6f6}),'kdocsCliConnectCancel':_0x28296d=>invoke(_0x120bc0(0x18f)+'onnector'+_0x120bc0(0x19d)+_0x120bc0(0x1d8),{'channelId':_0x120bc0(0x191),..._0x28296d}),'feishuDocCliConnectStart':()=>invoke('config:c'+_0x120bc0(0x25c)+_0x120bc0(0x19d)+_0x120bc0(0x1cb),{'channelId':'feishu_d'+'oc'}),'feishuDocCliConnectStatus':_0x1cb11d=>invoke('config:c'+_0x120bc0(0x25c)+_0x120bc0(0x19d)+_0x120bc0(0x212),{'channelId':_0x120bc0(0x1d0)+'oc',..._0x1cb11d}),'feishuDocCliConnectCancel':_0x39ac52=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x19d)+_0x120bc0(0x1d8),{'channelId':_0x120bc0(0x1d0)+'oc',..._0x39ac52}),'feishuDocCliConnectComplete':_0x3b77df=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+'-session'+_0x120bc0(0x19f)+'e',{'channelId':_0x120bc0(0x1d0)+'oc',..._0x3b77df}),'feishuRegistrationStart':_0x6154bb=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+'-session'+':start',{'channelId':_0x120bc0(0x22e),..._0x6154bb}),'feishuRegistrationStatus':_0x4a11e9=>invoke(_0x120bc0(0x18f)+'onnector'+_0x120bc0(0x19d)+_0x120bc0(0x212),{'channelId':'feishu',..._0x4a11e9}),'feishuRegistrationCancel':_0x3b9737=>invoke(_0x120bc0(0x18f)+_0x120bc0(0x25c)+_0x120bc0(0x19d)+':cancel',{'channelId':_0x120bc0(0x22e),..._0x3b9737}),'imChannelsList':()=>invoke(_0x120bc0(0x17f)+'m-channe'+_0x120bc0(0x213)),'imChannelsDelete':_0x4db271=>invoke(_0x120bc0(0x17f)+'m-channe'+_0x120bc0(0x1c6)+'e',_0x4db271),'imChannelsSetEnabled':_0x1ed6d0=>invoke(_0x120bc0(0x17f)+_0x120bc0(0x25a)+'ls:set-e'+_0x120bc0(0x23a),_0x1ed6d0),'wechatChannelStart':_0x1497b5=>invoke(_0x120bc0(0x18f)+'onnector'+_0x120bc0(0x19d)+_0x120bc0(0x1cb),{'channelId':_0x120bc0(0x232)+_0x120bc0(0x1a5),..._0x1497b5}),'wechatChannelCancel':_0x2f082a=>invoke('config:c'+_0x120bc0(0x25c)+_0x120bc0(0x19d)+_0x120bc0(0x1d8),{'channelId':'openclaw'+'-weixin',..._0x2f082a}),'onWechatQrcode':_0x1e0677=>subscribe(_0x120bc0(0x259)+_0x120bc0(0x1c8),_0x1e0677),'onWechatStatus':_0x2cc11c=>subscribe(_0x120bc0(0x251)+_0x120bc0(0x1ca),_0x2cc11c),'onWechatLog':_0x253d5b=>subscribe(_0x120bc0(0x205)+'og',_0x253d5b)},'logs':{'write':_0x39c2fa=>invoke(_0x120bc0(0x1bb)+'te',_0x39c2fa),'list':_0x570e0a=>invoke('logs:lis'+'t',_0x570e0a),'read':_0x445dae=>invoke('logs:rea'+'d',_0x445dae),'export':_0x5603cf=>invoke(_0x120bc0(0x1cc)+_0x120bc0(0x1c2),_0x5603cf),'report':_0x43eb95=>invoke(_0x120bc0(0x1f8)+'ort',_0x43eb95),'openDirectory':()=>invoke(_0x120bc0(0x23b)+'n-direct'+'ory')},'chat':{'stream':_0x1ce473=>invoke(_0x120bc0(0x1be)+_0x120bc0(0x192),_0x1ce473),'abort':_0x17124f=>invoke(_0x120bc0(0x1a9)+'rt',_0x17124f),'history':_0x5d332d=>invoke(_0x120bc0(0x248)+_0x120bc0(0x19e),_0x5d332d),'onStreamEvent':_0x5d980d=>subscribe(_0x120bc0(0x203)+_0x120bc0(0x1fa)+'t',_0x5d980d)},'tabs':{'navigate':_0x1d8f3d=>invoke(_0x120bc0(0x21f)+_0x120bc0(0x214),_0x1d8f3d),'postMessage':_0x531c23=>invoke(_0x120bc0(0x245)+_0x120bc0(0x1db)+'e',_0x531c23),'onCommand':_0x48a632=>subscribe('tabs-com'+'mand',_0x48a632),'isWebviewShell':()=>{const _0x4b1bf9=_0x120bc0;try{return new URL(location['href'])[_0x4b1bf9(0x199)+_0x4b1bf9(0x193)]['get'](_0x4b1bf9(0x1a4)+_0x4b1bf9(0x240))==='1';}catch{return![];}},'onAgentState':_0x46f5ec=>subscribe(_0x120bc0(0x21c)+'nt-state',_0x46f5ec),'requestAgentState':()=>invoke(_0x120bc0(0x206)+_0x120bc0(0x18b)+_0x120bc0(0x257)),'refreshAgentState':_0x9f4760=>invoke('tabs:ref'+_0x120bc0(0x1ae)+_0x120bc0(0x257),_0x9f4760)},'runtime':{'syncBundledResources':_0x432c57=>invoke('runtime:'+_0x120bc0(0x229)+_0x120bc0(0x24b)+_0x120bc0(0x186),_0x432c57),'resourceStatus':_0x32be08=>invoke(_0x120bc0(0x1ef)+_0x120bc0(0x204)+'-status',_0x32be08)},'platform':process[_0x120bc0(0x202)]};contextBridge['exposeIn'+'MainWorl'+'d'](_0x120bc0(0x1ab)+'ll',wujieShell);
|