@wujie-shell/core 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/bin/wujie-shell.mjs +1 -1
  2. package/dist/src/agents/bundled-agent-skills.mjs +1 -1
  3. package/dist/src/agents/bundled-agents.mjs +1 -1
  4. package/dist/src/chat/media-archive.mjs +1 -1
  5. package/dist/src/chat/queue.mjs +1 -1
  6. package/dist/src/common/diagnostics.mjs +1 -1
  7. package/dist/src/common/logging.mjs +1 -1
  8. package/dist/src/common/runtime-logger.mjs +1 -1
  9. package/dist/src/common/user-events.mjs +1 -1
  10. package/dist/src/common/utils.mjs +1 -1
  11. package/dist/src/config/controller.mjs +1 -1
  12. package/dist/src/connectors/config-utils.mjs +1 -1
  13. package/dist/src/connectors/constants.mjs +1 -1
  14. package/dist/src/connectors/controller.mjs +1 -1
  15. package/dist/src/connectors/kdocs-cli.mjs +1 -1
  16. package/dist/src/electron/main.mjs +1 -1
  17. package/dist/src/electron/preload.mjs +1 -1
  18. package/dist/src/files/generated-files-store.mjs +1 -1
  19. package/dist/src/files/handlers.mjs +1 -1
  20. package/dist/src/gateway/chat-delta.mjs +1 -1
  21. package/dist/src/gateway/controller.mjs +1 -1
  22. package/dist/src/gateway/ws-client.mjs +1 -1
  23. package/dist/src/index.mjs +1 -1
  24. package/dist/src/log-reporting/handlers.mjs +1 -1
  25. package/dist/src/log-reporting/report-logs.mjs +1 -1
  26. package/dist/src/models/handlers.mjs +1 -1
  27. package/dist/src/preferences/store.mjs +1 -1
  28. package/dist/src/runtime/index.mjs +1 -1
  29. package/dist/src/runtime/patch-channel-plugin-runtime.mjs +1 -1
  30. package/dist/src/runtime/patch-chat-history-mixed-tool-content.mjs +1 -1
  31. package/dist/src/runtime/patch-session-store-sqlite.mjs +1 -1
  32. package/dist/src/runtime/plugin-sync.mjs +1 -1
  33. package/dist/src/sessions/agent-sessions-map-store.mjs +1 -1
  34. package/dist/src/sessions/runtime-bridge.mjs +1 -1
  35. package/dist/src/sessions/session-sqlite-store.mjs +1 -1
  36. package/dist/src/skills/import.mjs +1 -1
  37. package/dist/src/skills/market.mjs +1 -1
  38. package/dist/src/terminal/manager.mjs +1 -1
  39. package/dist/src/updates/controller.mjs +1 -1
  40. package/dist/src/updates/loader.mjs +1 -0
  41. package/package.json +4 -3
@@ -1 +1 @@
1
- const _0x3bddf5=_0x40b7;(function(_0x318550,_0x5d5643){const _0x3c861d=_0x40b7,_0x286f3c=_0x318550();while(!![]){try{const _0x376e61=-parseInt(_0x3c861d(0x2bd))/0x1+parseInt(_0x3c861d(0x384))/0x2+parseInt(_0x3c861d(0x302))/0x3+-parseInt(_0x3c861d(0x1eb))/0x4+parseInt(_0x3c861d(0x327))/0x5*(parseInt(_0x3c861d(0x351))/0x6)+-parseInt(_0x3c861d(0x16e))/0x7+-parseInt(_0x3c861d(0x39b))/0x8*(-parseInt(_0x3c861d(0x128))/0x9);if(_0x376e61===_0x5d5643)break;else _0x286f3c['push'](_0x286f3c['shift']());}catch(_0x1d96e7){_0x286f3c['push'](_0x286f3c['shift']());}}}(_0x1800,0x9e85b));import _0x364a11 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{createSessionSqliteStore}from'../sessions/session-sqlite-store.mjs';import{createTerminalManager}from'../terminal/manager.mjs';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';function _0x1800(){const _0x2095ef=['ite-bina','stomMode','readSess','payload','getVersi','temperat','avatar','skills:d','json','ession','name','\x20process','-pinned','key','874674HvvIsw','range','shell-ru','update','model\x20ht','disable','tp\x20','detach','text/pla','lized','#0000000','-invalid','.jpeg','multiSel','setOpenC','get','activate','reasonin','d-state','nstall','patch','lt\x20model','size','lose','agents:d','hidden','uncaught','.jpg','session-','ources','child-pr','loadURL','agent\x20up','agent-','ipc\x20requ','ith-sess','ile\x20read','2088670PycnTj','pper\x20not','ile\x20writ','te\x20compl','listImCh','logs\x20dir','download','type','ell:even','tus','deleteIm','huChanne','code','l\x20first','ure','ready','t-stream','ackgroun','et-setti','igate','byteLeng','m-channe','-token','getPinne','lastInde',':close','ted\x20conn','loadFile','toLowerC','node','config:c','\x20failed:','ettings','ndlers','hell]\x20fa','/chat/co','ncident','lawSkill','ishuRegi','unhandle','skills:i','msvideo','12uBuobP','\x20not\x20con','pop','peratedM','nnel','app:gene','uit:\x20sto','send','oot','elSessio','main\x20win','all','ell\x20boot','resource','logs:lis',':rename','.mkv','kdown;\x20c','headers','xOf','closeToT','models:s','nectSess','getAllWi','some','stringif','agentId','e\x20direct','saveQqMa','ncent-do','odels','config','wujie-sh','lawMcpSe','ated','harset=u','ion','igSnapsh','unknown','number','l\x20reques','rated-fi','dSession','isArray','sessions','\x20CLI\x20wra','logs:ope','\x20configu','ndows',':create','product','2014114TvkkYI','video/x-','\x20found:\x20','config:i','cron:upd','maxEntri','-life-cy','stream','app:upda','ontext','ntime','les:reve','history','Dialog','webConte','getAppPa','image/sv','sourcePa','app.asar','hostname','Keys','led','clawspac','27256fAzesr','onfig','.\x20Run\x20wu','checkFor','slice','CliConne','dataDir','create','nelSessi','video/mp','ItemSett','quired','bytes','cancelKd','Exceptio','ssionKey','lect-fil','tatus','agent\x20de',':save-te','open','stopped\x20','onnector','pened','getPath','ocsCliCo','whenRead','setSelec','captureI','illEntry','set=utf-','keys','g_conten','stion','agent','cle','onnectSt','ate','lConnect','assign','jie-shel','nabled','defaults','cron:run','te:downl','level','Update','ell\x20conf','agent\x20al','runtime:',':answer-','omModel','dled-res','ory',':get-clo','gin','ools','zed','ove','isabled','isPackag','senderFr','text','e:direct','writeSha','minimize','cron:log','.mp4','.bmp','ing','ig\x20is\x20no','prod','\x20main\x20bo','length','ot\x20faile','openDire','content','inned','i-window','ywhere','ey\x20is\x20re','kdocs','terminal','log','devtools','openclaw','now','sessionK','lawPlugi','navigati','s:hide','Everywhe','ontents','finally','e:shared','elected-','ngs','product\x20','ot\x20initi','ocess-go','ionEntry','complete','keyDown','feishu_d','unregist','ontent-t','length,\x20','agents:w','darwin','enable','render-p','binary\x20f','runtimeI','-shortcu','openDevT','-by-sess','initiali',':choose-','temp','warn','meFilter','customNa','tSession','ishuDocC','ectory','Custom','gateway-',':fork','ask-user','select\x20d','startFei','ipc_requ','dAt','resize','\x20request','restart','channelI','bin','dev','e\x20comple',':save-fe','close','CommandO','torConfi','est\x20fail','d-local','tChannel','ilConnec','mChannel','itialize','rayOnClo','\x20to\x20load','path',':complet','Updates','map','provider','ired','chrome','.webm','versions','tory','2979MpGHkf','canceled','\x20excepti','set','mpletion','filters','ocess\x20go','est\x20star','maximize','n\x20failed','shuRegis','agents','ions-lis','deleteOp','chat','abort','range,\x20a','filter','eam','sPrivile','et-self-','setImCha','rnal','before-q','efault','teway','FeishuDo','hell:ipc','nConfig','feishu','ls:set-e','startKdo','method','-session','isMaximi','models','quitAndI','uRegistr','hideBySe','logsDir','annelCon','info','ite','ections','utf8','ell\x20gate','iConnect','saveNetE','timeout','cron:cre','local','les:dele','rename','get-conf',':save-ne','tf-8','toWeb','configPa','getStatu','parseInt','agents-u','ings','d\x20failed','Version',':resize','elConfig','error','rControl','uDocCliC','-mail','3346511WbfYmT','pping\x20ga','nt]','content-','th\x20is\x20re','\x20complet','handle','ead','showItem','files','api.open','SchemesA','way\x20is\x20n','tup:set','no-store','matroska','.avi',':set-clo','before\x20q','ndow','min','iled\x20to\x20','list','extensio','ame','huDocCon','settings',':status','dels','ted-ever','parse','tate','href','saveFeis','s:list','replace','model-id',':agent-m','.png','models:c','oad','emoji','ad-binar','delete','preload.','ion/json','upsert',':reorder','electron','sPath','dispose','preventD','logs:exp','control','split','files:se','ng;\x20recr','leted','ectory\x20o','targetDi','.svg','logs','getRecen','function','ype','-request','D,\x20OPTIO','ged','oken','ximize','unmaximi','migrateP','n-direct','saveTenc','showSave','ocs','st-direc','.flac','operated','resolveS','lConfig','saveDing','-context','agents:c','saveWeco','tateDir',':loading','nts','logs:wri','director','imePlugi','startWec','ot\x20start','ChannelC','enClawCh','from','saveCust','skills:u','chat:his','.webp','nput-eve','openAtLo','nfig','mand','fromWebC','runtimeR','requestB','et-selec','entDocsC','startsWi','start',':start','tabs:pos','s:reveal','text/mar','InFolder','fromEntr','-status','l\x20prepar','ignore','[wujie-s','.aac','trim','manifest','window-a','4603192itjVPF','main','no\x20defau','enClawCo','video/we','onfig\x20up','dow\x20load','select\x20f','apiKey','.txt','Unsuppor','test','ocus','ent','cancelFe','d\x20is\x20req','dCheck','maxToken',':save-we','chat-str','yInfo',':open-cl','title','paths','isFinite','getURL','openPath','path\x20is\x20','entries','ted-stat','ase','plugins','eated','plugins:','\x20is\x20requ','enClawMc','ntext','choices','-info','model','agents:l','diagnost','logs\x20exp','image/jp','ileName','agent-ev','before-i','POST','tabs:req','app:clip','.ogg','string','lawChann','g+xml','uired','ationSta','reorderP','writeEve','message','les:hide','app:open','IPC\x20requ','cwd','figs','nfo',':save-di','eted','sion','skills:s','Bearer\x20','red;\x20set','.md','\x20gone','hecks','uri','\x20main\x20wi','failed','open\x20ext','install','-logs','producti','sender','filePath','context','liConnec','indexOf','rver','answerAs','nges','will-qui','ProductR','applicat','ted','fromIpc','Config',':diagnos','reload','syncRunt','Terminal','then','runtime\x20','ls:delet','platform','files:wr','Session','artifact','nel','fig','ishu-cha','gateway\x20','mjs','orConfig','remove','ncent-ex','nnectSes','sync-bun','d\x20comple','status','-once','object','projectR','icktime','arch','pluginId','product-',':unpin','OPTIONS','ies','workspac','unref','ternally','ory-info','required','isIntege','ort','defaultF','ai.com/v','\x20shortcu','gatewayT','-url','tabs-age','ipc','productN','tabs-com','agent\x20cr','openExte','app:tray','\x20log','command','one','isDirect','skills','updateOp','redConte',':save-qq','folder','isFile','sConnect','ctStatus','file\x20wri','uit','t-messag','enClawSk','agent_id','ory\x20open','recursiv','window:o','meta','app:syst','app:file','plugin\x20d','resh-age','aseMailC','pServer','inimize','messages','ll-close','controll','default','t\x20initia','ector\x20se','readConf','sidebar','wujiecla','catch','quit','deletedS','writeCon','figured:','tLogs','isDestro','dRejecti','hide','mail','ces.json','te:quit-','pdate','Not\x20foun','openFile','index.mj','csCliCon','boot\x20ele','includes','image/we','baseUrl','groups','setName','nectorCo','register','cron','983622TUVNCj','deleteFi','wechat','renderer','cancelWe','kgroundC','#f8fafc','ls:list','roductDa','input','generate','file\x20rea','s-maximi','markConf','.mov','plugin\x20e','ssion:\x20',':gateway','ccept-ra','irectory','getLogin','alized','board:wr','getFocus','index.ht','url','app:star','config:r','entExmai','dist','limit','selected','timeoutM','getKdocs','max','startBac','window:c','saveQqbo','showOpen','plugin\x20c',':choose','ap:upser','talkDocC','toISOStr','updated','ists','getFeish','find','-refresh','\x20failed','customMo','nt-state',':input','record','in;\x20char'];_0x1800=function(){return _0x2095ef;};return _0x1800();}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';import{createUpdateController}from'../updates/controller.mjs';const __dirname=dirname(fileURLToPath(import.meta.url)),preloadPath=join(__dirname,_0x3bddf5(0x19a)+_0x3bddf5(0x259)),{app,BrowserWindow,clipboard,dialog,globalShortcut,ipcMain,protocol,shell}=_0x364a11,DEVTOOLS_ACCELERATOR=_0x3bddf5(0x429)+_0x3bddf5(0x16b)+'+Shift+I',CLAWSPACE_PROTOCOL_SCHEME=_0x3bddf5(0x39a)+'e',DEBUG_STDOUT=process.env.WUJIE_SHELL_DEBUG==='1'||process.env.VITE_DEV_SERVER_URL||process.env.NODE_ENV!==_0x3bddf5(0x23b)+'on',LOCAL_FILE_MIME_TYPES=new Map([[_0x3bddf5(0x1f4),'text/pla'+_0x3bddf5(0x2f3)+_0x3bddf5(0x3b9)+'8'],[_0x3bddf5(0x232),_0x3bddf5(0x1e0)+_0x3bddf5(0x362)+_0x3bddf5(0x374)+_0x3bddf5(0x15f)],[_0x3bddf5(0x31d),_0x3bddf5(0x216)+'eg'],[_0x3bddf5(0x30e),_0x3bddf5(0x216)+'eg'],[_0x3bddf5(0x194),'image/pn'+'g'],['.gif','image/gi'+'f'],[_0x3bddf5(0x3df),'image/bm'+'p'],[_0x3bddf5(0x1aa),_0x3bddf5(0x394)+_0x3bddf5(0x220)],[_0x3bddf5(0x1d1),_0x3bddf5(0x2b6)+'bp'],[_0x3bddf5(0x3de),_0x3bddf5(0x3a4)+'4'],[_0x3bddf5(0x2cb),'video/qu'+_0x3bddf5(0x264)],[_0x3bddf5(0x17e),_0x3bddf5(0x385)+_0x3bddf5(0x350)],[_0x3bddf5(0x361),_0x3bddf5(0x385)+_0x3bddf5(0x17d)],[_0x3bddf5(0x125),_0x3bddf5(0x1ef)+'bm'],['.mp3','audio/mp'+'eg'],['.wav','audio/wa'+'v'],['.m4a','audio/mp'+'4'],[_0x3bddf5(0x1e7),'audio/aa'+'c'],[_0x3bddf5(0x21d),'audio/og'+'g'],[_0x3bddf5(0x1bb),'audio/fl'+'ac']]);protocol[_0x3bddf5(0x2bb)+_0x3bddf5(0x179)+_0x3bddf5(0x13b)+_0x3bddf5(0x1b1)]([{'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,generatedFilesStore=null,productRuntime=null,productRuntimeHooks={},sessionSqliteStore=null,diagnosticsWriter=null,userEventWriter=null,isQuitting=![],updateController=null;function attachGatewayBroadcastHandlers(_0x2b15cf){const _0xf92bc1=_0x3bddf5;for(const _0xfb23ec of['gateway-'+_0xf92bc1(0x260),_0xf92bc1(0x419)+_0xf92bc1(0x3ee),_0xf92bc1(0x1fe)+'eam-even'+'t',_0xf92bc1(0x31e)+_0xf92bc1(0x2e9),_0xf92bc1(0x37d)+_0xf92bc1(0x30d)+_0xf92bc1(0x373),_0xf92bc1(0x218)+_0xf92bc1(0x1f8),_0xf92bc1(0x164)+'pdated',_0xf92bc1(0x41b)+'-questio'+'n']){_0x2b15cf['on'](_0xfb23ec,_0x41b1e4=>broadcast(_0xfb23ec,_0x41b1e4));}}function ensureSessionSqliteStore(){const _0x4a7094=_0x3bddf5;if(sessionSqliteStore)return sessionSqliteStore;if(!configController)throw new Error(_0x4a7094(0x371)+_0x4a7094(0x3ca)+_0x4a7094(0x3e1)+_0x4a7094(0x29e)+'lized');return sessionSqliteStore=createSessionSqliteStore({'stateDir':configController['resolveS'+'tateDir']()}),sessionSqliteStore;}function ensureGeneratedFilesStore(){const _0x509184=_0x3bddf5;if(generatedFilesStore)return generatedFilesStore;if(!configController)throw new Error(_0x509184(0x371)+'ell\x20conf'+'ig\x20is\x20no'+_0x509184(0x29e)+_0x509184(0x30b));return generatedFilesStore=createGeneratedFilesStore({'stateDir':configController['resolveS'+_0x509184(0x1c3)]()}),generatedFilesStore;}async function ensureGatewayControllerStarted(){const _0x58c236=_0x3bddf5;if(gatewayController)return gatewayController;if(!shellConfig||!configController)throw new Error(bootError?_0x58c236(0x371)+_0x58c236(0x35d)+_0x58c236(0x346)+'\x20'+bootError:_0x58c236(0x371)+_0x58c236(0x155)+_0x58c236(0x17a)+_0x58c236(0x3fd)+_0x58c236(0x2d2));return mainLogger?.[_0x58c236(0x412)](_0x58c236(0x258)+_0x58c236(0x29c)+'er\x20missi'+_0x58c236(0x1a6)+'eating'),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app[_0x58c236(0x2f8)+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter,'sessionSqliteStore':ensureSessionSqliteStore()}),attachGatewayBroadcastHandlers(gatewayController),await gatewayController[_0x58c236(0x1dc)](),gatewayController;}function _0x40b7(_0x1b1f7f,_0x1bfabb){_0x1b1f7f=_0x1b1f7f-0x11b;const _0x1800db=_0x1800();let _0x40b740=_0x1800db[_0x1b1f7f];return _0x40b740;}function getMode(){const _0x2f0526=_0x3bddf5;return process.env.VITE_DEV_SERVER_URL?_0x2f0526(0x425):_0x2f0526(0x3e2);}function isGatewayNotInitializedError(_0x26af8f){const _0xb71499=_0x3bddf5;return _0x26af8f instanceof Error&&_0x26af8f['message']==='wujie-sh'+'ell\x20gate'+_0xb71499(0x17a)+_0xb71499(0x3fd)+_0xb71499(0x2d2);}function revealPathInFolder(_0x543453){const _0x2f9eec=_0x3bddf5,_0x2be804=String(_0x543453||'')[_0x2f9eec(0x1e8)]();if(!_0x2be804)return{'ok':![],'error':_0x2f9eec(0x206)+_0x2f9eec(0x26f)};return shell[_0x2f9eec(0x176)+_0x2f9eec(0x1e1)](_0x2be804),{'ok':!![]};}function resolveProjectRoot(){const _0x51efa9=_0x3bddf5;if(process.env.WUJIE_SHELL_PROJECT_ROOT)return resolve(process.env.WUJIE_SHELL_PROJECT_ROOT);if(app[_0x51efa9(0x3d7)+'ed']&&process[_0x51efa9(0x35e)+_0x51efa9(0x19f)])return join(process['resource'+_0x51efa9(0x19f)],_0x51efa9(0x396));return resolve(process[_0x51efa9(0x229)]());}function getLocalFileMimeType(_0x17bd4b){const _0x3be6e0=_0x3bddf5;return LOCAL_FILE_MIME_TYPES[_0x3be6e0(0x311)](_0x17bd4b[_0x3be6e0(0x39f)](_0x17bd4b['lastInde'+'xOf']('.'))[_0x3be6e0(0x343)+'ase']())||'applicat'+'ion/octe'+_0x3be6e0(0x337);}function parseSingleRangeHeader(_0x50c612,_0x38b338){const _0x5cf3d0=_0x3bddf5,_0x8ba656=/^bytes=(\d*)-(\d*)$/i['exec'](_0x50c612['trim']());if(!_0x8ba656)return null;const [,_0xf58ae3,_0x255c53]=_0x8ba656;if(!_0xf58ae3&&!_0x255c53)return null;if(!_0xf58ae3){const _0x149c97=Number[_0x5cf3d0(0x163)](_0x255c53,0xa);if(!Number[_0x5cf3d0(0x203)](_0x149c97)||_0x149c97<=0x0)return null;const _0x322f71=Math[_0x5cf3d0(0x2df)](_0x38b338-_0x149c97,0x0);return{'start':_0x322f71,'end':_0x38b338-0x1};}const _0x393194=Number[_0x5cf3d0(0x163)](_0xf58ae3,0xa);if(!Number[_0x5cf3d0(0x203)](_0x393194)||_0x393194<0x0||_0x393194>=_0x38b338)return null;const _0x548038=_0x255c53?Number[_0x5cf3d0(0x163)](_0x255c53,0xa):_0x38b338-0x1;if(!Number[_0x5cf3d0(0x203)](_0x548038)||_0x548038<_0x393194)return null;return{'start':_0x393194,'end':Math[_0x5cf3d0(0x182)](_0x548038,_0x38b338-0x1)};}function decodeClawspacePath(_0x8f279e){const _0xfb257f=_0x3bddf5;try{const _0x53378c=new URL(_0x8f279e);if(_0x53378c['protocol']!==CLAWSPACE_PROTOCOL_SCHEME+':')return null;if(_0x53378c[_0xfb257f(0x397)]!==_0xfb257f(0x15a))return null;const _0x1ce1bf=decodeURIComponent(_0x53378c['pathname']);if(!_0x1ce1bf)return null;if(/^\/[A-Za-z]:\//[_0xfb257f(0x1f6)](_0x1ce1bf))return _0x1ce1bf[_0xfb257f(0x39f)](0x1);return _0x1ce1bf;}catch{return null;}}function createClawspaceHeaders(_0x1b7d9b={}){const _0x31f014=_0x3bddf5;return new Headers({'access-control-allow-origin':'*','access-control-allow-methods':'GET,\x20HEA'+_0x31f014(0x1b0)+'NS','access-control-allow-headers':'range,\x20c'+_0x31f014(0x404)+_0x31f014(0x1ae),'access-control-expose-headers':_0x31f014(0x171)+_0x31f014(0x405)+_0x31f014(0x171)+_0x31f014(0x138)+_0x31f014(0x2cf)+_0x31f014(0x243),..._0x1b7d9b});}function createLocalFileResponse(_0x5e788a,_0x228629){const _0x3598ff=_0x3bddf5,_0x1d3ee3=statSync(_0x228629);if(!_0x1d3ee3[_0x3598ff(0x287)]())return new Response(_0x3598ff(0x2b0)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x3598ff(0x30a)+_0x3598ff(0x2f3)+_0x3598ff(0x3b9)+'8'})});const _0x307c79=getLocalFileMimeType(_0x228629),_0x16624=createClawspaceHeaders({'content-type':_0x307c79,'accept-ranges':_0x3598ff(0x3a7),'cache-control':_0x3598ff(0x17c)});if(_0x5e788a['method']==='HEAD')return _0x16624['set'](_0x3598ff(0x171)+_0x3598ff(0x3e4),String(_0x1d3ee3[_0x3598ff(0x318)])),new Response(null,{'status':0xc8,'headers':_0x16624});const _0x2109dd=_0x5e788a[_0x3598ff(0x363)][_0x3598ff(0x311)]('range');if(!_0x2109dd)return _0x16624[_0x3598ff(0x12b)](_0x3598ff(0x171)+_0x3598ff(0x3e4),String(_0x1d3ee3[_0x3598ff(0x318)])),new Response(Readable[_0x3598ff(0x160)](createReadStream(_0x228629)),{'status':0xc8,'headers':_0x16624});const _0x24dc63=parseSingleRangeHeader(_0x2109dd,_0x1d3ee3[_0x3598ff(0x318)]);if(!_0x24dc63)return new Response(null,{'status':0x1a0,'headers':createClawspaceHeaders({...Object[_0x3598ff(0x1e2)+_0x3598ff(0x26a)](_0x16624['entries']()),'content-range':'bytes\x20*/'+_0x1d3ee3[_0x3598ff(0x318)]})});const {start:_0x51c98b,end:_0xa21304}=_0x24dc63,_0x54a5c0=_0xa21304-_0x51c98b+0x1,_0x78bafd=new Headers(_0x16624);return _0x78bafd['set'](_0x3598ff(0x171)+_0x3598ff(0x3e4),String(_0x54a5c0)),_0x78bafd[_0x3598ff(0x12b)](_0x3598ff(0x171)+_0x3598ff(0x303),'bytes\x20'+_0x51c98b+'-'+_0xa21304+'/'+_0x1d3ee3[_0x3598ff(0x318)]),new Response(Readable[_0x3598ff(0x160)](createReadStream(_0x228629,{'start':_0x51c98b,'end':_0xa21304})),{'status':0xce,'headers':_0x78bafd});}function installClawspaceProtocolHandler(){const _0xabfef8=_0x3bddf5;protocol[_0xabfef8(0x174)](CLAWSPACE_PROTOCOL_SCHEME,_0x10d280=>{const _0x3ed33a=_0xabfef8;if(_0x10d280[_0x3ed33a(0x148)]===_0x3ed33a(0x269))return new Response(null,{'status':0xcc,'headers':createClawspaceHeaders()});const _0x147ae5=decodeClawspacePath(_0x10d280[_0x3ed33a(0x2d6)]);if(!_0x147ae5)return new Response('Invalid\x20'+_0x3ed33a(0x39a)+'e\x20url',{'status':0x190,'headers':createClawspaceHeaders({'content-type':_0x3ed33a(0x30a)+'in;\x20char'+_0x3ed33a(0x3b9)+'8'})});if(!existsSync(_0x147ae5))return new Response(_0x3ed33a(0x2b0)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x3ed33a(0x30a)+_0x3ed33a(0x2f3)+'set=utf-'+'8'})});return createLocalFileResponse(_0x10d280,_0x147ae5);});}function broadcast(_0x184a93,_0x435121){const _0x4705b2=_0x3bddf5;DEBUG_STDOUT&&console['info'](_0x4705b2(0x1e6)+'hell:eve'+_0x4705b2(0x170),_0x184a93,summarizePayload(_0x435121,{'maxDepth':0x2}));for(const _0xd0259c of BrowserWindow[_0x4705b2(0x368)+_0x4705b2(0x381)]()){!_0xd0259c[_0x4705b2(0x392)+_0x4705b2(0x1c5)][_0x4705b2(0x2a9)+'yed']()&&_0xd0259c['webConte'+_0x4705b2(0x1c5)][_0x4705b2(0x358)](_0x4705b2(0x371)+_0x4705b2(0x32f)+'t',{'name':_0x184a93,'payload':_0x435121});}}async function loadProductRuntime(){const _0x2e899a=_0x3bddf5,_0x2b6df1=[join(shellConfig[_0x2e899a(0x263)+'oot'],_0x2e899a(0x304)+_0x2e899a(0x38e),_0x2e899a(0x2b2)+'s'),join(app[_0x2e899a(0x393)+'th'](),_0x2e899a(0x304)+'ntime',_0x2e899a(0x2b2)+'s')],_0x423263=_0x2b6df1[_0x2e899a(0x2ec)](_0x4b3e3a=>existsSync(_0x4b3e3a));if(!_0x423263)return mainLogger?.[_0x2e899a(0x151)](_0x2e899a(0x3fc)+'runtime\x20'+_0x2e899a(0x185)+'n\x20not\x20fo'+'und',{'runtimeCandidates':_0x2b6df1}),{};try{const _0x5636b4=await import(pathToFileURL(_0x423263)[_0x2e899a(0x18e)]);return mainLogger?.['info'](_0x2e899a(0x3fc)+_0x2e899a(0x24f)+_0x2e899a(0x185)+'n\x20loaded',{'runtimePath':_0x423263}),_0x5636b4;}catch(_0x5c3bb2){mainLogger?.[_0x2e899a(0x16a)](_0x2e899a(0x3fc)+_0x2e899a(0x24f)+'extensio'+_0x2e899a(0x131)+_0x2e899a(0x11d),{'runtimePath':_0x423263,'error':summarizeError(_0x5c3bb2)});throw _0x5c3bb2;}}function openDevToolsForActiveContext(){const _0x479517=_0x3bddf5,_0x10445a=BrowserWindow[_0x479517(0x2d4)+'edWindow']()||mainWindow;if(!_0x10445a||_0x10445a['isDestro'+'yed']())return{'ok':![]};return _0x10445a[_0x479517(0x392)+'nts'][_0x479517(0x40d)+_0x479517(0x3d3)]({'mode':_0x479517(0x309)}),_0x10445a[_0x479517(0x392)+_0x479517(0x1c5)]['send'](_0x479517(0x371)+_0x479517(0x32f)+'t',{'name':_0x479517(0x3ef)+_0x479517(0x40c)+'t','payload':{'accelerator':DEVTOOLS_ACCELERATOR}}),{'ok':!![]};}function registerShellShortcuts(){const _0x418d02=_0x3bddf5;globalShortcut[_0x418d02(0x403)+'er'](DEVTOOLS_ACCELERATOR);const _0x1ba142=globalShortcut[_0x418d02(0x2bb)](DEVTOOLS_ACCELERATOR,openDevToolsForActiveContext);!_0x1ba142&&console[_0x418d02(0x412)](_0x418d02(0x1e6)+'hell]\x20fa'+_0x418d02(0x183)+_0x418d02(0x2bb)+_0x418d02(0x274)+'t:\x20'+DEVTOOLS_ACCELERATOR);}async function getRuntimeResourceStatus(){const _0x12543d=_0x3bddf5;try{const _0x23e28b=await loadRuntimeInfo(shellConfig[_0x12543d(0x263)+'oot']),_0x58e4c8=_0x23e28b[_0x12543d(0x1e9)]||{};return{'ok':!![],'runtimeRoot':_0x23e28b[_0x12543d(0x1d7)+_0x12543d(0x359)],'openclawVersion':_0x23e28b[_0x12543d(0x3f0)+_0x12543d(0x167)],'generatedAt':_0x58e4c8[_0x12543d(0x2c7)+_0x12543d(0x41f)]||null,'pluginCount':Array[_0x12543d(0x37c)](_0x58e4c8[_0x12543d(0x20a)])?_0x58e4c8[_0x12543d(0x20a)]['length']:0x0,'plugins':Array[_0x12543d(0x37c)](_0x58e4c8[_0x12543d(0x20a)])?_0x58e4c8[_0x12543d(0x20a)]:[],'agents':_0x58e4c8[_0x12543d(0x133)]||null,'skills':_0x58e4c8[_0x12543d(0x282)]||null,'wrapper':_0x58e4c8['wujiecla'+'wBin']||null,'product':_0x58e4c8[_0x12543d(0x383)]||null};}catch(_0x5db7c4){return{'ok':![],'runtimeRoot':resolveRuntimeRoot(shellConfig?.[_0x12543d(0x263)+_0x12543d(0x359)]||resolveProjectRoot()),'error':_0x5db7c4 instanceof Error?_0x5db7c4[_0x12543d(0x225)]:String(_0x5db7c4)};}}async function createWindow(){const _0x50e9ca=_0x3bddf5,_0x35e7ff=process.env.VITE_DEV_SERVER_URL||join(shellConfig[_0x50e9ca(0x263)+_0x50e9ca(0x359)],_0x50e9ca(0x2da),_0x50e9ca(0x2d5)+'ml'),_0x1a0885=process[_0x50e9ca(0x251)]===_0x50e9ca(0x407);mainLogger?.[_0x50e9ca(0x151)]('creating'+_0x50e9ca(0x236)+_0x50e9ca(0x181),{'rendererUrl':_0x35e7ff,'mode':getMode()}),mainWindow=new BrowserWindow({'width':0x49c,'height':0x30c,'minWidth':0x384,'minHeight':0x26c,'title':shellConfig[_0x50e9ca(0x279)+_0x50e9ca(0x186)],'backgroundColor':_0x1a0885?_0x50e9ca(0x30c)+'0':_0x50e9ca(0x2c3),'titleBarStyle':_0x1a0885?_0x50e9ca(0x31b):_0x50e9ca(0x29d),..._0x1a0885?{'titleBarOverlay':!![],'trafficLightPosition':{'x':0x10,'y':0xc}}:{},..._0x1a0885?{'vibrancy':_0x50e9ca(0x2a1)}:{},'webPreferences':{'preload':preloadPath,'contextIsolation':!![],'nodeIntegration':![],'sandbox':![]}}),mainWindow['webConte'+_0x50e9ca(0x1c5)]['on'](_0x50e9ca(0x219)+_0x50e9ca(0x1d2)+'nt',_0x2f5837=>{const _0x1f3e46=_0x50e9ca,_0x41ce8b=_0x2f5837[_0x1f3e46(0x2c6)];if(!_0x41ce8b||_0x41ce8b['type']!==_0x1f3e46(0x401))return;const _0xf88f01=String(_0x41ce8b['key']||'')['toLowerC'+_0x1f3e46(0x209)](),_0x116ea1=_0xf88f01==='r',_0x18338c=process[_0x1f3e46(0x251)]===_0x1f3e46(0x407)?_0x41ce8b[_0x1f3e46(0x292)]===!![]:_0x41ce8b[_0x1f3e46(0x1a3)]===!![];if(!_0x116ea1||!_0x18338c)return;_0x2f5837[_0x1f3e46(0x1a1)+_0x1f3e46(0x140)](),broadcast(_0x1f3e46(0x27a)+'mand',{'type':_0x1f3e46(0x3f4)+'on','action':_0x1f3e46(0x24b)});}),mainWindow['on']('focus',()=>{const _0x204988=_0x50e9ca;updateController?.[_0x204988(0x1d8)+'ackgroun'+_0x204988(0x1fb)]('window_f'+_0x204988(0x1f7));});const _0xef43ef=process.env.VITE_DEV_SERVER_URL;_0xef43ef?(await mainWindow[_0x50e9ca(0x321)](_0xef43ef),process.env.WUJIE_SHELL_OPEN_DEVTOOLS==='1'&&mainWindow[_0x50e9ca(0x392)+_0x50e9ca(0x1c5)][_0x50e9ca(0x40d)+_0x50e9ca(0x3d3)]({'mode':_0x50e9ca(0x309)})):await mainWindow[_0x50e9ca(0x342)](join(shellConfig['projectR'+_0x50e9ca(0x359)],_0x50e9ca(0x2da),'index.ht'+'ml')),mainLogger?.[_0x50e9ca(0x151)](_0x50e9ca(0x35b)+_0x50e9ca(0x1f1)+'ed',{'rendererUrl':_0x35e7ff,'mode':getMode()});}async function installIpcHandlers(){const _0x28ef4f=_0x3bddf5,_0x45571c=(_0x33678c,_0x30a3da)=>{const _0x4b7e30=_0x40b7;ipcMain[_0x4b7e30(0x174)](_0x33678c,async(_0x5866c4,_0x16ee97)=>{const _0x335a55=_0x4b7e30,_0x2f05c5=Date[_0x335a55(0x3f1)](),_0x3e16e8=_0x5866c4[_0x335a55(0x3d8)+_0x335a55(0x186)]?.['url']||_0x5866c4[_0x335a55(0x23c)][_0x335a55(0x204)]();ipcLogger?.[_0x335a55(0x151)](_0x335a55(0x324)+_0x335a55(0x12f)+'ted',{'channel':_0x33678c,'senderUrl':_0x3e16e8,'payload':summarizePayload(_0x16ee97)});DEBUG_STDOUT&&console['info'](_0x335a55(0x1e6)+_0x335a55(0x143)+']',_0x33678c,'started',summarizePayload(_0x16ee97));try{let _0x2092cf;try{_0x2092cf=await _0x30a3da(_0x5866c4,_0x16ee97);}catch(_0x25bb55){if(!isGatewayNotInitializedError(_0x25bb55))throw _0x25bb55;await ensureGatewayControllerStarted(),_0x2092cf=await _0x30a3da(_0x5866c4,_0x16ee97);}const _0x1fadb6=Date['now']()-_0x2f05c5;return ipcLogger?.['info'](_0x335a55(0x324)+'est\x20comp'+_0x335a55(0x1a7),{'channel':_0x33678c,'durationMs':_0x1fadb6,'result':summarizePayload(_0x2092cf,{'maxDepth':0x2})}),await userEventWriter?.[_0x335a55(0x248)]({'channel':_0x33678c,'payload':_0x16ee97,'result':_0x2092cf,'durationMs':_0x1fadb6,'status':'succeede'+'d'}),DEBUG_STDOUT&&console[_0x335a55(0x151)](_0x335a55(0x1e6)+'hell:ipc'+']',_0x33678c,_0x335a55(0x400)+'d',summarizePayload(_0x2092cf,{'maxDepth':0x2})),_0x2092cf;}catch(_0x296594){const _0x5a7753=Date[_0x335a55(0x3f1)]()-_0x2f05c5;ipcLogger?.[_0x335a55(0x16a)](_0x335a55(0x324)+'est\x20fail'+'ed',{'channel':_0x33678c,'durationMs':_0x5a7753,'error':summarizeError(_0x296594)}),await userEventWriter?.[_0x335a55(0x248)]({'channel':_0x33678c,'payload':_0x16ee97,'error':_0x296594,'durationMs':_0x5a7753,'status':_0x335a55(0x237)}),await diagnosticsWriter?.[_0x335a55(0x3b7)+_0x335a55(0x34b)](diagnosticEventFromError(_0x296594,{'category':_0x335a55(0x278),'event':_0x335a55(0x41e)+'est_fail'+'ed','message':_0x335a55(0x228)+_0x335a55(0x42b)+'ed:\x20'+_0x33678c,'durationMs':_0x5a7753,'meta':{'channel':_0x33678c,'senderUrl':_0x3e16e8,'payload':summarizePayload(_0x16ee97)}}));DEBUG_STDOUT&&console[_0x335a55(0x16a)](_0x335a55(0x1e6)+_0x335a55(0x143)+']',_0x33678c,_0x335a55(0x237),summarizeError(_0x296594));throw _0x296594;}});},_0x766744=()=>{const _0x3d5b30=_0x40b7;if(!gatewayController)throw new Error(bootError?_0x3d5b30(0x371)+_0x3d5b30(0x35d)+_0x3d5b30(0x346)+'\x20'+bootError:'wujie-sh'+_0x3d5b30(0x155)+_0x3d5b30(0x17a)+_0x3d5b30(0x3fd)+_0x3d5b30(0x2d2));return gatewayController;},_0x2e7d86=()=>{const _0x3fea2c=_0x40b7;if(typeof productRuntime[_0x3fea2c(0x2bb)+_0x3fea2c(0x245)+'untimeHa'+_0x3fea2c(0x348)]!==_0x3fea2c(0x1ad))return;const _0x3fec09=productRuntime[_0x3fea2c(0x2bb)+_0x3fea2c(0x245)+'untimeHa'+'ndlers']({'app':app,'BrowserWindow':BrowserWindow,'broadcast':broadcast,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'dialog':dialog,'exportLogsArchive':exportLogsArchive,'filesLogger':filesLogger,'getRuntimeSpawnContext':getRuntimeSpawnContext,'handle':_0x45571c,'mainLogger':mainLogger,'mainWindow':mainWindow,'rendererLogger':rendererLogger,'requireGateway':_0x766744,'sep':sep,'openClawConfigHandlers':{'update':(..._0x210d11)=>configController[_0x3fea2c(0x283)+_0x3fea2c(0x1ee)+_0x3fea2c(0x1d4)](..._0x210d11),'setPluginConfig':_0x41b251=>configController['setOpenC'+'lawPlugi'+_0x3fea2c(0x144)](_0x41b251),'setChannelConfig':_0x5ac031=>configController[_0x3fea2c(0x310)+_0x3fea2c(0x21f)+_0x3fea2c(0x169)](_0x5ac031),'deleteChannelConfig':_0x541382=>configController['deleteOp'+_0x3fea2c(0x1cc)+_0x3fea2c(0x150)+_0x3fea2c(0x256)](_0x541382),'setSkillEntry':_0x5ab880=>configController[_0x3fea2c(0x310)+_0x3fea2c(0x34c)+'Entry'](_0x5ab880),'deleteSkillEntry':_0x11df25=>configController[_0x3fea2c(0x135)+_0x3fea2c(0x28d)+_0x3fea2c(0x3b8)](_0x11df25),'setMcpServer':_0x921799=>configController['setOpenC'+_0x3fea2c(0x372)+_0x3fea2c(0x241)](_0x921799),'deleteMcpServer':_0xdbcaac=>configController[_0x3fea2c(0x135)+_0x3fea2c(0x20e)+_0x3fea2c(0x298)](_0xdbcaac)},'shell':shell,'shellConfig':shellConfig,'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand,'summarizePayload':summarizePayload,'summarizeText':summarizeText,'toHomePath':toHomePath,'writeMutableConfig':_0x3dc86e})||{};Object[_0x3fea2c(0x3c2)](productRuntimeHooks,_0x3fec09);};_0x45571c('app:info',async()=>({'name':shellConfig[_0x28ef4f(0x279)+_0x28ef4f(0x186)],'version':app['getVersi'+'on'](),'appId':shellConfig['appId'],'dataDir':shellConfig['dataDir']})),_0x45571c(_0x28ef4f(0x227)+_0x28ef4f(0x276),async(_0x3f3061,_0x71a3ac)=>{const _0x365134=_0x28ef4f,_0x3259b5=typeof _0x71a3ac===_0x365134(0x21e)?_0x71a3ac:'';if(!_0x3259b5)return{'ok':![]};return filesLogger?.[_0x365134(0x151)](_0x365134(0x238)+'ernal\x20ur'+_0x365134(0x379)+_0x365134(0x247),{'url':summarizeText(_0x3259b5,0xa0)}),await shell[_0x365134(0x27c)+_0x365134(0x13e)](_0x3259b5),{'ok':!![]};});const _0x3dc86e=async(_0x160f41,_0x3d9988)=>{const _0x4de86c=_0x28ef4f;return configController[_0x4de86c(0x2ca)+'igWriteH'+'andledIn'+_0x4de86c(0x26d)](),await configController[_0x4de86c(0x2a6)+'fig'](_0x160f41,_0x3d9988),{'ok':!![]};};_0x2e7d86(),_0x45571c(_0x28ef4f(0x34f)+'mport-zi'+'p',async(_0x2f7656,_0x47a5fd)=>importMarketSkillZip({'payload':_0x47a5fd,'importSkillZip':_0xaefd99=>importSkillZip({..._0xaefd99,'app':app,'dialog':dialog,'dialogWindow':BrowserWindow['fromWebC'+_0x28ef4f(0x3f7)](_0x2f7656['sender'])||mainWindow,'configController':configController}),'configController':configController})),_0x45571c(_0x28ef4f(0x1cf)+'pdate',(_0x2c90f6,_0x2d13b3)=>updateManagedSkillConfig({'payload':_0x2d13b3,'configController':configController})),_0x45571c(_0x28ef4f(0x2fb)+'elete',(_0x47b997,_0x26d02f)=>deleteMarketSkillRegistryEntry({'payload':_0x26d02f,'deleteManagedSkill':_0x136d72=>deleteManagedSkill({..._0x136d72,'gateway':_0x766744(),'configController':configController}),'configController':configController}));const _0x1c9b44=ensureGeneratedFilesStore();_0x45571c(_0x28ef4f(0x356)+_0x28ef4f(0x37a)+'les:list',async()=>_0x1c9b44[_0x28ef4f(0x184)]()),_0x45571c('app:gene'+_0x28ef4f(0x37a)+'les:upse'+'rt',async(_0x59fd57,_0x5171e9={})=>_0x1c9b44[_0x28ef4f(0x19c)](_0x5171e9)),_0x45571c(_0x28ef4f(0x356)+_0x28ef4f(0x37a)+_0x28ef4f(0x226),async(_0x33b2d1,_0x5971eb)=>_0x1c9b44['hide'](String(_0x5971eb||''))),_0x45571c('app:gene'+'rated-fi'+_0x28ef4f(0x226)+_0x28ef4f(0x40e)+'ion',async(_0x482e51,_0x2ccb59)=>_0x1c9b44[_0x28ef4f(0x14e)+'ssion'](String(_0x2ccb59||''))),_0x45571c('app:gene'+_0x28ef4f(0x37a)+_0x28ef4f(0x15b)+'te',async(_0x4ca7c7,_0x1e4e32)=>_0x1c9b44['deleteFi'+'le'](String(_0x1e4e32||''))),_0x45571c('app:gene'+_0x28ef4f(0x37a)+'les:dele'+_0x28ef4f(0x208)+'e',async(_0x44ad3e,_0x581cb0=[])=>_0x1c9b44[_0x28ef4f(0x2a5)+'tate'](_0x581cb0)),_0x45571c(_0x28ef4f(0x356)+_0x28ef4f(0x37a)+_0x28ef4f(0x38f)+'al',async(_0x1d224a,_0x342099)=>revealPathInFolder(_0x342099)),_0x45571c(_0x28ef4f(0x254)+_0x28ef4f(0x190),async()=>_0x1c9b44['list']()),_0x45571c('artifact'+'s:upsert',async(_0x2aabf4,_0x30044d={})=>_0x1c9b44[_0x28ef4f(0x19c)](_0x30044d)),_0x45571c('artifact'+_0x28ef4f(0x3f5),async(_0xfd1fdb,_0x341cfe={})=>_0x1c9b44[_0x28ef4f(0x2ab)](String(_0x341cfe['id']||_0x341cfe||''))),_0x45571c(_0x28ef4f(0x254)+'s:delete',async(_0x1782a4,_0x2df07f={})=>_0x1c9b44[_0x28ef4f(0x2be)+'le'](String(_0x2df07f['id']||_0x2df07f||''))),_0x45571c(_0x28ef4f(0x254)+'s:delete'+_0x28ef4f(0x314),async(_0x4316ac,_0x138bea={})=>_0x1c9b44[_0x28ef4f(0x2a5)+_0x28ef4f(0x18d)](_0x138bea[_0x28ef4f(0x202)]||_0x138bea)),_0x45571c(_0x28ef4f(0x254)+_0x28ef4f(0x1df),async(_0x28b01c,_0x2a33a1={})=>{const _0x160148=_0x28ef4f,_0x415b2a=typeof _0x2a33a1===_0x160148(0x21e)?_0x2a33a1:_0x2a33a1[_0x160148(0x11e)]||_0x2a33a1[_0x160148(0x235)];return revealPathInFolder(_0x415b2a);});const _0x281880=createPreferencesStore({'stateDir':configController['resolveS'+_0x28ef4f(0x1c3)](),'storeFile':_0x28ef4f(0x267)+'preferen'+_0x28ef4f(0x2ad)});_0x45571c('app:tray'+_0x28ef4f(0x3d1)+'se',async()=>_0x281880[_0x28ef4f(0x311)](_0x28ef4f(0x365)+_0x28ef4f(0x11c)+'se',![])),_0x45571c(_0x28ef4f(0x27d)+_0x28ef4f(0x17f)+'se',async(_0x525d87,_0x52abfd)=>_0x281880['set'](_0x28ef4f(0x365)+_0x28ef4f(0x11c)+'se',_0x52abfd===!![])),registerFileHandlers({'app':app,'filesLogger':filesLogger,'handle':_0x45571c,'sep':sep,'stateDir':configController[_0x28ef4f(0x1bd)+_0x28ef4f(0x1c3)](),'toHomePath':toHomePath}),registerProductLogHandlers({'app':app,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'exportLogsArchive':exportLogsArchive,'handle':_0x45571c,'mainLogger':mainLogger,'rendererLogger':rendererLogger,'summarizeText':summarizeText,'toHomePath':toHomePath}),registerModelHandlers({'handle':_0x45571c,'modelHandlers':{'saveCustomModel':_0x144286=>_0x766744()[_0x28ef4f(0x14b)][_0x28ef4f(0x1ce)+_0x28ef4f(0x3ce)](_0x144286),'deleteCustomModel':_0x48fa42=>_0x766744()[_0x28ef4f(0x14b)]['deleteCu'+_0x28ef4f(0x2f5)+'l'](_0x48fa42)}}),connectorController=createConnectorController({'shellConfig':shellConfig,'configController':configController,'broadcast':broadcast,'shell':shell,'getRuntimeSpawnContext':getRuntimeSpawnContext,'openClawConfigHandlers':{'update':(..._0x1437d8)=>configController['updateOp'+_0x28ef4f(0x1ee)+_0x28ef4f(0x1d4)](..._0x1437d8),'setPluginConfig':_0x226c33=>configController[_0x28ef4f(0x310)+_0x28ef4f(0x3f3)+_0x28ef4f(0x144)](_0x226c33),'setChannelConfig':_0xb61679=>configController[_0x28ef4f(0x310)+'lawChann'+_0x28ef4f(0x169)](_0xb61679),'deleteChannelConfig':_0x415721=>configController[_0x28ef4f(0x135)+_0x28ef4f(0x1cc)+_0x28ef4f(0x150)+_0x28ef4f(0x256)](_0x415721),'setSkillEntry':_0x11fea1=>configController[_0x28ef4f(0x310)+_0x28ef4f(0x34c)+'Entry'](_0x11fea1),'deleteSkillEntry':_0x715f0b=>configController[_0x28ef4f(0x135)+'enClawSk'+_0x28ef4f(0x3b8)](_0x715f0b),'setMcpServer':_0x11a504=>configController[_0x28ef4f(0x310)+'lawMcpSe'+_0x28ef4f(0x241)](_0x11a504),'deleteMcpServer':_0x2d48b2=>configController[_0x28ef4f(0x135)+_0x28ef4f(0x20e)+_0x28ef4f(0x298)](_0x2d48b2)},'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand}),_0x45571c(_0x28ef4f(0x387)+_0x28ef4f(0x33c)+_0x28ef4f(0x2c4),async()=>connectorController[_0x28ef4f(0x32b)+_0x28ef4f(0x150)+_0x28ef4f(0x22a)]()),_0x45571c(_0x28ef4f(0x387)+_0x28ef4f(0x33c)+_0x28ef4f(0x250)+'e',async(_0x405fac,_0xd1c33b={})=>connectorController[_0x28ef4f(0x331)+_0x28ef4f(0x1cb)+_0x28ef4f(0x39c)](_0xd1c33b)),_0x45571c(_0x28ef4f(0x387)+'m-channe'+_0x28ef4f(0x146)+_0x28ef4f(0x3c4),async(_0x30474d,_0x2edd4d={})=>connectorController[_0x28ef4f(0x13d)+'nnelEnab'+_0x28ef4f(0x399)](_0x2edd4d)),_0x45571c('config:c'+'onnector'+':save',async(_0x560164,_0x4cac6b={})=>{const _0x5a0772=_0x28ef4f,_0x2987a2=String(_0x4cac6b[_0x5a0772(0x423)+'d']||_0x4cac6b[_0x5a0772(0x2f7)]?.['channelI'+'d']||_0x4cac6b[_0x5a0772(0x2f7)]?.['id']||'');if(!_0x2987a2)throw new Error('channelI'+_0x5a0772(0x1fa)+_0x5a0772(0x221));const _0x24cbab=_0x4cac6b[_0x5a0772(0x2f7)]||_0x4cac6b,_0x1a6b28={'feishu':connectorController[_0x5a0772(0x18f)+_0x5a0772(0x332)+_0x5a0772(0x1be)],'qqbot':connectorController[_0x5a0772(0x2e2)+_0x5a0772(0x42d)+_0x5a0772(0x249)],'wecom':connectorController[_0x5a0772(0x1c2)+_0x5a0772(0x42f)+_0x5a0772(0x249)],'qq_mail':connectorController['saveQqMa'+_0x5a0772(0x42e)+_0x5a0772(0x42a)+'g'],'netease_mail':connectorController[_0x5a0772(0x157)+_0x5a0772(0x297)+'onnector'+_0x5a0772(0x249)],'tencent_exmail':connectorController[_0x5a0772(0x1b7)+'entExmai'+_0x5a0772(0x3c1)+_0x5a0772(0x25a)],'feishu_doc':connectorController[_0x5a0772(0x18f)+_0x5a0772(0x187)+_0x5a0772(0x2ba)+_0x5a0772(0x1d4)],'tencent_docs':connectorController[_0x5a0772(0x1b7)+_0x5a0772(0x1da)+_0x5a0772(0x3b1)+_0x5a0772(0x249)],'kdocs':connectorController['saveKdoc'+_0x5a0772(0x288)+_0x5a0772(0x25a)],'dingtalk_doc':connectorController[_0x5a0772(0x1bf)+'talkDocC'+_0x5a0772(0x3b1)+_0x5a0772(0x249)]},_0x501f94=_0x1a6b28[_0x2987a2];if(!_0x501f94)throw new Error(_0x5a0772(0x1f5)+'ted\x20conn'+'ector:\x20'+_0x2987a2);return _0x501f94(_0x24cbab);}),_0x45571c('config:c'+'onnector'+_0x28ef4f(0x427)+_0x28ef4f(0x257)+_0x28ef4f(0x355),async(_0x5d3356,_0x4a57d7={})=>connectorController[_0x28ef4f(0x18f)+_0x28ef4f(0x332)+_0x28ef4f(0x1be)](_0x4a57d7)),_0x45571c('config:c'+'onnector'+_0x28ef4f(0x285)+'bot-chan'+_0x28ef4f(0x255),async(_0x4c37d4,_0x4f2d92={})=>connectorController[_0x28ef4f(0x2e2)+_0x28ef4f(0x42d)+_0x28ef4f(0x249)](_0x4f2d92)),_0x45571c(_0x28ef4f(0x345)+_0x28ef4f(0x3b1)+_0x28ef4f(0x1fd)+'com-chan'+_0x28ef4f(0x255),async(_0x50e973,_0xc19ae3={})=>connectorController['saveWeco'+_0x28ef4f(0x42f)+_0x28ef4f(0x249)](_0xc19ae3)),_0x45571c('config:c'+_0x28ef4f(0x3b1)+_0x28ef4f(0x285)+_0x28ef4f(0x16d),async(_0x2605f5,_0x482798={})=>connectorController[_0x28ef4f(0x36d)+_0x28ef4f(0x42e)+_0x28ef4f(0x42a)+'g'](_0x482798)),_0x45571c(_0x28ef4f(0x345)+'onnector'+_0x28ef4f(0x15e)+'tease-ma'+'il',async(_0x5cd75a,_0x206306={})=>connectorController[_0x28ef4f(0x157)+_0x28ef4f(0x297)+_0x28ef4f(0x3b1)+_0x28ef4f(0x249)](_0x206306)),_0x45571c('config:c'+'onnector'+_0x28ef4f(0x3ae)+_0x28ef4f(0x25c)+_0x28ef4f(0x2ac),async(_0x4ca813,_0x499ed7={})=>connectorController[_0x28ef4f(0x1b7)+_0x28ef4f(0x2d9)+'lConnect'+_0x28ef4f(0x25a)](_0x499ed7)),_0x45571c(_0x28ef4f(0x345)+'onnector'+':save-fe'+'ishu-doc',async(_0x45309f,_0x2e4bcf={})=>connectorController[_0x28ef4f(0x18f)+_0x28ef4f(0x187)+_0x28ef4f(0x2ba)+_0x28ef4f(0x1d4)](_0x2e4bcf)),_0x45571c('config:c'+'onnector'+_0x28ef4f(0x3ae)+_0x28ef4f(0x36e)+'cs',async(_0x4da88a,_0x26e5e4={})=>connectorController['saveTenc'+'entDocsC'+_0x28ef4f(0x3b1)+'Config'](_0x26e5e4)),_0x45571c('config:c'+_0x28ef4f(0x3b1)+':save-kd'+_0x28ef4f(0x1b9),async(_0x5f3822,_0x478dff={})=>connectorController['saveKdoc'+_0x28ef4f(0x288)+_0x28ef4f(0x25a)](_0x478dff)),_0x45571c('config:c'+'onnector'+_0x28ef4f(0x22c)+'ngtalk-d'+'oc',async(_0x5cbf6d,_0x511484={})=>connectorController[_0x28ef4f(0x1bf)+_0x28ef4f(0x2e7)+_0x28ef4f(0x3b1)+'Config'](_0x511484)),_0x45571c(_0x28ef4f(0x345)+_0x28ef4f(0x3b1)+_0x28ef4f(0x149)+_0x28ef4f(0x1dd),async(_0x14f0ae,_0x2ae5e2={})=>{const _0x124daf=_0x28ef4f,_0x51c3f1=String(_0x2ae5e2[_0x124daf(0x423)+'d']||_0x2ae5e2[_0x124daf(0x32e)]||'');if(_0x51c3f1===_0x124daf(0x3ec))return connectorController[_0x124daf(0x147)+_0x124daf(0x2b3)+_0x124daf(0x367)+_0x124daf(0x375)]();if(_0x51c3f1===_0x124daf(0x402)+'oc')return connectorController['startFei'+'shuDocCl'+_0x124daf(0x156)+_0x124daf(0x253)]();if(_0x51c3f1==='feishu')return connectorController[_0x124daf(0x41d)+_0x124daf(0x132)+'trationS'+_0x124daf(0x2fd)](_0x2ae5e2);if(_0x51c3f1===_0x124daf(0x3f0)+'-weixin'||_0x51c3f1===_0x124daf(0x2bf))return connectorController[_0x124daf(0x1c9)+'hatChann'+_0x124daf(0x35a)+'n']({'gatewayPort':_0x766744()['gatewayP'+_0x124daf(0x271)](),'gatewayToken':_0x766744()[_0x124daf(0x275)+_0x124daf(0x1b2)]()});throw new Error(_0x124daf(0x1f5)+_0x124daf(0x341)+_0x124daf(0x29f)+_0x124daf(0x2cd)+(_0x51c3f1||_0x124daf(0x377)));}),_0x45571c(_0x28ef4f(0x345)+'onnector'+'-session'+_0x28ef4f(0x189),async(_0x58891d,_0x3753f1={})=>{const _0x1ab532=_0x28ef4f,_0x2afa5d=String(_0x3753f1[_0x1ab532(0x423)+'d']||_0x3753f1[_0x1ab532(0x32e)]||'');if(_0x2afa5d==='kdocs')return connectorController[_0x1ab532(0x2de)+_0x1ab532(0x3a0)+_0x1ab532(0x289)](_0x3753f1);if(_0x2afa5d===_0x1ab532(0x402)+'oc')return connectorController[_0x1ab532(0x2eb)+_0x1ab532(0x16c)+_0x1ab532(0x3bf)+'atus'](_0x3753f1);if(_0x2afa5d===_0x1ab532(0x145))return connectorController[_0x1ab532(0x2eb)+_0x1ab532(0x14d)+_0x1ab532(0x222)+_0x1ab532(0x330)](_0x3753f1);throw new Error(_0x1ab532(0x1f5)+_0x1ab532(0x341)+_0x1ab532(0x29f)+'ssion:\x20'+(_0x2afa5d||_0x1ab532(0x377)));}),_0x45571c(_0x28ef4f(0x345)+'onnector'+_0x28ef4f(0x149)+':cancel',async(_0x24ee4f,_0x118015={})=>{const _0x4d639f=_0x28ef4f,_0x275366=String(_0x118015['channelI'+'d']||_0x118015[_0x4d639f(0x32e)]||'');if(_0x275366===_0x4d639f(0x3ec))return connectorController[_0x4d639f(0x3a8)+_0x4d639f(0x3b4)+_0x4d639f(0x25d)+_0x4d639f(0x22e)](_0x118015);if(_0x275366===_0x4d639f(0x402)+'oc')return connectorController[_0x4d639f(0x1f9)+_0x4d639f(0x416)+_0x4d639f(0x23f)+_0x4d639f(0x415)](_0x118015);if(_0x275366===_0x4d639f(0x145))return connectorController[_0x4d639f(0x1f9)+_0x4d639f(0x34d)+'stration'+'Session'](_0x118015);if(_0x275366===_0x4d639f(0x3f0)+'-weixin'||_0x275366===_0x4d639f(0x2bf))return connectorController[_0x4d639f(0x2c1)+'chatChan'+_0x4d639f(0x3a3)+'on']();return{'ok':!![]};}),_0x45571c('config:c'+_0x28ef4f(0x3b1)+_0x28ef4f(0x149)+_0x28ef4f(0x11f)+'e',async(_0x18c8f8,_0x1a9370={})=>{const _0xbc2fec=_0x28ef4f,_0xe77e81=String(_0x1a9370[_0xbc2fec(0x423)+'d']||_0x1a9370[_0xbc2fec(0x32e)]||'');if(_0xe77e81===_0xbc2fec(0x402)+'oc')return connectorController['complete'+_0xbc2fec(0x142)+'cCliConn'+'ectSessi'+'on'](_0x1a9370);throw new Error('Unsuppor'+'ted\x20conn'+_0xbc2fec(0x29f)+_0xbc2fec(0x2cd)+(_0xe77e81||_0xbc2fec(0x377)));}),_0x45571c(_0x28ef4f(0x2d8)+_0x28ef4f(0x175),()=>connectorController[_0x28ef4f(0x2a0)+_0x28ef4f(0x376)+'ot']());const _0x14a9bf=_0x3d36ef=>{const _0x22075a=_0x28ef4f,_0x480a2e=_0x3d36ef[_0x22075a(0x133)]&&typeof _0x3d36ef[_0x22075a(0x133)]===_0x22075a(0x262)?_0x3d36ef[_0x22075a(0x133)]:{};return Array[_0x22075a(0x37c)](_0x480a2e[_0x22075a(0x184)])?_0x480a2e[_0x22075a(0x184)]:[];},_0x2778d5=_0x514e6a=>{const _0x4fcce9=_0x28ef4f,_0x1cc706=typeof _0x514e6a===_0x4fcce9(0x21e)?_0x514e6a['trim']():'',_0x30c77b=_0x1cc706['match'](/^agent:([^:]+):/);return _0x30c77b?.[0x1]||'';},_0x335b42=(_0x4cc201={},_0x1b2ffb=[])=>{const _0x1e2697=_0x28ef4f,_0x47653a=Array['isArray'](_0x4cc201['agents'])?_0x4cc201[_0x1e2697(0x133)]:Array[_0x1e2697(0x37c)](_0x4cc201['list'])?_0x4cc201[_0x1e2697(0x184)]:[],_0x438a5e=Array['isArray'](_0x1b2ffb)?_0x1b2ffb:[];return _0x47653a[_0x1e2697(0x121)](_0x15e618=>{const _0xecca33=_0x1e2697,_0x3a4b04=String(_0x15e618?.['id']||_0x15e618?.[_0xecca33(0x36b)]||'')[_0xecca33(0x1e8)]();return{'agent':_0x15e618,'sessions':_0x3a4b04?_0x438a5e['filter'](_0x1d6a05=>{const _0xe27526=_0xecca33,_0x283fc6=String(_0x1d6a05?.[_0xe27526(0x36b)]||_0x1d6a05?.[_0xe27526(0x28e)]||_0x1d6a05?.[_0xe27526(0x3bd)]?.['id']||_0x2778d5(_0x1d6a05?.[_0xe27526(0x301)])||'')[_0xe27526(0x1e8)]();return _0x283fc6?_0x283fc6===_0x3a4b04:_0x3a4b04===_0xe27526(0x1ec);}):[]};});};_0x45571c(_0x28ef4f(0x38c)+'te:get-s'+_0x28ef4f(0x18d),async()=>updateController?.['getState']()),_0x45571c('app:upda'+'te:check',async()=>updateController?.[_0x28ef4f(0x39e)+_0x28ef4f(0x120)]()),_0x45571c(_0x28ef4f(0x38c)+_0x28ef4f(0x3c7)+_0x28ef4f(0x196),async()=>updateController?.[_0x28ef4f(0x32d)+_0x28ef4f(0x3c9)]()),_0x45571c(_0x28ef4f(0x38c)+_0x28ef4f(0x2ae)+'and-inst'+'all',async()=>updateController?.[_0x28ef4f(0x14c)+_0x28ef4f(0x315)]()),_0x45571c(_0x28ef4f(0x294)+_0x28ef4f(0x2e5),async(_0x257c06,_0x1f65db={})=>{const _0x5d0e0d=_0x28ef4f,_0x2398df=await dialog[_0x5d0e0d(0x2e3)+_0x5d0e0d(0x391)](BrowserWindow[_0x5d0e0d(0x1d6)+'ontents'](_0x257c06['sender'])??mainWindow,{'properties':[_0x5d0e0d(0x2b1),..._0x1f65db?.[_0x5d0e0d(0x2db)]!==0x1?[_0x5d0e0d(0x30f)+_0x5d0e0d(0x153)]:[]],'filters':_0x1f65db?.[_0x5d0e0d(0x414)+_0x5d0e0d(0x413)+'s']?[{'name':_0x5d0e0d(0x418),'extensions':_0x1f65db[_0x5d0e0d(0x414)+_0x5d0e0d(0x413)+'s']}]:undefined});return _0x2398df[_0x5d0e0d(0x23d)+'s']['map'](_0x2b68d1=>({'path':_0x2b68d1,'name':_0x2b68d1[_0x5d0e0d(0x1a4)](/[\\/]/)[_0x5d0e0d(0x353)]()||_0x2b68d1}));}),_0x45571c('app:file'+':downloa'+_0x28ef4f(0x42c),async(_0x92945f,_0x2005be={})=>{const _0x41f868=_0x28ef4f,_0x11673e=String(_0x2005be['sourcePa'+'th']||'');if(!_0x11673e)return{'success':![],'error':_0x41f868(0x395)+_0x41f868(0x172)+_0x41f868(0x3a6)};const _0x59d6d7=await dialog[_0x41f868(0x1b8)+_0x41f868(0x391)](mainWindow,{'defaultPath':_0x2005be[_0x41f868(0x272)+_0x41f868(0x217)]||_0x11673e[_0x41f868(0x1a4)](/[\\/]/)[_0x41f868(0x353)]()});if(_0x59d6d7[_0x41f868(0x129)]||!_0x59d6d7['filePath'])return{'success':![],'canceled':!![]};const {copyFile:_0xb2a44f}=await import('node:fs/'+'promises');return await _0xb2a44f(_0x11673e,_0x59d6d7[_0x41f868(0x23d)]),{'success':!![],'filePath':_0x59d6d7['filePath']};}),_0x45571c(_0x28ef4f(0x21c)+_0x28ef4f(0x2d3)+_0x28ef4f(0x152),async(_0x169274,_0x159d5f)=>{return clipboard['writeTex'+'t'](String(_0x159d5f??'')),{'ok':!![]};}),_0x45571c('app:syst'+'em:resta'+'rt',async()=>{const _0x957ff1=_0x28ef4f;return app['relaunch'](),app[_0x957ff1(0x2a4)](),{'ok':!![]};}),_0x45571c('window:i'+_0x28ef4f(0x2c9)+'zed',_0x29cd4c=>Boolean(BrowserWindow[_0x28ef4f(0x1d6)+_0x28ef4f(0x3f7)](_0x29cd4c[_0x28ef4f(0x23c)])?.[_0x28ef4f(0x14a)+'zed']())),_0x45571c(_0x28ef4f(0x2d7)+_0x28ef4f(0x17b),async(_0x2ae4b5,_0x505737)=>{const _0x4d8029=_0x28ef4f;return app['setLogin'+_0x4d8029(0x3a5)+_0x4d8029(0x165)]({'openAtLogin':_0x505737===!![]}),{'ok':!![],'enabled':_0x505737===!![]};}),_0x45571c(_0x28ef4f(0x2d7)+'tup:get',async()=>app[_0x28ef4f(0x2d1)+_0x28ef4f(0x3a5)+_0x28ef4f(0x165)]()[_0x28ef4f(0x1d3)+_0x28ef4f(0x3d2)]),_0x45571c(_0x28ef4f(0x294)+_0x28ef4f(0x410)+_0x28ef4f(0x286),async _0xcaa8b3=>{const _0xb8a867=_0x28ef4f,_0x208f78=await dialog['showOpen'+'Dialog'](BrowserWindow[_0xb8a867(0x1d6)+'ontents'](_0xcaa8b3[_0xb8a867(0x23c)])??mainWindow,{'properties':['openDire'+'ctory']});return _0x208f78[_0xb8a867(0x23d)+'s'][0x0]||'';}),_0x45571c(_0x28ef4f(0x293)+'em:open-'+_0x28ef4f(0x286),async(_0x3ae563,_0x100dac)=>{const _0x46ea83=_0x28ef4f,_0x42a78e=await shell[_0x46ea83(0x205)](String(_0x100dac||''));return _0x42a78e||'';}),_0x45571c('openclaw'+_0x28ef4f(0x2ce)+_0x28ef4f(0x33d),async()=>_0x766744()[_0x28ef4f(0x275)+_0x28ef4f(0x1b2)]()),_0x45571c(_0x28ef4f(0x3f0)+_0x28ef4f(0x2ce)+'-port',async()=>_0x766744()['gatewayP'+_0x28ef4f(0x271)]()),_0x45571c(_0x28ef4f(0x3f0)+':run-onc'+'e',async(_0x226fca,_0x257af1=[])=>{const _0x19d816=_0x28ef4f,_0x36b148=await runClawOnce(shellConfig[_0x19d816(0x263)+'oot'],Array[_0x19d816(0x37c)](_0x257af1)?_0x257af1:[]);return{'ok':_0x36b148[_0x19d816(0x333)]===0x0,..._0x36b148};}),_0x45571c(_0x28ef4f(0x37d)+_0x28ef4f(0x41a),async(_0x51c9e7,_0x2f47cb={})=>_0x766744()[_0x28ef4f(0x37d)][_0x28ef4f(0x3a2)]({..._0x2f47cb,'parentSessionKey':_0x2f47cb['parentSe'+_0x28ef4f(0x3aa)]||_0x2f47cb[_0x28ef4f(0x3f2)+'ey']}));const _0x3889ca=configController['resolveS'+_0x28ef4f(0x1c3)]();sessionSqliteStore=ensureSessionSqliteStore();const _0x140da1=createAgentSessionsMapStore({'stateDir':_0x3889ca});_0x45571c(_0x28ef4f(0x37d)+':agent-m'+'ap:get',async(_0x1f511a,_0x3abc36={})=>_0x140da1[_0x28ef4f(0x311)](_0x3abc36)),_0x45571c(_0x28ef4f(0x37d)+_0x28ef4f(0x193)+_0x28ef4f(0x2e6)+'t',async(_0x38d72b,_0x36fb45={})=>_0x140da1[_0x28ef4f(0x19c)](_0x36fb45)),_0x45571c(_0x28ef4f(0x37d)+_0x28ef4f(0x193)+'ap:entry',async(_0x16f012,_0x2a7a70={})=>{const _0x2e99f1=_0x28ef4f,_0x51c7ba=String(_0x2a7a70[_0x2e99f1(0x3f2)+'ey']||'')[_0x2e99f1(0x1e8)]();if(!_0x51c7ba)return null;return await sessionSqliteStore[_0x2e99f1(0x2f6)+_0x2e99f1(0x3ff)](_0x51c7ba);}),_0x45571c(_0x28ef4f(0x1c1)+'reate',async(_0x403165,_0x2ca45e={})=>{const _0x317cfd=_0x28ef4f,_0x1bf499=await readMutableConfig(),_0x8b8a8e=_0x1bf499[_0x317cfd(0x133)]&&typeof _0x1bf499[_0x317cfd(0x133)]===_0x317cfd(0x262)?_0x1bf499[_0x317cfd(0x133)]:{},_0x245f8c=_0x14a9bf(_0x1bf499),_0x710d5=String(_0x2ca45e['id']||_0x2ca45e['name']||_0x317cfd(0x323)+Date[_0x317cfd(0x3f1)]())[_0x317cfd(0x1e8)]()[_0x317cfd(0x191)](/\s+/g,'-'),_0x34465c={'id':_0x710d5,'name':String(_0x2ca45e[_0x317cfd(0x2fe)]||_0x710d5),..._0x2ca45e[_0x317cfd(0x26b)+'e']?{'workspace':String(_0x2ca45e[_0x317cfd(0x26b)+'e'])}:{},..._0x2ca45e[_0x317cfd(0x212)]?{'model':_0x2ca45e[_0x317cfd(0x212)]}:{},..._0x2ca45e[_0x317cfd(0x197)]?{'emoji':_0x2ca45e[_0x317cfd(0x197)]}:{},..._0x2ca45e[_0x317cfd(0x2fa)]?{'avatar':_0x2ca45e[_0x317cfd(0x2fa)]}:{},...Array[_0x317cfd(0x37c)](_0x2ca45e[_0x317cfd(0x282)])?{'skills':_0x2ca45e[_0x317cfd(0x282)]}:{}};if(_0x245f8c[_0x317cfd(0x369)](_0x55ddac=>_0x55ddac?.['id']===_0x710d5))throw new Error(_0x317cfd(0x3cb)+'ready\x20ex'+_0x317cfd(0x2ea));return _0x8b8a8e['list']=[..._0x245f8c,_0x34465c],_0x1bf499[_0x317cfd(0x133)]=_0x8b8a8e,await _0x3dc86e(_0x1bf499,_0x317cfd(0x27b)+_0x317cfd(0x20b)),{'ok':!![],'agent':_0x34465c};}),_0x45571c('agents:u'+_0x28ef4f(0x2af),async(_0x4fd42d,_0x516012={})=>{const _0x383b37=_0x28ef4f,_0xf102cb=String(_0x516012['id']||_0x516012['agentId']||'')[_0x383b37(0x1e8)]();if(!_0xf102cb)throw new Error('agent\x20id'+_0x383b37(0x20d)+_0x383b37(0x123));const _0x402e87=await readMutableConfig(),_0xe198a5=_0x402e87['agents']&&typeof _0x402e87[_0x383b37(0x133)]===_0x383b37(0x262)?_0x402e87[_0x383b37(0x133)]:{},_0x332592=_0x14a9bf(_0x402e87),_0x472204=_0x332592[_0x383b37(0x121)](_0x1e53e6=>_0x1e53e6?.['id']===_0xf102cb?{..._0x1e53e6,..._0x516012,'id':_0xf102cb}:_0x1e53e6);return _0xe198a5['list']=_0x472204,_0x402e87[_0x383b37(0x133)]=_0xe198a5,await _0x3dc86e(_0x402e87,_0x383b37(0x322)+'dated'),{'ok':!![],'agent':_0x472204[_0x383b37(0x2ec)](_0x3692f0=>_0x3692f0?.['id']===_0xf102cb)||null};}),_0x45571c(_0x28ef4f(0x31a)+'elete',async(_0x4e49b6,_0xa6922d={})=>{const _0x3b54af=_0x28ef4f,_0x1ea5c5=String(_0xa6922d['id']||_0xa6922d['agentId']||'')[_0x3b54af(0x1e8)]();if(!_0x1ea5c5)throw new Error('agent\x20id'+'\x20is\x20requ'+_0x3b54af(0x123));const _0x1406e3=await readMutableConfig(),_0x37e09a=_0x1406e3[_0x3b54af(0x133)]&&typeof _0x1406e3[_0x3b54af(0x133)]==='object'?_0x1406e3['agents']:{};return _0x37e09a[_0x3b54af(0x184)]=_0x14a9bf(_0x1406e3)[_0x3b54af(0x139)](_0xc703c7=>_0xc703c7?.['id']!==_0x1ea5c5),_0x1406e3[_0x3b54af(0x133)]=_0x37e09a,await _0x3dc86e(_0x1406e3,_0x3b54af(0x3ad)+_0x3b54af(0x1a7)),{'ok':!![],'agentId':_0x1ea5c5};}),_0x45571c(_0x28ef4f(0x406)+_0x28ef4f(0x325)+_0x28ef4f(0x134)+'t',async(_0x42c5bf,_0x54cd4a={})=>{const _0x506e5a=_0x28ef4f,[_0x444399,_0x286650]=await Promise[_0x506e5a(0x35c)]([_0x766744()['agents'][_0x506e5a(0x184)](),_0x766744()[_0x506e5a(0x37d)][_0x506e5a(0x184)](_0x54cd4a)['catch'](()=>({'sessions':[]}))]),_0x28c193=Array['isArray'](_0x286650[_0x506e5a(0x37d)])?_0x286650[_0x506e5a(0x37d)]:[];return{..._0x444399,'sessions':_0x28c193,'groups':Array[_0x506e5a(0x37c)](_0x444399['groups'])?_0x444399[_0x506e5a(0x2b8)]:_0x335b42(_0x444399,_0x28c193)};}),terminalManager=createTerminalManager({'cwd':join(configController[_0x28ef4f(0x1bd)+'tateDir'](),_0x28ef4f(0x26b)+'e'),'emitData':_0x46a30d=>broadcast(_0x28ef4f(0x3ed)+'-data',_0x46a30d),'emitExit':_0x32ca97=>broadcast(_0x28ef4f(0x3ed)+'-exit',_0x32ca97)}),_0x45571c(_0x28ef4f(0x3ed)+':create',async(_0x157085,_0x4d86af={})=>terminalManager['create'](_0x4d86af)),_0x45571c(_0x28ef4f(0x3ed)+_0x28ef4f(0x2f1),async(_0x55daf8,_0x1cb4d7={})=>terminalManager['input'](_0x1cb4d7)),_0x45571c(_0x28ef4f(0x3ed)+_0x28ef4f(0x168),async(_0x2d9acc,_0x539bcb={})=>terminalManager[_0x28ef4f(0x420)](_0x539bcb)),_0x45571c(_0x28ef4f(0x3ed)+_0x28ef4f(0x340),async(_0x459d71,_0x3b3276={})=>terminalManager[_0x28ef4f(0x428)](_0x3b3276)),_0x45571c(_0x28ef4f(0x20c)+_0x28ef4f(0x184),async()=>{const _0x4d3d27=_0x28ef4f,_0x429cd7=gatewayController?.[_0x4d3d27(0x40b)+_0x4d3d27(0x22b)]?.()||{};return _0x429cd7[_0x4d3d27(0x20a)]||[];}),_0x45571c(_0x28ef4f(0x20c)+_0x28ef4f(0x15d)+'ig',async(_0x3d5a60,_0xbdd2fb={})=>{const _0x3e4a57=_0x28ef4f,_0x5d8914=String(_0xbdd2fb['pluginId']||_0xbdd2fb['id']||''),_0xf7eaa6=await readMutableConfig(),_0x4c8c9d=_0xf7eaa6['plugins']?.[_0x3e4a57(0x207)]||{};return _0x5d8914?_0x4c8c9d[_0x5d8914]||null:_0x4c8c9d;}),_0x45571c('plugins:'+'update-c'+'onfig',async(_0xd79263,_0x438283={})=>{const _0x478b0e=_0x28ef4f,_0x3eea10=String(_0x438283[_0x478b0e(0x266)]||_0x438283['id']||'');if(!_0x3eea10)throw new Error('pluginId'+_0x478b0e(0x20d)+_0x478b0e(0x123));const _0x3ab129=await readMutableConfig(),_0x3bf4ca=_0x3ab129[_0x478b0e(0x20a)]&&typeof _0x3ab129[_0x478b0e(0x20a)]===_0x478b0e(0x262)?_0x3ab129[_0x478b0e(0x20a)]:{},_0x3b71f7=_0x3bf4ca['entries']&&typeof _0x3bf4ca['entries']==='object'?_0x3bf4ca[_0x478b0e(0x207)]:{};return _0x3b71f7[_0x3eea10]={..._0x3b71f7[_0x3eea10]||{},..._0x438283[_0x478b0e(0x370)]||_0x438283[_0x478b0e(0x316)]||{}},_0x3bf4ca[_0x478b0e(0x207)]=_0x3b71f7,_0x3ab129[_0x478b0e(0x20a)]=_0x3bf4ca,_0x3dc86e(_0x3ab129,_0x478b0e(0x2e4)+_0x478b0e(0x1f0)+'dated');}),_0x45571c(_0x28ef4f(0x20c)+_0x28ef4f(0x408),async(_0x188b77,_0x15ae32={})=>{const _0x1051a4=_0x28ef4f,_0x173114=String(_0x15ae32[_0x1051a4(0x266)]||_0x15ae32['id']||'');if(!_0x173114)throw new Error(_0x1051a4(0x266)+'\x20is\x20requ'+'ired');const _0x1a6cec=await readMutableConfig(),_0x518a59=_0x1a6cec[_0x1051a4(0x20a)]&&typeof _0x1a6cec[_0x1051a4(0x20a)]===_0x1051a4(0x262)?_0x1a6cec[_0x1051a4(0x20a)]:{},_0xf3a19b=_0x518a59[_0x1051a4(0x207)]&&typeof _0x518a59[_0x1051a4(0x207)]===_0x1051a4(0x262)?_0x518a59[_0x1051a4(0x207)]:{};return _0xf3a19b[_0x173114]={..._0xf3a19b[_0x173114]||{},'enabled':!![]},_0x518a59['entries']=_0xf3a19b,_0x1a6cec[_0x1051a4(0x20a)]=_0x518a59,_0x3dc86e(_0x1a6cec,_0x1051a4(0x2cc)+_0x1051a4(0x3c4));}),_0x45571c(_0x28ef4f(0x20c)+_0x28ef4f(0x307),async(_0x2a844f,_0x4920e5={})=>{const _0x2344bd=_0x28ef4f,_0x4f3c54=String(_0x4920e5['pluginId']||_0x4920e5['id']||'');if(!_0x4f3c54)throw new Error('pluginId'+_0x2344bd(0x20d)+_0x2344bd(0x123));const _0x535b00=await readMutableConfig(),_0x2c7c9f=_0x535b00[_0x2344bd(0x20a)]&&typeof _0x535b00[_0x2344bd(0x20a)]==='object'?_0x535b00['plugins']:{},_0x352568=_0x2c7c9f[_0x2344bd(0x207)]&&typeof _0x2c7c9f['entries']===_0x2344bd(0x262)?_0x2c7c9f[_0x2344bd(0x207)]:{};return _0x352568[_0x4f3c54]={..._0x352568[_0x4f3c54]||{},'enabled':![]},_0x2c7c9f['entries']=_0x352568,_0x535b00[_0x2344bd(0x20a)]=_0x2c7c9f,_0x3dc86e(_0x535b00,_0x2344bd(0x295)+_0x2344bd(0x3d6));}),_0x45571c(_0x28ef4f(0x20c)+'status',async(_0xbcdc0d,_0x26a982={})=>({'plugins':await((async()=>{const _0x5e7881=_0x28ef4f,_0x137d07=gatewayController?.[_0x5e7881(0x40b)+'nfo']?.()||{};if(!_0x26a982?.[_0x5e7881(0x266)]&&!_0x26a982?.['id'])return _0x137d07['plugins']||[];const _0x44c743=String(_0x26a982[_0x5e7881(0x266)]||_0x26a982['id']||'');return(_0x137d07[_0x5e7881(0x20a)]||[])[_0x5e7881(0x139)](_0x54d96f=>_0x54d96f[_0x5e7881(0x266)]===_0x44c743);})())})),_0x45571c('tabs:nav'+_0x28ef4f(0x33a),async(_0x188350,_0x3658a7)=>({'ok':!![],'payload':_0x3658a7})),_0x45571c(_0x28ef4f(0x1de)+_0x28ef4f(0x28c)+'e',async(_0x9aed38,_0x309be2)=>{const _0x3317b3=_0x28ef4f;return broadcast(_0x3317b3(0x27a)+_0x3317b3(0x1d5),_0x309be2),{'ok':!![]};}),_0x45571c(_0x28ef4f(0x21b)+'uest-age'+_0x28ef4f(0x2f0),async()=>{const _0x359b06=_0x28ef4f;return broadcast(_0x359b06(0x277)+'nt-state'+'-request',{}),{'ok':!![]};}),_0x45571c('tabs:ref'+_0x28ef4f(0x296)+_0x28ef4f(0x2f0),async(_0x1fec71,_0x50b746={})=>{const _0x5db515=_0x28ef4f;return broadcast(_0x5db515(0x277)+_0x5db515(0x2f0)+_0x5db515(0x2ed)+_0x5db515(0x1af),_0x50b746),{'ok':!![]};}),_0x45571c('window:m'+_0x28ef4f(0x299),_0xa0af70=>{const _0x5f43e2=_0x28ef4f;return BrowserWindow[_0x5f43e2(0x1d6)+_0x5f43e2(0x3f7)](_0xa0af70['sender'])?.[_0x5f43e2(0x3dc)](),{'ok':!![]};}),_0x45571c('window:t'+'oggle-ma'+_0x28ef4f(0x1b3),_0x5e1bd7=>{const _0x5a231a=_0x28ef4f,_0xf7f87b=BrowserWindow[_0x5a231a(0x1d6)+_0x5a231a(0x3f7)](_0x5e1bd7[_0x5a231a(0x23c)]);if(!_0xf7f87b)return{'isMaximized':![]};if(_0xf7f87b[_0x5a231a(0x14a)+_0x5a231a(0x3d4)]())_0xf7f87b[_0x5a231a(0x1b4)+'ze']();else _0xf7f87b[_0x5a231a(0x130)]();return{'isMaximized':_0xf7f87b[_0x5a231a(0x14a)+_0x5a231a(0x3d4)]()};}),_0x45571c(_0x28ef4f(0x2e1)+_0x28ef4f(0x319),_0x2efa5b=>{const _0x11bf92=_0x28ef4f;return BrowserWindow[_0x11bf92(0x1d6)+_0x11bf92(0x3f7)](_0x2efa5b[_0x11bf92(0x23c)])?.[_0x11bf92(0x428)](),{'ok':!![]};}),_0x45571c(_0x28ef4f(0x291)+'pen-devt'+'ools',()=>openDevToolsForActiveContext()),_0x45571c(_0x28ef4f(0x3f0)+':runtime'+_0x28ef4f(0x211),()=>_0x766744()['runtimeI'+'nfo']()),_0x45571c(_0x28ef4f(0x3f0)+_0x28ef4f(0x2ce)+_0x28ef4f(0x1e3),async()=>(await ensureGatewayControllerStarted())[_0x28ef4f(0x162)+'s']()),_0x45571c('openclaw'+':gateway'+'-restart',()=>_0x766744()[_0x28ef4f(0x422)](_0x28ef4f(0x2c0)+_0x28ef4f(0x421))),_0x45571c(_0x28ef4f(0x3f0)+_0x28ef4f(0x1c4)+_0x28ef4f(0x38a)+_0x28ef4f(0x3be),async()=>({'loadingLifeCycle':_0x28ef4f(0x336),'message':'','updatedAt':new Date()[_0x28ef4f(0x2e8)+_0x28ef4f(0x3e0)]()})),_0x45571c(_0x28ef4f(0x3f0)+':gateway'+_0x28ef4f(0x23a),(_0x59d6fc,_0x52108e={})=>_0x766744()[_0x28ef4f(0x1ac)+_0x28ef4f(0x2a8)](_0x52108e?.[_0x28ef4f(0x2db)]??0xc8)),_0x45571c('openclaw'+_0x28ef4f(0x3cd)+_0x28ef4f(0x41b)+'-questio'+'n',(_0x4b07c4,_0x2bd085)=>_0x766744()[_0x28ef4f(0x242)+'kUserQue'+_0x28ef4f(0x3bc)](_0x2bd085)),_0x45571c(_0x28ef4f(0x3f0)+_0x28ef4f(0x200)+_0x28ef4f(0x3e9),async()=>{const _0x2d7585=_0x28ef4f,_0x31ae6c=join(resolveRuntimeRoot(shellConfig['projectR'+_0x2d7585(0x359)]),_0x2d7585(0x424),_0x2d7585(0x2a2)+'w');if(!existsSync(_0x31ae6c))throw new Error(_0x2d7585(0x3f0)+_0x2d7585(0x37e)+_0x2d7585(0x328)+_0x2d7585(0x386)+_0x31ae6c+(_0x2d7585(0x39d)+_0x2d7585(0x3c3)+_0x2d7585(0x1e4)+'e\x20first.'));const _0x1c2bc3=join(app[_0x2d7585(0x3b3)](_0x2d7585(0x411)),_0x2d7585(0x371)+'ell-cli.'+_0x2d7585(0x27f));await writeFile(_0x1c2bc3,'#!/bin/s'+'h\x0aexec\x20\x22'+_0x31ae6c[_0x2d7585(0x191)](/\\/g,'\x5c\x5c')[_0x2d7585(0x191)](/"/g,'\x5c\x22')+'\x22\x0a',{'mode':0x1ed});const _0x3b2b91=spawn(_0x2d7585(0x3af),['-a',_0x2d7585(0x24d),_0x1c2bc3],{'detached':!![],'stdio':_0x2d7585(0x1e5)});return _0x3b2b91[_0x2d7585(0x26c)](),{'ok':!![],'cliPath':_0x31ae6c};}),_0x45571c(_0x28ef4f(0x213)+'ist',()=>_0x766744()['agents'][_0x28ef4f(0x184)]()),_0x45571c(_0x28ef4f(0x22f)+_0x28ef4f(0x3ac),(_0x38daa6,_0x585161)=>_0x766744()[_0x28ef4f(0x282)]['status'](_0x585161)),_0x45571c('sessions'+_0x28ef4f(0x382),(_0x37a9c5,_0x4e7358)=>_0x766744()[_0x28ef4f(0x37d)][_0x28ef4f(0x3a2)](_0x4e7358)),_0x45571c('sessions'+':list',(_0x23a13c,_0xa3de0b)=>_0x766744()[_0x28ef4f(0x37d)][_0x28ef4f(0x184)](_0xa3de0b)),_0x45571c(_0x28ef4f(0x37d)+':delete',(_0x542d9c,_0x411768)=>_0x766744()[_0x28ef4f(0x37d)][_0x28ef4f(0x199)](_0x411768)),_0x45571c('chat:str'+_0x28ef4f(0x13a),(_0x2dd176,_0x2fda3d)=>_0x766744()[_0x28ef4f(0x136)][_0x28ef4f(0x38b)](_0x2fda3d)),_0x45571c('chat:abo'+'rt',(_0x53cca6,_0x16695a)=>_0x766744()[_0x28ef4f(0x136)][_0x28ef4f(0x137)](_0x16695a)),_0x45571c(_0x28ef4f(0x1d0)+_0x28ef4f(0x127),(_0x1aa410,_0x288716)=>_0x766744()[_0x28ef4f(0x136)][_0x28ef4f(0x390)](_0x288716)),_0x45571c(_0x28ef4f(0x1c6)+'te',async(_0x15eb5c,_0x130453={})=>{const _0x5261a1=_0x28ef4f,_0x41a1ed=typeof _0x130453[_0x5261a1(0x3c8)]===_0x5261a1(0x21e)?_0x130453[_0x5261a1(0x3c8)]:_0x5261a1(0x151),_0x5a9904=typeof _0x130453['message']===_0x5261a1(0x21e)?_0x130453[_0x5261a1(0x225)]:_0x5261a1(0x2c0)+_0x5261a1(0x27e),_0x19bf9c=typeof _0x130453['context']==='string'&&_0x130453[_0x5261a1(0x23e)]['trim']()?_0x5261a1(0x2c0)+':'+_0x130453[_0x5261a1(0x23e)][_0x5261a1(0x1e8)]():_0x5261a1(0x2c0),_0x52a418=_0x130453[_0x5261a1(0x292)]&&typeof _0x130453[_0x5261a1(0x292)]===_0x5261a1(0x262)?{...summarizePayload(_0x130453[_0x5261a1(0x292)]),'context':_0x19bf9c}:{'context':_0x19bf9c},_0x20ed4e=rendererLogger;if(_0x20ed4e?.[_0x41a1ed])await _0x20ed4e[_0x41a1ed](_0x5a9904,_0x52a418);else await _0x20ed4e?.[_0x5261a1(0x151)](_0x5a9904,_0x52a418);if(_0x130453[_0x5261a1(0x214)+'ic']===!![]||_0x19bf9c===_0x5261a1(0x2c0)+_0x5261a1(0x24a)+'tic'){const _0x4b0700=_0x130453[_0x5261a1(0x2f2)]&&typeof _0x130453[_0x5261a1(0x2f2)]==='object'?_0x130453[_0x5261a1(0x2f2)]:_0x130453[_0x5261a1(0x292)]?.[_0x5261a1(0x2f2)]&&typeof _0x130453[_0x5261a1(0x292)][_0x5261a1(0x2f2)]===_0x5261a1(0x262)?_0x130453['meta'][_0x5261a1(0x2f2)]:{'level':_0x41a1ed,'category':'renderer','event':_0x19bf9c,'message':_0x5a9904,'meta':_0x130453[_0x5261a1(0x292)]};await diagnosticsWriter?.[_0x5261a1(0x224)+'nt'](_0x4b0700,{'captureIncident':String(_0x4b0700['level']||_0x41a1ed)[_0x5261a1(0x343)+_0x5261a1(0x209)]()===_0x5261a1(0x16a)||_0x130453[_0x5261a1(0x3b7)+_0x5261a1(0x34b)]===!![]});}return{'ok':!![]};}),_0x45571c(_0x28ef4f(0x1a2)+_0x28ef4f(0x271),async(_0x2581ed,_0x4bcca5={})=>{const _0x15b63c=_0x28ef4f,_0x5a23cf=typeof _0x4bcca5[_0x15b63c(0x1a9)+'r']===_0x15b63c(0x21e)&&_0x4bcca5[_0x15b63c(0x1a9)+'r']['trim']()?_0x4bcca5[_0x15b63c(0x1a9)+'r']:undefined,_0x1ab484=await exportLogsArchive({'logsDir':configController[_0x15b63c(0x202)][_0x15b63c(0x14f)],'targetDir':_0x5a23cf,'appVersion':app[_0x15b63c(0x2f8)+'on']()});return mainLogger?.[_0x15b63c(0x151)](_0x15b63c(0x215)+'orted',{'path':toHomePath(_0x1ab484[_0x15b63c(0x11e)])}),_0x1ab484;}),_0x45571c(_0x28ef4f(0x37f)+_0x28ef4f(0x1b6)+'ory',async()=>{const _0x1db53c=_0x28ef4f;return await shell['openPath'](configController['paths'][_0x1db53c(0x14f)]),mainLogger?.[_0x1db53c(0x151)](_0x1db53c(0x32c)+_0x1db53c(0x1a8)+_0x1db53c(0x3b2),{'logsDir':toHomePath(configController[_0x1db53c(0x202)][_0x1db53c(0x14f)])}),{'ok':!![],'path':configController['paths']['logsDir']};}),_0x45571c(_0x28ef4f(0x35f)+'t',async()=>{const _0x2b5288=_0x28ef4f,_0x2fe362=await readdir(configController[_0x2b5288(0x202)][_0x2b5288(0x14f)],{'recursive':!![]})[_0x2b5288(0x2a3)](()=>[]);return _0x2fe362;}),_0x45571c('logs:rea'+'d',async(_0x35cb3b,_0x287c7f={})=>{const _0x444d1b=_0x28ef4f,_0x26a3da=String(_0x287c7f[_0x444d1b(0x11e)]||'');if(!_0x26a3da)throw new Error('path\x20is\x20'+_0x444d1b(0x26f));return readFile(_0x26a3da,'utf8');}),_0x45571c('files:re'+'ad',async(_0xd36e68,_0x4df9c3)=>{const _0x9b2291=_0x28ef4f,_0x5f4b4a=Date['now']();try{const _0x2a309c=await readFile(_0x4df9c3,_0x9b2291(0x154));return filesLogger?.[_0x9b2291(0x151)](_0x9b2291(0x2c8)+_0x9b2291(0x25f)+_0x9b2291(0x247),{'path':toHomePath(_0x4df9c3),'bytes':Buffer[_0x9b2291(0x33b)+'th'](_0x2a309c),'durationMs':Date[_0x9b2291(0x3f1)]()-_0x5f4b4a}),_0x2a309c;}catch(_0x29a11a){filesLogger?.[_0x9b2291(0x16a)](_0x9b2291(0x2c8)+_0x9b2291(0x166),{'path':toHomePath(_0x4df9c3),'durationMs':Date[_0x9b2291(0x3f1)]()-_0x5f4b4a,'error':summarizeError(_0x29a11a)});throw _0x29a11a;}}),_0x45571c('files:re'+_0x28ef4f(0x198)+'y',async(_0x431808,_0x109c77)=>{const _0x2e0ecf=_0x28ef4f,_0x168e0b=Date[_0x2e0ecf(0x3f1)]();try{const _0x3c5bad=await readFile(_0x109c77);return filesLogger?.[_0x2e0ecf(0x151)]('binary\x20f'+_0x2e0ecf(0x326)+_0x2e0ecf(0x173)+'ed',{'path':toHomePath(_0x109c77),'bytes':_0x3c5bad['byteLeng'+'th'],'durationMs':Date[_0x2e0ecf(0x3f1)]()-_0x168e0b}),new Uint8Array(_0x3c5bad);}catch(_0x5d5755){filesLogger?.[_0x2e0ecf(0x16a)](_0x2e0ecf(0x40a)+_0x2e0ecf(0x326)+_0x2e0ecf(0x2ee),{'path':toHomePath(_0x109c77),'durationMs':Date['now']()-_0x168e0b,'error':summarizeError(_0x5d5755)});throw _0x5d5755;}}),_0x45571c('files:wr'+_0x28ef4f(0x152),async(_0x287dfb,_0x28c5b7={})=>{const _0x2bffd1=_0x28ef4f,_0x16eb95=Date['now']();return await writeFile(_0x28c5b7['path'],_0x28c5b7[_0x2bffd1(0x3e7)]??'',_0x2bffd1(0x154)),filesLogger?.[_0x2bffd1(0x151)](_0x2bffd1(0x28a)+_0x2bffd1(0x32a)+'eted',{'path':toHomePath(_0x28c5b7[_0x2bffd1(0x11e)]),'bytes':Buffer[_0x2bffd1(0x33b)+'th'](String(_0x28c5b7[_0x2bffd1(0x3e7)]??'')),'durationMs':Date[_0x2bffd1(0x3f1)]()-_0x16eb95}),{'ok':!![]};}),_0x45571c(_0x28ef4f(0x252)+_0x28ef4f(0x2f4)+'ry',async(_0x116b79,_0x5b5367={})=>{const _0x3e87eb=_0x28ef4f,_0x227b9f=Date[_0x3e87eb(0x3f1)]();await writeFile(_0x5b5367[_0x3e87eb(0x11e)],Buffer[_0x3e87eb(0x1cd)](_0x5b5367['content']??[]));const _0x507935=await stat(_0x5b5367['path'])[_0x3e87eb(0x2a3)](()=>null);return filesLogger?.['info'](_0x3e87eb(0x40a)+_0x3e87eb(0x329)+_0x3e87eb(0x426)+'ted',{'path':toHomePath(_0x5b5367['path']),'bytes':_0x507935?.[_0x3e87eb(0x318)]??0x0,'durationMs':Date[_0x3e87eb(0x3f1)]()-_0x227b9f}),{'ok':!![]};}),_0x45571c(_0x28ef4f(0x1a5)+_0x28ef4f(0x3ab)+'e',async(_0x344319,_0x45cfeb={})=>{const _0x3725af=_0x28ef4f,_0x29437b=await dialog['showOpen'+'Dialog'](BrowserWindow[_0x3725af(0x1d6)+_0x3725af(0x3f7)](_0x344319[_0x3725af(0x23c)])??mainWindow,{'title':typeof _0x45cfeb['title']==='string'?_0x45cfeb['title']:undefined,'properties':[_0x3725af(0x2b1),..._0x45cfeb[_0x3725af(0x30f)+_0x3725af(0x153)]?[_0x3725af(0x30f)+_0x3725af(0x153)]:[]],'filters':Array[_0x3725af(0x37c)](_0x45cfeb[_0x3725af(0x12d)])?_0x45cfeb[_0x3725af(0x12d)]:undefined});return filesLogger?.[_0x3725af(0x151)](_0x3725af(0x1f2)+'ile\x20comp'+_0x3725af(0x1a7),{'canceled':_0x29437b[_0x3725af(0x129)],'count':_0x29437b[_0x3725af(0x23d)+'s'][_0x3725af(0x3e4)],'paths':_0x29437b[_0x3725af(0x23d)+'s'][_0x3725af(0x121)](toHomePath)}),{'canceled':_0x29437b[_0x3725af(0x129)],'paths':_0x29437b[_0x3725af(0x23d)+'s']};}),_0x45571c('files:li'+_0x28ef4f(0x1ba)+'tory',async(_0x327637,_0x5aa16b={})=>{const _0x14827a=_0x28ef4f,_0x331bc5=resolve(String(_0x5aa16b['path']||'')),_0x49c57d=_0x5aa16b[_0x14827a(0x290)+'e']!==![],_0x57b83a=Array['isArray'](_0x5aa16b[_0x14827a(0x185)+'ns'])?_0x5aa16b[_0x14827a(0x185)+'ns']['map'](_0x2404d7=>String(_0x2404d7)[_0x14827a(0x343)+'ase']()[_0x14827a(0x191)](/^\./,''))[_0x14827a(0x139)](Boolean):null,_0x67f7c7=Number[_0x14827a(0x270)+'r'](_0x5aa16b[_0x14827a(0x389)+'es'])&&_0x5aa16b['maxEntri'+'es']>0x0?_0x5aa16b[_0x14827a(0x389)+'es']:0xc350,_0x1336a7=[];let _0x5d9fb2=![];async function _0x57cac6(_0x4d8e63){const _0x2209f3=_0x14827a;if(_0x5d9fb2)return;let _0x508c7a;try{_0x508c7a=await readdir(_0x4d8e63,{'withFileTypes':!![]});}catch{return;}for(const _0x360a37 of _0x508c7a){if(_0x5d9fb2)return;if(_0x360a37['name'][_0x2209f3(0x1db)+'th']('.'))continue;const _0xf0348d=join(_0x4d8e63,_0x360a37[_0x2209f3(0x2fe)]);if(_0x360a37[_0x2209f3(0x281)+_0x2209f3(0x3d0)]()){if(_0x49c57d)await _0x57cac6(_0xf0348d);continue;}if(!_0x360a37[_0x2209f3(0x287)]())continue;if(_0x57b83a){const _0x4ae74c=_0x360a37[_0x2209f3(0x2fe)][_0x2209f3(0x33f)+_0x2209f3(0x364)]('.'),_0x7a9ff6=_0x4ae74c>=0x0?_0x360a37[_0x2209f3(0x2fe)][_0x2209f3(0x39f)](_0x4ae74c+0x1)[_0x2209f3(0x343)+_0x2209f3(0x209)]():'';if(!_0x57b83a[_0x2209f3(0x2b5)](_0x7a9ff6))continue;}if(_0x1336a7['length']>=_0x67f7c7){_0x5d9fb2=!![];return;}_0x1336a7['push']({'name':_0x360a37[_0x2209f3(0x2fe)],'path':_0xf0348d});}}return await _0x57cac6(_0x331bc5),{'path':_0x331bc5,'entries':_0x1336a7,'truncated':_0x5d9fb2};}),_0x45571c('files:se'+'lect-dir'+_0x28ef4f(0x417),async(_0xfa29d6,_0x7a0a86={})=>{const _0x5402b9=_0x28ef4f,_0x43b3a9=await dialog['showOpen'+_0x5402b9(0x391)](BrowserWindow[_0x5402b9(0x1d6)+_0x5402b9(0x3f7)](_0xfa29d6['sender'])??mainWindow,{'title':typeof _0x7a0a86[_0x5402b9(0x201)]===_0x5402b9(0x21e)?_0x7a0a86[_0x5402b9(0x201)]:undefined,'properties':[_0x5402b9(0x3e6)+'ctory']});return filesLogger?.[_0x5402b9(0x151)](_0x5402b9(0x41c)+_0x5402b9(0x2d0)+_0x5402b9(0x173)+'ed',{'canceled':_0x43b3a9['canceled'],'count':_0x43b3a9[_0x5402b9(0x23d)+'s']['length'],'paths':_0x43b3a9[_0x5402b9(0x23d)+'s'][_0x5402b9(0x121)](toHomePath)}),{'canceled':_0x43b3a9[_0x5402b9(0x129)],'paths':_0x43b3a9[_0x5402b9(0x23d)+'s']};}),_0x45571c(_0x28ef4f(0x26b)+_0x28ef4f(0x3da)+_0x28ef4f(0x26e),()=>_0x766744()['workspac'+'e']['director'+'yInfo']()),_0x45571c(_0x28ef4f(0x26b)+'e:open-d'+_0x28ef4f(0x2d0),async()=>{const _0x1c1050=_0x28ef4f,_0x1a8c21=await _0x766744()[_0x1c1050(0x26b)+'e'][_0x1c1050(0x1c7)+_0x1c1050(0x1ff)]();return await shell[_0x1c1050(0x205)](_0x1a8c21[_0x1c1050(0x11e)]),filesLogger?.[_0x1c1050(0x151)](_0x1c1050(0x26b)+_0x1c1050(0x36c)+_0x1c1050(0x28f)+'ed',{'path':toHomePath(_0x1a8c21['path'])}),{'ok':!![],'path':_0x1a8c21[_0x1c1050(0x11e)]};}),_0x45571c('workspac'+_0x28ef4f(0x3f9)+_0x28ef4f(0x1c0),()=>_0x766744()[_0x28ef4f(0x26b)+'e']['sharedCo'+_0x28ef4f(0x20f)]()),_0x45571c('workspac'+'e:write-'+'shared-c'+_0x28ef4f(0x38d),(_0x3b98ca,_0x3140fa)=>_0x766744()[_0x28ef4f(0x26b)+'e'][_0x28ef4f(0x3db)+_0x28ef4f(0x284)+'xt'](_0x3140fa)),_0x45571c(_0x28ef4f(0x37d)+_0x28ef4f(0x360),(_0x484c23,_0x3845a5)=>_0x766744()['sessions'][_0x28ef4f(0x15c)](_0x3845a5)),_0x45571c(_0x28ef4f(0x37d)+':pin',async(_0x3f6768,_0x3cdff1={})=>{const _0xfcd901=_0x28ef4f,_0x2c9302=String(_0x3cdff1[_0xfcd901(0x3f2)+'ey']||_0x3cdff1['key']||'')[_0xfcd901(0x1e8)]();if(!_0x2c9302)throw new Error(_0xfcd901(0x3f2)+'ey\x20is\x20re'+'quired');const _0x4948a5=await ensureSessionSqliteStore()[_0xfcd901(0x33e)+'dSession'+_0xfcd901(0x398)](),_0x23517c=await _0x766744()[_0xfcd901(0x37d)]['reorderP'+'inned']([_0x2c9302,..._0x4948a5[_0xfcd901(0x139)](_0x174383=>_0x174383!==_0x2c9302)]);return _0x23517c;}),_0x45571c(_0x28ef4f(0x37d)+_0x28ef4f(0x268),async(_0x37430a,_0x3f5836={})=>{const _0x11bf7e=_0x28ef4f,_0x4f9cf2=String(_0x3f5836[_0x11bf7e(0x3f2)+'ey']||_0x3f5836[_0x11bf7e(0x301)]||'')['trim']();if(!_0x4f9cf2)throw new Error(_0x11bf7e(0x3f2)+_0x11bf7e(0x3eb)+'quired');const _0x5863fe=await ensureSessionSqliteStore()[_0x11bf7e(0x33e)+_0x11bf7e(0x37b)+'Keys']();return await _0x766744()['sessions'][_0x11bf7e(0x223)+_0x11bf7e(0x3e8)](_0x5863fe['filter'](_0x5e4f69=>_0x5e4f69!==_0x4f9cf2));}),_0x45571c(_0x28ef4f(0x37d)+_0x28ef4f(0x19d)+_0x28ef4f(0x300),async(_0x554ae1,_0x5399b8={})=>{const _0x4465ce=_0x28ef4f,_0x55c703=Array['isArray'](_0x5399b8[_0x4465ce(0x3ba)])?_0x5399b8[_0x4465ce(0x3ba)]:_0x5399b8;return await _0x766744()[_0x4465ce(0x37d)][_0x4465ce(0x223)+_0x4465ce(0x3e8)](_0x55c703);}),_0x45571c(_0x28ef4f(0x34f)+_0x28ef4f(0x315),(_0xece50d,_0x4d5752)=>_0x766744()['skills'][_0x28ef4f(0x239)](_0x4d5752)),_0x45571c('cron:lis'+'t',(_0x9fae8a,_0x38267a)=>_0x766744()['cron'][_0x28ef4f(0x184)](_0x38267a)),_0x45571c(_0x28ef4f(0x159)+_0x28ef4f(0x3c0),(_0xaf7ba5,_0x10a1c2)=>_0x766744()[_0x28ef4f(0x2bc)][_0x28ef4f(0x3a2)](_0x10a1c2)),_0x45571c(_0x28ef4f(0x388)+'ate',(_0x54ca84,_0x3e3837)=>_0x766744()[_0x28ef4f(0x2bc)][_0x28ef4f(0x305)](_0x3e3837)),_0x45571c('cron:rem'+_0x28ef4f(0x3d5),(_0x5953af,_0x53939f)=>_0x766744()[_0x28ef4f(0x2bc)][_0x28ef4f(0x25b)](_0x53939f)),_0x45571c(_0x28ef4f(0x3c6)+_0x28ef4f(0x261),(_0x452b5,_0x593703)=>_0x766744()['cron']['runOnce'](_0x593703)),_0x45571c(_0x28ef4f(0x3dd)+'s',(_0xc82a42,_0x5d654e)=>_0x766744()[_0x28ef4f(0x2bc)][_0x28ef4f(0x1ab)](_0x5d654e)),_0x45571c(_0x28ef4f(0x195)+'omplete',async(_0x5f2a01,_0x4ef6cc={})=>{const _0xb2b690=_0x28ef4f,_0x3b7d7f=configController['resolveC'+'onfigPat'+'h'](),_0xb0d70d=JSON[_0xb2b690(0x18c)](await readFile(_0x3b7d7f,_0xb2b690(0x154))),_0x51268a=_0xb0d70d?.[_0xb2b690(0x14b)]?.[_0xb2b690(0x122)+'s']&&typeof _0xb0d70d[_0xb2b690(0x14b)]['provider'+'s']===_0xb2b690(0x262)?_0xb0d70d[_0xb2b690(0x14b)][_0xb2b690(0x122)+'s']:{},_0x588ca6=typeof _0xb0d70d?.['agents']?.[_0xb2b690(0x3c5)]?.['model']?.['primary']===_0xb2b690(0x21e)?_0xb0d70d[_0xb2b690(0x133)][_0xb2b690(0x3c5)]['model']['primary']:'',_0x22475f=String(_0x4ef6cc['model']||_0x588ca6||'');if(!_0x22475f[_0xb2b690(0x2b5)]('/'))throw new Error(_0xb2b690(0x1ed)+_0xb2b690(0x317)+_0xb2b690(0x380)+_0xb2b690(0x231)+'\x20a\x20provi'+'der/mode'+_0xb2b690(0x334));const _0x410a23=_0x22475f[_0xb2b690(0x240)]('/'),_0xa55677=_0x22475f[_0xb2b690(0x39f)](0x0,_0x410a23),_0x4bd549=_0x22475f[_0xb2b690(0x39f)](_0x410a23+0x1),_0x254bd0=_0x51268a[_0xa55677];if(!_0x254bd0||typeof _0x254bd0!==_0xb2b690(0x262))throw new Error(_0xb2b690(0x122)+_0xb2b690(0x352)+_0xb2b690(0x2a7)+'\x20'+_0xa55677);const _0x22eb87=String(_0x254bd0[_0xb2b690(0x2b7)]||'https://'+_0xb2b690(0x178)+_0xb2b690(0x273)+'1')[_0xb2b690(0x1e8)]()[_0xb2b690(0x191)](/\/$/,''),_0x56a217=await fetch(_0x22eb87+(_0xb2b690(0x34a)+_0xb2b690(0x12c)+'s'),{'method':_0xb2b690(0x21a),'headers':{'content-type':_0xb2b690(0x246)+_0xb2b690(0x19b),'Authorization':_0xb2b690(0x230)+(_0x254bd0[_0xb2b690(0x1f3)]||''),..._0x254bd0[_0xb2b690(0x363)]&&typeof _0x254bd0['headers']===_0xb2b690(0x262)?_0x254bd0[_0xb2b690(0x363)]:{}},'body':JSON[_0xb2b690(0x36a)+'y']({'model':_0x4bd549,'max_tokens':Number[_0xb2b690(0x270)+'r'](_0x4ef6cc['maxToken'+'s'])?_0x4ef6cc[_0xb2b690(0x1fc)+'s']:0x400,'temperature':typeof _0x4ef6cc[_0xb2b690(0x2f9)+_0xb2b690(0x335)]===_0xb2b690(0x378)?_0x4ef6cc[_0xb2b690(0x2f9)+'ure']:undefined,'messages':Array[_0xb2b690(0x37c)](_0x4ef6cc[_0xb2b690(0x29a)])?_0x4ef6cc[_0xb2b690(0x29a)]:[]}),'signal':AbortSignal[_0xb2b690(0x158)](Number[_0xb2b690(0x270)+'r'](_0x4ef6cc['timeoutM'+'s'])?_0x4ef6cc[_0xb2b690(0x2dd)+'s']:0x1d4c0)});if(!_0x56a217['ok']){const _0x5e9273=await _0x56a217[_0xb2b690(0x3d9)]();throw new Error(_0xb2b690(0x306)+_0xb2b690(0x308)+_0x56a217[_0xb2b690(0x260)]+':\x20'+_0x5e9273['slice'](0x0,0x190));}const _0x3aa17d=await _0x56a217[_0xb2b690(0x2fc)](),_0x221bf9=_0x3aa17d?.[_0xb2b690(0x210)]?.[0x0]?.[_0xb2b690(0x225)]??{};return{'content':extractModelMessageContent(_0x221bf9[_0xb2b690(0x3e7)]),'reasoning':typeof _0x221bf9[_0xb2b690(0x313)+'g_conten'+'t']==='string'?_0x221bf9['reasonin'+_0xb2b690(0x3bb)+'t']:'','model':_0x3aa17d?.['model']||_0x4bd549};}),_0x45571c(_0x28ef4f(0x366)+_0x28ef4f(0x347),()=>_0x766744()['models'][_0x28ef4f(0x188)]()),_0x45571c(_0x28ef4f(0x366)+_0x28ef4f(0x339)+_0x28ef4f(0x3fb),(_0x44ae0f,_0x4442e0)=>_0x766744()[_0x28ef4f(0x14b)]['setSetti'+_0x28ef4f(0x3fb)](_0x4442e0)),_0x45571c(_0x28ef4f(0x366)+_0x28ef4f(0x1d9)+_0x28ef4f(0x18b)+_0x28ef4f(0x3ea),(_0x42a612,_0x5cb048)=>_0x766744()[_0x28ef4f(0x14b)][_0x28ef4f(0x3b6)+'tedModel'+_0x28ef4f(0x3f6)+'re'](_0x5cb048)),_0x45571c(_0x28ef4f(0x366)+_0x28ef4f(0x13c)+_0x28ef4f(0x1bc),(_0x50077,_0x271a4b)=>_0x766744()['models']['setSelfO'+_0x28ef4f(0x354)+_0x28ef4f(0x36f)](_0x271a4b)),_0x45571c(_0x28ef4f(0x366)+_0x28ef4f(0x3fa)+_0x28ef4f(0x192),()=>_0x766744()[_0x28ef4f(0x14b)][_0x28ef4f(0x2dc)+'ModelId']()),_0x45571c(_0x28ef4f(0x195)+'ustom-mo'+_0x28ef4f(0x18a),()=>_0x766744()[_0x28ef4f(0x14b)][_0x28ef4f(0x2ef)+_0x28ef4f(0x18a)]()),_0x45571c(_0x28ef4f(0x3cc)+_0x28ef4f(0x25e)+_0x28ef4f(0x3cf)+_0x28ef4f(0x31f),async()=>{const _0x2d385d=_0x28ef4f,_0x15381d=await prepareRuntime(shellConfig,{'syncOnly':!![]});return await configController[_0x2d385d(0x24c)+_0x2d385d(0x1c8)+'ns'](),{'ok':!![],'syncedAt':new Date()[_0x2d385d(0x2e8)+_0x2d385d(0x3e0)](),'manifest':_0x15381d,'status':await getRuntimeResourceStatus()};}),_0x45571c(_0x28ef4f(0x3cc)+_0x28ef4f(0x35e)+_0x28ef4f(0x1e3),async()=>getRuntimeResourceStatus());}async function boot(){const _0x56f49a=_0x3bddf5;shellConfig=await loadShellConfig(resolveProjectRoot()),app[_0x56f49a(0x2b9)](shellConfig['productN'+_0x56f49a(0x186)]),configController=createConfigController(shellConfig),mainLogger=createShellLogger(configController[_0x56f49a(0x202)],_0x56f49a(0x1ec)),ipcLogger=createShellLogger(configController[_0x56f49a(0x202)],_0x56f49a(0x278)),filesLogger=createShellLogger(configController[_0x56f49a(0x202)],_0x56f49a(0x177)),rendererLogger=createShellLogger(configController['paths'],'renderer'),productRuntime=await loadProductRuntime();const _0x12e67d=resolveWujieApiEndpoint();diagnosticsWriter=createDiagnosticsWriter({'logsDir':configController[_0x56f49a(0x202)][_0x56f49a(0x14f)],'appContext':{'productName':shellConfig[_0x56f49a(0x279)+_0x56f49a(0x186)],'appId':shellConfig['appId'],'appVersion':app[_0x56f49a(0x2f8)+'on'](),'platform':process[_0x56f49a(0x251)],'arch':process[_0x56f49a(0x265)],..._0x12e67d?{'apiEndpoint':_0x12e67d}:{}}}),userEventWriter=createUserEventWriter({'logsDir':configController['paths'][_0x56f49a(0x14f)],'diagnosticsWriter':diagnosticsWriter}),updateController=createUpdateController({'shellConfig':shellConfig,'appName':()=>app['name'],'appVersion':()=>app[_0x56f49a(0x2f8)+'on'](),'broadcast':broadcast,'logger':mainLogger}),updateController[_0x56f49a(0x40f)+'ze'](),registerProcessLogHooks(),mainLogger?.['info']('electron'+_0x56f49a(0x3e3)+_0x56f49a(0x1ca)+'ed',{'appVersion':app[_0x56f49a(0x2f8)+'on'](),'electronVersion':process[_0x56f49a(0x126)]['electron'],'nodeVersion':process[_0x56f49a(0x126)][_0x56f49a(0x344)],'chromeVersion':process[_0x56f49a(0x126)][_0x56f49a(0x124)],'platform':process[_0x56f49a(0x251)],'arch':process[_0x56f49a(0x265)],'mode':getMode(),'projectRoot':shellConfig[_0x56f49a(0x263)+_0x56f49a(0x359)],'configPath':shellConfig[_0x56f49a(0x161)+'th'],'dataDir':shellConfig[_0x56f49a(0x3a1)],'logsDir':configController[_0x56f49a(0x202)][_0x56f49a(0x14f)],'rendererUrl':process.env.VITE_DEV_SERVER_URL||join(shellConfig['projectR'+_0x56f49a(0x359)],_0x56f49a(0x2da),_0x56f49a(0x2d5)+'ml')}),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app['getVersi'+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter,'sessionSqliteStore':ensureSessionSqliteStore()}),typeof productRuntime[_0x56f49a(0x1b5)+'roductCo'+_0x56f49a(0x1d4)]===_0x56f49a(0x1ad)&&await productRuntime[_0x56f49a(0x1b5)+'roductCo'+'nfig']({'configController':configController,'mainLogger':mainLogger}),typeof productRuntime[_0x56f49a(0x1b5)+_0x56f49a(0x2c5)+'ta']===_0x56f49a(0x1ad)?await productRuntime[_0x56f49a(0x1b5)+_0x56f49a(0x2c5)+'ta']({'configController':configController,'generatedFilesStore':ensureGeneratedFilesStore(),'mainLogger':mainLogger,'sessionSqliteStore':ensureSessionSqliteStore()}):await ensureGeneratedFilesStore()['ensureIn'+_0x56f49a(0x11b)+'d'](),attachGatewayBroadcastHandlers(gatewayController),await installIpcHandlers(),installClawspaceProtocolHandler(),registerShellShortcuts(),await createWindow(),await gatewayController['start'](),updateController[_0x56f49a(0x2e0)+_0x56f49a(0x2c2)+_0x56f49a(0x234)](),mainLogger?.['info'](_0x56f49a(0x19e)+_0x56f49a(0x3e3)+'ot\x20compl'+_0x56f49a(0x22d));}function registerProcessLogHooks(){const _0x36786f=_0x3bddf5;if(registerProcessLogHooks['register'+'ed'])return;registerProcessLogHooks['register'+'ed']=!![],process['on']('uncaught'+_0x36786f(0x3a9)+'n',_0x1a94a4=>{const _0x30d5c4=_0x36786f;mainLogger?.[_0x30d5c4(0x16a)](_0x30d5c4(0x31c)+_0x30d5c4(0x12a)+'on',summarizeError(_0x1a94a4));}),process['on'](_0x36786f(0x34e)+_0x36786f(0x2aa)+'on',_0x224760=>{const _0x346641=_0x36786f;mainLogger?.['error'](_0x346641(0x34e)+'d\x20reject'+_0x346641(0x375),summarizeError(_0x224760));}),app['on'](_0x36786f(0x409)+'rocess-g'+_0x36786f(0x280),(_0x4074f8,_0x65170b,_0xc42886)=>{const _0x10817b=_0x36786f;mainLogger?.['error'](_0x10817b(0x2c0)+_0x10817b(0x2ff)+_0x10817b(0x233),{'url':_0x65170b[_0x10817b(0x204)](),'details':_0xc42886});}),app['on'](_0x36786f(0x320)+_0x36786f(0x3fe)+'ne',(_0x3218db,_0x1bf05a)=>{const _0x431693=_0x36786f;mainLogger?.[_0x431693(0x16a)]('child\x20pr'+_0x431693(0x12e)+'ne',{'details':_0x1bf05a});});}app['on'](_0x3bddf5(0x1ea)+_0x3bddf5(0x29b)+'d',()=>{const _0x2ad7a5=_0x3bddf5;if(process['platform']!==_0x2ad7a5(0x407))app[_0x2ad7a5(0x2a4)]();}),app['on'](_0x3bddf5(0x312),async()=>{const _0x2d97e1=_0x3bddf5;if(isQuitting){app[_0x2d97e1(0x2a4)]();return;}updateController?.[_0x2d97e1(0x1d8)+_0x2d97e1(0x338)+_0x2d97e1(0x1fb)]('app_acti'+'vate'),BrowserWindow[_0x2d97e1(0x368)+_0x2d97e1(0x381)]()[_0x2d97e1(0x3e4)]===0x0&&shellConfig&&await createWindow();}),app['on'](_0x3bddf5(0x13f)+_0x3bddf5(0x28b),_0x5db692=>{const _0x206313=_0x3bddf5;isQuitting=!![],updateController?.['markQuit'+'Observed'](),terminalManager?.[_0x206313(0x1a0)](),terminalManager=null,productRuntimeHooks?.[_0x206313(0x1a0)]?.();for(const _0x49872f of Object[_0x206313(0x3ba)](productRuntimeHooks))delete productRuntimeHooks[_0x49872f];if(!gatewayController)return;mainLogger?.[_0x206313(0x151)](_0x206313(0x180)+_0x206313(0x357)+_0x206313(0x16f)+_0x206313(0x141)),_0x5db692['preventD'+_0x206313(0x140)](),void gatewayController['stop']()[_0x206313(0x3f8)](()=>{const _0x17bd4a=_0x206313;gatewayController=null,mainLogger?.['info'](_0x17bd4a(0x258)+_0x17bd4a(0x3b0)+_0x17bd4a(0x180)+_0x17bd4a(0x28b)),app[_0x17bd4a(0x2a4)]();});}),app['on'](_0x3bddf5(0x244)+'t',()=>{globalShortcut['unregist'+'er'](DEVTOOLS_ACCELERATOR);}),app[_0x3bddf5(0x3b5)+'y']()[_0x3bddf5(0x24e)](boot)['catch'](_0x23e809=>{const _0x20023f=_0x3bddf5;bootError=_0x23e809 instanceof Error?_0x23e809[_0x20023f(0x225)]:String(_0x23e809),mainLogger?.[_0x20023f(0x16a)]('electron'+_0x20023f(0x3e3)+_0x20023f(0x3e5)+'d',summarizeError(_0x23e809)),console[_0x20023f(0x16a)](_0x20023f(0x1e6)+_0x20023f(0x349)+_0x20023f(0x183)+_0x20023f(0x2b4)+'ctron\x20ma'+'in',_0x23e809);});
1
+ const _0x543b23=_0x53f4;(function(_0x3f87c0,_0x53394c){const _0x33e754=_0x53f4,_0x45376f=_0x3f87c0();while(!![]){try{const _0x98f6cd=parseInt(_0x33e754(0x1ec))/0x1*(parseInt(_0x33e754(0x2c3))/0x2)+parseInt(_0x33e754(0x2fb))/0x3+-parseInt(_0x33e754(0x14d))/0x4+-parseInt(_0x33e754(0x36c))/0x5+-parseInt(_0x33e754(0x205))/0x6*(-parseInt(_0x33e754(0x277))/0x7)+parseInt(_0x33e754(0x198))/0x8*(parseInt(_0x33e754(0x2f6))/0x9)+parseInt(_0x33e754(0x17e))/0xa*(-parseInt(_0x33e754(0x2c6))/0xb);if(_0x98f6cd===_0x53394c)break;else _0x45376f['push'](_0x45376f['shift']());}catch(_0x12d70e){_0x45376f['push'](_0x45376f['shift']());}}}(_0x16a7,0x6aefe));import _0x1c74e0 from'electron';import{fileURLToPath,pathToFileURL}from'node:url';import{dirname,join,resolve,sep}from'node:path';function _0x53f4(_0xbe75a2,_0x559551){_0xbe75a2=_0xbe75a2-0x64;const _0x16a718=_0x16a7();let _0x53f44d=_0x16a718[_0xbe75a2];return _0x53f44d;}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{createSessionSqliteStore}from'../sessions/session-sqlite-store.mjs';import{createTerminalManager}from'../terminal/manager.mjs';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';import{loadCreateUpdateController}from'../updates/loader.mjs';const __dirname=dirname(fileURLToPath(import.meta.url)),preloadPath=join(__dirname,_0x543b23(0x1da)+_0x543b23(0x2c0)),{app,BrowserWindow,clipboard,dialog,globalShortcut,ipcMain,protocol,shell}=_0x1c74e0,DEVTOOLS_ACCELERATOR=_0x543b23(0x1f4)+_0x543b23(0x248)+'+Shift+I',CLAWSPACE_PROTOCOL_SCHEME='clawspac'+'e',DEBUG_STDOUT=process.env.WUJIE_SHELL_DEBUG==='1'||process.env.VITE_DEV_SERVER_URL||process.env.NODE_ENV!==_0x543b23(0x88)+'on',LOCAL_FILE_MIME_TYPES=new Map([[_0x543b23(0x1fd),_0x543b23(0x203)+_0x543b23(0x2d9)+_0x543b23(0x10b)+'8'],[_0x543b23(0x9f),'text/mar'+_0x543b23(0x76)+_0x543b23(0x164)+_0x543b23(0x2ea)],[_0x543b23(0x1d7),_0x543b23(0x190)+'eg'],[_0x543b23(0x7b),_0x543b23(0x190)+'eg'],[_0x543b23(0xb4),'image/pn'+'g'],[_0x543b23(0x129),'image/gi'+'f'],[_0x543b23(0x1a4),'image/bm'+'p'],['.svg',_0x543b23(0x146)+_0x543b23(0x87)],[_0x543b23(0x140),_0x543b23(0x1d0)+'bp'],[_0x543b23(0x1c0),_0x543b23(0x108)+'4'],[_0x543b23(0x1a2),_0x543b23(0x334)+_0x543b23(0x37c)],[_0x543b23(0x188),_0x543b23(0x323)+_0x543b23(0x372)],[_0x543b23(0x107),_0x543b23(0x323)+_0x543b23(0x26b)],[_0x543b23(0x243),'video/we'+'bm'],[_0x543b23(0x2d7),_0x543b23(0x1f7)+'eg'],['.wav',_0x543b23(0x2b5)+'v'],[_0x543b23(0x31d),'audio/mp'+'4'],['.aac',_0x543b23(0x7e)+'c'],[_0x543b23(0x27a),_0x543b23(0x353)+'g'],['.flac',_0x543b23(0x1b6)+'ac']]);protocol[_0x543b23(0x2cf)+_0x543b23(0x2e3)+_0x543b23(0x244)+_0x543b23(0x193)]([{'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,generatedFilesStore=null,productRuntime=null,productRuntimeHooks={},sessionSqliteStore=null,diagnosticsWriter=null,userEventWriter=null,isQuitting=![],updateController=null;function attachGatewayBroadcastHandlers(_0x5c3c4a){const _0x128147=_0x543b23;for(const _0x196f48 of['gateway-'+_0x128147(0x7a),_0x128147(0x162)+_0x128147(0x283),_0x128147(0xd6)+_0x128147(0xbb)+'t','session-'+_0x128147(0x322),'sessions'+_0x128147(0x2e6)+'ated',_0x128147(0x1e8)+_0x128147(0x234),_0x128147(0xce)+'pdated','ask-user'+_0x128147(0x329)+'n']){_0x5c3c4a['on'](_0x196f48,_0x2fda82=>broadcast(_0x196f48,_0x2fda82));}}function ensureSessionSqliteStore(){const _0x1e5704=_0x543b23;if(sessionSqliteStore)return sessionSqliteStore;if(!configController)throw new Error('wujie-sh'+_0x1e5704(0x26a)+_0x1e5704(0x1b1)+'t\x20initia'+_0x1e5704(0x117));return sessionSqliteStore=createSessionSqliteStore({'stateDir':configController[_0x1e5704(0xb3)+'tateDir']()}),sessionSqliteStore;}function ensureGeneratedFilesStore(){const _0x4c5b06=_0x543b23;if(generatedFilesStore)return generatedFilesStore;if(!configController)throw new Error(_0x4c5b06(0x6c)+_0x4c5b06(0x26a)+_0x4c5b06(0x1b1)+_0x4c5b06(0x1e7)+'lized');return generatedFilesStore=createGeneratedFilesStore({'stateDir':configController[_0x4c5b06(0xb3)+'tateDir']()}),generatedFilesStore;}async function ensureGatewayControllerStarted(){const _0x210743=_0x543b23;if(gatewayController)return gatewayController;if(!shellConfig||!configController)throw new Error(bootError?_0x210743(0x6c)+_0x210743(0x2db)+_0x210743(0x1b4)+'\x20'+bootError:_0x210743(0x6c)+'ell\x20gate'+_0x210743(0x20f)+_0x210743(0x33a)+_0x210743(0x150));return mainLogger?.[_0x210743(0xcb)](_0x210743(0x1b3)+_0x210743(0x338)+'er\x20missi'+_0x210743(0x179)+_0x210743(0x291)),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app[_0x210743(0x1ad)+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter,'sessionSqliteStore':ensureSessionSqliteStore()}),attachGatewayBroadcastHandlers(gatewayController),await gatewayController[_0x210743(0x2e1)](),gatewayController;}function getMode(){const _0x2b94fd=_0x543b23;return process.env.VITE_DEV_SERVER_URL?_0x2b94fd(0x224):_0x2b94fd(0x339);}function isGatewayNotInitializedError(_0xa4ff2f){const _0x3d55e5=_0x543b23;return _0xa4ff2f instanceof Error&&_0xa4ff2f[_0x3d55e5(0xbf)]===_0x3d55e5(0x6c)+_0x3d55e5(0x225)+'way\x20is\x20n'+_0x3d55e5(0x33a)+'alized';}function revealPathInFolder(_0x297c1a){const _0x8d3f3=_0x543b23,_0x2db76e=String(_0x297c1a||'')['trim']();if(!_0x2db76e)return{'ok':![],'error':_0x8d3f3(0x33f)+_0x8d3f3(0x2f5)};return shell['showItem'+_0x8d3f3(0x2d3)](_0x2db76e),{'ok':!![]};}function resolveProjectRoot(){const _0x9395f4=_0x543b23;if(process.env.WUJIE_SHELL_PROJECT_ROOT)return resolve(process.env.WUJIE_SHELL_PROJECT_ROOT);if(app[_0x9395f4(0xe6)+'ed']&&process[_0x9395f4(0x6b)+'sPath'])return join(process[_0x9395f4(0x6b)+_0x9395f4(0x288)],_0x9395f4(0xed));return resolve(process[_0x9395f4(0x221)]());}function getLocalFileMimeType(_0x3ca542){const _0x1aabfb=_0x543b23;return LOCAL_FILE_MIME_TYPES[_0x1aabfb(0x2fc)](_0x3ca542[_0x1aabfb(0x2d2)](_0x3ca542[_0x1aabfb(0x11d)+_0x1aabfb(0x34e)]('.'))['toLowerC'+'ase']())||_0x1aabfb(0x1d4)+_0x1aabfb(0x2e2)+'t-stream';}function parseSingleRangeHeader(_0x34e880,_0x13d98a){const _0x56b5f0=_0x543b23,_0x493c28=/^bytes=(\d*)-(\d*)$/i[_0x56b5f0(0x85)](_0x34e880['trim']());if(!_0x493c28)return null;const [,_0x454e15,_0x4f74e5]=_0x493c28;if(!_0x454e15&&!_0x4f74e5)return null;if(!_0x454e15){const _0x4b9bf0=Number[_0x56b5f0(0x1df)](_0x4f74e5,0xa);if(!Number['isFinite'](_0x4b9bf0)||_0x4b9bf0<=0x0)return null;const _0x303c21=Math[_0x56b5f0(0x197)](_0x13d98a-_0x4b9bf0,0x0);return{'start':_0x303c21,'end':_0x13d98a-0x1};}const _0x55c70d=Number['parseInt'](_0x454e15,0xa);if(!Number[_0x56b5f0(0x294)](_0x55c70d)||_0x55c70d<0x0||_0x55c70d>=_0x13d98a)return null;const _0x3d7099=_0x4f74e5?Number[_0x56b5f0(0x1df)](_0x4f74e5,0xa):_0x13d98a-0x1;if(!Number[_0x56b5f0(0x294)](_0x3d7099)||_0x3d7099<_0x55c70d)return null;return{'start':_0x55c70d,'end':Math['min'](_0x3d7099,_0x13d98a-0x1)};}function decodeClawspacePath(_0x2766ca){const _0x57c3a6=_0x543b23;try{const _0x49a5e7=new URL(_0x2766ca);if(_0x49a5e7['protocol']!==CLAWSPACE_PROTOCOL_SCHEME+':')return null;if(_0x49a5e7[_0x57c3a6(0x2e5)]!==_0x57c3a6(0x302))return null;const _0x1831d0=decodeURIComponent(_0x49a5e7[_0x57c3a6(0x27e)]);if(!_0x1831d0)return null;if(/^\/[A-Za-z]:\//[_0x57c3a6(0x2ef)](_0x1831d0))return _0x1831d0[_0x57c3a6(0x2d2)](0x1);return _0x1831d0;}catch{return null;}}function createClawspaceHeaders(_0x62fc68={}){const _0x243d64=_0x543b23;return new Headers({'access-control-allow-origin':'*','access-control-allow-methods':'GET,\x20HEA'+'D,\x20OPTIO'+'NS','access-control-allow-headers':'range,\x20c'+_0x243d64(0x32b)+'ype','access-control-expose-headers':_0x243d64(0x27b)+_0x243d64(0x16d)+'content-'+'range,\x20a'+_0x243d64(0x1a3)+_0x243d64(0xbd),..._0x62fc68});}function createLocalFileResponse(_0x2b3ff9,_0x4a26ba){const _0x12e466=_0x543b23,_0x35d9cc=statSync(_0x4a26ba);if(!_0x35d9cc['isFile']())return new Response(_0x12e466(0x1d8)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x12e466(0x203)+_0x12e466(0x2d9)+_0x12e466(0x10b)+'8'})});const _0x38cd7d=getLocalFileMimeType(_0x4a26ba),_0x616859=createClawspaceHeaders({'content-type':_0x38cd7d,'accept-ranges':_0x12e466(0x1d2),'cache-control':_0x12e466(0x172)});if(_0x2b3ff9['method']===_0x12e466(0x73))return _0x616859[_0x12e466(0x22f)]('content-'+_0x12e466(0xa3),String(_0x35d9cc[_0x12e466(0x2a9)])),new Response(null,{'status':0xc8,'headers':_0x616859});const _0xdeb954=_0x2b3ff9[_0x12e466(0x2fd)][_0x12e466(0x2fc)](_0x12e466(0x169));if(!_0xdeb954)return _0x616859[_0x12e466(0x22f)]('content-'+_0x12e466(0xa3),String(_0x35d9cc[_0x12e466(0x2a9)])),new Response(Readable['toWeb'](createReadStream(_0x4a26ba)),{'status':0xc8,'headers':_0x616859});const _0x1edece=parseSingleRangeHeader(_0xdeb954,_0x35d9cc[_0x12e466(0x2a9)]);if(!_0x1edece)return new Response(null,{'status':0x1a0,'headers':createClawspaceHeaders({...Object[_0x12e466(0x1f3)+_0x12e466(0x247)](_0x616859[_0x12e466(0x177)]()),'content-range':_0x12e466(0x29b)+_0x35d9cc['size']})});const {start:_0xd3d9e6,end:_0x317e90}=_0x1edece,_0x15a911=_0x317e90-_0xd3d9e6+0x1,_0x410200=new Headers(_0x616859);return _0x410200['set'](_0x12e466(0x27b)+_0x12e466(0xa3),String(_0x15a911)),_0x410200[_0x12e466(0x22f)]('content-'+_0x12e466(0x169),_0x12e466(0x267)+_0xd3d9e6+'-'+_0x317e90+'/'+_0x35d9cc[_0x12e466(0x2a9)]),new Response(Readable['toWeb'](createReadStream(_0x4a26ba,{'start':_0xd3d9e6,'end':_0x317e90})),{'status':0xce,'headers':_0x410200});}function _0x16a7(){const _0x4b369b=['window:t',':diagnos','agent\x20al','maxEntri','register','content','sessionK','slice','InFolder','window:c','te\x20compl','install','.mp3','oot','in;\x20char','e\x20comple','ell\x20boot','ready','ocess-go','t:\x20','s:hide','ists','start','ion/octe','SchemesA','config:c','hostname','-invalid','-pinned','nnelEnab','relaunch','tf-8','ensureIn','ernal\x20ur','\x20shortcu','cron:upd','test','-session','s:list','ipc_requ','ishuRegi','eam','required','261MSLsxF','agent\x20id','saveKdoc','openDevT','dow\x20load','2033064sNQDpq','get','headers','platform','before-q','app:tray','models:c','local','index.mj','-restart','nts','saveTenc','multiSel','cron','rocess-g','ory','sConnect','node','ChannelC','canceled','resolveC','agentId','\x20found:\x20','listImCh','chat:abo','liConnec','select\x20f','\x20gone','child\x20pr','Dialog','ces.json','renderer','tabs:req','dCheck','.m4a','setOpenC','Config','saveWeco','skills:d','updated','video/x-','openclaw',':save-qq','webConte','zed','setSelfO','-questio','deleteIm','ontent-t','app:info','level','deleteFi',':choose','then','tease-ma','ector:\x20','payload','video/qu','filters',':save-te','logs','controll','prod','ot\x20initi','edWindow','-shortcu','hell]\x20fa','l\x20reques','path\x20is\x20','ocs','feishu','ileName','omplete','tateDir','mport-zi','folder','apiKey','reload','ate','-data','unmaximi','saveFeis','utf8','xOf','timeoutM','saveDing','timeout','startWec','audio/og','devtools','temp','sender','failed','\x20log','d\x20reject','imePlugi','atus',':input','agents','ion','getLogin','ontext','huChanne','\x20failed','logs\x20exp','ith-sess','includes','nt]','dSession','main','tic','uncaught','Exceptio','3645085VNWVAL','senderFr','et-selec','ssionKey','replace','filter','msvideo','l\x20prepar','ession','openFile','enable','startFei','em:open-','[wujie-s','ectory','Entry','icktime','et-self-','m-channe','saveCust','getFeish','uest-age','app_acti','projectR','agents:u','-life-cy','cron:cre','omModel','enClawSk','resource','wujie-sh','showSave','kdocs','ources','nabled','pop','darwin','HEAD','tChannel','tSession','kdown;\x20c','tabs-age','rated-fi','cron:lis','status','.jpeg','update-c','path','audio/aa','stion','onfig\x20up','hell:eve','deleteCu','split','gatewayP','exec','entExmai','g+xml','producti','l\x20first','ipc\x20requ','tus','agent\x20cr','ove','plugin\x20e','appId','vate','-request','d\x20failed','n-direct','ssion:\x20','ed:\x20','led','ai.com/v','extensio','/chat/co','saveQqbo','isMaximi','tp\x20','Bearer\x20','ory\x20open','.md','agent-','-context','maxToken','length','\x20to\x20load',':unpin','text','oken','ask-user','product','string','yInfo','und','settings','writeSha','activate','illEntry','logs:lis','code','resolveS','.png','enClawCo','wujiecla','ame','e\x20direct','s:delete',':set-clo','eam-even','agent_id','nges','tabs-com','message','default','push','writeTex','ctron\x20ma','ad-binar','parse','Custom','loadFile','filePath','productN','te:get-s','warn','inned','window:o','agents-u','cancelWe','skills:i','pluginId','window_f','logs:rea','customMo','lt\x20model','chat-str','context','IPC\x20requ','nConfig','openPath','parentSe','OPTIONS','ist','setImCha',':agent-m','plugins','uDocCliC','disable','CliConne','name','elected-','isPackag','tup:get','isDestro','child-pr',':delete','pping\x20ga','cancelKd','app.asar','upsert','Terminal',':run-onc','i-window','roductCo','orted','roductDa','getRecen','agents:w','s-maximi','ncident','ings','chat:str','ted',':save-ne','tedModel','ections','ectory\x20o','bin','pper\x20not','ngs','close',':status','ncent-ex',':downloa','.mkv','video/mp','getAppPa','config:r','set=utf-','render-p','d-state','ionEntry','stopped\x20','red;\x20set','config:i','app:file',':fork','setSetti','-url','complete','lized','sion','targetDi','ItemSett','lect-fil','getFocus','lastInde','-port','quit','files:se','product\x20','itialize','te:quit-','clawspac','annelCon','meta','requestB','mand','.gif','ncent-do','rayOnClo','tup:set','dispose','sync-bun','record','pen-devt','control','unhandle','files','elConfig','isabled','ase','huDocCon','director','ile\x20read','ell-cli.','readSess','models:s','focus','est_fail','wechat','.webp','promises','files:re','app:star','binary\x20f','talkDocC','image/sv','Keys','Updates','ot\x20start','plugins:','recursiv',':pin','1885680TbmIHS','choices','logs:exp','alized','json','files:li','match','openDire','ired','runtime\x20','ort','\x20not\x20con','nnel','node:fs/','toLowerC','stringif','irectory','meFilter','runOnce','lose','startKdo','gateway-','uri','harset=u','leted','nt-state','csCliCon','from','range','ap:entry',':complet','quired','length,\x20','.\x20Run\x20wu','redConte','e:open-d','reasonin','no-store','versions','sessions','toISOStr','groups','entries','ngtalk-d','ng;\x20recr','restart','-logs','readConf','arch','3403930GOdMOV','ontents','plugin\x20d','agents:d','\x20main\x20wi','setSelec','getState','eted','ssion','electron','.avi','ternally','model','will-qui','untimeHa','rver','Everywhe','tate','image/jp','ions-lis','elSessio','ged','oggle-ma',':save-fe',':open-cl','max','24072AbRuIY','function','-once','tabs:nav','trim','efault','s:upsert','uired','files:wr','cron:run','.mov','ccept-ra','.bmp','number','shell-ru','stop',':gateway','ot\x20compl','key','markConf','checkFor','getVersi','keys','hatChann','runtimeI','ig\x20is\x20no','ion/json','gateway\x20','\x20failed:','hidden','audio/fl','mChannel','ure','setName','t-messag',':rename','lawMcpSe','error','agent\x20de','les:hide','.mp4','-status','isArray','rename','updateOp','input','Invalid\x20','les:reve','e:shared','assign','est\x20fail','chat','d\x20comple','tabs:pos','n\x20loaded','handle','image/we','gatewayT','bytes','ximize','applicat','nnectSes','onfig','.jpg','Not\x20foun','paths','preload.','saveQqMa','captureI',':save-di','dist','parseInt','lawSkill','writeCon','torConfi','defaults','ools','est\x20comp','openExte','t\x20initia','agent-ev','figured:','minimize','showOpen','29QZHUFY','update','ntime','agents:l','info','reorderP','chatChan','fromEntr','CommandO','deletedS','abort','audio/mp','href','ted\x20conn','nfo','igWriteH','skills:s','.txt','\x20complet','shuDocCl','chrome','entDocsC','odels','text/pla','shared-c','39378okWsZQ','\x20is\x20requ','fromIpc',':start','unknown','selected','nstall','baseUrl','byteLeng','cle','way\x20is\x20n','hideBySe','onnector','product-','saveNetE','oad','preventD','generate','Version','ustom-mo','\x20request','enClawMc','history','primary','lawChann','unregist','answerAs','th\x20is\x20re','cwd','indexOf','e:direct','dev','ell\x20gate',':create','\x20a\x20provi','\x20excepti','POST','logsDir','plugin\x20c','\x20configu','map','workspac','set','ectSessi','whenRead','figs','all','ent','ettings','app:gene','delete','send','skills','\x20process','migrateP','jie-shel','create','eated','mpletion','provider','e:write-','get-conf','.webm','sPrivile','runtime:','ndows','ies','rControl','lect-dir',':cancel','isIntege','dataDir','markQuit','ocsCliCo','enClawCh','getPinne','com-chan','method','channelI','stomMode','nectSess','quitAndI','object','fig','uit',':answer-','ot\x20faile','Unsuppor','setLogin','window:i','ted-stat','deleteOp','getKdocs','title','cancelFe','uit:\x20sto','command','before\x20q','bytes\x20','pened','Observed','ell\x20conf','matroska','ndow','iled\x20to\x20','file\x20rea','nel','type','#f8fafc','ey\x20is\x20re','emoji',':list','unref','ntext','777WDYNQu','logs:ope','ocess\x20go','.ogg','content-','cCliConn','hell:ipc','pathname','list','h\x0aexec\x20\x22','dels','-refresh','log','keyDown','ile\x20comp','orConfig','ector\x20se','sPath','tLogs','app:upda','g_conten','before-i','agent\x20up','nelSessi','hide',':save-kd','eating','board:wr','index.ht','isFinite','ead','file\x20wri','nput-eve','ap:get','d\x20is\x20req','ishu-doc','bytes\x20*/','models','ite','getPath','e\x20first.','ProductR','elete','nfig','closeToT','artifact','feishu_d','manifest','avatar','getURL','size','select\x20d','-weixin','n\x20not\x20fo','les:dele','nectorCo','maximize','now','app:syst','ls:set-e','catch','ctory','audio/wa','cron:rem','ing','\x20main\x20bo','aseMailC','preferen','getAllWi','chat:his','fromWebC','ndlers','yed','mjs','sourcePa','terminal','33476nmXSTH','started','Update','11VnuTQE','logs:wri','Session','app:open','writeEve'];_0x16a7=function(){return _0x4b369b;};return _0x16a7();}function installClawspaceProtocolHandler(){const _0x2cb238=_0x543b23;protocol[_0x2cb238(0x1cf)](CLAWSPACE_PROTOCOL_SCHEME,_0x34f65c=>{const _0x44eebd=_0x2cb238;if(_0x34f65c[_0x44eebd(0x252)]===_0x44eebd(0xdc))return new Response(null,{'status':0xcc,'headers':createClawspaceHeaders()});const _0x339a4f=decodeClawspacePath(_0x34f65c['url']);if(!_0x339a4f)return new Response(_0x44eebd(0x1c6)+_0x44eebd(0x124)+'e\x20url',{'status':0x190,'headers':createClawspaceHeaders({'content-type':_0x44eebd(0x203)+_0x44eebd(0x2d9)+'set=utf-'+'8'})});if(!existsSync(_0x339a4f))return new Response(_0x44eebd(0x1d8)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x44eebd(0x203)+_0x44eebd(0x2d9)+_0x44eebd(0x10b)+'8'})});return createLocalFileResponse(_0x34f65c,_0x339a4f);});}function broadcast(_0x4df50f,_0x44752c){const _0x5c0294=_0x543b23;DEBUG_STDOUT&&console[_0x5c0294(0x1f0)](_0x5c0294(0x379)+_0x5c0294(0x81)+_0x5c0294(0x366),_0x4df50f,summarizePayload(_0x44752c,{'maxDepth':0x2}));for(const _0x5f0a92 of BrowserWindow[_0x5c0294(0x2bb)+_0x5c0294(0x246)]()){!_0x5f0a92[_0x5c0294(0x326)+_0x5c0294(0x305)][_0x5c0294(0xe8)+_0x5c0294(0x2bf)]()&&_0x5f0a92[_0x5c0294(0x326)+'nts']['send'](_0x5c0294(0x6c)+'ell:even'+'t',{'name':_0x4df50f,'payload':_0x44752c});}}async function loadProductRuntime(){const _0x2926b9=_0x543b23,_0x4df9cb=[join(shellConfig[_0x2926b9(0x65)+_0x2926b9(0x2d8)],_0x2926b9(0x1a6)+_0x2926b9(0x1ee),_0x2926b9(0x303)+'s'),join(app[_0x2926b9(0x109)+'th'](),'shell-ru'+'ntime',_0x2926b9(0x303)+'s')],_0x55f571=_0x4df9cb['find'](_0x1dc496=>existsSync(_0x1dc496));if(!_0x55f571)return mainLogger?.[_0x2926b9(0x1f0)]('product\x20'+_0x2926b9(0x156)+'extensio'+_0x2926b9(0x2ac)+_0x2926b9(0xac),{'runtimeCandidates':_0x4df9cb}),{};try{const _0x4a9b23=await import(pathToFileURL(_0x55f571)[_0x2926b9(0x1f8)]);return mainLogger?.[_0x2926b9(0x1f0)](_0x2926b9(0x121)+_0x2926b9(0x156)+_0x2926b9(0x98)+_0x2926b9(0x1ce),{'runtimePath':_0x55f571}),_0x4a9b23;}catch(_0x3c4c76){mainLogger?.[_0x2926b9(0x1bd)](_0x2926b9(0x121)+'runtime\x20'+'extensio'+'n\x20failed'+_0x2926b9(0xa4),{'runtimePath':_0x55f571,'error':summarizeError(_0x3c4c76)});throw _0x3c4c76;}}function openDevToolsForActiveContext(){const _0x4e6b7c=_0x543b23,_0x276b56=BrowserWindow[_0x4e6b7c(0x11c)+_0x4e6b7c(0x33b)]()||mainWindow;if(!_0x276b56||_0x276b56[_0x4e6b7c(0xe8)+'yed']())return{'ok':![]};return _0x276b56[_0x4e6b7c(0x326)+_0x4e6b7c(0x305)]['openDevT'+_0x4e6b7c(0x1e4)]({'mode':'detach'}),_0x276b56[_0x4e6b7c(0x326)+_0x4e6b7c(0x305)][_0x4e6b7c(0x238)](_0x4e6b7c(0x6c)+'ell:even'+'t',{'name':_0x4e6b7c(0x354)+_0x4e6b7c(0x33c)+'t','payload':{'accelerator':DEVTOOLS_ACCELERATOR}}),{'ok':!![]};}function registerShellShortcuts(){const _0x4024a7=_0x543b23;globalShortcut[_0x4024a7(0x21e)+'er'](DEVTOOLS_ACCELERATOR);const _0xe70e0c=globalShortcut[_0x4024a7(0x2cf)](DEVTOOLS_ACCELERATOR,openDevToolsForActiveContext);!_0xe70e0c&&console[_0x4024a7(0xcb)]('[wujie-s'+_0x4024a7(0x33d)+_0x4024a7(0x26d)+_0x4024a7(0x2cf)+_0x4024a7(0x2ed)+_0x4024a7(0x2de)+DEVTOOLS_ACCELERATOR);}async function getRuntimeResourceStatus(){const _0x42f13f=_0x543b23;try{const _0x454e46=await loadRuntimeInfo(shellConfig[_0x42f13f(0x65)+_0x42f13f(0x2d8)]),_0x55a18b=_0x454e46[_0x42f13f(0x2a6)]||{};return{'ok':!![],'runtimeRoot':_0x454e46['runtimeR'+_0x42f13f(0x2d8)],'openclawVersion':_0x454e46[_0x42f13f(0x324)+_0x42f13f(0x217)],'generatedAt':_0x55a18b[_0x42f13f(0x216)+'dAt']||null,'pluginCount':Array[_0x42f13f(0x1c2)](_0x55a18b[_0x42f13f(0xe0)])?_0x55a18b[_0x42f13f(0xe0)]['length']:0x0,'plugins':Array[_0x42f13f(0x1c2)](_0x55a18b[_0x42f13f(0xe0)])?_0x55a18b[_0x42f13f(0xe0)]:[],'agents':_0x55a18b[_0x42f13f(0x35d)]||null,'skills':_0x55a18b[_0x42f13f(0x239)]||null,'wrapper':_0x55a18b[_0x42f13f(0xb6)+'wBin']||null,'product':_0x55a18b[_0x42f13f(0xa9)]||null};}catch(_0x4d5ad8){return{'ok':![],'runtimeRoot':resolveRuntimeRoot(shellConfig?.['projectR'+'oot']||resolveProjectRoot()),'error':_0x4d5ad8 instanceof Error?_0x4d5ad8[_0x42f13f(0xbf)]:String(_0x4d5ad8)};}}async function createWindow(){const _0x470bce=_0x543b23,_0x154050=process.env.VITE_DEV_SERVER_URL||join(shellConfig[_0x470bce(0x65)+_0x470bce(0x2d8)],_0x470bce(0x1de),_0x470bce(0x293)+'ml'),_0x1fb2ad=process[_0x470bce(0x2fe)]===_0x470bce(0x72);mainLogger?.[_0x470bce(0x1f0)]('creating'+_0x470bce(0x182)+_0x470bce(0x26c),{'rendererUrl':_0x154050,'mode':getMode()}),mainWindow=new BrowserWindow({'width':0x49c,'height':0x30c,'minWidth':0x384,'minHeight':0x26c,'title':shellConfig[_0x470bce(0xc9)+_0x470bce(0xb7)],'backgroundColor':_0x1fb2ad?'#0000000'+'0':_0x470bce(0x271),'titleBarStyle':_0x1fb2ad?_0x470bce(0x1b5):_0x470bce(0xc0),..._0x1fb2ad?{'titleBarOverlay':!![],'trafficLightPosition':{'x':0x10,'y':0xc}}:{},..._0x1fb2ad?{'vibrancy':'sidebar'}:{},'webPreferences':{'preload':preloadPath,'contextIsolation':!![],'nodeIntegration':![],'sandbox':![]}}),mainWindow[_0x470bce(0x326)+_0x470bce(0x305)]['on'](_0x470bce(0x28c)+_0x470bce(0x297)+'nt',_0x3adfa2=>{const _0x2d159e=_0x470bce,_0x4e75a1=_0x3adfa2[_0x2d159e(0x1c5)];if(!_0x4e75a1||_0x4e75a1[_0x2d159e(0x270)]!==_0x2d159e(0x284))return;const _0x41290d=String(_0x4e75a1['key']||'')[_0x2d159e(0x15b)+_0x2d159e(0x136)](),_0x10910c=_0x41290d==='r',_0x179588=process[_0x2d159e(0x2fe)]===_0x2d159e(0x72)?_0x4e75a1[_0x2d159e(0x126)]===!![]:_0x4e75a1[_0x2d159e(0x131)]===!![];if(!_0x10910c||!_0x179588)return;_0x3adfa2[_0x2d159e(0x215)+'efault'](),broadcast('tabs-com'+_0x2d159e(0x128),{'type':'navigati'+'on','action':_0x2d159e(0x348)});}),mainWindow['on'](_0x470bce(0x13d),()=>{const _0x2c0cec=_0x470bce;updateController?.[_0x2c0cec(0x127)+'ackgroun'+_0x2c0cec(0x31c)](_0x2c0cec(0xd2)+'ocus');});const _0x510547=process.env.VITE_DEV_SERVER_URL;_0x510547?(await mainWindow['loadURL'](_0x510547),process.env.WUJIE_SHELL_OPEN_DEVTOOLS==='1'&&mainWindow[_0x470bce(0x326)+_0x470bce(0x305)][_0x470bce(0x2f9)+_0x470bce(0x1e4)]({'mode':'detach'})):await mainWindow[_0x470bce(0xc7)](join(shellConfig['projectR'+_0x470bce(0x2d8)],_0x470bce(0x1de),'index.ht'+'ml')),mainLogger?.[_0x470bce(0x1f0)]('main\x20win'+_0x470bce(0x2fa)+'ed',{'rendererUrl':_0x154050,'mode':getMode()});}async function installIpcHandlers(){const _0x18367f=_0x543b23,_0x10a429=(_0x3e2880,_0x1b68f5)=>{const _0x3ab545=_0x53f4;ipcMain[_0x3ab545(0x1cf)](_0x3e2880,async(_0x5b2f90,_0x9aba3d)=>{const _0x2f386a=_0x3ab545,_0x30771a=Date[_0x2f386a(0x2b0)](),_0x5d9dfd=_0x5b2f90[_0x2f386a(0x36d)+_0x2f386a(0xb7)]?.['url']||_0x5b2f90[_0x2f386a(0x356)][_0x2f386a(0x2a8)]();ipcLogger?.[_0x2f386a(0x1f0)](_0x2f386a(0x8a)+'est\x20star'+_0x2f386a(0xfb),{'channel':_0x3e2880,'senderUrl':_0x5d9dfd,'payload':summarizePayload(_0x9aba3d)});DEBUG_STDOUT&&console['info'](_0x2f386a(0x379)+_0x2f386a(0x27d)+']',_0x3e2880,_0x2f386a(0x2c4),summarizePayload(_0x9aba3d));try{let _0x432f13;try{_0x432f13=await _0x1b68f5(_0x5b2f90,_0x9aba3d);}catch(_0x5b72ee){if(!isGatewayNotInitializedError(_0x5b72ee))throw _0x5b72ee;await ensureGatewayControllerStarted(),_0x432f13=await _0x1b68f5(_0x5b2f90,_0x9aba3d);}const _0x2c8085=Date['now']()-_0x30771a;return ipcLogger?.['info']('ipc\x20requ'+_0x2f386a(0x1e5)+'leted',{'channel':_0x3e2880,'durationMs':_0x2c8085,'result':summarizePayload(_0x432f13,{'maxDepth':0x2})}),await userEventWriter?.[_0x2f386a(0x207)]({'channel':_0x3e2880,'payload':_0x9aba3d,'result':_0x432f13,'durationMs':_0x2c8085,'status':'succeede'+'d'}),DEBUG_STDOUT&&console['info'](_0x2f386a(0x379)+'hell:ipc'+']',_0x3e2880,_0x2f386a(0x116)+'d',summarizePayload(_0x432f13,{'maxDepth':0x2})),_0x432f13;}catch(_0x46cb24){const _0x204055=Date['now']()-_0x30771a;ipcLogger?.[_0x2f386a(0x1bd)](_0x2f386a(0x8a)+_0x2f386a(0x1ca)+'ed',{'channel':_0x3e2880,'durationMs':_0x204055,'error':summarizeError(_0x46cb24)}),await userEventWriter?.[_0x2f386a(0x207)]({'channel':_0x3e2880,'payload':_0x9aba3d,'error':_0x46cb24,'durationMs':_0x204055,'status':_0x2f386a(0x357)}),await diagnosticsWriter?.[_0x2f386a(0x1dc)+_0x2f386a(0xf8)](diagnosticEventFromError(_0x46cb24,{'category':'ipc','event':_0x2f386a(0x2f2)+_0x2f386a(0x13e)+'ed','message':_0x2f386a(0xd8)+'est\x20fail'+_0x2f386a(0x95)+_0x3e2880,'durationMs':_0x204055,'meta':{'channel':_0x3e2880,'senderUrl':_0x5d9dfd,'payload':summarizePayload(_0x9aba3d)}}));DEBUG_STDOUT&&console[_0x2f386a(0x1bd)](_0x2f386a(0x379)+'hell:ipc'+']',_0x3e2880,_0x2f386a(0x357),summarizeError(_0x46cb24));throw _0x46cb24;}});},_0x1d533c=()=>{const _0x3493e1=_0x53f4;if(!gatewayController)throw new Error(bootError?_0x3493e1(0x6c)+_0x3493e1(0x2db)+_0x3493e1(0x1b4)+'\x20'+bootError:_0x3493e1(0x6c)+_0x3493e1(0x225)+'way\x20is\x20n'+_0x3493e1(0x33a)+_0x3493e1(0x150));return gatewayController;},_0x25596d=()=>{const _0x124cdc=_0x53f4;if(typeof productRuntime[_0x124cdc(0x2cf)+'ProductR'+_0x124cdc(0x18c)+_0x124cdc(0x2be)]!==_0x124cdc(0x199))return;const _0x137756=productRuntime[_0x124cdc(0x2cf)+_0x124cdc(0x2a0)+_0x124cdc(0x18c)+_0x124cdc(0x2be)]({'app':app,'BrowserWindow':BrowserWindow,'broadcast':broadcast,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'dialog':dialog,'exportLogsArchive':exportLogsArchive,'filesLogger':filesLogger,'getRuntimeSpawnContext':getRuntimeSpawnContext,'handle':_0x10a429,'mainLogger':mainLogger,'mainWindow':mainWindow,'rendererLogger':rendererLogger,'requireGateway':_0x1d533c,'sep':sep,'openClawConfigHandlers':{'update':(..._0x11a8d3)=>configController[_0x124cdc(0x1c4)+_0x124cdc(0xb5)+_0x124cdc(0x2a2)](..._0x11a8d3),'setPluginConfig':_0x532cbf=>configController[_0x124cdc(0x31e)+'lawPlugi'+_0x124cdc(0xd9)](_0x532cbf),'setChannelConfig':_0x2b23fc=>configController[_0x124cdc(0x31e)+_0x124cdc(0x21d)+'elConfig'](_0x2b23fc),'deleteChannelConfig':_0x564bc2=>configController[_0x124cdc(0x260)+'enClawCh'+'annelCon'+_0x124cdc(0x258)](_0x564bc2),'setSkillEntry':_0x303ae7=>configController[_0x124cdc(0x31e)+_0x124cdc(0x1e0)+_0x124cdc(0x37b)](_0x303ae7),'deleteSkillEntry':_0x6febab=>configController['deleteOp'+_0x124cdc(0x6a)+'illEntry'](_0x6febab),'setMcpServer':_0x538bbd=>configController['setOpenC'+_0x124cdc(0x1bc)+_0x124cdc(0x18d)](_0x538bbd),'deleteMcpServer':_0x2aa8fe=>configController[_0x124cdc(0x260)+_0x124cdc(0x21a)+'pServer'](_0x2aa8fe)},'shell':shell,'shellConfig':shellConfig,'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand,'summarizePayload':summarizePayload,'summarizeText':summarizeText,'toHomePath':toHomePath,'writeMutableConfig':_0x1f5818})||{};Object[_0x124cdc(0x1c9)](productRuntimeHooks,_0x137756);};_0x10a429(_0x18367f(0x32c),async()=>({'name':shellConfig[_0x18367f(0xc9)+'ame'],'version':app[_0x18367f(0x1ad)+'on'](),'appId':shellConfig[_0x18367f(0x8f)],'dataDir':shellConfig[_0x18367f(0x24c)]})),_0x10a429(_0x18367f(0x2c9)+_0x18367f(0x115),async(_0x4866c4,_0x34cd80)=>{const _0x1b68a8=_0x18367f,_0x474be4=typeof _0x34cd80===_0x1b68a8(0xaa)?_0x34cd80:'';if(!_0x474be4)return{'ok':![]};return filesLogger?.[_0x1b68a8(0x1f0)]('open\x20ext'+_0x1b68a8(0x2ec)+_0x1b68a8(0x33e)+_0x1b68a8(0xfb),{'url':summarizeText(_0x474be4,0xa0)}),await shell[_0x1b68a8(0x1e6)+'rnal'](_0x474be4),{'ok':!![]};});const _0x1f5818=async(_0x274b1e,_0x4662f5)=>{const _0x15708a=_0x18367f;return configController[_0x15708a(0x1ab)+_0x15708a(0x1fb)+'andledIn'+_0x15708a(0x189)](),await configController[_0x15708a(0x1e1)+_0x15708a(0x258)](_0x274b1e,_0x4662f5),{'ok':!![]};};_0x25596d(),_0x10a429(_0x18367f(0xd0)+_0x18367f(0x345)+'p',async(_0x1dbdcd,_0x2b13aa)=>importMarketSkillZip({'payload':_0x2b13aa,'importSkillZip':_0xc14680=>importSkillZip({..._0xc14680,'app':app,'dialog':dialog,'dialogWindow':BrowserWindow['fromWebC'+_0x18367f(0x17f)](_0x1dbdcd[_0x18367f(0x356)])||mainWindow,'configController':configController}),'configController':configController})),_0x10a429('skills:u'+'pdate',(_0x63b567,_0x4362a3)=>updateManagedSkillConfig({'payload':_0x4362a3,'configController':configController})),_0x10a429(_0x18367f(0x321)+_0x18367f(0x2a1),(_0xec0580,_0x314ba5)=>deleteMarketSkillRegistryEntry({'payload':_0x314ba5,'deleteManagedSkill':_0x3d743c=>deleteManagedSkill({..._0x3d743c,'gateway':_0x1d533c(),'configController':configController}),'configController':configController}));const _0x38edc9=ensureGeneratedFilesStore();_0x10a429(_0x18367f(0x236)+'rated-fi'+'les:list',async()=>_0x38edc9[_0x18367f(0x27f)]()),_0x10a429(_0x18367f(0x236)+_0x18367f(0x78)+'les:upse'+'rt',async(_0x178162,_0x47d893={})=>_0x38edc9[_0x18367f(0xee)](_0x47d893)),_0x10a429(_0x18367f(0x236)+_0x18367f(0x78)+_0x18367f(0x1bf),async(_0x134481,_0x1fd2f9)=>_0x38edc9['hide'](String(_0x1fd2f9||''))),_0x10a429(_0x18367f(0x236)+_0x18367f(0x78)+_0x18367f(0x1bf)+'-by-sess'+_0x18367f(0x35e),async(_0x1ee99b,_0x1112b0)=>_0x38edc9[_0x18367f(0x210)+_0x18367f(0x186)](String(_0x1112b0||''))),_0x10a429(_0x18367f(0x236)+'rated-fi'+_0x18367f(0x2ad)+'te',async(_0x2cb1ab,_0x86b27f)=>_0x38edc9['deleteFi'+'le'](String(_0x86b27f||''))),_0x10a429('app:gene'+_0x18367f(0x78)+_0x18367f(0x2ad)+_0x18367f(0x25f)+'e',async(_0x4a3895,_0x1849ee=[])=>_0x38edc9[_0x18367f(0x1f5)+'tate'](_0x1849ee)),_0x10a429(_0x18367f(0x236)+_0x18367f(0x78)+_0x18367f(0x1c7)+'al',async(_0x136bc3,_0x4d3d40)=>revealPathInFolder(_0x4d3d40)),_0x10a429(_0x18367f(0x2a4)+_0x18367f(0x2f1),async()=>_0x38edc9[_0x18367f(0x27f)]()),_0x10a429('artifact'+_0x18367f(0x19e),async(_0x2a76f5,_0x4d3a78={})=>_0x38edc9[_0x18367f(0xee)](_0x4d3a78)),_0x10a429(_0x18367f(0x2a4)+_0x18367f(0x2df),async(_0x3f64b3,_0x125bc2={})=>_0x38edc9[_0x18367f(0x28f)](String(_0x125bc2['id']||_0x125bc2||''))),_0x10a429(_0x18367f(0x2a4)+'s:delete',async(_0x1553df,_0x27da5d={})=>_0x38edc9[_0x18367f(0x32e)+'le'](String(_0x27da5d['id']||_0x27da5d||''))),_0x10a429(_0x18367f(0x2a4)+_0x18367f(0xb9)+_0x18367f(0x10d),async(_0x19f3f4,_0x3af715={})=>_0x38edc9[_0x18367f(0x1f5)+_0x18367f(0x18f)](_0x3af715[_0x18367f(0x1d9)]||_0x3af715)),_0x10a429('artifact'+'s:reveal',async(_0x5cf9c5,_0x31394f={})=>{const _0x256792=_0x18367f,_0xd964ce=typeof _0x31394f===_0x256792(0xaa)?_0x31394f:_0x31394f['path']||_0x31394f[_0x256792(0x163)];return revealPathInFolder(_0xd964ce);});const _0x11ceda=createPreferencesStore({'stateDir':configController[_0x18367f(0xb3)+'tateDir'](),'storeFile':_0x18367f(0x212)+_0x18367f(0x2ba)+_0x18367f(0x319)});_0x10a429(_0x18367f(0x300)+':get-clo'+'se',async()=>_0x11ceda[_0x18367f(0x2fc)]('closeToT'+_0x18367f(0x12b)+'se',![])),_0x10a429(_0x18367f(0x300)+_0x18367f(0xba)+'se',async(_0x560e8c,_0x3a8d41)=>_0x11ceda['set'](_0x18367f(0x2a3)+_0x18367f(0x12b)+'se',_0x3a8d41===!![])),registerFileHandlers({'app':app,'filesLogger':filesLogger,'handle':_0x10a429,'sep':sep,'stateDir':configController['resolveS'+_0x18367f(0x344)](),'toHomePath':toHomePath}),registerProductLogHandlers({'app':app,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'exportLogsArchive':exportLogsArchive,'handle':_0x10a429,'mainLogger':mainLogger,'rendererLogger':rendererLogger,'summarizeText':summarizeText,'toHomePath':toHomePath}),registerModelHandlers({'handle':_0x10a429,'modelHandlers':{'saveCustomModel':_0x1d6f1c=>_0x1d533c()[_0x18367f(0x29c)][_0x18367f(0x37f)+_0x18367f(0x69)](_0x1d6f1c),'deleteCustomModel':_0x414754=>_0x1d533c()[_0x18367f(0x29c)][_0x18367f(0x82)+_0x18367f(0x254)+'l'](_0x414754)}}),connectorController=createConnectorController({'shellConfig':shellConfig,'configController':configController,'broadcast':broadcast,'shell':shell,'getRuntimeSpawnContext':getRuntimeSpawnContext,'openClawConfigHandlers':{'update':(..._0x238eb2)=>configController[_0x18367f(0x1c4)+'enClawCo'+'nfig'](..._0x238eb2),'setPluginConfig':_0x54ab9d=>configController[_0x18367f(0x31e)+'lawPlugi'+_0x18367f(0xd9)](_0x54ab9d),'setChannelConfig':_0x4614a5=>configController[_0x18367f(0x31e)+_0x18367f(0x21d)+_0x18367f(0x134)](_0x4614a5),'deleteChannelConfig':_0x47e18e=>configController[_0x18367f(0x260)+_0x18367f(0x24f)+_0x18367f(0x125)+_0x18367f(0x258)](_0x47e18e),'setSkillEntry':_0x8a159c=>configController['setOpenC'+_0x18367f(0x1e0)+'Entry'](_0x8a159c),'deleteSkillEntry':_0x2ac42c=>configController[_0x18367f(0x260)+_0x18367f(0x6a)+_0x18367f(0xb0)](_0x2ac42c),'setMcpServer':_0x3861f4=>configController['setOpenC'+_0x18367f(0x1bc)+'rver'](_0x3861f4),'deleteMcpServer':_0xcc042=>configController['deleteOp'+'enClawMc'+'pServer'](_0xcc042)},'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand}),_0x10a429(_0x18367f(0x111)+_0x18367f(0x37e)+'ls:list',async()=>connectorController[_0x18367f(0x312)+_0x18367f(0x125)+_0x18367f(0x232)]()),_0x10a429('config:i'+_0x18367f(0x37e)+'ls:delet'+'e',async(_0x41bf90,_0x5e875e={})=>connectorController[_0x18367f(0x32a)+_0x18367f(0x30d)+'onfig'](_0x5e875e)),_0x10a429('config:i'+_0x18367f(0x37e)+_0x18367f(0x2b2)+_0x18367f(0x70),async(_0x441858,_0x5ef64e={})=>connectorController[_0x18367f(0xde)+_0x18367f(0x2e8)+_0x18367f(0x96)](_0x5ef64e)),_0x10a429(_0x18367f(0x2e4)+'onnector'+':save',async(_0x513b45,_0x57f93b={})=>{const _0x4a3770=_0x18367f,_0x56fd70=String(_0x57f93b[_0x4a3770(0x253)+'d']||_0x57f93b[_0x4a3770(0x333)]?.['channelI'+'d']||_0x57f93b[_0x4a3770(0x333)]?.['id']||'');if(!_0x56fd70)throw new Error(_0x4a3770(0x253)+_0x4a3770(0x299)+_0x4a3770(0x19f));const _0x2da110=_0x57f93b[_0x4a3770(0x333)]||_0x57f93b,_0x42c6fd={'feishu':connectorController['saveFeis'+_0x4a3770(0x361)+'lConfig'],'qqbot':connectorController[_0x4a3770(0x9a)+_0x4a3770(0x74)+_0x4a3770(0x31f)],'wecom':connectorController[_0x4a3770(0x320)+_0x4a3770(0x1b7)+_0x4a3770(0x31f)],'qq_mail':connectorController[_0x4a3770(0x1db)+'ilConnec'+_0x4a3770(0x1e2)+'g'],'netease_mail':connectorController[_0x4a3770(0x213)+_0x4a3770(0x2b9)+'onnector'+'Config'],'tencent_exmail':connectorController[_0x4a3770(0x306)+_0x4a3770(0x86)+'lConnect'+_0x4a3770(0x286)],'feishu_doc':connectorController[_0x4a3770(0x34c)+_0x4a3770(0x137)+_0x4a3770(0x2ae)+_0x4a3770(0x2a2)],'tencent_docs':connectorController[_0x4a3770(0x306)+_0x4a3770(0x201)+_0x4a3770(0x211)+_0x4a3770(0x31f)],'kdocs':connectorController[_0x4a3770(0x2f8)+_0x4a3770(0x30b)+'orConfig'],'dingtalk_doc':connectorController['saveDing'+_0x4a3770(0x145)+_0x4a3770(0x211)+_0x4a3770(0x31f)]},_0x31e8ae=_0x42c6fd[_0x56fd70];if(!_0x31e8ae)throw new Error(_0x4a3770(0x25c)+_0x4a3770(0x1f9)+_0x4a3770(0x332)+_0x56fd70);return _0x31e8ae(_0x2da110);}),_0x10a429(_0x18367f(0x2e4)+_0x18367f(0x211)+':save-fe'+'ishu-cha'+_0x18367f(0x159),async(_0x5d6807,_0x483578={})=>connectorController[_0x18367f(0x34c)+_0x18367f(0x361)+'lConfig'](_0x483578)),_0x10a429(_0x18367f(0x2e4)+_0x18367f(0x211)+':save-qq'+'bot-chan'+_0x18367f(0x26f),async(_0x2fa857,_0x2a9e9b={})=>connectorController['saveQqbo'+_0x18367f(0x74)+_0x18367f(0x31f)](_0x2a9e9b)),_0x10a429(_0x18367f(0x2e4)+_0x18367f(0x211)+':save-we'+_0x18367f(0x251)+_0x18367f(0x26f),async(_0x512aa2,_0x3124e9={})=>connectorController[_0x18367f(0x320)+_0x18367f(0x1b7)+_0x18367f(0x31f)](_0x3124e9)),_0x10a429('config:c'+_0x18367f(0x211)+_0x18367f(0x325)+'-mail',async(_0x2c3fb6,_0x28c607={})=>connectorController[_0x18367f(0x1db)+'ilConnec'+'torConfi'+'g'](_0x28c607)),_0x10a429(_0x18367f(0x2e4)+_0x18367f(0x211)+_0x18367f(0xfc)+_0x18367f(0x331)+'il',async(_0x3f7637,_0x536464={})=>connectorController[_0x18367f(0x213)+'aseMailC'+_0x18367f(0x211)+_0x18367f(0x31f)](_0x536464)),_0x10a429('config:c'+_0x18367f(0x211)+_0x18367f(0x336)+_0x18367f(0x105)+'mail',async(_0x331d80,_0x36efa0={})=>connectorController[_0x18367f(0x306)+_0x18367f(0x86)+'lConnect'+'orConfig'](_0x36efa0)),_0x10a429('config:c'+'onnector'+_0x18367f(0x195)+_0x18367f(0x29a),async(_0x25de85,_0x183b0d={})=>connectorController[_0x18367f(0x34c)+'huDocCon'+'nectorCo'+'nfig'](_0x183b0d)),_0x10a429('config:c'+_0x18367f(0x211)+':save-te'+_0x18367f(0x12a)+'cs',async(_0x140231,_0x496c52={})=>connectorController[_0x18367f(0x306)+_0x18367f(0x201)+_0x18367f(0x211)+'Config'](_0x496c52)),_0x10a429('config:c'+_0x18367f(0x211)+_0x18367f(0x290)+_0x18367f(0x340),async(_0x1db090,_0x1587dd={})=>connectorController[_0x18367f(0x2f8)+_0x18367f(0x30b)+_0x18367f(0x286)](_0x1587dd)),_0x10a429(_0x18367f(0x2e4)+'onnector'+_0x18367f(0x1dd)+_0x18367f(0x178)+'oc',async(_0x13443d,_0x329459={})=>connectorController[_0x18367f(0x350)+_0x18367f(0x145)+_0x18367f(0x211)+'Config'](_0x329459)),_0x10a429(_0x18367f(0x2e4)+_0x18367f(0x211)+_0x18367f(0x2f0)+_0x18367f(0x208),async(_0x3a96d0,_0x34be15={})=>{const _0x5e67e7=_0x18367f,_0x3f80d=String(_0x34be15['channelI'+'d']||_0x34be15[_0x5e67e7(0x270)]||'');if(_0x3f80d===_0x5e67e7(0x6e))return connectorController[_0x5e67e7(0x161)+_0x5e67e7(0x167)+_0x5e67e7(0x255)+_0x5e67e7(0x35e)]();if(_0x3f80d===_0x5e67e7(0x2a5)+'oc')return connectorController[_0x5e67e7(0x377)+_0x5e67e7(0x1ff)+'iConnect'+'Session']();if(_0x3f80d===_0x5e67e7(0x341))return connectorController['startFei'+'shuRegis'+'trationS'+_0x5e67e7(0x374)](_0x34be15);if(_0x3f80d==='openclaw'+_0x5e67e7(0x2ab)||_0x3f80d===_0x5e67e7(0x13f))return connectorController[_0x5e67e7(0x352)+_0x5e67e7(0x1af)+_0x5e67e7(0x192)+'n']({'gatewayPort':_0x1d533c()[_0x5e67e7(0x84)+_0x5e67e7(0x157)](),'gatewayToken':_0x1d533c()[_0x5e67e7(0x1d1)+_0x5e67e7(0xa7)]()});throw new Error(_0x5e67e7(0x25c)+_0x5e67e7(0x1f9)+_0x5e67e7(0x287)+_0x5e67e7(0x94)+(_0x3f80d||'unknown'));}),_0x10a429(_0x18367f(0x2e4)+_0x18367f(0x211)+_0x18367f(0x2f0)+_0x18367f(0x104),async(_0x14c26e,_0x2a9ce5={})=>{const _0x4f045f=_0x18367f,_0x17492e=String(_0x2a9ce5[_0x4f045f(0x253)+'d']||_0x2a9ce5[_0x4f045f(0x270)]||'');if(_0x17492e===_0x4f045f(0x6e))return connectorController[_0x4f045f(0x261)+_0x4f045f(0xe3)+'ctStatus'](_0x2a9ce5);if(_0x17492e==='feishu_d'+'oc')return connectorController[_0x4f045f(0x380)+_0x4f045f(0xe1)+'onnectSt'+_0x4f045f(0x35b)](_0x2a9ce5);if(_0x17492e===_0x4f045f(0x341))return connectorController['getFeish'+'uRegistr'+'ationSta'+_0x4f045f(0x8b)](_0x2a9ce5);throw new Error(_0x4f045f(0x25c)+_0x4f045f(0x1f9)+_0x4f045f(0x287)+_0x4f045f(0x94)+(_0x17492e||_0x4f045f(0x209)));}),_0x10a429(_0x18367f(0x2e4)+'onnector'+_0x18367f(0x2f0)+_0x18367f(0x24a),async(_0x520280,_0x51d869={})=>{const _0x153e7f=_0x18367f,_0x2e1852=String(_0x51d869[_0x153e7f(0x253)+'d']||_0x51d869[_0x153e7f(0x270)]||'');if(_0x2e1852==='kdocs')return connectorController[_0x153e7f(0xec)+_0x153e7f(0x24e)+_0x153e7f(0x1d5)+_0x153e7f(0x118)](_0x51d869);if(_0x2e1852==='feishu_d'+'oc')return connectorController[_0x153e7f(0x263)+'ishuDocC'+_0x153e7f(0x314)+_0x153e7f(0x75)](_0x51d869);if(_0x2e1852===_0x153e7f(0x341))return connectorController[_0x153e7f(0x263)+_0x153e7f(0x2f3)+'stration'+_0x153e7f(0x2c8)](_0x51d869);if(_0x2e1852===_0x153e7f(0x324)+'-weixin'||_0x2e1852===_0x153e7f(0x13f))return connectorController[_0x153e7f(0xcf)+_0x153e7f(0x1f2)+_0x153e7f(0x28e)+'on']();return{'ok':!![]};}),_0x10a429(_0x18367f(0x2e4)+_0x18367f(0x211)+_0x18367f(0x2f0)+_0x18367f(0x16b)+'e',async(_0x1260fa,_0x39e740={})=>{const _0x57d3bf=_0x18367f,_0x68fe3=String(_0x39e740[_0x57d3bf(0x253)+'d']||_0x39e740[_0x57d3bf(0x270)]||'');if(_0x68fe3==='feishu_d'+'oc')return connectorController[_0x57d3bf(0x116)+'FeishuDo'+_0x57d3bf(0x27c)+_0x57d3bf(0x230)+'on'](_0x39e740);throw new Error(_0x57d3bf(0x25c)+_0x57d3bf(0x1f9)+_0x57d3bf(0x287)+'ssion:\x20'+(_0x68fe3||_0x57d3bf(0x209)));}),_0x10a429(_0x18367f(0x10a)+_0x18367f(0x295),()=>connectorController[_0x18367f(0x17c)+'igSnapsh'+'ot']());const _0x183918=_0x23b59c=>{const _0x1132ee=_0x18367f,_0x4c2b0e=_0x23b59c[_0x1132ee(0x35d)]&&typeof _0x23b59c[_0x1132ee(0x35d)]===_0x1132ee(0x257)?_0x23b59c[_0x1132ee(0x35d)]:{};return Array[_0x1132ee(0x1c2)](_0x4c2b0e[_0x1132ee(0x27f)])?_0x4c2b0e[_0x1132ee(0x27f)]:[];},_0x1ba225=_0x1c8fa8=>{const _0x547790=_0x18367f,_0x435afa=typeof _0x1c8fa8===_0x547790(0xaa)?_0x1c8fa8[_0x547790(0x19c)]():'',_0x33fe36=_0x435afa[_0x547790(0x153)](/^agent:([^:]+):/);return _0x33fe36?.[0x1]||'';},_0xbec0ac=(_0x38913e={},_0x126bc2=[])=>{const _0x439fcf=_0x18367f,_0x532bf1=Array['isArray'](_0x38913e[_0x439fcf(0x35d)])?_0x38913e['agents']:Array[_0x439fcf(0x1c2)](_0x38913e[_0x439fcf(0x27f)])?_0x38913e[_0x439fcf(0x27f)]:[],_0x709058=Array[_0x439fcf(0x1c2)](_0x126bc2)?_0x126bc2:[];return _0x532bf1[_0x439fcf(0x22d)](_0x54affd=>{const _0x468409=_0x439fcf,_0x5814d0=String(_0x54affd?.['id']||_0x54affd?.[_0x468409(0x310)]||'')[_0x468409(0x19c)]();return{'agent':_0x54affd,'sessions':_0x5814d0?_0x709058[_0x468409(0x371)](_0x233cc0=>{const _0x1e419f=_0x468409,_0x557f2c=String(_0x233cc0?.['agentId']||_0x233cc0?.[_0x1e419f(0xbc)]||_0x233cc0?.['agent']?.['id']||_0x1ba225(_0x233cc0?.[_0x1e419f(0x1aa)])||'')[_0x1e419f(0x19c)]();return _0x557f2c?_0x557f2c===_0x5814d0:_0x5814d0===_0x1e419f(0x368);}):[]};});};_0x10a429('app:upda'+_0x18367f(0xca)+_0x18367f(0x18f),async()=>updateController?.[_0x18367f(0x184)]()),_0x10a429(_0x18367f(0x28a)+'te:check',async()=>updateController?.[_0x18367f(0x1ac)+_0x18367f(0x148)]()),_0x10a429(_0x18367f(0x28a)+'te:downl'+_0x18367f(0x214),async()=>updateController?.['download'+_0x18367f(0x2c5)]()),_0x10a429(_0x18367f(0x28a)+_0x18367f(0x123)+'and-inst'+_0x18367f(0x233),async()=>updateController?.[_0x18367f(0x256)+'nstall']()),_0x10a429(_0x18367f(0x112)+_0x18367f(0x32f),async(_0x165941,_0x1b5f5d={})=>{const _0x29fbe7=_0x18367f,_0x2f02fb=await dialog[_0x29fbe7(0x1eb)+'Dialog'](BrowserWindow[_0x29fbe7(0x2bd)+_0x29fbe7(0x17f)](_0x165941['sender'])??mainWindow,{'properties':[_0x29fbe7(0x375),..._0x1b5f5d?.['limit']!==0x1?[_0x29fbe7(0x307)+_0x29fbe7(0xfe)]:[]],'filters':_0x1b5f5d?.['customNa'+_0x29fbe7(0x15e)+'s']?[{'name':_0x29fbe7(0xc6),'extensions':_0x1b5f5d['customNa'+_0x29fbe7(0x15e)+'s']}]:undefined});return _0x2f02fb[_0x29fbe7(0xc8)+'s'][_0x29fbe7(0x22d)](_0x2a5571=>({'path':_0x2a5571,'name':_0x2a5571[_0x29fbe7(0x83)](/[\\/]/)[_0x29fbe7(0x71)]()||_0x2a5571}));}),_0x10a429(_0x18367f(0x112)+_0x18367f(0x106)+'d-local',async(_0x5dc692,_0x1aabb1={})=>{const _0x273b5b=_0x18367f,_0x1401a3=String(_0x1aabb1['sourcePa'+'th']||'');if(!_0x1401a3)return{'success':![],'error':_0x273b5b(0x2c1)+_0x273b5b(0x220)+_0x273b5b(0x16c)};const _0x538ec9=await dialog[_0x273b5b(0x6d)+_0x273b5b(0x318)](mainWindow,{'defaultPath':_0x1aabb1['defaultF'+_0x273b5b(0x342)]||_0x1401a3[_0x273b5b(0x83)](/[\\/]/)[_0x273b5b(0x71)]()});if(_0x538ec9[_0x273b5b(0x30e)]||!_0x538ec9[_0x273b5b(0xc8)])return{'success':![],'canceled':!![]};const {copyFile:_0x4752fc}=await import(_0x273b5b(0x15a)+_0x273b5b(0x141));return await _0x4752fc(_0x1401a3,_0x538ec9[_0x273b5b(0xc8)]),{'success':!![],'filePath':_0x538ec9[_0x273b5b(0xc8)]};}),_0x10a429('app:clip'+_0x18367f(0x292)+_0x18367f(0x29d),async(_0x44db88,_0x4834a4)=>{const _0x41d779=_0x18367f;return clipboard[_0x41d779(0xc2)+'t'](String(_0x4834a4??'')),{'ok':!![]};}),_0x10a429(_0x18367f(0x2b1)+'em:resta'+'rt',async()=>{const _0x42db28=_0x18367f;return app[_0x42db28(0x2e9)](),app[_0x42db28(0x11f)](),{'ok':!![]};}),_0x10a429(_0x18367f(0x25e)+_0x18367f(0xf7)+_0x18367f(0x327),_0x1a45a5=>Boolean(BrowserWindow[_0x18367f(0x2bd)+_0x18367f(0x17f)](_0x1a45a5['sender'])?.[_0x18367f(0x9b)+_0x18367f(0x327)]())),_0x10a429(_0x18367f(0x143)+_0x18367f(0x12c),async(_0x1e29bf,_0x4386da)=>{const _0x385ce8=_0x18367f;return app[_0x385ce8(0x25d)+_0x385ce8(0x11a)+_0x385ce8(0xf9)]({'openAtLogin':_0x4386da===!![]}),{'ok':!![],'enabled':_0x4386da===!![]};}),_0x10a429(_0x18367f(0x143)+_0x18367f(0xe7),async()=>app[_0x18367f(0x35f)+_0x18367f(0x11a)+_0x18367f(0xf9)]()['openAtLo'+'gin']),_0x10a429(_0x18367f(0x112)+':choose-'+_0x18367f(0x346),async _0x588830=>{const _0x417ab9=_0x18367f,_0x218756=await dialog[_0x417ab9(0x1eb)+_0x417ab9(0x318)](BrowserWindow[_0x417ab9(0x2bd)+_0x417ab9(0x17f)](_0x588830[_0x417ab9(0x356)])??mainWindow,{'properties':[_0x417ab9(0x154)+'ctory']});return _0x218756[_0x417ab9(0xc8)+'s'][0x0]||'';}),_0x10a429(_0x18367f(0x2b1)+_0x18367f(0x378)+_0x18367f(0x346),async(_0x1955bf,_0x44b79b)=>{const _0x5b1293=await shell['openPath'](String(_0x44b79b||''));return _0x5b1293||'';}),_0x10a429('openclaw'+_0x18367f(0x1a8)+'-token',async()=>_0x1d533c()[_0x18367f(0x1d1)+_0x18367f(0xa7)]()),_0x10a429(_0x18367f(0x324)+_0x18367f(0x1a8)+_0x18367f(0x11e),async()=>_0x1d533c()['gatewayP'+_0x18367f(0x157)]()),_0x10a429('openclaw'+_0x18367f(0xf0)+'e',async(_0x2782a2,_0x5eb292=[])=>{const _0x2322bb=_0x18367f,_0x44088c=await runClawOnce(shellConfig[_0x2322bb(0x65)+_0x2322bb(0x2d8)],Array['isArray'](_0x5eb292)?_0x5eb292:[]);return{'ok':_0x44088c[_0x2322bb(0xb2)]===0x0,..._0x44088c};}),_0x10a429(_0x18367f(0x174)+_0x18367f(0x113),async(_0x45499b,_0x30923b={})=>_0x1d533c()['sessions'][_0x18367f(0x23d)]({..._0x30923b,'parentSessionKey':_0x30923b[_0x18367f(0xdb)+_0x18367f(0x36f)]||_0x30923b[_0x18367f(0x2d1)+'ey']}));const _0x12c05f=configController[_0x18367f(0xb3)+_0x18367f(0x344)]();sessionSqliteStore=ensureSessionSqliteStore();const _0x1df262=createAgentSessionsMapStore({'stateDir':_0x12c05f});_0x10a429(_0x18367f(0x174)+_0x18367f(0xdf)+_0x18367f(0x298),async(_0x5c6399,_0x8a8e5f={})=>_0x1df262['get'](_0x8a8e5f)),_0x10a429(_0x18367f(0x174)+_0x18367f(0xdf)+'ap:upser'+'t',async(_0x2533b4,_0x31b424={})=>_0x1df262[_0x18367f(0xee)](_0x31b424)),_0x10a429('sessions'+':agent-m'+_0x18367f(0x16a),async(_0x26a017,_0x2301eb={})=>{const _0x32337d=_0x18367f,_0x5e040d=String(_0x2301eb[_0x32337d(0x2d1)+'ey']||'')['trim']();if(!_0x5e040d)return null;return await sessionSqliteStore[_0x32337d(0x13b)+_0x32337d(0x10e)](_0x5e040d);}),_0x10a429('agents:c'+'reate',async(_0x4bb966,_0x418215={})=>{const _0x1fa44f=_0x18367f,_0x40c0cb=await readMutableConfig(),_0x1e2b4d=_0x40c0cb[_0x1fa44f(0x35d)]&&typeof _0x40c0cb[_0x1fa44f(0x35d)]===_0x1fa44f(0x257)?_0x40c0cb['agents']:{},_0x5363b3=_0x183918(_0x40c0cb),_0x2e4dd0=String(_0x418215['id']||_0x418215['name']||_0x1fa44f(0xa0)+Date[_0x1fa44f(0x2b0)]())[_0x1fa44f(0x19c)]()['replace'](/\s+/g,'-'),_0x501613={'id':_0x2e4dd0,'name':String(_0x418215[_0x1fa44f(0xe4)]||_0x2e4dd0),..._0x418215[_0x1fa44f(0x22e)+'e']?{'workspace':String(_0x418215[_0x1fa44f(0x22e)+'e'])}:{},..._0x418215[_0x1fa44f(0x18a)]?{'model':_0x418215['model']}:{},..._0x418215[_0x1fa44f(0x273)]?{'emoji':_0x418215[_0x1fa44f(0x273)]}:{},..._0x418215[_0x1fa44f(0x2a7)]?{'avatar':_0x418215[_0x1fa44f(0x2a7)]}:{},...Array[_0x1fa44f(0x1c2)](_0x418215['skills'])?{'skills':_0x418215['skills']}:{}};if(_0x5363b3['some'](_0xd847ee=>_0xd847ee?.['id']===_0x2e4dd0))throw new Error(_0x1fa44f(0x2cd)+'ready\x20ex'+_0x1fa44f(0x2e0));return _0x1e2b4d[_0x1fa44f(0x27f)]=[..._0x5363b3,_0x501613],_0x40c0cb[_0x1fa44f(0x35d)]=_0x1e2b4d,await _0x1f5818(_0x40c0cb,_0x1fa44f(0x8c)+_0x1fa44f(0x23e)),{'ok':!![],'agent':_0x501613};}),_0x10a429(_0x18367f(0x66)+'pdate',async(_0x2bf309,_0x5bb816={})=>{const _0x5d5d59=_0x18367f,_0xf9b52a=String(_0x5bb816['id']||_0x5bb816[_0x5d5d59(0x310)]||'')[_0x5d5d59(0x19c)]();if(!_0xf9b52a)throw new Error(_0x5d5d59(0x2f7)+_0x5d5d59(0x206)+_0x5d5d59(0x155));const _0x15a2da=await readMutableConfig(),_0x4c5138=_0x15a2da['agents']&&typeof _0x15a2da['agents']===_0x5d5d59(0x257)?_0x15a2da[_0x5d5d59(0x35d)]:{},_0x4c218d=_0x183918(_0x15a2da),_0x1fb231=_0x4c218d[_0x5d5d59(0x22d)](_0x43a33f=>_0x43a33f?.['id']===_0xf9b52a?{..._0x43a33f,..._0x5bb816,'id':_0xf9b52a}:_0x43a33f);return _0x4c5138[_0x5d5d59(0x27f)]=_0x1fb231,_0x15a2da[_0x5d5d59(0x35d)]=_0x4c5138,await _0x1f5818(_0x15a2da,_0x5d5d59(0x28d)+'dated'),{'ok':!![],'agent':_0x1fb231['find'](_0x51fcff=>_0x51fcff?.['id']===_0xf9b52a)||null};}),_0x10a429(_0x18367f(0x181)+'elete',async(_0x4035b8,_0x2a476d={})=>{const _0x30d8ce=_0x18367f,_0x207713=String(_0x2a476d['id']||_0x2a476d['agentId']||'')[_0x30d8ce(0x19c)]();if(!_0x207713)throw new Error(_0x30d8ce(0x2f7)+_0x30d8ce(0x206)+_0x30d8ce(0x155));const _0x85da00=await readMutableConfig(),_0x20addb=_0x85da00[_0x30d8ce(0x35d)]&&typeof _0x85da00[_0x30d8ce(0x35d)]==='object'?_0x85da00[_0x30d8ce(0x35d)]:{};return _0x20addb[_0x30d8ce(0x27f)]=_0x183918(_0x85da00)['filter'](_0x401963=>_0x401963?.['id']!==_0x207713),_0x85da00[_0x30d8ce(0x35d)]=_0x20addb,await _0x1f5818(_0x85da00,_0x30d8ce(0x1be)+_0x30d8ce(0x165)),{'ok':!![],'agentId':_0x207713};}),_0x10a429(_0x18367f(0xf6)+_0x18367f(0x364)+_0x18367f(0x191)+'t',async(_0x539b51,_0x11476b={})=>{const _0x4b2cc5=_0x18367f,[_0x542b0e,_0x19d054]=await Promise[_0x4b2cc5(0x233)]([_0x1d533c()[_0x4b2cc5(0x35d)][_0x4b2cc5(0x27f)](),_0x1d533c()[_0x4b2cc5(0x174)][_0x4b2cc5(0x27f)](_0x11476b)[_0x4b2cc5(0x2b3)](()=>({'sessions':[]}))]),_0x4ef249=Array[_0x4b2cc5(0x1c2)](_0x19d054[_0x4b2cc5(0x174)])?_0x19d054[_0x4b2cc5(0x174)]:[];return{..._0x542b0e,'sessions':_0x4ef249,'groups':Array[_0x4b2cc5(0x1c2)](_0x542b0e[_0x4b2cc5(0x176)])?_0x542b0e[_0x4b2cc5(0x176)]:_0xbec0ac(_0x542b0e,_0x4ef249)};}),terminalManager=createTerminalManager({'cwd':join(configController['resolveS'+_0x18367f(0x344)](),_0x18367f(0x22e)+'e'),'emitData':_0xefe555=>broadcast('terminal'+_0x18367f(0x34a),_0xefe555),'emitExit':_0x372ed0=>broadcast(_0x18367f(0x2c2)+'-exit',_0x372ed0)}),_0x10a429(_0x18367f(0x2c2)+_0x18367f(0x226),async(_0x33849e,_0x3d457b={})=>terminalManager[_0x18367f(0x23d)](_0x3d457b)),_0x10a429(_0x18367f(0x2c2)+_0x18367f(0x35c),async(_0x49db1d,_0x19b3f1={})=>terminalManager[_0x18367f(0x1c5)](_0x19b3f1)),_0x10a429(_0x18367f(0x2c2)+':resize',async(_0x5721a4,_0x350dfa={})=>terminalManager['resize'](_0x350dfa)),_0x10a429(_0x18367f(0x2c2)+':close',async(_0x4b9099,_0x468e51={})=>terminalManager[_0x18367f(0x103)](_0x468e51)),_0x10a429(_0x18367f(0x14a)+_0x18367f(0x27f),async()=>{const _0x5d1553=_0x18367f,_0x137b69=gatewayController?.[_0x5d1553(0x1b0)+'nfo']?.()||{};return _0x137b69['plugins']||[];}),_0x10a429('plugins:'+_0x18367f(0x242)+'ig',async(_0x3e6022,_0x1ff0d2={})=>{const _0x20e656=_0x18367f,_0x403882=String(_0x1ff0d2[_0x20e656(0xd1)]||_0x1ff0d2['id']||''),_0xc4bff4=await readMutableConfig(),_0x30cc02=_0xc4bff4[_0x20e656(0xe0)]?.[_0x20e656(0x177)]||{};return _0x403882?_0x30cc02[_0x403882]||null:_0x30cc02;}),_0x10a429(_0x18367f(0x14a)+_0x18367f(0x7c)+_0x18367f(0x1d6),async(_0x250479,_0x50f03b={})=>{const _0x3547f6=_0x18367f,_0x2ccca7=String(_0x50f03b[_0x3547f6(0xd1)]||_0x50f03b['id']||'');if(!_0x2ccca7)throw new Error('pluginId'+_0x3547f6(0x206)+'ired');const _0x25afe8=await readMutableConfig(),_0x46a75f=_0x25afe8[_0x3547f6(0xe0)]&&typeof _0x25afe8[_0x3547f6(0xe0)]===_0x3547f6(0x257)?_0x25afe8[_0x3547f6(0xe0)]:{},_0x1da1f2=_0x46a75f[_0x3547f6(0x177)]&&typeof _0x46a75f[_0x3547f6(0x177)]===_0x3547f6(0x257)?_0x46a75f[_0x3547f6(0x177)]:{};return _0x1da1f2[_0x2ccca7]={..._0x1da1f2[_0x2ccca7]||{},..._0x50f03b['config']||_0x50f03b['patch']||{}},_0x46a75f['entries']=_0x1da1f2,_0x25afe8[_0x3547f6(0xe0)]=_0x46a75f,_0x1f5818(_0x25afe8,_0x3547f6(0x22b)+_0x3547f6(0x80)+'dated');}),_0x10a429(_0x18367f(0x14a)+_0x18367f(0x376),async(_0x4812e8,_0x365406={})=>{const _0x2b9efb=_0x18367f,_0x3bee1f=String(_0x365406[_0x2b9efb(0xd1)]||_0x365406['id']||'');if(!_0x3bee1f)throw new Error(_0x2b9efb(0xd1)+'\x20is\x20requ'+_0x2b9efb(0x155));const _0x7d3d35=await readMutableConfig(),_0x3a1181=_0x7d3d35[_0x2b9efb(0xe0)]&&typeof _0x7d3d35['plugins']===_0x2b9efb(0x257)?_0x7d3d35[_0x2b9efb(0xe0)]:{},_0x559149=_0x3a1181[_0x2b9efb(0x177)]&&typeof _0x3a1181[_0x2b9efb(0x177)]===_0x2b9efb(0x257)?_0x3a1181['entries']:{};return _0x559149[_0x3bee1f]={..._0x559149[_0x3bee1f]||{},'enabled':!![]},_0x3a1181[_0x2b9efb(0x177)]=_0x559149,_0x7d3d35[_0x2b9efb(0xe0)]=_0x3a1181,_0x1f5818(_0x7d3d35,_0x2b9efb(0x8e)+'nabled');}),_0x10a429(_0x18367f(0x14a)+_0x18367f(0xe2),async(_0x42b3e3,_0xee79a={})=>{const _0xba9590=_0x18367f,_0x4c1340=String(_0xee79a[_0xba9590(0xd1)]||_0xee79a['id']||'');if(!_0x4c1340)throw new Error(_0xba9590(0xd1)+_0xba9590(0x206)+_0xba9590(0x155));const _0x235988=await readMutableConfig(),_0x40bddb=_0x235988[_0xba9590(0xe0)]&&typeof _0x235988[_0xba9590(0xe0)]==='object'?_0x235988[_0xba9590(0xe0)]:{},_0x5d4bde=_0x40bddb[_0xba9590(0x177)]&&typeof _0x40bddb[_0xba9590(0x177)]==='object'?_0x40bddb[_0xba9590(0x177)]:{};return _0x5d4bde[_0x4c1340]={..._0x5d4bde[_0x4c1340]||{},'enabled':![]},_0x40bddb[_0xba9590(0x177)]=_0x5d4bde,_0x235988[_0xba9590(0xe0)]=_0x40bddb,_0x1f5818(_0x235988,_0xba9590(0x180)+_0xba9590(0x135));}),_0x10a429(_0x18367f(0x14a)+_0x18367f(0x7a),async(_0xb1a079,_0x2d526d={})=>({'plugins':await((async()=>{const _0x14ed42=_0x18367f,_0x2b0f96=gatewayController?.[_0x14ed42(0x1b0)+_0x14ed42(0x1fa)]?.()||{};if(!_0x2d526d?.['pluginId']&&!_0x2d526d?.['id'])return _0x2b0f96['plugins']||[];const _0x14687b=String(_0x2d526d[_0x14ed42(0xd1)]||_0x2d526d['id']||'');return(_0x2b0f96['plugins']||[])[_0x14ed42(0x371)](_0x320f23=>_0x320f23[_0x14ed42(0xd1)]===_0x14687b);})())})),_0x10a429(_0x18367f(0x19b)+'igate',async(_0x4c5210,_0x305726)=>({'ok':!![],'payload':_0x305726})),_0x10a429(_0x18367f(0x1cd)+_0x18367f(0x1ba)+'e',async(_0x8eee87,_0x5c8340)=>{const _0x4cd017=_0x18367f;return broadcast(_0x4cd017(0xbe)+_0x4cd017(0x128),_0x5c8340),{'ok':!![]};}),_0x10a429(_0x18367f(0x31b)+_0x18367f(0x381)+_0x18367f(0x166),async()=>{const _0x2e0115=_0x18367f;return broadcast(_0x2e0115(0x77)+_0x2e0115(0x166)+_0x2e0115(0x91),{}),{'ok':!![]};}),_0x10a429('tabs:ref'+'resh-age'+_0x18367f(0x166),async(_0x279e3e,_0x55f580={})=>{const _0x44dab7=_0x18367f;return broadcast('tabs-age'+_0x44dab7(0x166)+_0x44dab7(0x282)+_0x44dab7(0x91),_0x55f580),{'ok':!![]};}),_0x10a429('window:m'+'inimize',_0x2aa01d=>{const _0x3ac15d=_0x18367f;return BrowserWindow['fromWebC'+_0x3ac15d(0x17f)](_0x2aa01d[_0x3ac15d(0x356)])?.[_0x3ac15d(0x1ea)](),{'ok':!![]};}),_0x10a429(_0x18367f(0x2cb)+_0x18367f(0x194)+_0x18367f(0x1d3),_0x45d7ab=>{const _0x1f9ae1=_0x18367f,_0x11268e=BrowserWindow[_0x1f9ae1(0x2bd)+_0x1f9ae1(0x17f)](_0x45d7ab[_0x1f9ae1(0x356)]);if(!_0x11268e)return{'isMaximized':![]};if(_0x11268e[_0x1f9ae1(0x9b)+_0x1f9ae1(0x327)]())_0x11268e[_0x1f9ae1(0x34b)+'ze']();else _0x11268e[_0x1f9ae1(0x2af)]();return{'isMaximized':_0x11268e[_0x1f9ae1(0x9b)+_0x1f9ae1(0x327)]()};}),_0x10a429(_0x18367f(0x2d4)+_0x18367f(0x160),_0x2b64a2=>{const _0x32f726=_0x18367f;return BrowserWindow['fromWebC'+'ontents'](_0x2b64a2[_0x32f726(0x356)])?.['close'](),{'ok':!![]};}),_0x10a429(_0x18367f(0xcd)+_0x18367f(0x130)+_0x18367f(0x1e4),()=>openDevToolsForActiveContext()),_0x10a429(_0x18367f(0x324)+':runtime'+'-info',()=>_0x1d533c()[_0x18367f(0x1b0)+'nfo']()),_0x10a429(_0x18367f(0x324)+_0x18367f(0x1a8)+_0x18367f(0x1c1),async()=>(await ensureGatewayControllerStarted())['getStatu'+'s']()),_0x10a429(_0x18367f(0x324)+_0x18367f(0x1a8)+_0x18367f(0x304),()=>_0x1d533c()[_0x18367f(0x17a)](_0x18367f(0x31a)+_0x18367f(0x219))),_0x10a429(_0x18367f(0x324)+':loading'+_0x18367f(0x67)+_0x18367f(0x20e),async()=>({'loadingLifeCycle':_0x18367f(0x2dc),'message':'','updatedAt':new Date()[_0x18367f(0x175)+'ing']()})),_0x10a429('openclaw'+_0x18367f(0x1a8)+_0x18367f(0x17b),(_0x386e26,_0x174a0d={})=>_0x1d533c()[_0x18367f(0xf5)+_0x18367f(0x289)](_0x174a0d?.['limit']??0xc8)),_0x10a429(_0x18367f(0x324)+_0x18367f(0x25a)+_0x18367f(0xa8)+_0x18367f(0x329)+'n',(_0x7720d8,_0x566223)=>_0x1d533c()[_0x18367f(0x21f)+'kUserQue'+_0x18367f(0x7f)](_0x566223)),_0x10a429('openclaw'+_0x18367f(0x196)+_0x18367f(0xf1),async()=>{const _0x46b57a=_0x18367f,_0xf13934=join(resolveRuntimeRoot(shellConfig[_0x46b57a(0x65)+_0x46b57a(0x2d8)]),_0x46b57a(0x100),_0x46b57a(0xb6)+'w');if(!existsSync(_0xf13934))throw new Error(_0x46b57a(0x324)+'\x20CLI\x20wra'+_0x46b57a(0x101)+_0x46b57a(0x311)+_0xf13934+(_0x46b57a(0x16e)+_0x46b57a(0x23c)+_0x46b57a(0x373)+_0x46b57a(0x29f)));const _0x50f967=join(app[_0x46b57a(0x29e)](_0x46b57a(0x355)),_0x46b57a(0x6c)+_0x46b57a(0x13a)+_0x46b57a(0x265));await writeFile(_0x50f967,'#!/bin/s'+_0x46b57a(0x280)+_0xf13934['replace'](/\\/g,'\x5c\x5c')[_0x46b57a(0x370)](/"/g,'\x5c\x22')+'\x22\x0a',{'mode':0x1ed});const _0x3c6f4a=spawn('open',['-a',_0x46b57a(0xef),_0x50f967],{'detached':!![],'stdio':'ignore'});return _0x3c6f4a[_0x46b57a(0x275)](),{'ok':!![],'cliPath':_0xf13934};}),_0x10a429(_0x18367f(0x1ef)+_0x18367f(0xdd),()=>_0x1d533c()['agents'][_0x18367f(0x27f)]()),_0x10a429(_0x18367f(0x1fc)+'tatus',(_0x2559ed,_0x54ab37)=>_0x1d533c()[_0x18367f(0x239)][_0x18367f(0x7a)](_0x54ab37)),_0x10a429(_0x18367f(0x174)+_0x18367f(0x226),(_0x3315fa,_0x28bc71)=>_0x1d533c()[_0x18367f(0x174)][_0x18367f(0x23d)](_0x28bc71)),_0x10a429('sessions'+_0x18367f(0x274),(_0x414989,_0x23f47d)=>_0x1d533c()[_0x18367f(0x174)][_0x18367f(0x27f)](_0x23f47d)),_0x10a429(_0x18367f(0x174)+_0x18367f(0xea),(_0x3358d9,_0x27c962)=>_0x1d533c()[_0x18367f(0x174)][_0x18367f(0x237)](_0x27c962)),_0x10a429(_0x18367f(0xfa)+_0x18367f(0x2f4),(_0x51458b,_0xf6a13d)=>_0x1d533c()[_0x18367f(0x1cb)]['stream'](_0xf6a13d)),_0x10a429(_0x18367f(0x313)+'rt',(_0x151b01,_0x20a577)=>_0x1d533c()[_0x18367f(0x1cb)][_0x18367f(0x1f6)](_0x20a577)),_0x10a429(_0x18367f(0x2bc)+'tory',(_0x3f3415,_0x1afe91)=>_0x1d533c()[_0x18367f(0x1cb)][_0x18367f(0x21b)](_0x1afe91)),_0x10a429(_0x18367f(0x2c7)+'te',async(_0x41817d,_0x488920={})=>{const _0x3da235=_0x18367f,_0x168642=typeof _0x488920[_0x3da235(0x32d)]===_0x3da235(0xaa)?_0x488920[_0x3da235(0x32d)]:_0x3da235(0x1f0),_0xef8714=typeof _0x488920['message']===_0x3da235(0xaa)?_0x488920[_0x3da235(0xbf)]:_0x3da235(0x31a)+_0x3da235(0x358),_0x391a6f=typeof _0x488920[_0x3da235(0xd7)]===_0x3da235(0xaa)&&_0x488920['context'][_0x3da235(0x19c)]()?_0x3da235(0x31a)+':'+_0x488920[_0x3da235(0xd7)][_0x3da235(0x19c)]():_0x3da235(0x31a),_0x253580=_0x488920[_0x3da235(0x126)]&&typeof _0x488920[_0x3da235(0x126)]===_0x3da235(0x257)?{...summarizePayload(_0x488920[_0x3da235(0x126)]),'context':_0x391a6f}:{'context':_0x391a6f},_0x1a6e28=rendererLogger;if(_0x1a6e28?.[_0x168642])await _0x1a6e28[_0x168642](_0xef8714,_0x253580);else await _0x1a6e28?.['info'](_0xef8714,_0x253580);if(_0x488920['diagnost'+'ic']===!![]||_0x391a6f===_0x3da235(0x31a)+_0x3da235(0x2cc)+_0x3da235(0x369)){const _0x446001=_0x488920['record']&&typeof _0x488920[_0x3da235(0x12f)]===_0x3da235(0x257)?_0x488920[_0x3da235(0x12f)]:_0x488920[_0x3da235(0x126)]?.[_0x3da235(0x12f)]&&typeof _0x488920[_0x3da235(0x126)][_0x3da235(0x12f)]===_0x3da235(0x257)?_0x488920['meta'][_0x3da235(0x12f)]:{'level':_0x168642,'category':'renderer','event':_0x391a6f,'message':_0xef8714,'meta':_0x488920['meta']};await diagnosticsWriter?.[_0x3da235(0x2ca)+'nt'](_0x446001,{'captureIncident':String(_0x446001['level']||_0x168642)[_0x3da235(0x15b)+_0x3da235(0x136)]()==='error'||_0x488920[_0x3da235(0x1dc)+'ncident']===!![]});}return{'ok':!![]};}),_0x10a429(_0x18367f(0x14f)+_0x18367f(0x157),async(_0x86d847,_0x11de72={})=>{const _0x49b414=_0x18367f,_0x4bff2f=typeof _0x11de72[_0x49b414(0x119)+'r']===_0x49b414(0xaa)&&_0x11de72[_0x49b414(0x119)+'r']['trim']()?_0x11de72[_0x49b414(0x119)+'r']:undefined,_0x2cb9b9=await exportLogsArchive({'logsDir':configController[_0x49b414(0x1d9)][_0x49b414(0x22a)],'targetDir':_0x4bff2f,'appVersion':app['getVersi'+'on']()});return mainLogger?.['info'](_0x49b414(0x363)+_0x49b414(0xf3),{'path':toHomePath(_0x2cb9b9[_0x49b414(0x7d)])}),_0x2cb9b9;}),_0x10a429(_0x18367f(0x278)+_0x18367f(0x93)+_0x18367f(0x30a),async()=>{const _0x40ebd3=_0x18367f;return await shell[_0x40ebd3(0xda)](configController[_0x40ebd3(0x1d9)][_0x40ebd3(0x22a)]),mainLogger?.['info']('logs\x20dir'+_0x40ebd3(0xff)+_0x40ebd3(0x268),{'logsDir':toHomePath(configController[_0x40ebd3(0x1d9)][_0x40ebd3(0x22a)])}),{'ok':!![],'path':configController['paths']['logsDir']};}),_0x10a429(_0x18367f(0xb1)+'t',async()=>{const _0x2d8666=_0x18367f,_0xebd090=await readdir(configController['paths'][_0x2d8666(0x22a)],{'recursive':!![]})[_0x2d8666(0x2b3)](()=>[]);return _0xebd090;}),_0x10a429(_0x18367f(0xd3)+'d',async(_0x13db35,_0x26dbdf={})=>{const _0x1cfaa0=_0x18367f,_0x3243a8=String(_0x26dbdf[_0x1cfaa0(0x7d)]||'');if(!_0x3243a8)throw new Error(_0x1cfaa0(0x33f)+_0x1cfaa0(0x2f5));return readFile(_0x3243a8,_0x1cfaa0(0x34d));}),_0x10a429(_0x18367f(0x142)+'ad',async(_0x39ef6f,_0x349672)=>{const _0x48559e=_0x18367f,_0x51d8a6=Date[_0x48559e(0x2b0)]();try{const _0x919037=await readFile(_0x349672,'utf8');return filesLogger?.['info'](_0x48559e(0x26e)+_0x48559e(0x1cc)+'ted',{'path':toHomePath(_0x349672),'bytes':Buffer[_0x48559e(0x20d)+'th'](_0x919037),'durationMs':Date['now']()-_0x51d8a6}),_0x919037;}catch(_0x41fb44){filesLogger?.[_0x48559e(0x1bd)](_0x48559e(0x26e)+_0x48559e(0x92),{'path':toHomePath(_0x349672),'durationMs':Date[_0x48559e(0x2b0)]()-_0x51d8a6,'error':summarizeError(_0x41fb44)});throw _0x41fb44;}}),_0x10a429(_0x18367f(0x142)+_0x18367f(0xc4)+'y',async(_0x35b2be,_0x5189cb)=>{const _0x16ac94=_0x18367f,_0x56c597=Date[_0x16ac94(0x2b0)]();try{const _0xebaf7b=await readFile(_0x5189cb);return filesLogger?.['info']('binary\x20f'+_0x16ac94(0x139)+_0x16ac94(0x1fe)+'ed',{'path':toHomePath(_0x5189cb),'bytes':_0xebaf7b[_0x16ac94(0x20d)+'th'],'durationMs':Date[_0x16ac94(0x2b0)]()-_0x56c597}),new Uint8Array(_0xebaf7b);}catch(_0x21b253){filesLogger?.[_0x16ac94(0x1bd)](_0x16ac94(0x144)+'ile\x20read'+_0x16ac94(0x362),{'path':toHomePath(_0x5189cb),'durationMs':Date[_0x16ac94(0x2b0)]()-_0x56c597,'error':summarizeError(_0x21b253)});throw _0x21b253;}}),_0x10a429('files:wr'+_0x18367f(0x29d),async(_0x3b74de,_0x1761d3={})=>{const _0x393770=_0x18367f,_0x44e94b=Date['now']();return await writeFile(_0x1761d3['path'],_0x1761d3[_0x393770(0x2d0)]??'',_0x393770(0x34d)),filesLogger?.[_0x393770(0x1f0)](_0x393770(0x296)+_0x393770(0x2d5)+_0x393770(0x185),{'path':toHomePath(_0x1761d3[_0x393770(0x7d)]),'bytes':Buffer[_0x393770(0x20d)+'th'](String(_0x1761d3[_0x393770(0x2d0)]??'')),'durationMs':Date[_0x393770(0x2b0)]()-_0x44e94b}),{'ok':!![]};}),_0x10a429(_0x18367f(0x1a0)+'ite-bina'+'ry',async(_0x17b1dc,_0x2dad56={})=>{const _0x4a201f=_0x18367f,_0x5011f6=Date['now']();await writeFile(_0x2dad56[_0x4a201f(0x7d)],Buffer[_0x4a201f(0x168)](_0x2dad56[_0x4a201f(0x2d0)]??[]));const _0x5c0bba=await stat(_0x2dad56[_0x4a201f(0x7d)])[_0x4a201f(0x2b3)](()=>null);return filesLogger?.['info'](_0x4a201f(0x144)+'ile\x20writ'+_0x4a201f(0x2da)+_0x4a201f(0xfb),{'path':toHomePath(_0x2dad56[_0x4a201f(0x7d)]),'bytes':_0x5c0bba?.['size']??0x0,'durationMs':Date['now']()-_0x5011f6}),{'ok':!![]};}),_0x10a429('files:se'+_0x18367f(0x11b)+'e',async(_0x42d6ce,_0x2b14f8={})=>{const _0x5abfa9=_0x18367f,_0x4925b=await dialog[_0x5abfa9(0x1eb)+_0x5abfa9(0x318)](BrowserWindow[_0x5abfa9(0x2bd)+_0x5abfa9(0x17f)](_0x42d6ce[_0x5abfa9(0x356)])??mainWindow,{'title':typeof _0x2b14f8[_0x5abfa9(0x262)]===_0x5abfa9(0xaa)?_0x2b14f8[_0x5abfa9(0x262)]:undefined,'properties':[_0x5abfa9(0x375),..._0x2b14f8[_0x5abfa9(0x307)+_0x5abfa9(0xfe)]?['multiSel'+_0x5abfa9(0xfe)]:[]],'filters':Array[_0x5abfa9(0x1c2)](_0x2b14f8[_0x5abfa9(0x335)])?_0x2b14f8[_0x5abfa9(0x335)]:undefined});return filesLogger?.[_0x5abfa9(0x1f0)](_0x5abfa9(0x315)+_0x5abfa9(0x285)+'leted',{'canceled':_0x4925b[_0x5abfa9(0x30e)],'count':_0x4925b[_0x5abfa9(0xc8)+'s']['length'],'paths':_0x4925b[_0x5abfa9(0xc8)+'s'][_0x5abfa9(0x22d)](toHomePath)}),{'canceled':_0x4925b[_0x5abfa9(0x30e)],'paths':_0x4925b[_0x5abfa9(0xc8)+'s']};}),_0x10a429(_0x18367f(0x152)+'st-direc'+'tory',async(_0x58acee,_0x3bb4d0={})=>{const _0x591fcf=_0x18367f,_0x31f124=resolve(String(_0x3bb4d0['path']||'')),_0x1e2f3d=_0x3bb4d0[_0x591fcf(0x14b)+'e']!==![],_0x55beef=Array[_0x591fcf(0x1c2)](_0x3bb4d0[_0x591fcf(0x98)+'ns'])?_0x3bb4d0[_0x591fcf(0x98)+'ns']['map'](_0x4ad034=>String(_0x4ad034)['toLowerC'+_0x591fcf(0x136)]()[_0x591fcf(0x370)](/^\./,''))['filter'](Boolean):null,_0x52f247=Number[_0x591fcf(0x24b)+'r'](_0x3bb4d0[_0x591fcf(0x2ce)+'es'])&&_0x3bb4d0['maxEntri'+'es']>0x0?_0x3bb4d0['maxEntri'+'es']:0xc350,_0x585deb=[];let _0x6da1d3=![];async function _0xb17a6c(_0x540236){const _0x5de74a=_0x591fcf;if(_0x6da1d3)return;let _0x37d4e4;try{_0x37d4e4=await readdir(_0x540236,{'withFileTypes':!![]});}catch{return;}for(const _0x35b13e of _0x37d4e4){if(_0x6da1d3)return;if(_0x35b13e[_0x5de74a(0xe4)]['startsWi'+'th']('.'))continue;const _0x4419fd=join(_0x540236,_0x35b13e[_0x5de74a(0xe4)]);if(_0x35b13e['isDirect'+_0x5de74a(0x30a)]()){if(_0x1e2f3d)await _0xb17a6c(_0x4419fd);continue;}if(!_0x35b13e['isFile']())continue;if(_0x55beef){const _0x5a893a=_0x35b13e['name']['lastInde'+'xOf']('.'),_0x915cc3=_0x5a893a>=0x0?_0x35b13e[_0x5de74a(0xe4)]['slice'](_0x5a893a+0x1)[_0x5de74a(0x15b)+_0x5de74a(0x136)]():'';if(!_0x55beef['includes'](_0x915cc3))continue;}if(_0x585deb[_0x5de74a(0xa3)]>=_0x52f247){_0x6da1d3=!![];return;}_0x585deb[_0x5de74a(0xc1)]({'name':_0x35b13e['name'],'path':_0x4419fd});}}return await _0xb17a6c(_0x31f124),{'path':_0x31f124,'entries':_0x585deb,'truncated':_0x6da1d3};}),_0x10a429(_0x18367f(0x120)+_0x18367f(0x249)+_0x18367f(0x37a),async(_0x5069c4,_0x224ba0={})=>{const _0x47e232=_0x18367f,_0x56c7ae=await dialog[_0x47e232(0x1eb)+_0x47e232(0x318)](BrowserWindow[_0x47e232(0x2bd)+_0x47e232(0x17f)](_0x5069c4[_0x47e232(0x356)])??mainWindow,{'title':typeof _0x224ba0[_0x47e232(0x262)]==='string'?_0x224ba0[_0x47e232(0x262)]:undefined,'properties':[_0x47e232(0x154)+_0x47e232(0x2b4)]});return filesLogger?.[_0x47e232(0x1f0)](_0x47e232(0x2aa)+_0x47e232(0x15d)+_0x47e232(0x1fe)+'ed',{'canceled':_0x56c7ae['canceled'],'count':_0x56c7ae[_0x47e232(0xc8)+'s'][_0x47e232(0xa3)],'paths':_0x56c7ae[_0x47e232(0xc8)+'s'][_0x47e232(0x22d)](toHomePath)}),{'canceled':_0x56c7ae[_0x47e232(0x30e)],'paths':_0x56c7ae[_0x47e232(0xc8)+'s']};}),_0x10a429(_0x18367f(0x22e)+_0x18367f(0x223)+'ory-info',()=>_0x1d533c()[_0x18367f(0x22e)+'e'][_0x18367f(0x138)+_0x18367f(0xab)]()),_0x10a429(_0x18367f(0x22e)+_0x18367f(0x170)+_0x18367f(0x15d),async()=>{const _0x2e6ab7=_0x18367f,_0x4a0990=await _0x1d533c()[_0x2e6ab7(0x22e)+'e']['director'+_0x2e6ab7(0xab)]();return await shell['openPath'](_0x4a0990[_0x2e6ab7(0x7d)]),filesLogger?.[_0x2e6ab7(0x1f0)](_0x2e6ab7(0x22e)+_0x2e6ab7(0xb8)+_0x2e6ab7(0x9e)+'ed',{'path':toHomePath(_0x4a0990[_0x2e6ab7(0x7d)])}),{'ok':!![],'path':_0x4a0990[_0x2e6ab7(0x7d)]};}),_0x10a429('workspac'+_0x18367f(0x1c8)+_0x18367f(0xa1),()=>_0x1d533c()['workspac'+'e']['sharedCo'+_0x18367f(0x276)]()),_0x10a429(_0x18367f(0x22e)+_0x18367f(0x241)+_0x18367f(0x204)+_0x18367f(0x360),(_0xd24d61,_0x454b97)=>_0x1d533c()[_0x18367f(0x22e)+'e'][_0x18367f(0xae)+_0x18367f(0x16f)+'xt'](_0x454b97)),_0x10a429(_0x18367f(0x174)+_0x18367f(0x1bb),(_0x42f46d,_0x5ca5c1)=>_0x1d533c()['sessions'][_0x18367f(0x1c3)](_0x5ca5c1)),_0x10a429('sessions'+_0x18367f(0x14c),async(_0x510d6e,_0x1c37f1={})=>{const _0x5db886=_0x18367f,_0x56bab9=String(_0x1c37f1['sessionK'+'ey']||_0x1c37f1[_0x5db886(0x1aa)]||'')[_0x5db886(0x19c)]();if(!_0x56bab9)throw new Error(_0x5db886(0x2d1)+_0x5db886(0x272)+_0x5db886(0x16c));const _0x126ebf=await ensureSessionSqliteStore()[_0x5db886(0x250)+_0x5db886(0x367)+_0x5db886(0x147)](),_0x42d846=await _0x1d533c()[_0x5db886(0x174)]['reorderP'+_0x5db886(0xcc)]([_0x56bab9,..._0x126ebf[_0x5db886(0x371)](_0x45f69a=>_0x45f69a!==_0x56bab9)]);return _0x42d846;}),_0x10a429(_0x18367f(0x174)+_0x18367f(0xa5),async(_0x4a91f2,_0x255078={})=>{const _0x244988=_0x18367f,_0x2f0a7f=String(_0x255078[_0x244988(0x2d1)+'ey']||_0x255078[_0x244988(0x1aa)]||'')['trim']();if(!_0x2f0a7f)throw new Error(_0x244988(0x2d1)+_0x244988(0x272)+_0x244988(0x16c));const _0x4c8e04=await ensureSessionSqliteStore()[_0x244988(0x250)+_0x244988(0x367)+'Keys']();return await _0x1d533c()[_0x244988(0x174)][_0x244988(0x1f1)+_0x244988(0xcc)](_0x4c8e04[_0x244988(0x371)](_0x52de06=>_0x52de06!==_0x2f0a7f));}),_0x10a429(_0x18367f(0x174)+':reorder'+_0x18367f(0x2e7),async(_0x3c4924,_0x35dc8f={})=>{const _0x37b00d=_0x18367f,_0x1b7030=Array[_0x37b00d(0x1c2)](_0x35dc8f['keys'])?_0x35dc8f[_0x37b00d(0x1ae)]:_0x35dc8f;return await _0x1d533c()[_0x37b00d(0x174)][_0x37b00d(0x1f1)+_0x37b00d(0xcc)](_0x1b7030);}),_0x10a429(_0x18367f(0xd0)+_0x18367f(0x20b),(_0x592bd2,_0x5486df)=>_0x1d533c()['skills'][_0x18367f(0x2d6)](_0x5486df)),_0x10a429(_0x18367f(0x79)+'t',(_0x39705d,_0x2c33a3)=>_0x1d533c()[_0x18367f(0x308)][_0x18367f(0x27f)](_0x2c33a3)),_0x10a429(_0x18367f(0x68)+_0x18367f(0x349),(_0x4bd4f6,_0x144b7b)=>_0x1d533c()[_0x18367f(0x308)][_0x18367f(0x23d)](_0x144b7b)),_0x10a429(_0x18367f(0x2ee)+_0x18367f(0x349),(_0x4ffa0c,_0x1463b8)=>_0x1d533c()['cron'][_0x18367f(0x1ed)](_0x1463b8)),_0x10a429(_0x18367f(0x2b6)+_0x18367f(0x8d),(_0x60b512,_0x5f479c)=>_0x1d533c()[_0x18367f(0x308)]['remove'](_0x5f479c)),_0x10a429(_0x18367f(0x1a1)+_0x18367f(0x19a),(_0x641ac1,_0x3c494f)=>_0x1d533c()[_0x18367f(0x308)][_0x18367f(0x15f)](_0x3c494f)),_0x10a429('cron:log'+'s',(_0x4b350c,_0x10315e)=>_0x1d533c()['cron'][_0x18367f(0x337)](_0x10315e)),_0x10a429(_0x18367f(0x301)+_0x18367f(0x343),async(_0x434f9f,_0x3ebc4b={})=>{const _0x42eea5=_0x18367f,_0x35ded6=configController[_0x42eea5(0x30f)+'onfigPat'+'h'](),_0x4f3069=JSON[_0x42eea5(0xc5)](await readFile(_0x35ded6,_0x42eea5(0x34d))),_0x52a357=_0x4f3069?.['models']?.[_0x42eea5(0x240)+'s']&&typeof _0x4f3069[_0x42eea5(0x29c)][_0x42eea5(0x240)+'s']==='object'?_0x4f3069[_0x42eea5(0x29c)]['provider'+'s']:{},_0x5713f9=typeof _0x4f3069?.[_0x42eea5(0x35d)]?.[_0x42eea5(0x1e3)]?.[_0x42eea5(0x18a)]?.[_0x42eea5(0x21c)]===_0x42eea5(0xaa)?_0x4f3069['agents'][_0x42eea5(0x1e3)][_0x42eea5(0x18a)][_0x42eea5(0x21c)]:'',_0x5f3624=String(_0x3ebc4b[_0x42eea5(0x18a)]||_0x5713f9||'');if(!_0x5f3624[_0x42eea5(0x365)]('/'))throw new Error('no\x20defau'+_0x42eea5(0xd5)+_0x42eea5(0x22c)+_0x42eea5(0x110)+_0x42eea5(0x227)+'der/mode'+_0x42eea5(0x89));const _0x38fa9f=_0x5f3624[_0x42eea5(0x222)]('/'),_0x57755d=_0x5f3624[_0x42eea5(0x2d2)](0x0,_0x38fa9f),_0x1b3fb6=_0x5f3624[_0x42eea5(0x2d2)](_0x38fa9f+0x1),_0x3f67b7=_0x52a357[_0x57755d];if(!_0x3f67b7||typeof _0x3f67b7!==_0x42eea5(0x257))throw new Error(_0x42eea5(0x240)+_0x42eea5(0x158)+_0x42eea5(0x1e9)+'\x20'+_0x57755d);const _0xa69554=String(_0x3f67b7[_0x42eea5(0x20c)]||'https://'+'api.open'+_0x42eea5(0x97)+'1')[_0x42eea5(0x19c)]()['replace'](/\/$/,''),_0xf8bb46=await fetch(_0xa69554+(_0x42eea5(0x99)+_0x42eea5(0x23f)+'s'),{'method':_0x42eea5(0x229),'headers':{'content-type':_0x42eea5(0x1d4)+_0x42eea5(0x1b2),'Authorization':_0x42eea5(0x9d)+(_0x3f67b7[_0x42eea5(0x347)]||''),..._0x3f67b7[_0x42eea5(0x2fd)]&&typeof _0x3f67b7[_0x42eea5(0x2fd)]==='object'?_0x3f67b7[_0x42eea5(0x2fd)]:{}},'body':JSON[_0x42eea5(0x15c)+'y']({'model':_0x1b3fb6,'max_tokens':Number[_0x42eea5(0x24b)+'r'](_0x3ebc4b[_0x42eea5(0xa2)+'s'])?_0x3ebc4b[_0x42eea5(0xa2)+'s']:0x400,'temperature':typeof _0x3ebc4b['temperat'+_0x42eea5(0x1b8)]===_0x42eea5(0x1a5)?_0x3ebc4b['temperat'+_0x42eea5(0x1b8)]:undefined,'messages':Array['isArray'](_0x3ebc4b['messages'])?_0x3ebc4b['messages']:[]}),'signal':AbortSignal[_0x42eea5(0x351)](Number['isIntege'+'r'](_0x3ebc4b['timeoutM'+'s'])?_0x3ebc4b[_0x42eea5(0x34f)+'s']:0x1d4c0)});if(!_0xf8bb46['ok']){const _0x57dc39=await _0xf8bb46[_0x42eea5(0xa6)]();throw new Error('model\x20ht'+_0x42eea5(0x9c)+_0xf8bb46[_0x42eea5(0x7a)]+':\x20'+_0x57dc39['slice'](0x0,0x190));}const _0x287a7d=await _0xf8bb46[_0x42eea5(0x151)](),_0xdd91c=_0x287a7d?.[_0x42eea5(0x14e)]?.[0x0]?.[_0x42eea5(0xbf)]??{};return{'content':extractModelMessageContent(_0xdd91c[_0x42eea5(0x2d0)]),'reasoning':typeof _0xdd91c[_0x42eea5(0x171)+_0x42eea5(0x28b)+'t']===_0x42eea5(0xaa)?_0xdd91c[_0x42eea5(0x171)+_0x42eea5(0x28b)+'t']:'','model':_0x287a7d?.[_0x42eea5(0x18a)]||_0x1b3fb6};}),_0x10a429('models:s'+_0x18367f(0x235),()=>_0x1d533c()['models'][_0x18367f(0xad)]()),_0x10a429('models:s'+'et-setti'+_0x18367f(0x102),(_0x207d8d,_0x5b7015)=>_0x1d533c()[_0x18367f(0x29c)][_0x18367f(0x114)+'ngs'](_0x5b7015)),_0x10a429(_0x18367f(0x13c)+_0x18367f(0x36e)+'ted-ever'+'ywhere',(_0x42c37b,_0x2e2e95)=>_0x1d533c()[_0x18367f(0x29c)][_0x18367f(0x183)+_0x18367f(0xfd)+_0x18367f(0x18e)+'re'](_0x2e2e95)),_0x10a429('models:s'+_0x18367f(0x37d)+'operated',(_0x4b3947,_0x1bf656)=>_0x1d533c()[_0x18367f(0x29c)][_0x18367f(0x328)+'peratedM'+_0x18367f(0x202)](_0x1bf656)),_0x10a429(_0x18367f(0x13c)+_0x18367f(0xe5)+'model-id',()=>_0x1d533c()[_0x18367f(0x29c)][_0x18367f(0x20a)+'ModelId']()),_0x10a429(_0x18367f(0x301)+_0x18367f(0x218)+_0x18367f(0x281),()=>_0x1d533c()['models'][_0x18367f(0xd4)+_0x18367f(0x281)]()),_0x10a429(_0x18367f(0x245)+_0x18367f(0x12e)+'dled-res'+_0x18367f(0x6f),async()=>{const _0x20c4d7=_0x18367f,_0x32a8b3=await prepareRuntime(shellConfig,{'syncOnly':!![]});return await configController['syncRunt'+_0x20c4d7(0x35a)+'ns'](),{'ok':!![],'syncedAt':new Date()['toISOStr'+_0x20c4d7(0x2b7)](),'manifest':_0x32a8b3,'status':await getRuntimeResourceStatus()};}),_0x10a429(_0x18367f(0x245)+_0x18367f(0x6b)+'-status',async()=>getRuntimeResourceStatus());}async function boot(){const _0x2c2583=_0x543b23;shellConfig=await loadShellConfig(resolveProjectRoot()),app[_0x2c2583(0x1b9)](shellConfig[_0x2c2583(0xc9)+_0x2c2583(0xb7)]),configController=createConfigController(shellConfig),mainLogger=createShellLogger(configController[_0x2c2583(0x1d9)],_0x2c2583(0x368)),ipcLogger=createShellLogger(configController[_0x2c2583(0x1d9)],'ipc'),filesLogger=createShellLogger(configController[_0x2c2583(0x1d9)],_0x2c2583(0x133)),rendererLogger=createShellLogger(configController['paths'],_0x2c2583(0x31a)),productRuntime=await loadProductRuntime();const _0x337d6f=resolveWujieApiEndpoint();diagnosticsWriter=createDiagnosticsWriter({'logsDir':configController[_0x2c2583(0x1d9)][_0x2c2583(0x22a)],'appContext':{'productName':shellConfig[_0x2c2583(0xc9)+_0x2c2583(0xb7)],'appId':shellConfig[_0x2c2583(0x8f)],'appVersion':app[_0x2c2583(0x1ad)+'on'](),'platform':process[_0x2c2583(0x2fe)],'arch':process['arch'],..._0x337d6f?{'apiEndpoint':_0x337d6f}:{}}}),userEventWriter=createUserEventWriter({'logsDir':configController['paths']['logsDir'],'diagnosticsWriter':diagnosticsWriter});const _0xb39cf7=await loadCreateUpdateController({'logger':mainLogger});updateController=_0xb39cf7({'shellConfig':shellConfig,'appName':()=>app[_0x2c2583(0xe4)],'appVersion':()=>app[_0x2c2583(0x1ad)+'on'](),'broadcast':broadcast,'logger':mainLogger}),updateController['initiali'+'ze'](),registerProcessLogHooks(),mainLogger?.[_0x2c2583(0x1f0)]('electron'+_0x2c2583(0x2b8)+_0x2c2583(0x149)+'ed',{'appVersion':app[_0x2c2583(0x1ad)+'on'](),'electronVersion':process[_0x2c2583(0x173)]['electron'],'nodeVersion':process['versions'][_0x2c2583(0x30c)],'chromeVersion':process['versions'][_0x2c2583(0x200)],'platform':process['platform'],'arch':process[_0x2c2583(0x17d)],'mode':getMode(),'projectRoot':shellConfig[_0x2c2583(0x65)+'oot'],'configPath':shellConfig['configPa'+'th'],'dataDir':shellConfig[_0x2c2583(0x24c)],'logsDir':configController['paths'][_0x2c2583(0x22a)],'rendererUrl':process.env.VITE_DEV_SERVER_URL||join(shellConfig[_0x2c2583(0x65)+_0x2c2583(0x2d8)],_0x2c2583(0x1de),_0x2c2583(0x293)+'ml')}),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app[_0x2c2583(0x1ad)+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter,'sessionSqliteStore':ensureSessionSqliteStore()}),typeof productRuntime['migrateP'+'roductCo'+_0x2c2583(0x2a2)]===_0x2c2583(0x199)&&await productRuntime[_0x2c2583(0x23b)+_0x2c2583(0xf2)+'nfig']({'configController':configController,'mainLogger':mainLogger}),typeof productRuntime[_0x2c2583(0x23b)+_0x2c2583(0xf4)+'ta']===_0x2c2583(0x199)?await productRuntime['migrateP'+_0x2c2583(0xf4)+'ta']({'configController':configController,'generatedFilesStore':ensureGeneratedFilesStore(),'mainLogger':mainLogger,'sessionSqliteStore':ensureSessionSqliteStore()}):await ensureGeneratedFilesStore()[_0x2c2583(0x2eb)+_0x2c2583(0x122)+'d'](),attachGatewayBroadcastHandlers(gatewayController),await installIpcHandlers(),installClawspaceProtocolHandler(),registerShellShortcuts(),await createWindow(),await gatewayController[_0x2c2583(0x2e1)](),updateController['startBac'+'kgroundC'+'hecks'](),mainLogger?.[_0x2c2583(0x1f0)](_0x2c2583(0x187)+_0x2c2583(0x2b8)+_0x2c2583(0x1a9)+_0x2c2583(0x185));}function registerProcessLogHooks(){const _0x46f70a=_0x543b23;if(registerProcessLogHooks[_0x46f70a(0x2cf)+'ed'])return;registerProcessLogHooks[_0x46f70a(0x2cf)+'ed']=!![],process['on'](_0x46f70a(0x36a)+_0x46f70a(0x36b)+'n',_0x56bb6f=>{const _0x2125d5=_0x46f70a;mainLogger?.['error']('uncaught'+_0x2125d5(0x228)+'on',summarizeError(_0x56bb6f));}),process['on'](_0x46f70a(0x132)+'dRejecti'+'on',_0x4ded59=>{const _0x16e83f=_0x46f70a;mainLogger?.[_0x16e83f(0x1bd)]('unhandle'+_0x16e83f(0x359)+_0x16e83f(0x35e),summarizeError(_0x4ded59));}),app['on'](_0x46f70a(0x10c)+_0x46f70a(0x309)+'one',(_0x509de0,_0x38091c,_0x4452e3)=>{const _0x1b2091=_0x46f70a;mainLogger?.[_0x1b2091(0x1bd)](_0x1b2091(0x31a)+_0x1b2091(0x23a)+_0x1b2091(0x316),{'url':_0x38091c[_0x1b2091(0x2a8)](),'details':_0x4452e3});}),app['on'](_0x46f70a(0xe9)+_0x46f70a(0x2dd)+'ne',(_0x95e22f,_0x54a1ca)=>{const _0x760c4d=_0x46f70a;mainLogger?.[_0x760c4d(0x1bd)](_0x760c4d(0x317)+_0x760c4d(0x279)+'ne',{'details':_0x54a1ca});});}app['on']('window-a'+'ll-close'+'d',()=>{const _0x1173fd=_0x543b23;if(process[_0x1173fd(0x2fe)]!=='darwin')app['quit']();}),app['on'](_0x543b23(0xaf),async()=>{const _0x1b0a34=_0x543b23;if(isQuitting){app['quit']();return;}updateController?.[_0x1b0a34(0x127)+'ackgroun'+'dCheck'](_0x1b0a34(0x64)+_0x1b0a34(0x90)),BrowserWindow[_0x1b0a34(0x2bb)+_0x1b0a34(0x246)]()[_0x1b0a34(0xa3)]===0x0&&shellConfig&&await createWindow();}),app['on'](_0x543b23(0x2ff)+_0x543b23(0x259),_0x4fa557=>{const _0xa4afd=_0x543b23;isQuitting=!![],updateController?.[_0xa4afd(0x24d)+_0xa4afd(0x269)](),terminalManager?.[_0xa4afd(0x12d)](),terminalManager=null,productRuntimeHooks?.['dispose']?.();for(const _0x269a67 of Object[_0xa4afd(0x1ae)](productRuntimeHooks))delete productRuntimeHooks[_0x269a67];if(!gatewayController)return;mainLogger?.[_0xa4afd(0x1f0)](_0xa4afd(0x266)+_0xa4afd(0x264)+_0xa4afd(0xeb)+'teway'),_0x4fa557[_0xa4afd(0x215)+_0xa4afd(0x19d)](),void gatewayController[_0xa4afd(0x1a7)]()['finally'](()=>{const _0x5b0a4f=_0xa4afd;gatewayController=null,mainLogger?.['info'](_0x5b0a4f(0x1b3)+_0x5b0a4f(0x10f)+_0x5b0a4f(0x266)+'uit'),app[_0x5b0a4f(0x11f)]();});}),app['on'](_0x543b23(0x18b)+'t',()=>{const _0x2277f2=_0x543b23;globalShortcut[_0x2277f2(0x21e)+'er'](DEVTOOLS_ACCELERATOR);}),app[_0x543b23(0x231)+'y']()[_0x543b23(0x330)](boot)[_0x543b23(0x2b3)](_0xae1021=>{const _0xb2fd2d=_0x543b23;bootError=_0xae1021 instanceof Error?_0xae1021[_0xb2fd2d(0xbf)]:String(_0xae1021),mainLogger?.[_0xb2fd2d(0x1bd)](_0xb2fd2d(0x187)+'\x20main\x20bo'+_0xb2fd2d(0x25b)+'d',summarizeError(_0xae1021)),console[_0xb2fd2d(0x1bd)]('[wujie-s'+'hell]\x20fa'+_0xb2fd2d(0x26d)+'boot\x20ele'+_0xb2fd2d(0xc3)+'in',_0xae1021);});