@wujie-shell/core 3.0.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/wujie-shell.mjs +1 -1
- package/dist/src/agents/bundled-agent-skills.mjs +1 -1
- package/dist/src/agents/bundled-agents.mjs +1 -1
- package/dist/src/chat/media-archive.mjs +1 -1
- package/dist/src/chat/queue.mjs +1 -1
- package/dist/src/common/diagnostics.mjs +1 -1
- package/dist/src/common/logging.mjs +1 -1
- package/dist/src/common/runtime-logger.mjs +1 -1
- package/dist/src/common/user-events.mjs +1 -1
- package/dist/src/common/utils.mjs +1 -1
- package/dist/src/config/controller.mjs +1 -1
- package/dist/src/connectors/config-utils.mjs +1 -1
- package/dist/src/connectors/constants.mjs +1 -1
- package/dist/src/connectors/controller.mjs +1 -1
- package/dist/src/connectors/kdocs-cli.mjs +1 -1
- package/dist/src/electron/main.mjs +1 -1
- package/dist/src/electron/preload.mjs +1 -1
- package/dist/src/files/generated-files-store.mjs +1 -1
- package/dist/src/files/handlers.mjs +1 -1
- package/dist/src/gateway/chat-delta.mjs +1 -1
- package/dist/src/gateway/controller.mjs +1 -1
- package/dist/src/gateway/ws-client.mjs +1 -1
- package/dist/src/index.mjs +1 -1
- package/dist/src/log-reporting/handlers.mjs +1 -1
- package/dist/src/log-reporting/report-logs.mjs +1 -1
- package/dist/src/models/handlers.mjs +1 -1
- package/dist/src/preferences/store.mjs +1 -1
- package/dist/src/runtime/index.mjs +1 -1
- package/dist/src/runtime/patch-channel-plugin-runtime.mjs +1 -1
- package/dist/src/runtime/patch-chat-history-mixed-tool-content.mjs +1 -1
- package/dist/src/runtime/patch-session-store-sqlite.mjs +1 -1
- package/dist/src/runtime/plugin-sync.mjs +1 -1
- package/dist/src/sessions/agent-sessions-map-store.mjs +1 -1
- package/dist/src/sessions/runtime-bridge.mjs +1 -1
- package/dist/src/sessions/session-sqlite-store.mjs +1 -1
- package/dist/src/skills/import.mjs +1 -1
- package/dist/src/skills/market.mjs +1 -1
- package/dist/src/terminal/manager.mjs +1 -1
- package/dist/src/updates/controller.mjs +1 -1
- package/dist/src/updates/loader.mjs +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
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);});
|
|
1
|
+
const _0x548820=_0x5f40;(function(_0xa51dbe,_0x2316da){const _0x58d04c=_0x5f40,_0x18e54c=_0xa51dbe();while(!![]){try{const _0x27203e=-parseInt(_0x58d04c(0x394))/0x1*(parseInt(_0x58d04c(0x2ce))/0x2)+-parseInt(_0x58d04c(0x332))/0x3+-parseInt(_0x58d04c(0x3de))/0x4*(parseInt(_0x58d04c(0x325))/0x5)+parseInt(_0x58d04c(0x419))/0x6*(-parseInt(_0x58d04c(0x450))/0x7)+parseInt(_0x58d04c(0x1d2))/0x8*(-parseInt(_0x58d04c(0x348))/0x9)+-parseInt(_0x58d04c(0x2e0))/0xa*(parseInt(_0x58d04c(0x3cf))/0xb)+parseInt(_0x58d04c(0x24a))/0xc*(parseInt(_0x58d04c(0x31f))/0xd);if(_0x27203e===_0x2316da)break;else _0x18e54c['push'](_0x18e54c['shift']());}catch(_0x5609fd){_0x18e54c['push'](_0x18e54c['shift']());}}}(_0x23e7,0x6023f));import _0x77a00c 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';function _0x5f40(_0x47d4d5,_0x4ce366){_0x47d4d5=_0x47d4d5-0x15a;const _0x23e77c=_0x23e7();let _0x5f409f=_0x23e77c[_0x47d4d5];return _0x5f409f;}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';function _0x23e7(){const _0x5b53b4=['\x20failed:','cron','disable','shell-ru','.avi',':choose-','nnelEnab','window:c','setSelec','audio/og','install','led','update','loadFile','ap:entry','dCheck','resource','send','closeToT','chat:abo','edWindow','e\x20direct','d-state',':cancel','sPrivile','\x20excepti','ig\x20is\x20no','\x20complet','getState','payload','code','ask-user','set','357005BgyFZp','ed:\x20','les:reve','resolveS','fromEntr','captureI','er\x20missi','wujie-sh','lect-fil','paths','image/jp','models:s','aseMailC','bin','patch','116128lAKGkD','ame','ory','ItemSett','\x20main\x20bo','hatChann',':downloa','efault','.jpg','uri','red;\x20set','ustom-mo','generate','agentId','ot\x20faile','image/bm','appId','\x20configu','saveDing','started','pper\x20not','stration','les:dele','split','pping\x20ga','deleteOp',':reorder','ishu-cha','wBin','channelI','agent\x20id','configPa','skills:s','agent\x20al','.aac','hell:eve','ated','quitAndI','quit','maxToken','tabs-age','temperat','agent-ev','.gif','logs:exp','dist','mChannel','defaults','-mail','then','baseUrl','ure','lConfig','setOpenC','skills',':set-clo','director','kgroundC','est\x20fail','42486oiEQtc','enClawSk','isFinite','binary\x20f','saveWeco','Not\x20foun','type','file\x20wri','ocs','nelSessi','darwin','\x20main\x20wi','initiali','ad-binar','ocsCliCo','text/mar','syncRunt','enClawCh','Observed','tic',':run-onc','boot\x20ele','.m4a','markQuit','requestB','plugins','cancelFe','getFeish','igate','from','title','nel','limit','lized','skills:u','yInfo','get','max','e:open-d','ey\x20is\x20re','t-stream',':rename',':agent-m','imePlugi','fromWebC','way\x20is\x20n','ort','cron:upd','ishuRegi','default','-life-cy','ationSta','text','model-id','updated','287BzXoQm','ccept-ra','isFile','pServer','d\x20failed','chat-str','runtimeR','th\x20is\x20re','bot-chan','yed','activate','required','toLowerC','now','app:file','agents','hideBySe','entExmai','ilConnec','pluginId','setLogin','number','gatewayT','remove','hell:ipc','e:write-','saveQqbo','senderFr','orConfig','openAtLo','cancelKd','trim','mport-zi','deletedS','openDevT',':complet','e\x20comple','window:i','-pinned','fig','recursiv','dev','meta','logs\x20exp','Dialog',':list','tedModel','files','method','-logs','ing','dow\x20load','maxEntri','oot','peratedM','ontents','tp\x20','Update','get-conf','nectSess','key','tup:get','shuDocCl','tory','chat:str','model','.mov','g+xml','ist','sender','oken','getPinne','info','s:hide','\x20process','torConfi','replace','ted-stat',':gateway','[wujie-s','agents-u','onnector',':save-di','leted','utf8','focus','length,\x20','ired','readSess','ChannelC','unregist','video/we','et-selec','ipc','mpletion','feishu_d','t\x20initia','igWriteH',':save-qq','files:wr','ell\x20boot','local','odels','board:wr','showItem','ndlers','select\x20f','n\x20failed','ternally','startBac','isDestro','quired','ings','folder',':choose','ession','main','ile\x20comp','ector:\x20','push','multiSel','unref','api.open','s-maximi','nts','no\x20defau','dispose','ectory\x20o','will-qui','igSnapsh','-token','webConte','les:upse','node','customNa','agent','listImCh','files:re','gateway\x20','ile\x20read','settings','skills:d','avatar','feishu','showOpen','ists','meFilter','sConnect','e\x20first.','entDocsC','parse','ory-info','loadURL','preload.','ngs','.mp4',':runtime','preferen','s:upsert',':fork','Invalid\x20','ls:delet','uit','Config','rnal','s:reveal','ces.json','reate','window:o','SchemesA','open\x20ext','orted','\x20is\x20requ','input','mand','and-inst','preventD','nt-state','902152ObJUtW','app:syst','saveTenc','ishu-doc','logs:ope','itialize','ap:upser','der/mode','migrateP','chat','app:upda','getFocus','.bmp',':open-cl','gin','lastInde','cCliConn','getVersi','.svg','openExte','config:c','lawSkill','uncaught','onfig\x20up','product\x20','-status','nectorCo','audio/aa','tup:set','provider','window-a','models:c','saveFeis','em:resta','Updates','uired','dataDir',':diagnos','logs\x20dir','upsert','logs:lis','product-','hell]\x20fa','wechat','deleteFi','ell-cli.','text/pla','isArray','command','close','in;\x20char','alized','writeTex','ies','sharedCo','reasonin','und','promises','sion','ocess\x20go','/chat/co','log','select\x20d','.webp','.flac','toISOStr','ai.com/v','devtools','answerAs','agents:u','control','oggle-ma','isPackag','whenRead','app_acti','dels','getStatu','getAllWi','agents:c','download','isMaximi','applicat','ssion','pop','ent','inned','one','pened','saveKdoc','catch','pdate','ot\x20initi',':save-we','image/pn','est\x20comp','startFei','nabled','controll','ted\x20conn','logsDir','l\x20first','.txt','electron','.\x20Run\x20wu','mail','-context','runtimeI','ted-ever','lt\x20model','find','files:li','rControl','-weixin','gatewayP','ncident','assign','before-i','tus','url','message','29660700WZPEeT','setSelfO','groups','delete','path','st-direc','register','.md','icktime',':resize','stop','toWeb','openFile','selected','getKdocs','function','csCliCon','ell\x20conf','app:tray','href','.ogg','window:t','plugins:','nges',':delete','onfig','dSession','ector\x20se','wujiecla','slice','te:downl','D,\x20OPTIO','iConnect','writeEve','uest-age','json','onnectSt','handle','.webm','illEntry','ell\x20gate','setImCha','et-self-','roductDa','manifest','file\x20rea','markConf','plugin\x20e','GET,\x20HEA','enable','shuRegis','agent\x20up','video/mp','#!/bin/s','ove','image/sv','pathname','agent-','runtime:','rayOnClo','ontext','dated','relaunch','uit:\x20sto','agents:w','ted','content-','l\x20prepar','ernal\x20ur','zed','nstall','restart','ections','platform','onfigPat','gateway-','logs:wri','maximize','Unsuppor','d\x20reject','video/x-','ources','before-q','content','session-','saveNetE','talkDocC','image/we','chatChan','-invalid','est_fail','app:gene','liConnec','failed','create','unmaximi','Terminal','deleteIm','https://','stream','range,\x20a','before\x20q','ocess-go','customMo','\x20shortcu','s:list','ignore','config:i','ipc\x20requ','nfo','getPath','renderer','kUserQue','lawPlugi','tabs:req','plugin\x20c','huChanne','resolveC',':answer-','unknown',':create','openDire','reorderP','cwd','indexOf','includes','ndows','tease-ma','kdown;\x20c','getLogin','versions','tateDir','33122IpLqNY','productN','skills:i','openclaw','ngtalk-d','uRegistr','writeSha','keys','figs',':status','runOnce','logs','com-chan','ate','audio/wa','untimeHa','msvideo','abort','20uVwHxm','-questio','ready','level','\x20a\x20provi','ntime','list','app.asar','index.ht','start','lawMcpSe','artifact','diagnost','-session','eted','omplete','te\x20compl','stopped\x20','byteLeng',':unpin','ools','annelCon','oad','ctory','tatus','app:clip','ase','Keys','logs:rea','finally','error','index.mj','minimize','elete','l\x20reques','ntext','keyDown','string','Custom','producti','render-p','ap:get','emoji','ileName','context','hostname','i-window','models','nConfig','terminal','readConf','nfig','ell:even','lawChann','pdated','plugin\x20d','saveQqMa','app:info','product','deleteCu','filePath','dAt','bytes\x20','13dkteyv','entries','unhandle',':loading','tate','agents:l','115rabHsV','eating',':save-te','test','ectory','g_conten','projectR','hide','open','showSave','headers','teway','canceled','1882617JTZbcw','roductCo','tf-8','audio/fl','succeede','workspac','.mkv','ocus','omModel','.jpeg','sPath','filters','ready\x20ex','image/gi','updateOp','size','CommandO','timeout','runtime\x20','les:hide','protocol','agent\x20cr','9fxorFs','-by-sess','path\x20is\x20','fromIpc','ndow','\x20not\x20con','matroska','setSetti','model\x20ht','extensio','set=utf-','files:se','ywhere','ite-bina','iled\x20to\x20','ncent-ex','ls:list','m-channe','shared-c','warn','name','enClawMc','clawspac','tLogs','all','-restart','-shortcu','getRecen','range,\x20c','detach','lConnect','length','rated-fi','checkFor','figured:','ximize','ype','Version','filter','status','em:open-','IPC\x20requ','parseInt','xOf','ssion:\x20','record','audio/mp','range','-data','video/qu','nnectSes','h\x0aexec\x20\x22','andledIn','update-c','ion','targetDi','ite','ensureIn','uDocCliC','-once','app:open','min','ot\x20compl','sessionK','kdocs','complete','s:delete',':save-fe','elConfig','.png','prod',':save-kd','atus','primary','sessions','ls:set-e','19WbdibP','bytes','ith-sess','saveCust','ged','getURL','hidden','timeoutM','agent\x20de','isIntege','map','-request','-port','arch','temp','ions-lis','jie-shel','object','choices','Session','tabs:ref','cancelWe','navigati','cron:run','config','Entry'];_0x23e7=function(){return _0x5b53b4;};return _0x23e7();}const __dirname=dirname(fileURLToPath(import.meta.url)),preloadPath=join(__dirname,_0x548820(0x1b9)+'mjs'),{app,BrowserWindow,clipboard,dialog,globalShortcut,ipcMain,protocol,shell}=_0x77a00c,DEVTOOLS_ACCELERATOR=_0x548820(0x342)+_0x548820(0x241)+'+Shift+I',CLAWSPACE_PROTOCOL_SCHEME=_0x548820(0x35e)+'e',DEBUG_STDOUT=process.env.WUJIE_SHELL_DEBUG==='1'||process.env.VITE_DEV_SERVER_URL||process.env.NODE_ENV!==_0x548820(0x307)+'on',LOCAL_FILE_MIME_TYPES=new Map([[_0x548820(0x237),_0x548820(0x200)+'in;\x20char'+'set=utf-'+'8'],[_0x548820(0x251),_0x548820(0x428)+_0x548820(0x2ca)+'harset=u'+_0x548820(0x334)],[_0x548820(0x3e6),_0x548820(0x3d9)+'eg'],[_0x548820(0x33b),_0x548820(0x3d9)+'eg'],[_0x548820(0x38d),_0x548820(0x22f)+'g'],[_0x548820(0x409),_0x548820(0x33f)+'f'],[_0x548820(0x1de),_0x548820(0x3ed)+'p'],[_0x548820(0x1e4),_0x548820(0x281)+_0x548820(0x163)],[_0x548820(0x211),_0x548820(0x2a1)+'bp'],[_0x548820(0x1bb),_0x548820(0x27e)+'4'],[_0x548820(0x162),_0x548820(0x379)+_0x548820(0x252)],[_0x548820(0x3b2),_0x548820(0x29a)+_0x548820(0x2de)],[_0x548820(0x338),_0x548820(0x29a)+_0x548820(0x34e)],[_0x548820(0x270),_0x548820(0x17b)+'bm'],['.mp3',_0x548820(0x376)+'eg'],['.wav',_0x548820(0x2dc)+'v'],[_0x548820(0x42f),_0x548820(0x376)+'4'],[_0x548820(0x400),_0x548820(0x1ed)+'c'],[_0x548820(0x25e),_0x548820(0x3b7)+'g'],[_0x548820(0x212),_0x548820(0x335)+'ac']]);protocol['register'+_0x548820(0x1c9)+_0x548820(0x3c6)+_0x548820(0x398)]([{'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(_0x1071e3){const _0x486002=_0x548820;for(const _0x4900a7 of[_0x486002(0x295)+_0x486002(0x36f),_0x486002(0x295)+_0x486002(0x20f),_0x486002(0x455)+'eam-even'+'t',_0x486002(0x29e)+_0x486002(0x44f),_0x486002(0x392)+_0x486002(0x2a3)+_0x486002(0x402),_0x486002(0x408)+_0x486002(0x226),_0x486002(0x170)+_0x486002(0x316),'ask-user'+_0x486002(0x2e1)+'n']){_0x1071e3['on'](_0x4900a7,_0x52bbdb=>broadcast(_0x4900a7,_0x52bbdb));}}function ensureSessionSqliteStore(){const _0x390ab0=_0x548820;if(sessionSqliteStore)return sessionSqliteStore;if(!configController)throw new Error('wujie-sh'+_0x390ab0(0x25b)+_0x390ab0(0x3c8)+_0x390ab0(0x180)+_0x390ab0(0x43a));return sessionSqliteStore=createSessionSqliteStore({'stateDir':configController[_0x390ab0(0x3d2)+'tateDir']()}),sessionSqliteStore;}function ensureGeneratedFilesStore(){const _0xcaffb9=_0x548820;if(generatedFilesStore)return generatedFilesStore;if(!configController)throw new Error(_0xcaffb9(0x3d6)+_0xcaffb9(0x25b)+_0xcaffb9(0x3c8)+_0xcaffb9(0x180)+_0xcaffb9(0x43a));return generatedFilesStore=createGeneratedFilesStore({'stateDir':configController['resolveS'+_0xcaffb9(0x2cd)]()}),generatedFilesStore;}async function ensureGatewayControllerStarted(){const _0x1dd21e=_0x548820;if(gatewayController)return gatewayController;if(!shellConfig||!configController)throw new Error(bootError?_0x1dd21e(0x3d6)+_0x1dd21e(0x184)+_0x1dd21e(0x3ae)+'\x20'+bootError:_0x1dd21e(0x3d6)+_0x1dd21e(0x272)+_0x1dd21e(0x446)+_0x1dd21e(0x22d)+_0x1dd21e(0x205));return mainLogger?.['warn'](_0x1dd21e(0x1aa)+_0x1dd21e(0x233)+_0x1dd21e(0x3d5)+'ng;\x20recr'+_0x1dd21e(0x326)),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app[_0x1dd21e(0x1e3)+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter,'sessionSqliteStore':ensureSessionSqliteStore()}),attachGatewayBroadcastHandlers(gatewayController),await gatewayController[_0x1dd21e(0x2e9)](),gatewayController;}function getMode(){const _0x3c8902=_0x548820;return process.env.VITE_DEV_SERVER_URL?_0x3c8902(0x479):_0x3c8902(0x38e);}function isGatewayNotInitializedError(_0x1ac9a9){const _0x2c1f24=_0x548820;return _0x1ac9a9 instanceof Error&&_0x1ac9a9[_0x2c1f24(0x249)]===_0x2c1f24(0x3d6)+_0x2c1f24(0x272)+'way\x20is\x20n'+_0x2c1f24(0x22d)+_0x2c1f24(0x205);}function revealPathInFolder(_0x59e7f2){const _0x107e4c=_0x548820,_0x2ae556=String(_0x59e7f2||'')[_0x107e4c(0x46f)]();if(!_0x2ae556)return{'ok':![],'error':_0x107e4c(0x34a)+_0x107e4c(0x45b)};return shell[_0x107e4c(0x188)+'InFolder'](_0x2ae556),{'ok':!![]};}function resolveProjectRoot(){const _0x3f9a8f=_0x548820;if(process.env.WUJIE_SHELL_PROJECT_ROOT)return resolve(process.env.WUJIE_SHELL_PROJECT_ROOT);if(app[_0x3f9a8f(0x21a)+'ed']&&process[_0x3f9a8f(0x3be)+_0x3f9a8f(0x33c)])return join(process['resource'+'sPath'],_0x3f9a8f(0x2e7));return resolve(process[_0x3f9a8f(0x2c5)]());}function getLocalFileMimeType(_0x3c8810){const _0x165e23=_0x548820;return LOCAL_FILE_MIME_TYPES[_0x165e23(0x43d)](_0x3c8810[_0x165e23(0x267)](_0x3c8810[_0x165e23(0x1e1)+'xOf']('.'))[_0x165e23(0x45c)+_0x165e23(0x2fa)]())||_0x165e23(0x223)+'ion/octe'+_0x165e23(0x441);}function parseSingleRangeHeader(_0x1ba739,_0x5ee8a5){const _0x50a67e=_0x548820,_0x497fd1=/^bytes=(\d*)-(\d*)$/i['exec'](_0x1ba739['trim']());if(!_0x497fd1)return null;const [,_0x443419,_0x40c0a9]=_0x497fd1;if(!_0x443419&&!_0x40c0a9)return null;if(!_0x443419){const _0x5b8acd=Number[_0x50a67e(0x372)](_0x40c0a9,0xa);if(!Number[_0x50a67e(0x41b)](_0x5b8acd)||_0x5b8acd<=0x0)return null;const _0x35d795=Math[_0x50a67e(0x43e)](_0x5ee8a5-_0x5b8acd,0x0);return{'start':_0x35d795,'end':_0x5ee8a5-0x1};}const _0x14284e=Number['parseInt'](_0x443419,0xa);if(!Number['isFinite'](_0x14284e)||_0x14284e<0x0||_0x14284e>=_0x5ee8a5)return null;const _0x1a8e85=_0x40c0a9?Number[_0x50a67e(0x372)](_0x40c0a9,0xa):_0x5ee8a5-0x1;if(!Number[_0x50a67e(0x41b)](_0x1a8e85)||_0x1a8e85<_0x14284e)return null;return{'start':_0x14284e,'end':Math[_0x50a67e(0x385)](_0x1a8e85,_0x5ee8a5-0x1)};}function decodeClawspacePath(_0x54d16d){const _0x499e87=_0x548820;try{const _0x12a55c=new URL(_0x54d16d);if(_0x12a55c[_0x499e87(0x346)]!==CLAWSPACE_PROTOCOL_SCHEME+':')return null;if(_0x12a55c[_0x499e87(0x30d)]!==_0x499e87(0x185))return null;const _0x1217bc=decodeURIComponent(_0x12a55c[_0x499e87(0x282)]);if(!_0x1217bc)return null;if(/^\/[A-Za-z]:\//[_0x499e87(0x328)](_0x1217bc))return _0x1217bc[_0x499e87(0x267)](0x1);return _0x1217bc;}catch{return null;}}function createClawspaceHeaders(_0x53bd1e={}){const _0x1430b4=_0x548820;return new Headers({'access-control-allow-origin':'*','access-control-allow-methods':_0x1430b4(0x27a)+_0x1430b4(0x269)+'NS','access-control-allow-headers':_0x1430b4(0x364)+'ontent-t'+_0x1430b4(0x36c),'access-control-expose-headers':_0x1430b4(0x28c)+_0x1430b4(0x176)+_0x1430b4(0x28c)+_0x1430b4(0x2ae)+_0x1430b4(0x451)+_0x1430b4(0x261),..._0x53bd1e});}function createLocalFileResponse(_0x20b0a8,_0x32be8d){const _0x1afe3f=_0x548820,_0x4fdd47=statSync(_0x32be8d);if(!_0x4fdd47[_0x1afe3f(0x452)]())return new Response(_0x1afe3f(0x41e)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x1afe3f(0x200)+_0x1afe3f(0x204)+_0x1afe3f(0x352)+'8'})});const _0x37da39=getLocalFileMimeType(_0x32be8d),_0x42fe7b=createClawspaceHeaders({'content-type':_0x37da39,'accept-ranges':_0x1afe3f(0x395),'cache-control':'no-store'});if(_0x20b0a8['method']==='HEAD')return _0x42fe7b[_0x1afe3f(0x3ce)](_0x1afe3f(0x28c)+_0x1afe3f(0x367),String(_0x4fdd47['size'])),new Response(null,{'status':0xc8,'headers':_0x42fe7b});const _0x44cd36=_0x20b0a8['headers'][_0x1afe3f(0x43d)]('range');if(!_0x44cd36)return _0x42fe7b[_0x1afe3f(0x3ce)](_0x1afe3f(0x28c)+'length',String(_0x4fdd47[_0x1afe3f(0x341)])),new Response(Readable[_0x1afe3f(0x255)](createReadStream(_0x32be8d)),{'status':0xc8,'headers':_0x42fe7b});const _0x158336=parseSingleRangeHeader(_0x44cd36,_0x4fdd47[_0x1afe3f(0x341)]);if(!_0x158336)return new Response(null,{'status':0x1a0,'headers':createClawspaceHeaders({...Object[_0x1afe3f(0x3d3)+_0x1afe3f(0x207)](_0x42fe7b[_0x1afe3f(0x320)]()),'content-range':'bytes\x20*/'+_0x4fdd47[_0x1afe3f(0x341)]})});const {start:_0x58c21e,end:_0x38899f}=_0x158336,_0x16e6ae=_0x38899f-_0x58c21e+0x1,_0x3e377e=new Headers(_0x42fe7b);return _0x3e377e[_0x1afe3f(0x3ce)](_0x1afe3f(0x28c)+_0x1afe3f(0x367),String(_0x16e6ae)),_0x3e377e[_0x1afe3f(0x3ce)](_0x1afe3f(0x28c)+_0x1afe3f(0x377),_0x1afe3f(0x31e)+_0x58c21e+'-'+_0x38899f+'/'+_0x4fdd47[_0x1afe3f(0x341)]),new Response(Readable[_0x1afe3f(0x255)](createReadStream(_0x32be8d,{'start':_0x58c21e,'end':_0x38899f})),{'status':0xce,'headers':_0x3e377e});}function installClawspaceProtocolHandler(){const _0x689e4d=_0x548820;protocol[_0x689e4d(0x26f)](CLAWSPACE_PROTOCOL_SCHEME,_0x3c3826=>{const _0x3fe651=_0x689e4d;if(_0x3c3826[_0x3fe651(0x480)]==='OPTIONS')return new Response(null,{'status':0xcc,'headers':createClawspaceHeaders()});const _0x5d3eea=decodeClawspacePath(_0x3c3826[_0x3fe651(0x248)]);if(!_0x5d3eea)return new Response(_0x3fe651(0x1c0)+_0x3fe651(0x35e)+'e\x20url',{'status':0x190,'headers':createClawspaceHeaders({'content-type':_0x3fe651(0x200)+'in;\x20char'+_0x3fe651(0x352)+'8'})});if(!existsSync(_0x5d3eea))return new Response(_0x3fe651(0x41e)+'d',{'status':0x194,'headers':createClawspaceHeaders({'content-type':_0x3fe651(0x200)+'in;\x20char'+_0x3fe651(0x352)+'8'})});return createLocalFileResponse(_0x3c3826,_0x5d3eea);});}function broadcast(_0x1dfa07,_0x43f279){const _0x479aab=_0x548820;DEBUG_STDOUT&&console[_0x479aab(0x168)](_0x479aab(0x16f)+_0x479aab(0x401)+'nt]',_0x1dfa07,summarizePayload(_0x43f279,{'maxDepth':0x2}));for(const _0x1399bd of BrowserWindow[_0x479aab(0x21f)+_0x479aab(0x2c8)]()){!_0x1399bd[_0x479aab(0x1a3)+_0x479aab(0x19c)][_0x479aab(0x18e)+_0x479aab(0x459)]()&&_0x1399bd[_0x479aab(0x1a3)+'nts'][_0x479aab(0x3bf)](_0x479aab(0x3d6)+_0x479aab(0x314)+'t',{'name':_0x1dfa07,'payload':_0x43f279});}}async function loadProductRuntime(){const _0x325cb9=_0x548820,_0x4db085=[join(shellConfig[_0x325cb9(0x32b)+_0x325cb9(0x485)],_0x325cb9(0x3b1)+'ntime',_0x325cb9(0x2ff)+'s'),join(app['getAppPa'+'th'](),_0x325cb9(0x3b1)+_0x325cb9(0x2e5),_0x325cb9(0x2ff)+'s')],_0x4cdc68=_0x4db085[_0x325cb9(0x23f)](_0x3d594e=>existsSync(_0x3d594e));if(!_0x4cdc68)return mainLogger?.['info'](_0x325cb9(0x1ea)+'runtime\x20'+_0x325cb9(0x351)+'n\x20not\x20fo'+_0x325cb9(0x20a),{'runtimeCandidates':_0x4db085}),{};try{const _0x17d5d0=await import(pathToFileURL(_0x4cdc68)[_0x325cb9(0x25d)]);return mainLogger?.['info'](_0x325cb9(0x1ea)+_0x325cb9(0x344)+'extensio'+'n\x20loaded',{'runtimePath':_0x4cdc68}),_0x17d5d0;}catch(_0x17c7d4){mainLogger?.[_0x325cb9(0x2fe)](_0x325cb9(0x1ea)+_0x325cb9(0x344)+_0x325cb9(0x351)+_0x325cb9(0x18b)+'\x20to\x20load',{'runtimePath':_0x4cdc68,'error':summarizeError(_0x17c7d4)});throw _0x17c7d4;}}function openDevToolsForActiveContext(){const _0x539d10=_0x548820,_0x4e1524=BrowserWindow[_0x539d10(0x1dd)+_0x539d10(0x3c2)]()||mainWindow;if(!_0x4e1524||_0x4e1524[_0x539d10(0x18e)+_0x539d10(0x459)]())return{'ok':![]};return _0x4e1524[_0x539d10(0x1a3)+_0x539d10(0x19c)][_0x539d10(0x472)+_0x539d10(0x2f4)]({'mode':'detach'}),_0x4e1524[_0x539d10(0x1a3)+_0x539d10(0x19c)][_0x539d10(0x3bf)](_0x539d10(0x3d6)+_0x539d10(0x314)+'t',{'name':_0x539d10(0x215)+_0x539d10(0x362)+'t','payload':{'accelerator':DEVTOOLS_ACCELERATOR}}),{'ok':!![]};}function registerShellShortcuts(){const _0x265ded=_0x548820;globalShortcut[_0x265ded(0x17a)+'er'](DEVTOOLS_ACCELERATOR);const _0x3e7466=globalShortcut['register'](DEVTOOLS_ACCELERATOR,openDevToolsForActiveContext);!_0x3e7466&&console[_0x265ded(0x35b)](_0x265ded(0x16f)+_0x265ded(0x1fc)+_0x265ded(0x356)+_0x265ded(0x250)+_0x265ded(0x2b2)+'t:\x20'+DEVTOOLS_ACCELERATOR);}async function getRuntimeResourceStatus(){const _0x4c2561=_0x548820;try{const _0x2d2874=await loadRuntimeInfo(shellConfig[_0x4c2561(0x32b)+_0x4c2561(0x485)]),_0x5c1645=_0x2d2874[_0x4c2561(0x276)]||{};return{'ok':!![],'runtimeRoot':_0x2d2874[_0x4c2561(0x456)+'oot'],'openclawVersion':_0x2d2874[_0x4c2561(0x2d1)+_0x4c2561(0x36d)],'generatedAt':_0x5c1645[_0x4c2561(0x3ea)+_0x4c2561(0x31d)]||null,'pluginCount':Array[_0x4c2561(0x201)](_0x5c1645[_0x4c2561(0x432)])?_0x5c1645[_0x4c2561(0x432)][_0x4c2561(0x367)]:0x0,'plugins':Array[_0x4c2561(0x201)](_0x5c1645[_0x4c2561(0x432)])?_0x5c1645[_0x4c2561(0x432)]:[],'agents':_0x5c1645[_0x4c2561(0x45f)]||null,'skills':_0x5c1645[_0x4c2561(0x414)]||null,'wrapper':_0x5c1645[_0x4c2561(0x266)+_0x4c2561(0x3fa)]||null,'product':_0x5c1645[_0x4c2561(0x31a)]||null};}catch(_0x23d82a){return{'ok':![],'runtimeRoot':resolveRuntimeRoot(shellConfig?.[_0x4c2561(0x32b)+_0x4c2561(0x485)]||resolveProjectRoot()),'error':_0x23d82a instanceof Error?_0x23d82a[_0x4c2561(0x249)]:String(_0x23d82a)};}}async function createWindow(){const _0x11c76d=_0x548820,_0x2fa102=process.env.VITE_DEV_SERVER_URL||join(shellConfig[_0x11c76d(0x32b)+_0x11c76d(0x485)],_0x11c76d(0x40b),'index.ht'+'ml'),_0x39fd8f=process[_0x11c76d(0x293)]===_0x11c76d(0x423);mainLogger?.[_0x11c76d(0x168)]('creating'+_0x11c76d(0x424)+_0x11c76d(0x34c),{'rendererUrl':_0x2fa102,'mode':getMode()}),mainWindow=new BrowserWindow({'width':0x49c,'height':0x30c,'minWidth':0x384,'minHeight':0x26c,'title':shellConfig[_0x11c76d(0x2cf)+_0x11c76d(0x3df)],'backgroundColor':_0x39fd8f?'#0000000'+'0':'#f8fafc','titleBarStyle':_0x39fd8f?_0x11c76d(0x39a):_0x11c76d(0x44a),..._0x39fd8f?{'titleBarOverlay':!![],'trafficLightPosition':{'x':0x10,'y':0xc}}:{},..._0x39fd8f?{'vibrancy':'sidebar'}:{},'webPreferences':{'preload':preloadPath,'contextIsolation':!![],'nodeIntegration':![],'sandbox':![]}}),mainWindow[_0x11c76d(0x1a3)+'nts']['on'](_0x11c76d(0x246)+'nput-eve'+'nt',_0x18f744=>{const _0x1d2a64=_0x11c76d,_0x4595c2=_0x18f744[_0x1d2a64(0x1cd)];if(!_0x4595c2||_0x4595c2[_0x1d2a64(0x41f)]!==_0x1d2a64(0x304))return;const _0x100edd=String(_0x4595c2[_0x1d2a64(0x15c)]||'')[_0x1d2a64(0x45c)+_0x1d2a64(0x2fa)](),_0x423194=_0x100edd==='r',_0x241d72=process[_0x1d2a64(0x293)]==='darwin'?_0x4595c2[_0x1d2a64(0x47a)]===!![]:_0x4595c2[_0x1d2a64(0x218)]===!![];if(!_0x423194||!_0x241d72)return;_0x18f744[_0x1d2a64(0x1d0)+_0x1d2a64(0x3e5)](),broadcast('tabs-com'+_0x1d2a64(0x1ce),{'type':_0x1d2a64(0x3aa)+'on','action':'reload'});}),mainWindow['on'](_0x11c76d(0x175),()=>{const _0x35fe0d=_0x11c76d;updateController?.['requestB'+'ackgroun'+'dCheck']('window_f'+_0x35fe0d(0x339));});const _0x31db16=process.env.VITE_DEV_SERVER_URL;_0x31db16?(await mainWindow[_0x11c76d(0x1b8)](_0x31db16),process.env.WUJIE_SHELL_OPEN_DEVTOOLS==='1'&&mainWindow[_0x11c76d(0x1a3)+_0x11c76d(0x19c)][_0x11c76d(0x472)+_0x11c76d(0x2f4)]({'mode':_0x11c76d(0x365)})):await mainWindow[_0x11c76d(0x3bb)](join(shellConfig[_0x11c76d(0x32b)+_0x11c76d(0x485)],_0x11c76d(0x40b),_0x11c76d(0x2e8)+'ml')),mainLogger?.['info']('main\x20win'+_0x11c76d(0x483)+'ed',{'rendererUrl':_0x2fa102,'mode':getMode()});}async function installIpcHandlers(){const _0x1e5349=_0x548820,_0x24e5da=(_0x28d84c,_0x525e6b)=>{const _0x197f09=_0x5f40;ipcMain[_0x197f09(0x26f)](_0x28d84c,async(_0xc4891f,_0x466e6d)=>{const _0x34151b=_0x197f09,_0x217218=Date[_0x34151b(0x45d)](),_0x14f08f=_0xc4891f[_0x34151b(0x46b)+_0x34151b(0x3df)]?.['url']||_0xc4891f[_0x34151b(0x165)][_0x34151b(0x399)]();ipcLogger?.[_0x34151b(0x168)](_0x34151b(0x2b6)+'est\x20star'+_0x34151b(0x28b),{'channel':_0x28d84c,'senderUrl':_0x14f08f,'payload':summarizePayload(_0x466e6d)});DEBUG_STDOUT&&console[_0x34151b(0x168)](_0x34151b(0x16f)+_0x34151b(0x468)+']',_0x28d84c,_0x34151b(0x3f1),summarizePayload(_0x466e6d));try{let _0x312232;try{_0x312232=await _0x525e6b(_0xc4891f,_0x466e6d);}catch(_0x2b59a9){if(!isGatewayNotInitializedError(_0x2b59a9))throw _0x2b59a9;await ensureGatewayControllerStarted(),_0x312232=await _0x525e6b(_0xc4891f,_0x466e6d);}const _0x469062=Date[_0x34151b(0x45d)]()-_0x217218;return ipcLogger?.['info'](_0x34151b(0x2b6)+_0x34151b(0x230)+_0x34151b(0x173),{'channel':_0x28d84c,'durationMs':_0x469062,'result':summarizePayload(_0x312232,{'maxDepth':0x2})}),await userEventWriter?.['fromIpc']({'channel':_0x28d84c,'payload':_0x466e6d,'result':_0x312232,'durationMs':_0x469062,'status':_0x34151b(0x336)+'d'}),DEBUG_STDOUT&&console[_0x34151b(0x168)](_0x34151b(0x16f)+_0x34151b(0x468)+']',_0x28d84c,'complete'+'d',summarizePayload(_0x312232,{'maxDepth':0x2})),_0x312232;}catch(_0x1f8a35){const _0x348d66=Date[_0x34151b(0x45d)]()-_0x217218;ipcLogger?.[_0x34151b(0x2fe)](_0x34151b(0x2b6)+'est\x20fail'+'ed',{'channel':_0x28d84c,'durationMs':_0x348d66,'error':summarizeError(_0x1f8a35)}),await userEventWriter?.[_0x34151b(0x34b)]({'channel':_0x28d84c,'payload':_0x466e6d,'error':_0x1f8a35,'durationMs':_0x348d66,'status':_0x34151b(0x2a7)}),await diagnosticsWriter?.['captureI'+'ncident'](diagnosticEventFromError(_0x1f8a35,{'category':_0x34151b(0x17d),'event':'ipc_requ'+_0x34151b(0x2a4)+'ed','message':_0x34151b(0x371)+_0x34151b(0x418)+_0x34151b(0x3d0)+_0x28d84c,'durationMs':_0x348d66,'meta':{'channel':_0x28d84c,'senderUrl':_0x14f08f,'payload':summarizePayload(_0x466e6d)}}));DEBUG_STDOUT&&console[_0x34151b(0x2fe)]('[wujie-s'+_0x34151b(0x468)+']',_0x28d84c,_0x34151b(0x2a7),summarizeError(_0x1f8a35));throw _0x1f8a35;}});},_0x6c6bcd=()=>{const _0x543dac=_0x5f40;if(!gatewayController)throw new Error(bootError?_0x543dac(0x3d6)+_0x543dac(0x184)+_0x543dac(0x3ae)+'\x20'+bootError:_0x543dac(0x3d6)+_0x543dac(0x272)+_0x543dac(0x446)+_0x543dac(0x22d)+'alized');return gatewayController;},_0x2c3f8d=()=>{const _0x2aafc3=_0x5f40;if(typeof productRuntime['register'+'ProductR'+_0x2aafc3(0x2dd)+_0x2aafc3(0x189)]!==_0x2aafc3(0x259))return;const _0x50c53a=productRuntime[_0x2aafc3(0x250)+'ProductR'+'untimeHa'+_0x2aafc3(0x189)]({'app':app,'BrowserWindow':BrowserWindow,'broadcast':broadcast,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'dialog':dialog,'exportLogsArchive':exportLogsArchive,'filesLogger':filesLogger,'getRuntimeSpawnContext':getRuntimeSpawnContext,'handle':_0x24e5da,'mainLogger':mainLogger,'mainWindow':mainWindow,'rendererLogger':rendererLogger,'requireGateway':_0x6c6bcd,'sep':sep,'openClawConfigHandlers':{'update':(..._0xc8fda8)=>configController['updateOp'+'enClawCo'+'nfig'](..._0xc8fda8),'setPluginConfig':_0x23f673=>configController[_0x2aafc3(0x413)+_0x2aafc3(0x2bb)+_0x2aafc3(0x310)](_0x23f673),'setChannelConfig':_0x97137c=>configController['setOpenC'+'lawChann'+'elConfig'](_0x97137c),'deleteChannelConfig':_0x593e98=>configController['deleteOp'+'enClawCh'+_0x2aafc3(0x2f5)+_0x2aafc3(0x477)](_0x593e98),'setSkillEntry':_0x4ffddc=>configController[_0x2aafc3(0x413)+_0x2aafc3(0x1e7)+_0x2aafc3(0x3ad)](_0x4ffddc),'deleteSkillEntry':_0x246568=>configController[_0x2aafc3(0x3f7)+_0x2aafc3(0x41a)+_0x2aafc3(0x271)](_0x246568),'setMcpServer':_0x375a8f=>configController[_0x2aafc3(0x413)+'lawMcpSe'+'rver'](_0x375a8f),'deleteMcpServer':_0xb8600c=>configController[_0x2aafc3(0x3f7)+'enClawMc'+_0x2aafc3(0x453)](_0xb8600c)},'shell':shell,'shellConfig':shellConfig,'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand,'summarizePayload':summarizePayload,'summarizeText':summarizeText,'toHomePath':toHomePath,'writeMutableConfig':_0x531f4a})||{};Object[_0x2aafc3(0x245)](productRuntimeHooks,_0x50c53a);};_0x24e5da(_0x1e5349(0x319),async()=>({'name':shellConfig[_0x1e5349(0x2cf)+'ame'],'version':app[_0x1e5349(0x1e3)+'on'](),'appId':shellConfig[_0x1e5349(0x3ee)],'dataDir':shellConfig[_0x1e5349(0x1f6)]})),_0x24e5da(_0x1e5349(0x384)+'-url',async(_0x5f31ea,_0x284423)=>{const _0x59e5b0=_0x1e5349,_0x29ad8b=typeof _0x284423===_0x59e5b0(0x305)?_0x284423:'';if(!_0x29ad8b)return{'ok':![]};return filesLogger?.['info'](_0x59e5b0(0x1ca)+_0x59e5b0(0x28e)+_0x59e5b0(0x302)+'ted',{'url':summarizeText(_0x29ad8b,0xa0)}),await shell[_0x59e5b0(0x1e5)+_0x59e5b0(0x1c4)](_0x29ad8b),{'ok':!![]};});const _0x531f4a=async(_0x252dd0,_0x31e07e)=>{const _0x121a14=_0x1e5349;return configController[_0x121a14(0x278)+_0x121a14(0x181)+_0x121a14(0x37c)+_0x121a14(0x18c)](),await configController['writeCon'+_0x121a14(0x477)](_0x252dd0,_0x31e07e),{'ok':!![]};};_0x2c3f8d(),_0x24e5da('skills:i'+_0x1e5349(0x470)+'p',async(_0x1ad0c9,_0xa77440)=>importMarketSkillZip({'payload':_0xa77440,'importSkillZip':_0x2fb36d=>importSkillZip({..._0x2fb36d,'app':app,'dialog':dialog,'dialogWindow':BrowserWindow['fromWebC'+_0x1e5349(0x487)](_0x1ad0c9[_0x1e5349(0x165)])||mainWindow,'configController':configController}),'configController':configController})),_0x24e5da(_0x1e5349(0x43b)+_0x1e5349(0x22c),(_0x393d22,_0x2c81d1)=>updateManagedSkillConfig({'payload':_0x2c81d1,'configController':configController})),_0x24e5da(_0x1e5349(0x1ad)+_0x1e5349(0x301),(_0x1a74ba,_0x1cdfc9)=>deleteMarketSkillRegistryEntry({'payload':_0x1cdfc9,'deleteManagedSkill':_0x3bf386=>deleteManagedSkill({..._0x3bf386,'gateway':_0x6c6bcd(),'configController':configController}),'configController':configController}));const _0x3db4f3=ensureGeneratedFilesStore();_0x24e5da(_0x1e5349(0x2a5)+_0x1e5349(0x368)+'les:list',async()=>_0x3db4f3[_0x1e5349(0x2e6)]()),_0x24e5da(_0x1e5349(0x2a5)+_0x1e5349(0x368)+_0x1e5349(0x1a4)+'rt',async(_0x35e1a5,_0x226f91={})=>_0x3db4f3['upsert'](_0x226f91)),_0x24e5da(_0x1e5349(0x2a5)+_0x1e5349(0x368)+_0x1e5349(0x345),async(_0x1864f8,_0x53d43d)=>_0x3db4f3[_0x1e5349(0x32c)](String(_0x53d43d||''))),_0x24e5da(_0x1e5349(0x2a5)+'rated-fi'+_0x1e5349(0x345)+_0x1e5349(0x349)+'ion',async(_0x3ba1c2,_0x1592f9)=>_0x3db4f3[_0x1e5349(0x460)+_0x1e5349(0x224)](String(_0x1592f9||''))),_0x24e5da(_0x1e5349(0x2a5)+_0x1e5349(0x368)+_0x1e5349(0x3f4)+'te',async(_0x2b8156,_0x104914)=>_0x3db4f3['deleteFi'+'le'](String(_0x104914||''))),_0x24e5da(_0x1e5349(0x2a5)+'rated-fi'+'les:dele'+_0x1e5349(0x16d)+'e',async(_0x2e1273,_0x52190a=[])=>_0x3db4f3[_0x1e5349(0x471)+_0x1e5349(0x323)](_0x52190a)),_0x24e5da(_0x1e5349(0x2a5)+_0x1e5349(0x368)+_0x1e5349(0x3d1)+'al',async(_0x5007b8,_0x30f4f1)=>revealPathInFolder(_0x30f4f1)),_0x24e5da(_0x1e5349(0x2eb)+_0x1e5349(0x2b3),async()=>_0x3db4f3['list']()),_0x24e5da('artifact'+_0x1e5349(0x1be),async(_0x7663cf,_0xe9a1b7={})=>_0x3db4f3[_0x1e5349(0x1f9)](_0xe9a1b7)),_0x24e5da(_0x1e5349(0x2eb)+_0x1e5349(0x169),async(_0x39556d,_0x5ed0b6={})=>_0x3db4f3['hide'](String(_0x5ed0b6['id']||_0x5ed0b6||''))),_0x24e5da('artifact'+_0x1e5349(0x38a),async(_0x45329d,_0x16695f={})=>_0x3db4f3[_0x1e5349(0x1fe)+'le'](String(_0x16695f['id']||_0x16695f||''))),_0x24e5da(_0x1e5349(0x2eb)+'s:delete'+_0x1e5349(0x3c4),async(_0x27093e,_0x2e8895={})=>_0x3db4f3[_0x1e5349(0x471)+_0x1e5349(0x323)](_0x2e8895['paths']||_0x2e8895)),_0x24e5da(_0x1e5349(0x2eb)+_0x1e5349(0x1c5),async(_0x56c6cb,_0x100ab2={})=>{const _0x192e36=_0x1e5349,_0x5e98a6=typeof _0x100ab2===_0x192e36(0x305)?_0x100ab2:_0x100ab2[_0x192e36(0x24e)]||_0x100ab2[_0x192e36(0x3e7)];return revealPathInFolder(_0x5e98a6);});const _0x4d6610=createPreferencesStore({'stateDir':configController['resolveS'+_0x1e5349(0x2cd)](),'storeFile':_0x1e5349(0x1fb)+_0x1e5349(0x1bd)+_0x1e5349(0x1c6)});_0x24e5da(_0x1e5349(0x25c)+':get-clo'+'se',async()=>_0x4d6610['get'](_0x1e5349(0x3c0)+'rayOnClo'+'se',![])),_0x24e5da(_0x1e5349(0x25c)+_0x1e5349(0x415)+'se',async(_0x2c6735,_0x4933c1)=>_0x4d6610[_0x1e5349(0x3ce)](_0x1e5349(0x3c0)+_0x1e5349(0x285)+'se',_0x4933c1===!![])),registerFileHandlers({'app':app,'filesLogger':filesLogger,'handle':_0x24e5da,'sep':sep,'stateDir':configController[_0x1e5349(0x3d2)+_0x1e5349(0x2cd)](),'toHomePath':toHomePath}),registerProductLogHandlers({'app':app,'configController':configController,'diagnosticEventFromError':diagnosticEventFromError,'diagnosticsWriter':diagnosticsWriter,'exportLogsArchive':exportLogsArchive,'handle':_0x24e5da,'mainLogger':mainLogger,'rendererLogger':rendererLogger,'summarizeText':summarizeText,'toHomePath':toHomePath}),registerModelHandlers({'handle':_0x24e5da,'modelHandlers':{'saveCustomModel':_0x2bb1c3=>_0x6c6bcd()[_0x1e5349(0x30f)][_0x1e5349(0x397)+_0x1e5349(0x33a)](_0x2bb1c3),'deleteCustomModel':_0x214c29=>_0x6c6bcd()['models'][_0x1e5349(0x31b)+'stomMode'+'l'](_0x214c29)}}),connectorController=createConnectorController({'shellConfig':shellConfig,'configController':configController,'broadcast':broadcast,'shell':shell,'getRuntimeSpawnContext':getRuntimeSpawnContext,'openClawConfigHandlers':{'update':(..._0x3d8ffa)=>configController[_0x1e5349(0x340)+'enClawCo'+_0x1e5349(0x313)](..._0x3d8ffa),'setPluginConfig':_0x4ea436=>configController[_0x1e5349(0x413)+_0x1e5349(0x2bb)+'nConfig'](_0x4ea436),'setChannelConfig':_0x3cb67a=>configController['setOpenC'+_0x1e5349(0x315)+_0x1e5349(0x38c)](_0x3cb67a),'deleteChannelConfig':_0x1fcc47=>configController[_0x1e5349(0x3f7)+_0x1e5349(0x42a)+_0x1e5349(0x2f5)+_0x1e5349(0x477)](_0x1fcc47),'setSkillEntry':_0x3a3465=>configController['setOpenC'+_0x1e5349(0x1e7)+_0x1e5349(0x3ad)](_0x3a3465),'deleteSkillEntry':_0x1ff2b0=>configController['deleteOp'+'enClawSk'+_0x1e5349(0x271)](_0x1ff2b0),'setMcpServer':_0x29147a=>configController['setOpenC'+_0x1e5349(0x2ea)+'rver'](_0x29147a),'deleteMcpServer':_0x39d317=>configController['deleteOp'+_0x1e5349(0x35d)+_0x1e5349(0x453)](_0x39d317)},'resolveRuntimeKdocsCliCommand':resolveRuntimeKdocsCliCommand,'resolveRuntimeLarkCliCommand':resolveRuntimeLarkCliCommand}),_0x24e5da(_0x1e5349(0x2b5)+'m-channe'+_0x1e5349(0x358),async()=>connectorController[_0x1e5349(0x1a8)+_0x1e5349(0x2f5)+_0x1e5349(0x2d6)]()),_0x24e5da(_0x1e5349(0x2b5)+'m-channe'+_0x1e5349(0x1c1)+'e',async(_0x254017,_0xf8124f={})=>connectorController[_0x1e5349(0x2ab)+_0x1e5349(0x179)+_0x1e5349(0x263)](_0xf8124f)),_0x24e5da(_0x1e5349(0x2b5)+_0x1e5349(0x359)+_0x1e5349(0x393)+'nabled',async(_0x3a538c,_0x26bccf={})=>connectorController[_0x1e5349(0x273)+_0x1e5349(0x3b4)+_0x1e5349(0x3b9)](_0x26bccf)),_0x24e5da('config:c'+'onnector'+':save',async(_0x2c70a0,_0x6df5c7={})=>{const _0x5369d4=_0x1e5349,_0x334740=String(_0x6df5c7['channelI'+'d']||_0x6df5c7['payload']?.[_0x5369d4(0x3fb)+'d']||_0x6df5c7[_0x5369d4(0x3cb)]?.['id']||'');if(!_0x334740)throw new Error(_0x5369d4(0x3fb)+'d\x20is\x20req'+_0x5369d4(0x1f5));const _0x3b07fa=_0x6df5c7['payload']||_0x6df5c7,_0x1d0d97={'feishu':connectorController[_0x5369d4(0x1f2)+_0x5369d4(0x2be)+'lConfig'],'qqbot':connectorController[_0x5369d4(0x46a)+'tChannel'+'Config'],'wecom':connectorController[_0x5369d4(0x41d)+_0x5369d4(0x40c)+_0x5369d4(0x1c3)],'qq_mail':connectorController[_0x5369d4(0x318)+_0x5369d4(0x462)+_0x5369d4(0x16b)+'g'],'netease_mail':connectorController[_0x5369d4(0x29f)+_0x5369d4(0x3db)+_0x5369d4(0x171)+'Config'],'tencent_exmail':connectorController[_0x5369d4(0x1d4)+_0x5369d4(0x461)+_0x5369d4(0x366)+_0x5369d4(0x46c)],'feishu_doc':connectorController['saveFeis'+'huDocCon'+'nectorCo'+_0x5369d4(0x313)],'tencent_docs':connectorController[_0x5369d4(0x1d4)+_0x5369d4(0x1b5)+_0x5369d4(0x171)+_0x5369d4(0x1c3)],'kdocs':connectorController[_0x5369d4(0x22a)+'sConnect'+_0x5369d4(0x46c)],'dingtalk_doc':connectorController[_0x5369d4(0x3f0)+_0x5369d4(0x2a0)+'onnector'+_0x5369d4(0x1c3)]},_0x197cbb=_0x1d0d97[_0x334740];if(!_0x197cbb)throw new Error(_0x5369d4(0x298)+'ted\x20conn'+_0x5369d4(0x196)+_0x334740);return _0x197cbb(_0x3b07fa);}),_0x24e5da(_0x1e5349(0x1e6)+'onnector'+_0x1e5349(0x38b)+_0x1e5349(0x3f9)+'nnel',async(_0x20e6c2,_0x120515={})=>connectorController[_0x1e5349(0x1f2)+_0x1e5349(0x2be)+_0x1e5349(0x412)](_0x120515)),_0x24e5da('config:c'+_0x1e5349(0x171)+':save-qq'+_0x1e5349(0x458)+'nel',async(_0x45542c,_0x3660de={})=>connectorController[_0x1e5349(0x46a)+'tChannel'+_0x1e5349(0x1c3)](_0x3660de)),_0x24e5da('config:c'+_0x1e5349(0x171)+_0x1e5349(0x22e)+_0x1e5349(0x2da)+_0x1e5349(0x438),async(_0x1478ec,_0x103999={})=>connectorController[_0x1e5349(0x41d)+_0x1e5349(0x40c)+_0x1e5349(0x1c3)](_0x103999)),_0x24e5da('config:c'+_0x1e5349(0x171)+_0x1e5349(0x182)+_0x1e5349(0x40e),async(_0x1046f1,_0x1d9f87={})=>connectorController['saveQqMa'+_0x1e5349(0x462)+_0x1e5349(0x16b)+'g'](_0x1d9f87)),_0x24e5da('config:c'+'onnector'+':save-ne'+_0x1e5349(0x2c9)+'il',async(_0x1dff57,_0x2dbb53={})=>connectorController[_0x1e5349(0x29f)+'aseMailC'+_0x1e5349(0x171)+_0x1e5349(0x1c3)](_0x2dbb53)),_0x24e5da(_0x1e5349(0x1e6)+_0x1e5349(0x171)+_0x1e5349(0x327)+_0x1e5349(0x357)+_0x1e5349(0x23a),async(_0x4030d4,_0x4c2203={})=>connectorController['saveTenc'+_0x1e5349(0x461)+_0x1e5349(0x366)+_0x1e5349(0x46c)](_0x4c2203)),_0x24e5da('config:c'+'onnector'+':save-fe'+_0x1e5349(0x1d5),async(_0x1aadb4,_0x4030b8={})=>connectorController[_0x1e5349(0x1f2)+'huDocCon'+_0x1e5349(0x1ec)+_0x1e5349(0x313)](_0x4030b8)),_0x24e5da(_0x1e5349(0x1e6)+'onnector'+_0x1e5349(0x327)+'ncent-do'+'cs',async(_0x2f3daa,_0x5f0ca5={})=>connectorController[_0x1e5349(0x1d4)+_0x1e5349(0x1b5)+_0x1e5349(0x171)+'Config'](_0x5f0ca5)),_0x24e5da(_0x1e5349(0x1e6)+_0x1e5349(0x171)+_0x1e5349(0x38f)+_0x1e5349(0x421),async(_0x587812,_0x43aa91={})=>connectorController[_0x1e5349(0x22a)+_0x1e5349(0x1b3)+_0x1e5349(0x46c)](_0x43aa91)),_0x24e5da(_0x1e5349(0x1e6)+_0x1e5349(0x171)+_0x1e5349(0x172)+_0x1e5349(0x2d2)+'oc',async(_0x2a4fad,_0x470786={})=>connectorController[_0x1e5349(0x3f0)+_0x1e5349(0x2a0)+'onnector'+_0x1e5349(0x1c3)](_0x470786)),_0x24e5da(_0x1e5349(0x1e6)+'onnector'+_0x1e5349(0x2ed)+':start',async(_0x19e7c,_0x250666={})=>{const _0xf775e6=_0x1e5349,_0x1cd12a=String(_0x250666[_0xf775e6(0x3fb)+'d']||_0x250666[_0xf775e6(0x41f)]||'');if(_0x1cd12a===_0xf775e6(0x388))return connectorController['startKdo'+_0xf775e6(0x25a)+_0xf775e6(0x15b)+_0xf775e6(0x37e)]();if(_0x1cd12a===_0xf775e6(0x17f)+'oc')return connectorController[_0xf775e6(0x231)+_0xf775e6(0x15e)+_0xf775e6(0x26a)+_0xf775e6(0x3a7)]();if(_0x1cd12a==='feishu')return connectorController[_0xf775e6(0x231)+_0xf775e6(0x27c)+'trationS'+_0xf775e6(0x193)](_0x250666);if(_0x1cd12a===_0xf775e6(0x2d1)+_0xf775e6(0x242)||_0x1cd12a===_0xf775e6(0x1fd))return connectorController['startWec'+_0xf775e6(0x3e3)+'elSessio'+'n']({'gatewayPort':_0x6c6bcd()[_0xf775e6(0x243)+_0xf775e6(0x447)](),'gatewayToken':_0x6c6bcd()[_0xf775e6(0x466)+_0xf775e6(0x166)]()});throw new Error(_0xf775e6(0x298)+'ted\x20conn'+_0xf775e6(0x265)+'ssion:\x20'+(_0x1cd12a||'unknown'));}),_0x24e5da(_0x1e5349(0x1e6)+_0x1e5349(0x171)+'-session'+_0x1e5349(0x2d7),async(_0x20f0ab,_0x45bcd1={})=>{const _0x1b2cbb=_0x1e5349,_0x45d004=String(_0x45bcd1[_0x1b2cbb(0x3fb)+'d']||_0x45bcd1[_0x1b2cbb(0x41f)]||'');if(_0x45d004==='kdocs')return connectorController[_0x1b2cbb(0x258)+'CliConne'+'ctStatus'](_0x45bcd1);if(_0x45d004==='feishu_d'+'oc')return connectorController[_0x1b2cbb(0x434)+_0x1b2cbb(0x382)+_0x1b2cbb(0x26e)+_0x1b2cbb(0x390)](_0x45bcd1);if(_0x45d004===_0x1b2cbb(0x1af))return connectorController[_0x1b2cbb(0x434)+_0x1b2cbb(0x2d3)+_0x1b2cbb(0x44c)+_0x1b2cbb(0x247)](_0x45bcd1);throw new Error(_0x1b2cbb(0x298)+_0x1b2cbb(0x234)+'ector\x20se'+'ssion:\x20'+(_0x45d004||_0x1b2cbb(0x2c1)));}),_0x24e5da(_0x1e5349(0x1e6)+_0x1e5349(0x171)+_0x1e5349(0x2ed)+_0x1e5349(0x3c5),async(_0x5b59f4,_0x456875={})=>{const _0x23ad3b=_0x1e5349,_0x594b9a=String(_0x456875['channelI'+'d']||_0x456875[_0x23ad3b(0x41f)]||'');if(_0x594b9a==='kdocs')return connectorController[_0x23ad3b(0x46e)+_0x23ad3b(0x427)+_0x23ad3b(0x37a)+_0x23ad3b(0x20c)](_0x456875);if(_0x594b9a===_0x23ad3b(0x17f)+'oc')return connectorController[_0x23ad3b(0x433)+'ishuDocC'+_0x23ad3b(0x2a6)+'tSession'](_0x456875);if(_0x594b9a===_0x23ad3b(0x1af))return connectorController[_0x23ad3b(0x433)+_0x23ad3b(0x449)+_0x23ad3b(0x3f3)+_0x23ad3b(0x3a7)](_0x456875);if(_0x594b9a==='openclaw'+_0x23ad3b(0x242)||_0x594b9a==='wechat')return connectorController[_0x23ad3b(0x3a9)+_0x23ad3b(0x2a2)+_0x23ad3b(0x422)+'on']();return{'ok':!![]};}),_0x24e5da(_0x1e5349(0x1e6)+_0x1e5349(0x171)+_0x1e5349(0x2ed)+_0x1e5349(0x473)+'e',async(_0x2c176c,_0x1181e0={})=>{const _0x215f61=_0x1e5349,_0x26492b=String(_0x1181e0[_0x215f61(0x3fb)+'d']||_0x1181e0['type']||'');if(_0x26492b===_0x215f61(0x17f)+'oc')return connectorController[_0x215f61(0x389)+'FeishuDo'+_0x215f61(0x1e2)+'ectSessi'+'on'](_0x1181e0);throw new Error('Unsuppor'+'ted\x20conn'+'ector\x20se'+_0x215f61(0x374)+(_0x26492b||_0x215f61(0x2c1)));}),_0x24e5da('config:r'+'ead',()=>connectorController[_0x1e5349(0x312)+_0x1e5349(0x1a1)+'ot']());const _0x226cb5=_0x3e8085=>{const _0x22449a=_0x1e5349,_0x46eaba=_0x3e8085['agents']&&typeof _0x3e8085['agents']===_0x22449a(0x3a5)?_0x3e8085[_0x22449a(0x45f)]:{};return Array[_0x22449a(0x201)](_0x46eaba[_0x22449a(0x2e6)])?_0x46eaba[_0x22449a(0x2e6)]:[];},_0x4923ed=_0x243380=>{const _0x38a4f4=_0x1e5349,_0x3ebc55=typeof _0x243380===_0x38a4f4(0x305)?_0x243380['trim']():'',_0xa6d67a=_0x3ebc55['match'](/^agent:([^:]+):/);return _0xa6d67a?.[0x1]||'';},_0x5286b7=(_0x3aa1ed={},_0x36e63c=[])=>{const _0x30d55b=_0x1e5349,_0x5a3464=Array[_0x30d55b(0x201)](_0x3aa1ed[_0x30d55b(0x45f)])?_0x3aa1ed['agents']:Array[_0x30d55b(0x201)](_0x3aa1ed[_0x30d55b(0x2e6)])?_0x3aa1ed['list']:[],_0x1d9666=Array[_0x30d55b(0x201)](_0x36e63c)?_0x36e63c:[];return _0x5a3464[_0x30d55b(0x39e)](_0x3c4ecd=>{const _0x30d2c2=_0x30d55b,_0x5c0766=String(_0x3c4ecd?.['id']||_0x3c4ecd?.[_0x30d2c2(0x3eb)]||'')[_0x30d2c2(0x46f)]();return{'agent':_0x3c4ecd,'sessions':_0x5c0766?_0x1d9666[_0x30d2c2(0x36e)](_0x27f6c3=>{const _0x4748a9=_0x30d2c2,_0x15dd90=String(_0x27f6c3?.[_0x4748a9(0x3eb)]||_0x27f6c3?.['agent_id']||_0x27f6c3?.[_0x4748a9(0x1a7)]?.['id']||_0x4923ed(_0x27f6c3?.[_0x4748a9(0x15c)])||'')[_0x4748a9(0x46f)]();return _0x15dd90?_0x15dd90===_0x5c0766:_0x5c0766===_0x4748a9(0x194);}):[]};});};_0x24e5da('app:upda'+'te:get-s'+'tate',async()=>updateController?.[_0x1e5349(0x3ca)]()),_0x24e5da(_0x1e5349(0x1dc)+'te:check',async()=>updateController?.[_0x1e5349(0x369)+_0x1e5349(0x1f4)]()),_0x24e5da(_0x1e5349(0x1dc)+_0x1e5349(0x268)+_0x1e5349(0x2f6),async()=>updateController?.[_0x1e5349(0x221)+_0x1e5349(0x489)]()),_0x24e5da(_0x1e5349(0x1dc)+'te:quit-'+_0x1e5349(0x1cf)+'all',async()=>updateController?.[_0x1e5349(0x403)+'nstall']()),_0x24e5da(_0x1e5349(0x45e)+_0x1e5349(0x192),async(_0x49bfaa,_0x1437b0={})=>{const _0xce904a=_0x1e5349,_0x415589=await dialog['showOpen'+_0xce904a(0x47c)](BrowserWindow[_0xce904a(0x445)+_0xce904a(0x487)](_0x49bfaa[_0xce904a(0x165)])??mainWindow,{'properties':['openFile',..._0x1437b0?.[_0xce904a(0x439)]!==0x1?[_0xce904a(0x198)+_0xce904a(0x292)]:[]],'filters':_0x1437b0?.[_0xce904a(0x1a6)+_0xce904a(0x1b2)+'s']?[{'name':_0xce904a(0x306),'extensions':_0x1437b0[_0xce904a(0x1a6)+_0xce904a(0x1b2)+'s']}]:undefined});return _0x415589[_0xce904a(0x31c)+'s']['map'](_0x260fad=>({'path':_0x260fad,'name':_0x260fad[_0xce904a(0x3f5)](/[\\/]/)[_0xce904a(0x225)]()||_0x260fad}));}),_0x24e5da(_0x1e5349(0x45e)+_0x1e5349(0x3e4)+'d-local',async(_0x46c6e6,_0x25d21b={})=>{const _0xf53900=_0x1e5349,_0x30c224=String(_0x25d21b['sourcePa'+'th']||'');if(!_0x30c224)return{'success':![],'error':'sourcePa'+_0xf53900(0x457)+_0xf53900(0x18f)};const _0x4e882b=await dialog[_0xf53900(0x32e)+_0xf53900(0x47c)](mainWindow,{'defaultPath':_0x25d21b['defaultF'+_0xf53900(0x30b)]||_0x30c224[_0xf53900(0x3f5)](/[\\/]/)[_0xf53900(0x225)]()});if(_0x4e882b['canceled']||!_0x4e882b[_0xf53900(0x31c)])return{'success':![],'canceled':!![]};const {copyFile:_0x5ee2d7}=await import('node:fs/'+_0xf53900(0x20b));return await _0x5ee2d7(_0x30c224,_0x4e882b[_0xf53900(0x31c)]),{'success':!![],'filePath':_0x4e882b[_0xf53900(0x31c)]};}),_0x24e5da(_0x1e5349(0x2f9)+_0x1e5349(0x187)+'ite',async(_0x4ed26a,_0x2c5dcb)=>{const _0x5426e4=_0x1e5349;return clipboard[_0x5426e4(0x206)+'t'](String(_0x2c5dcb??'')),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x1d3)+_0x1e5349(0x1f3)+'rt',async()=>{const _0x12fe7f=_0x1e5349;return app[_0x12fe7f(0x288)](),app[_0x12fe7f(0x404)](),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x475)+_0x1e5349(0x19b)+_0x1e5349(0x28f),_0x32cf18=>Boolean(BrowserWindow['fromWebC'+'ontents'](_0x32cf18[_0x1e5349(0x165)])?.[_0x1e5349(0x222)+_0x1e5349(0x28f)]())),_0x24e5da('app:star'+_0x1e5349(0x1ee),async(_0x21006d,_0x55c327)=>{const _0x51d826=_0x1e5349;return app[_0x51d826(0x464)+_0x51d826(0x3e1)+_0x51d826(0x190)]({'openAtLogin':_0x55c327===!![]}),{'ok':!![],'enabled':_0x55c327===!![]};}),_0x24e5da('app:star'+_0x1e5349(0x15d),async()=>app[_0x1e5349(0x2cb)+_0x1e5349(0x3e1)+_0x1e5349(0x190)]()[_0x1e5349(0x46d)+_0x1e5349(0x1e0)]),_0x24e5da(_0x1e5349(0x45e)+_0x1e5349(0x3b3)+'folder',async _0x4af765=>{const _0x5c6976=_0x1e5349,_0x50107a=await dialog['showOpen'+'Dialog'](BrowserWindow[_0x5c6976(0x445)+_0x5c6976(0x487)](_0x4af765[_0x5c6976(0x165)])??mainWindow,{'properties':[_0x5c6976(0x2c3)+_0x5c6976(0x2f7)]});return _0x50107a[_0x5c6976(0x31c)+'s'][0x0]||'';}),_0x24e5da(_0x1e5349(0x1d3)+_0x1e5349(0x370)+_0x1e5349(0x191),async(_0xa24293,_0x37cb25)=>{const _0x35e2b9=await shell['openPath'](String(_0x37cb25||''));return _0x35e2b9||'';}),_0x24e5da(_0x1e5349(0x2d1)+_0x1e5349(0x16e)+_0x1e5349(0x1a2),async()=>_0x6c6bcd()[_0x1e5349(0x466)+'oken']()),_0x24e5da(_0x1e5349(0x2d1)+':gateway'+_0x1e5349(0x3a0),async()=>_0x6c6bcd()['gatewayP'+_0x1e5349(0x447)]()),_0x24e5da('openclaw'+_0x1e5349(0x42d)+'e',async(_0x1adf57,_0x45d814=[])=>{const _0x3ede08=_0x1e5349,_0x3c07ef=await runClawOnce(shellConfig[_0x3ede08(0x32b)+_0x3ede08(0x485)],Array[_0x3ede08(0x201)](_0x45d814)?_0x45d814:[]);return{'ok':_0x3c07ef[_0x3ede08(0x3cc)]===0x0,..._0x3c07ef};}),_0x24e5da(_0x1e5349(0x392)+_0x1e5349(0x1bf),async(_0x34f8bc,_0xf05a70={})=>_0x6c6bcd()['sessions'][_0x1e5349(0x2a8)]({..._0xf05a70,'parentSessionKey':_0xf05a70['parentSe'+'ssionKey']||_0xf05a70['sessionK'+'ey']}));const _0x25a3b8=configController[_0x1e5349(0x3d2)+_0x1e5349(0x2cd)]();sessionSqliteStore=ensureSessionSqliteStore();const _0x3cfe82=createAgentSessionsMapStore({'stateDir':_0x25a3b8});_0x24e5da(_0x1e5349(0x392)+':agent-m'+_0x1e5349(0x309),async(_0x6033f5,_0x54aec7={})=>_0x3cfe82[_0x1e5349(0x43d)](_0x54aec7)),_0x24e5da('sessions'+_0x1e5349(0x443)+_0x1e5349(0x1d8)+'t',async(_0x4c15db,_0x2954c2={})=>_0x3cfe82['upsert'](_0x2954c2)),_0x24e5da(_0x1e5349(0x392)+_0x1e5349(0x443)+_0x1e5349(0x3bc),async(_0x4923fe,_0x3be65b={})=>{const _0x53a152=_0x1e5349,_0x3c3c6f=String(_0x3be65b[_0x53a152(0x387)+'ey']||'')[_0x53a152(0x46f)]();if(!_0x3c3c6f)return null;return await sessionSqliteStore[_0x53a152(0x178)+'ionEntry'](_0x3c3c6f);}),_0x24e5da(_0x1e5349(0x220)+_0x1e5349(0x1c7),async(_0x33c7e6,_0x3141d5={})=>{const _0x371221=_0x1e5349,_0x65fa51=await readMutableConfig(),_0xf6f9f5=_0x65fa51[_0x371221(0x45f)]&&typeof _0x65fa51[_0x371221(0x45f)]===_0x371221(0x3a5)?_0x65fa51[_0x371221(0x45f)]:{},_0x220c60=_0x226cb5(_0x65fa51),_0x1a12bd=String(_0x3141d5['id']||_0x3141d5[_0x371221(0x35c)]||_0x371221(0x283)+Date[_0x371221(0x45d)]())['trim']()[_0x371221(0x16c)](/\s+/g,'-'),_0x4ded26={'id':_0x1a12bd,'name':String(_0x3141d5[_0x371221(0x35c)]||_0x1a12bd),..._0x3141d5[_0x371221(0x337)+'e']?{'workspace':String(_0x3141d5[_0x371221(0x337)+'e'])}:{},..._0x3141d5[_0x371221(0x161)]?{'model':_0x3141d5[_0x371221(0x161)]}:{},..._0x3141d5[_0x371221(0x30a)]?{'emoji':_0x3141d5[_0x371221(0x30a)]}:{},..._0x3141d5['avatar']?{'avatar':_0x3141d5[_0x371221(0x1ae)]}:{},...Array[_0x371221(0x201)](_0x3141d5['skills'])?{'skills':_0x3141d5[_0x371221(0x414)]}:{}};if(_0x220c60['some'](_0x15158c=>_0x15158c?.['id']===_0x1a12bd))throw new Error(_0x371221(0x3ff)+_0x371221(0x33e)+_0x371221(0x1b1));return _0xf6f9f5[_0x371221(0x2e6)]=[..._0x220c60,_0x4ded26],_0x65fa51[_0x371221(0x45f)]=_0xf6f9f5,await _0x531f4a(_0x65fa51,_0x371221(0x347)+'eated'),{'ok':!![],'agent':_0x4ded26};}),_0x24e5da(_0x1e5349(0x217)+'pdate',async(_0x2aea8b,_0x31b6c0={})=>{const _0xeaf8ca=_0x1e5349,_0x4e742a=String(_0x31b6c0['id']||_0x31b6c0[_0xeaf8ca(0x3eb)]||'')['trim']();if(!_0x4e742a)throw new Error(_0xeaf8ca(0x3fc)+_0xeaf8ca(0x1cc)+_0xeaf8ca(0x177));const _0x1286b9=await readMutableConfig(),_0x675c64=_0x1286b9[_0xeaf8ca(0x45f)]&&typeof _0x1286b9[_0xeaf8ca(0x45f)]==='object'?_0x1286b9[_0xeaf8ca(0x45f)]:{},_0x2b7b83=_0x226cb5(_0x1286b9),_0xf79b9d=_0x2b7b83['map'](_0x2fa730=>_0x2fa730?.['id']===_0x4e742a?{..._0x2fa730,..._0x31b6c0,'id':_0x4e742a}:_0x2fa730);return _0x675c64[_0xeaf8ca(0x2e6)]=_0xf79b9d,_0x1286b9[_0xeaf8ca(0x45f)]=_0x675c64,await _0x531f4a(_0x1286b9,_0xeaf8ca(0x27d)+_0xeaf8ca(0x287)),{'ok':!![],'agent':_0xf79b9d['find'](_0x1a8547=>_0x1a8547?.['id']===_0x4e742a)||null};}),_0x24e5da('agents:d'+_0x1e5349(0x301),async(_0x529da7,_0x5bd39f={})=>{const _0x254bb1=_0x1e5349,_0x11f488=String(_0x5bd39f['id']||_0x5bd39f[_0x254bb1(0x3eb)]||'')[_0x254bb1(0x46f)]();if(!_0x11f488)throw new Error(_0x254bb1(0x3fc)+_0x254bb1(0x1cc)+'ired');const _0x35557f=await readMutableConfig(),_0x25b935=_0x35557f['agents']&&typeof _0x35557f[_0x254bb1(0x45f)]==='object'?_0x35557f[_0x254bb1(0x45f)]:{};return _0x25b935['list']=_0x226cb5(_0x35557f)[_0x254bb1(0x36e)](_0xc21942=>_0xc21942?.['id']!==_0x11f488),_0x35557f['agents']=_0x25b935,await _0x531f4a(_0x35557f,_0x254bb1(0x39c)+_0x254bb1(0x173)),{'ok':!![],'agentId':_0x11f488};}),_0x24e5da(_0x1e5349(0x28a)+_0x1e5349(0x396)+_0x1e5349(0x3a3)+'t',async(_0x316290,_0x19881c={})=>{const _0x3bdc24=_0x1e5349,[_0x1370e5,_0x352921]=await Promise[_0x3bdc24(0x360)]([_0x6c6bcd()['agents'][_0x3bdc24(0x2e6)](),_0x6c6bcd()['sessions'][_0x3bdc24(0x2e6)](_0x19881c)[_0x3bdc24(0x22b)](()=>({'sessions':[]}))]),_0x119dad=Array[_0x3bdc24(0x201)](_0x352921['sessions'])?_0x352921[_0x3bdc24(0x392)]:[];return{..._0x1370e5,'sessions':_0x119dad,'groups':Array[_0x3bdc24(0x201)](_0x1370e5['groups'])?_0x1370e5[_0x3bdc24(0x24c)]:_0x5286b7(_0x1370e5,_0x119dad)};}),terminalManager=createTerminalManager({'cwd':join(configController['resolveS'+_0x1e5349(0x2cd)](),_0x1e5349(0x337)+'e'),'emitData':_0x2e233e=>broadcast('terminal'+_0x1e5349(0x378),_0x2e233e),'emitExit':_0x3f05e1=>broadcast(_0x1e5349(0x311)+'-exit',_0x3f05e1)}),_0x24e5da(_0x1e5349(0x311)+_0x1e5349(0x2c2),async(_0x2a0377,_0x5a66a6={})=>terminalManager['create'](_0x5a66a6)),_0x24e5da('terminal'+':input',async(_0x3f4825,_0x58068e={})=>terminalManager[_0x1e5349(0x1cd)](_0x58068e)),_0x24e5da('terminal'+_0x1e5349(0x253),async(_0x5f228a,_0x54f955={})=>terminalManager['resize'](_0x54f955)),_0x24e5da('terminal'+':close',async(_0x4e03ff,_0x4906b9={})=>terminalManager[_0x1e5349(0x203)](_0x4906b9)),_0x24e5da(_0x1e5349(0x260)+'list',async()=>{const _0x49ec63=_0x1e5349,_0x61fcf0=gatewayController?.[_0x49ec63(0x23c)+_0x49ec63(0x2b7)]?.()||{};return _0x61fcf0[_0x49ec63(0x432)]||[];}),_0x24e5da(_0x1e5349(0x260)+_0x1e5349(0x15a)+'ig',async(_0x4715d0,_0x4fb6d4={})=>{const _0x5488ec=_0x1e5349,_0x3e9646=String(_0x4fb6d4[_0x5488ec(0x463)]||_0x4fb6d4['id']||''),_0x5413d9=await readMutableConfig(),_0x2915d2=_0x5413d9[_0x5488ec(0x432)]?.[_0x5488ec(0x320)]||{};return _0x3e9646?_0x2915d2[_0x3e9646]||null:_0x2915d2;}),_0x24e5da(_0x1e5349(0x260)+_0x1e5349(0x37d)+_0x1e5349(0x263),async(_0x5078a4,_0x2e7078={})=>{const _0x2bddab=_0x1e5349,_0x540091=String(_0x2e7078[_0x2bddab(0x463)]||_0x2e7078['id']||'');if(!_0x540091)throw new Error(_0x2bddab(0x463)+_0x2bddab(0x1cc)+'ired');const _0x2a806b=await readMutableConfig(),_0x73efdc=_0x2a806b['plugins']&&typeof _0x2a806b['plugins']===_0x2bddab(0x3a5)?_0x2a806b['plugins']:{},_0x231b72=_0x73efdc[_0x2bddab(0x320)]&&typeof _0x73efdc['entries']==='object'?_0x73efdc[_0x2bddab(0x320)]:{};return _0x231b72[_0x540091]={..._0x231b72[_0x540091]||{},..._0x2e7078[_0x2bddab(0x3ac)]||_0x2e7078[_0x2bddab(0x3dd)]||{}},_0x73efdc[_0x2bddab(0x320)]=_0x231b72,_0x2a806b['plugins']=_0x73efdc,_0x531f4a(_0x2a806b,_0x2bddab(0x2bd)+_0x2bddab(0x1e9)+_0x2bddab(0x287));}),_0x24e5da('plugins:'+_0x1e5349(0x27b),async(_0x135333,_0x2d1da2={})=>{const _0x55651b=_0x1e5349,_0x21be92=String(_0x2d1da2[_0x55651b(0x463)]||_0x2d1da2['id']||'');if(!_0x21be92)throw new Error(_0x55651b(0x463)+'\x20is\x20requ'+'ired');const _0x511361=await readMutableConfig(),_0x470988=_0x511361[_0x55651b(0x432)]&&typeof _0x511361[_0x55651b(0x432)]===_0x55651b(0x3a5)?_0x511361['plugins']:{},_0x1ea78f=_0x470988[_0x55651b(0x320)]&&typeof _0x470988['entries']==='object'?_0x470988[_0x55651b(0x320)]:{};return _0x1ea78f[_0x21be92]={..._0x1ea78f[_0x21be92]||{},'enabled':!![]},_0x470988[_0x55651b(0x320)]=_0x1ea78f,_0x511361[_0x55651b(0x432)]=_0x470988,_0x531f4a(_0x511361,_0x55651b(0x279)+_0x55651b(0x232));}),_0x24e5da('plugins:'+_0x1e5349(0x3b0),async(_0x52b353,_0x1aeee9={})=>{const _0xfef7ab=_0x1e5349,_0x15ec77=String(_0x1aeee9[_0xfef7ab(0x463)]||_0x1aeee9['id']||'');if(!_0x15ec77)throw new Error(_0xfef7ab(0x463)+_0xfef7ab(0x1cc)+_0xfef7ab(0x177));const _0x3717de=await readMutableConfig(),_0x3e8998=_0x3717de[_0xfef7ab(0x432)]&&typeof _0x3717de[_0xfef7ab(0x432)]===_0xfef7ab(0x3a5)?_0x3717de[_0xfef7ab(0x432)]:{},_0x43e925=_0x3e8998[_0xfef7ab(0x320)]&&typeof _0x3e8998['entries']===_0xfef7ab(0x3a5)?_0x3e8998[_0xfef7ab(0x320)]:{};return _0x43e925[_0x15ec77]={..._0x43e925[_0x15ec77]||{},'enabled':![]},_0x3e8998[_0xfef7ab(0x320)]=_0x43e925,_0x3717de[_0xfef7ab(0x432)]=_0x3e8998,_0x531f4a(_0x3717de,_0xfef7ab(0x317)+'isabled');}),_0x24e5da(_0x1e5349(0x260)+'status',async(_0x33ff8e,_0x29cb9f={})=>({'plugins':await((async()=>{const _0x5564c1=_0x1e5349,_0x43f9b0=gatewayController?.[_0x5564c1(0x23c)+_0x5564c1(0x2b7)]?.()||{};if(!_0x29cb9f?.[_0x5564c1(0x463)]&&!_0x29cb9f?.['id'])return _0x43f9b0['plugins']||[];const _0xf537f4=String(_0x29cb9f[_0x5564c1(0x463)]||_0x29cb9f['id']||'');return(_0x43f9b0[_0x5564c1(0x432)]||[])[_0x5564c1(0x36e)](_0xaf559e=>_0xaf559e[_0x5564c1(0x463)]===_0xf537f4);})())})),_0x24e5da('tabs:nav'+_0x1e5349(0x435),async(_0x54ba65,_0x19e28f)=>({'ok':!![],'payload':_0x19e28f})),_0x24e5da('tabs:pos'+'t-messag'+'e',async(_0x343959,_0x49e6ed)=>{return broadcast('tabs-com'+'mand',_0x49e6ed),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x2bc)+_0x1e5349(0x26c)+_0x1e5349(0x1d1),async()=>{const _0x58eed5=_0x1e5349;return broadcast(_0x58eed5(0x406)+_0x58eed5(0x1d1)+_0x58eed5(0x39f),{}),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x3a8)+'resh-age'+_0x1e5349(0x1d1),async(_0x57781f,_0x54ecf4={})=>{const _0x34e565=_0x1e5349;return broadcast(_0x34e565(0x406)+_0x34e565(0x1d1)+'-refresh'+_0x34e565(0x39f),_0x54ecf4),{'ok':!![]};}),_0x24e5da('window:m'+'inimize',_0xe28626=>{const _0x56a16b=_0x1e5349;return BrowserWindow['fromWebC'+_0x56a16b(0x487)](_0xe28626['sender'])?.[_0x56a16b(0x300)](),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x25f)+_0x1e5349(0x219)+_0x1e5349(0x36b),_0x2420df=>{const _0x50fb69=_0x1e5349,_0x481cdd=BrowserWindow[_0x50fb69(0x445)+_0x50fb69(0x487)](_0x2420df[_0x50fb69(0x165)]);if(!_0x481cdd)return{'isMaximized':![]};if(_0x481cdd['isMaximi'+_0x50fb69(0x28f)]())_0x481cdd[_0x50fb69(0x2a9)+'ze']();else _0x481cdd[_0x50fb69(0x297)]();return{'isMaximized':_0x481cdd[_0x50fb69(0x222)+_0x50fb69(0x28f)]()};}),_0x24e5da(_0x1e5349(0x3b5)+'lose',_0x336153=>{const _0xdcf7c4=_0x1e5349;return BrowserWindow[_0xdcf7c4(0x445)+'ontents'](_0x336153[_0xdcf7c4(0x165)])?.[_0xdcf7c4(0x203)](),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x1c8)+'pen-devt'+_0x1e5349(0x2f4),()=>openDevToolsForActiveContext()),_0x24e5da(_0x1e5349(0x2d1)+_0x1e5349(0x1bc)+'-info',()=>_0x6c6bcd()[_0x1e5349(0x23c)+_0x1e5349(0x2b7)]()),_0x24e5da(_0x1e5349(0x2d1)+_0x1e5349(0x16e)+_0x1e5349(0x1eb),async()=>(await ensureGatewayControllerStarted())[_0x1e5349(0x21e)+'s']()),_0x24e5da(_0x1e5349(0x2d1)+_0x1e5349(0x16e)+_0x1e5349(0x361),()=>_0x6c6bcd()[_0x1e5349(0x291)](_0x1e5349(0x2b9)+'\x20request')),_0x24e5da(_0x1e5349(0x2d1)+_0x1e5349(0x322)+_0x1e5349(0x44b)+'cle',async()=>({'loadingLifeCycle':_0x1e5349(0x2e2),'message':'','updatedAt':new Date()[_0x1e5349(0x213)+_0x1e5349(0x482)]()})),_0x24e5da('openclaw'+_0x1e5349(0x16e)+_0x1e5349(0x481),(_0x43c0b8,_0x37432a={})=>_0x6c6bcd()[_0x1e5349(0x363)+_0x1e5349(0x35f)](_0x37432a?.[_0x1e5349(0x439)]??0xc8)),_0x24e5da(_0x1e5349(0x2d1)+_0x1e5349(0x2c0)+_0x1e5349(0x3cd)+_0x1e5349(0x2e1)+'n',(_0x419f17,_0x1a990f)=>_0x6c6bcd()[_0x1e5349(0x216)+_0x1e5349(0x2ba)+'stion'](_0x1a990f)),_0x24e5da(_0x1e5349(0x2d1)+_0x1e5349(0x1df)+_0x1e5349(0x30e),async()=>{const _0x59b08e=_0x1e5349,_0x15f355=join(resolveRuntimeRoot(shellConfig[_0x59b08e(0x32b)+_0x59b08e(0x485)]),_0x59b08e(0x3dc),_0x59b08e(0x266)+'w');if(!existsSync(_0x15f355))throw new Error(_0x59b08e(0x2d1)+'\x20CLI\x20wra'+_0x59b08e(0x3f2)+'\x20found:\x20'+_0x15f355+(_0x59b08e(0x239)+_0x59b08e(0x3a4)+_0x59b08e(0x28d)+_0x59b08e(0x1b4)));const _0x5a95fa=join(app[_0x59b08e(0x2b8)](_0x59b08e(0x3a2)),_0x59b08e(0x3d6)+_0x59b08e(0x1ff)+_0x59b08e(0x202));await writeFile(_0x5a95fa,_0x59b08e(0x27f)+_0x59b08e(0x37b)+_0x15f355[_0x59b08e(0x16c)](/\\/g,'\x5c\x5c')['replace'](/"/g,'\x5c\x22')+'\x22\x0a',{'mode':0x1ed});const _0x3488=spawn(_0x59b08e(0x32d),['-a',_0x59b08e(0x2aa),_0x5a95fa],{'detached':!![],'stdio':_0x59b08e(0x2b4)});return _0x3488[_0x59b08e(0x199)](),{'ok':!![],'cliPath':_0x15f355};}),_0x24e5da(_0x1e5349(0x324)+_0x1e5349(0x164),()=>_0x6c6bcd()[_0x1e5349(0x45f)][_0x1e5349(0x2e6)]()),_0x24e5da(_0x1e5349(0x3fe)+_0x1e5349(0x2f8),(_0x134b11,_0x4cc96b)=>_0x6c6bcd()[_0x1e5349(0x414)][_0x1e5349(0x36f)](_0x4cc96b)),_0x24e5da('sessions'+_0x1e5349(0x2c2),(_0x5d9767,_0xcb8788)=>_0x6c6bcd()[_0x1e5349(0x392)][_0x1e5349(0x2a8)](_0xcb8788)),_0x24e5da(_0x1e5349(0x392)+_0x1e5349(0x47d),(_0x47436d,_0x39406e)=>_0x6c6bcd()['sessions'][_0x1e5349(0x2e6)](_0x39406e)),_0x24e5da(_0x1e5349(0x392)+_0x1e5349(0x262),(_0x4b0311,_0x45f846)=>_0x6c6bcd()['sessions'][_0x1e5349(0x24d)](_0x45f846)),_0x24e5da(_0x1e5349(0x160)+'eam',(_0x2cb6fb,_0x57028f)=>_0x6c6bcd()[_0x1e5349(0x1db)][_0x1e5349(0x2ad)](_0x57028f)),_0x24e5da(_0x1e5349(0x3c1)+'rt',(_0x5548b8,_0x4ee2e8)=>_0x6c6bcd()['chat'][_0x1e5349(0x2df)](_0x4ee2e8)),_0x24e5da('chat:his'+_0x1e5349(0x15f),(_0x5dd5e0,_0x57371f)=>_0x6c6bcd()[_0x1e5349(0x1db)]['history'](_0x57371f)),_0x24e5da(_0x1e5349(0x296)+'te',async(_0x2e14d2,_0x137aa5={})=>{const _0x45f07b=_0x1e5349,_0x21f1b2=typeof _0x137aa5[_0x45f07b(0x2e3)]===_0x45f07b(0x305)?_0x137aa5[_0x45f07b(0x2e3)]:_0x45f07b(0x168),_0x512fea=typeof _0x137aa5['message']===_0x45f07b(0x305)?_0x137aa5[_0x45f07b(0x249)]:_0x45f07b(0x2b9)+'\x20log',_0x46fc3f=typeof _0x137aa5[_0x45f07b(0x30c)]===_0x45f07b(0x305)&&_0x137aa5[_0x45f07b(0x30c)]['trim']()?_0x45f07b(0x2b9)+':'+_0x137aa5[_0x45f07b(0x30c)]['trim']():_0x45f07b(0x2b9),_0x5f2b2b=_0x137aa5['meta']&&typeof _0x137aa5[_0x45f07b(0x47a)]==='object'?{...summarizePayload(_0x137aa5['meta']),'context':_0x46fc3f}:{'context':_0x46fc3f},_0x2658ac=rendererLogger;if(_0x2658ac?.[_0x21f1b2])await _0x2658ac[_0x21f1b2](_0x512fea,_0x5f2b2b);else await _0x2658ac?.[_0x45f07b(0x168)](_0x512fea,_0x5f2b2b);if(_0x137aa5[_0x45f07b(0x2ec)+'ic']===!![]||_0x46fc3f===_0x45f07b(0x2b9)+_0x45f07b(0x1f7)+_0x45f07b(0x42c)){const _0xd11e5=_0x137aa5[_0x45f07b(0x375)]&&typeof _0x137aa5['record']==='object'?_0x137aa5[_0x45f07b(0x375)]:_0x137aa5[_0x45f07b(0x47a)]?.[_0x45f07b(0x375)]&&typeof _0x137aa5['meta'][_0x45f07b(0x375)]===_0x45f07b(0x3a5)?_0x137aa5[_0x45f07b(0x47a)]['record']:{'level':_0x21f1b2,'category':'renderer','event':_0x46fc3f,'message':_0x512fea,'meta':_0x137aa5[_0x45f07b(0x47a)]};await diagnosticsWriter?.[_0x45f07b(0x26b)+'nt'](_0xd11e5,{'captureIncident':String(_0xd11e5[_0x45f07b(0x2e3)]||_0x21f1b2)[_0x45f07b(0x45c)+_0x45f07b(0x2fa)]()===_0x45f07b(0x2fe)||_0x137aa5[_0x45f07b(0x3d4)+_0x45f07b(0x244)]===!![]});}return{'ok':!![]};}),_0x24e5da(_0x1e5349(0x40a)+_0x1e5349(0x447),async(_0x2c2790,_0x287c66={})=>{const _0x3b2731=_0x1e5349,_0x14dd53=typeof _0x287c66[_0x3b2731(0x37f)+'r']==='string'&&_0x287c66[_0x3b2731(0x37f)+'r'][_0x3b2731(0x46f)]()?_0x287c66[_0x3b2731(0x37f)+'r']:undefined,_0xf171b3=await exportLogsArchive({'logsDir':configController[_0x3b2731(0x3d8)][_0x3b2731(0x235)],'targetDir':_0x14dd53,'appVersion':app[_0x3b2731(0x1e3)+'on']()});return mainLogger?.[_0x3b2731(0x168)](_0x3b2731(0x47b)+_0x3b2731(0x1cb),{'path':toHomePath(_0xf171b3[_0x3b2731(0x24e)])}),_0xf171b3;}),_0x24e5da(_0x1e5349(0x1d6)+'n-direct'+_0x1e5349(0x3e0),async()=>{const _0x32b29d=_0x1e5349;return await shell['openPath'](configController[_0x32b29d(0x3d8)][_0x32b29d(0x235)]),mainLogger?.['info'](_0x32b29d(0x1f8)+_0x32b29d(0x19f)+_0x32b29d(0x229),{'logsDir':toHomePath(configController[_0x32b29d(0x3d8)][_0x32b29d(0x235)])}),{'ok':!![],'path':configController[_0x32b29d(0x3d8)][_0x32b29d(0x235)]};}),_0x24e5da(_0x1e5349(0x1fa)+'t',async()=>{const _0x3b6cc4=await readdir(configController['paths']['logsDir'],{'recursive':!![]})['catch'](()=>[]);return _0x3b6cc4;}),_0x24e5da(_0x1e5349(0x2fc)+'d',async(_0x2ec4bc,_0x419d2a={})=>{const _0x263801=_0x1e5349,_0x5580de=String(_0x419d2a['path']||'');if(!_0x5580de)throw new Error(_0x263801(0x34a)+_0x263801(0x45b));return readFile(_0x5580de,'utf8');}),_0x24e5da(_0x1e5349(0x1a9)+'ad',async(_0x39b7b8,_0x4ae3ec)=>{const _0x5a8410=_0x1e5349,_0x2969cf=Date[_0x5a8410(0x45d)]();try{const _0x3944db=await readFile(_0x4ae3ec,'utf8');return filesLogger?.[_0x5a8410(0x168)]('file\x20rea'+'d\x20comple'+'ted',{'path':toHomePath(_0x4ae3ec),'bytes':Buffer[_0x5a8410(0x2f2)+'th'](_0x3944db),'durationMs':Date[_0x5a8410(0x45d)]()-_0x2969cf}),_0x3944db;}catch(_0x7bd0dd){filesLogger?.[_0x5a8410(0x2fe)](_0x5a8410(0x277)+_0x5a8410(0x454),{'path':toHomePath(_0x4ae3ec),'durationMs':Date[_0x5a8410(0x45d)]()-_0x2969cf,'error':summarizeError(_0x7bd0dd)});throw _0x7bd0dd;}}),_0x24e5da(_0x1e5349(0x1a9)+_0x1e5349(0x426)+'y',async(_0x2a50ae,_0x207116)=>{const _0x49f805=_0x1e5349,_0xb55add=Date[_0x49f805(0x45d)]();try{const _0x2a8e45=await readFile(_0x207116);return filesLogger?.[_0x49f805(0x168)](_0x49f805(0x41c)+_0x49f805(0x1ab)+_0x49f805(0x3c9)+'ed',{'path':toHomePath(_0x207116),'bytes':_0x2a8e45[_0x49f805(0x2f2)+'th'],'durationMs':Date[_0x49f805(0x45d)]()-_0xb55add}),new Uint8Array(_0x2a8e45);}catch(_0xecc24c){filesLogger?.[_0x49f805(0x2fe)](_0x49f805(0x41c)+_0x49f805(0x1ab)+'\x20failed',{'path':toHomePath(_0x207116),'durationMs':Date[_0x49f805(0x45d)]()-_0xb55add,'error':summarizeError(_0xecc24c)});throw _0xecc24c;}}),_0x24e5da('files:wr'+_0x1e5349(0x380),async(_0x352227,_0x5095ed={})=>{const _0x9e1bf0=_0x1e5349,_0x58c5b9=Date[_0x9e1bf0(0x45d)]();return await writeFile(_0x5095ed[_0x9e1bf0(0x24e)],_0x5095ed[_0x9e1bf0(0x29d)]??'','utf8'),filesLogger?.[_0x9e1bf0(0x168)](_0x9e1bf0(0x420)+_0x9e1bf0(0x2f0)+_0x9e1bf0(0x2ee),{'path':toHomePath(_0x5095ed[_0x9e1bf0(0x24e)]),'bytes':Buffer[_0x9e1bf0(0x2f2)+'th'](String(_0x5095ed[_0x9e1bf0(0x29d)]??'')),'durationMs':Date['now']()-_0x58c5b9}),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x183)+_0x1e5349(0x355)+'ry',async(_0x19f585,_0x5f4e9b={})=>{const _0x41e854=_0x1e5349,_0x551e50=Date[_0x41e854(0x45d)]();await writeFile(_0x5f4e9b[_0x41e854(0x24e)],Buffer[_0x41e854(0x436)](_0x5f4e9b['content']??[]));const _0x2e5c32=await stat(_0x5f4e9b['path'])[_0x41e854(0x22b)](()=>null);return filesLogger?.[_0x41e854(0x168)](_0x41e854(0x41c)+'ile\x20writ'+_0x41e854(0x474)+_0x41e854(0x28b),{'path':toHomePath(_0x5f4e9b[_0x41e854(0x24e)]),'bytes':_0x2e5c32?.['size']??0x0,'durationMs':Date[_0x41e854(0x45d)]()-_0x551e50}),{'ok':!![]};}),_0x24e5da(_0x1e5349(0x353)+_0x1e5349(0x3d7)+'e',async(_0x1e369c,_0x2edb69={})=>{const _0x4705b1=_0x1e5349,_0x47fd7c=await dialog['showOpen'+_0x4705b1(0x47c)](BrowserWindow['fromWebC'+_0x4705b1(0x487)](_0x1e369c[_0x4705b1(0x165)])??mainWindow,{'title':typeof _0x2edb69['title']===_0x4705b1(0x305)?_0x2edb69['title']:undefined,'properties':[_0x4705b1(0x256),..._0x2edb69[_0x4705b1(0x198)+_0x4705b1(0x292)]?[_0x4705b1(0x198)+_0x4705b1(0x292)]:[]],'filters':Array[_0x4705b1(0x201)](_0x2edb69[_0x4705b1(0x33d)])?_0x2edb69[_0x4705b1(0x33d)]:undefined});return filesLogger?.[_0x4705b1(0x168)](_0x4705b1(0x18a)+_0x4705b1(0x195)+_0x4705b1(0x173),{'canceled':_0x47fd7c[_0x4705b1(0x331)],'count':_0x47fd7c['filePath'+'s'][_0x4705b1(0x367)],'paths':_0x47fd7c[_0x4705b1(0x31c)+'s'][_0x4705b1(0x39e)](toHomePath)}),{'canceled':_0x47fd7c['canceled'],'paths':_0x47fd7c['filePath'+'s']};}),_0x24e5da(_0x1e5349(0x240)+_0x1e5349(0x24f)+_0x1e5349(0x15f),async(_0x4dc0fe,_0x2d4d5a={})=>{const _0x3ed602=_0x1e5349,_0x1a2e7f=resolve(String(_0x2d4d5a['path']||'')),_0x280633=_0x2d4d5a[_0x3ed602(0x478)+'e']!==![],_0x2789aa=Array[_0x3ed602(0x201)](_0x2d4d5a[_0x3ed602(0x351)+'ns'])?_0x2d4d5a['extensio'+'ns'][_0x3ed602(0x39e)](_0x30f052=>String(_0x30f052)[_0x3ed602(0x45c)+_0x3ed602(0x2fa)]()[_0x3ed602(0x16c)](/^\./,''))[_0x3ed602(0x36e)](Boolean):null,_0x1b05dc=Number[_0x3ed602(0x39d)+'r'](_0x2d4d5a['maxEntri'+'es'])&&_0x2d4d5a[_0x3ed602(0x484)+'es']>0x0?_0x2d4d5a[_0x3ed602(0x484)+'es']:0xc350,_0x35096f=[];let _0x55575d=![];async function _0x51e55f(_0x3e346b){const _0x38b773=_0x3ed602;if(_0x55575d)return;let _0x565c9c;try{_0x565c9c=await readdir(_0x3e346b,{'withFileTypes':!![]});}catch{return;}for(const _0x131ea6 of _0x565c9c){if(_0x55575d)return;if(_0x131ea6[_0x38b773(0x35c)]['startsWi'+'th']('.'))continue;const _0x2de93d=join(_0x3e346b,_0x131ea6[_0x38b773(0x35c)]);if(_0x131ea6['isDirect'+_0x38b773(0x3e0)]()){if(_0x280633)await _0x51e55f(_0x2de93d);continue;}if(!_0x131ea6[_0x38b773(0x452)]())continue;if(_0x2789aa){const _0x9f452a=_0x131ea6[_0x38b773(0x35c)][_0x38b773(0x1e1)+_0x38b773(0x373)]('.'),_0x7fba37=_0x9f452a>=0x0?_0x131ea6[_0x38b773(0x35c)][_0x38b773(0x267)](_0x9f452a+0x1)[_0x38b773(0x45c)+_0x38b773(0x2fa)]():'';if(!_0x2789aa[_0x38b773(0x2c7)](_0x7fba37))continue;}if(_0x35096f['length']>=_0x1b05dc){_0x55575d=!![];return;}_0x35096f[_0x38b773(0x197)]({'name':_0x131ea6[_0x38b773(0x35c)],'path':_0x2de93d});}}return await _0x51e55f(_0x1a2e7f),{'path':_0x1a2e7f,'entries':_0x35096f,'truncated':_0x55575d};}),_0x24e5da(_0x1e5349(0x353)+'lect-dir'+_0x1e5349(0x329),async(_0x3bd72c,_0xf5da50={})=>{const _0x467995=_0x1e5349,_0xfded0=await dialog[_0x467995(0x1b0)+_0x467995(0x47c)](BrowserWindow['fromWebC'+_0x467995(0x487)](_0x3bd72c[_0x467995(0x165)])??mainWindow,{'title':typeof _0xf5da50[_0x467995(0x437)]===_0x467995(0x305)?_0xf5da50[_0x467995(0x437)]:undefined,'properties':[_0x467995(0x2c3)+'ctory']});return filesLogger?.[_0x467995(0x168)](_0x467995(0x210)+'irectory'+_0x467995(0x3c9)+'ed',{'canceled':_0xfded0[_0x467995(0x331)],'count':_0xfded0['filePath'+'s'][_0x467995(0x367)],'paths':_0xfded0[_0x467995(0x31c)+'s'][_0x467995(0x39e)](toHomePath)}),{'canceled':_0xfded0[_0x467995(0x331)],'paths':_0xfded0[_0x467995(0x31c)+'s']};}),_0x24e5da(_0x1e5349(0x337)+'e:direct'+_0x1e5349(0x1b7),()=>_0x6c6bcd()[_0x1e5349(0x337)+'e']['director'+_0x1e5349(0x43c)]()),_0x24e5da(_0x1e5349(0x337)+_0x1e5349(0x43f)+'irectory',async()=>{const _0x2f5350=_0x1e5349,_0x47ba30=await _0x6c6bcd()[_0x2f5350(0x337)+'e'][_0x2f5350(0x416)+'yInfo']();return await shell['openPath'](_0x47ba30['path']),filesLogger?.[_0x2f5350(0x168)]('workspac'+_0x2f5350(0x3c3)+'ory\x20open'+'ed',{'path':toHomePath(_0x47ba30[_0x2f5350(0x24e)])}),{'ok':!![],'path':_0x47ba30['path']};}),_0x24e5da(_0x1e5349(0x337)+'e:shared'+_0x1e5349(0x23b),()=>_0x6c6bcd()['workspac'+'e'][_0x1e5349(0x208)+_0x1e5349(0x303)]()),_0x24e5da(_0x1e5349(0x337)+_0x1e5349(0x469)+_0x1e5349(0x35a)+_0x1e5349(0x286),(_0xe20037,_0xd90bcc)=>_0x6c6bcd()[_0x1e5349(0x337)+'e'][_0x1e5349(0x2d4)+'redConte'+'xt'](_0xd90bcc)),_0x24e5da('sessions'+_0x1e5349(0x442),(_0x1a4ab1,_0x50bf0)=>_0x6c6bcd()[_0x1e5349(0x392)]['rename'](_0x50bf0)),_0x24e5da('sessions'+':pin',async(_0xed68f5,_0x18f639={})=>{const _0x5d9898=_0x1e5349,_0x568e6e=String(_0x18f639[_0x5d9898(0x387)+'ey']||_0x18f639['key']||'')[_0x5d9898(0x46f)]();if(!_0x568e6e)throw new Error('sessionK'+'ey\x20is\x20re'+_0x5d9898(0x18f));const _0x340590=await ensureSessionSqliteStore()['getPinne'+_0x5d9898(0x264)+'Keys'](),_0xd3bfe7=await _0x6c6bcd()[_0x5d9898(0x392)][_0x5d9898(0x2c4)+_0x5d9898(0x227)]([_0x568e6e,..._0x340590[_0x5d9898(0x36e)](_0x592e2b=>_0x592e2b!==_0x568e6e)]);return _0xd3bfe7;}),_0x24e5da('sessions'+_0x1e5349(0x2f3),async(_0x5a43db,_0x593d54={})=>{const _0x4175c4=_0x1e5349,_0xc51690=String(_0x593d54[_0x4175c4(0x387)+'ey']||_0x593d54[_0x4175c4(0x15c)]||'')[_0x4175c4(0x46f)]();if(!_0xc51690)throw new Error(_0x4175c4(0x387)+_0x4175c4(0x440)+_0x4175c4(0x18f));const _0x57e386=await ensureSessionSqliteStore()[_0x4175c4(0x167)+_0x4175c4(0x264)+_0x4175c4(0x2fb)]();return await _0x6c6bcd()[_0x4175c4(0x392)][_0x4175c4(0x2c4)+_0x4175c4(0x227)](_0x57e386[_0x4175c4(0x36e)](_0x234344=>_0x234344!==_0xc51690));}),_0x24e5da(_0x1e5349(0x392)+_0x1e5349(0x3f8)+_0x1e5349(0x476),async(_0x4b63a4,_0x261f46={})=>{const _0x2bf71f=_0x1e5349,_0x300cbd=Array['isArray'](_0x261f46[_0x2bf71f(0x2d5)])?_0x261f46[_0x2bf71f(0x2d5)]:_0x261f46;return await _0x6c6bcd()['sessions'][_0x2bf71f(0x2c4)+_0x2bf71f(0x227)](_0x300cbd);}),_0x24e5da(_0x1e5349(0x2d0)+_0x1e5349(0x290),(_0x1e5e5e,_0xd6c9d7)=>_0x6c6bcd()[_0x1e5349(0x414)][_0x1e5349(0x3b8)](_0xd6c9d7)),_0x24e5da('cron:lis'+'t',(_0x147d2b,_0x2680d1)=>_0x6c6bcd()[_0x1e5349(0x3af)]['list'](_0x2680d1)),_0x24e5da('cron:cre'+_0x1e5349(0x2db),(_0x5c8173,_0x4aa500)=>_0x6c6bcd()['cron'][_0x1e5349(0x2a8)](_0x4aa500)),_0x24e5da(_0x1e5349(0x448)+_0x1e5349(0x2db),(_0x36e40d,_0x79fe5d)=>_0x6c6bcd()['cron'][_0x1e5349(0x3ba)](_0x79fe5d)),_0x24e5da('cron:rem'+_0x1e5349(0x280),(_0x166497,_0x148eda)=>_0x6c6bcd()[_0x1e5349(0x3af)][_0x1e5349(0x467)](_0x148eda)),_0x24e5da(_0x1e5349(0x3ab)+_0x1e5349(0x383),(_0x3b9920,_0x1eb166)=>_0x6c6bcd()[_0x1e5349(0x3af)][_0x1e5349(0x2d8)](_0x1eb166)),_0x24e5da('cron:log'+'s',(_0x552d9c,_0x3e6864)=>_0x6c6bcd()[_0x1e5349(0x3af)][_0x1e5349(0x2d9)](_0x3e6864)),_0x24e5da(_0x1e5349(0x1f1)+_0x1e5349(0x2ef),async(_0x3737af,_0x1ad4ba={})=>{const _0x5db4a0=_0x1e5349,_0x39b559=configController[_0x5db4a0(0x2bf)+_0x5db4a0(0x294)+'h'](),_0xb45339=JSON[_0x5db4a0(0x1b6)](await readFile(_0x39b559,_0x5db4a0(0x174))),_0x32e777=_0xb45339?.[_0x5db4a0(0x30f)]?.['provider'+'s']&&typeof _0xb45339['models']['provider'+'s']===_0x5db4a0(0x3a5)?_0xb45339[_0x5db4a0(0x30f)][_0x5db4a0(0x1ef)+'s']:{},_0x4c4a73=typeof _0xb45339?.[_0x5db4a0(0x45f)]?.[_0x5db4a0(0x40d)]?.['model']?.[_0x5db4a0(0x391)]===_0x5db4a0(0x305)?_0xb45339[_0x5db4a0(0x45f)][_0x5db4a0(0x40d)][_0x5db4a0(0x161)][_0x5db4a0(0x391)]:'',_0xe78fc4=String(_0x1ad4ba[_0x5db4a0(0x161)]||_0x4c4a73||'');if(!_0xe78fc4['includes']('/'))throw new Error(_0x5db4a0(0x19d)+_0x5db4a0(0x23e)+_0x5db4a0(0x3ef)+_0x5db4a0(0x3e8)+_0x5db4a0(0x2e4)+_0x5db4a0(0x1d9)+_0x5db4a0(0x236));const _0xb94ae2=_0xe78fc4[_0x5db4a0(0x2c6)]('/'),_0x50fdfa=_0xe78fc4['slice'](0x0,_0xb94ae2),_0x145ef5=_0xe78fc4[_0x5db4a0(0x267)](_0xb94ae2+0x1),_0x4175ba=_0x32e777[_0x50fdfa];if(!_0x4175ba||typeof _0x4175ba!==_0x5db4a0(0x3a5))throw new Error(_0x5db4a0(0x1ef)+_0x5db4a0(0x34d)+_0x5db4a0(0x36a)+'\x20'+_0x50fdfa);const _0x4cab4b=String(_0x4175ba[_0x5db4a0(0x410)]||_0x5db4a0(0x2ac)+_0x5db4a0(0x19a)+_0x5db4a0(0x214)+'1')[_0x5db4a0(0x46f)]()[_0x5db4a0(0x16c)](/\/$/,''),_0x523ed7=await fetch(_0x4cab4b+(_0x5db4a0(0x20e)+_0x5db4a0(0x17e)+'s'),{'method':'POST','headers':{'content-type':_0x5db4a0(0x223)+'ion/json','Authorization':'Bearer\x20'+(_0x4175ba['apiKey']||''),..._0x4175ba['headers']&&typeof _0x4175ba['headers']===_0x5db4a0(0x3a5)?_0x4175ba[_0x5db4a0(0x32f)]:{}},'body':JSON['stringif'+'y']({'model':_0x145ef5,'max_tokens':Number['isIntege'+'r'](_0x1ad4ba['maxToken'+'s'])?_0x1ad4ba[_0x5db4a0(0x405)+'s']:0x400,'temperature':typeof _0x1ad4ba[_0x5db4a0(0x407)+_0x5db4a0(0x411)]===_0x5db4a0(0x465)?_0x1ad4ba[_0x5db4a0(0x407)+'ure']:undefined,'messages':Array['isArray'](_0x1ad4ba['messages'])?_0x1ad4ba['messages']:[]}),'signal':AbortSignal[_0x5db4a0(0x343)](Number['isIntege'+'r'](_0x1ad4ba[_0x5db4a0(0x39b)+'s'])?_0x1ad4ba[_0x5db4a0(0x39b)+'s']:0x1d4c0)});if(!_0x523ed7['ok']){const _0x2532f1=await _0x523ed7[_0x5db4a0(0x44d)]();throw new Error(_0x5db4a0(0x350)+_0x5db4a0(0x488)+_0x523ed7[_0x5db4a0(0x36f)]+':\x20'+_0x2532f1[_0x5db4a0(0x267)](0x0,0x190));}const _0x36ff9a=await _0x523ed7[_0x5db4a0(0x26d)](),_0x356c86=_0x36ff9a?.[_0x5db4a0(0x3a6)]?.[0x0]?.[_0x5db4a0(0x249)]??{};return{'content':extractModelMessageContent(_0x356c86['content']),'reasoning':typeof _0x356c86['reasonin'+'g_conten'+'t']===_0x5db4a0(0x305)?_0x356c86[_0x5db4a0(0x209)+_0x5db4a0(0x32a)+'t']:'','model':_0x36ff9a?.[_0x5db4a0(0x161)]||_0x145ef5};}),_0x24e5da(_0x1e5349(0x3da)+'ettings',()=>_0x6c6bcd()[_0x1e5349(0x30f)][_0x1e5349(0x1ac)]()),_0x24e5da(_0x1e5349(0x3da)+'et-setti'+'ngs',(_0x5ed671,_0x23a819)=>_0x6c6bcd()[_0x1e5349(0x30f)][_0x1e5349(0x34f)+_0x1e5349(0x1ba)](_0x23a819)),_0x24e5da(_0x1e5349(0x3da)+_0x1e5349(0x17c)+_0x1e5349(0x23d)+_0x1e5349(0x354),(_0x204c0b,_0x5a2962)=>_0x6c6bcd()[_0x1e5349(0x30f)][_0x1e5349(0x3b6)+_0x1e5349(0x47e)+'Everywhe'+'re'](_0x5a2962)),_0x24e5da('models:s'+_0x1e5349(0x274)+'operated',(_0x16b718,_0x4f4736)=>_0x6c6bcd()[_0x1e5349(0x30f)][_0x1e5349(0x24b)+_0x1e5349(0x486)+_0x1e5349(0x186)](_0x4f4736)),_0x24e5da(_0x1e5349(0x3da)+'elected-'+_0x1e5349(0x44e),()=>_0x6c6bcd()[_0x1e5349(0x30f)][_0x1e5349(0x257)+'ModelId']()),_0x24e5da(_0x1e5349(0x1f1)+_0x1e5349(0x3e9)+_0x1e5349(0x21d),()=>_0x6c6bcd()[_0x1e5349(0x30f)][_0x1e5349(0x2b1)+_0x1e5349(0x21d)]()),_0x24e5da(_0x1e5349(0x284)+'sync-bun'+'dled-res'+_0x1e5349(0x29b),async()=>{const _0x62dcde=_0x1e5349,_0x4328e9=await prepareRuntime(shellConfig,{'syncOnly':!![]});return await configController[_0x62dcde(0x429)+_0x62dcde(0x444)+'ns'](),{'ok':!![],'syncedAt':new Date()[_0x62dcde(0x213)+_0x62dcde(0x482)](),'manifest':_0x4328e9,'status':await getRuntimeResourceStatus()};}),_0x24e5da(_0x1e5349(0x284)+_0x1e5349(0x3be)+'-status',async()=>getRuntimeResourceStatus());}async function boot(){const _0x33554c=_0x548820;shellConfig=await loadShellConfig(resolveProjectRoot()),app['setName'](shellConfig[_0x33554c(0x2cf)+_0x33554c(0x3df)]),configController=createConfigController(shellConfig),mainLogger=createShellLogger(configController[_0x33554c(0x3d8)],_0x33554c(0x194)),ipcLogger=createShellLogger(configController[_0x33554c(0x3d8)],_0x33554c(0x17d)),filesLogger=createShellLogger(configController[_0x33554c(0x3d8)],_0x33554c(0x47f)),rendererLogger=createShellLogger(configController['paths'],_0x33554c(0x2b9)),productRuntime=await loadProductRuntime();const _0x575e4f=resolveWujieApiEndpoint();diagnosticsWriter=createDiagnosticsWriter({'logsDir':configController['paths']['logsDir'],'appContext':{'productName':shellConfig[_0x33554c(0x2cf)+'ame'],'appId':shellConfig[_0x33554c(0x3ee)],'appVersion':app['getVersi'+'on'](),'platform':process['platform'],'arch':process[_0x33554c(0x3a1)],..._0x575e4f?{'apiEndpoint':_0x575e4f}:{}}}),userEventWriter=createUserEventWriter({'logsDir':configController['paths'][_0x33554c(0x235)],'diagnosticsWriter':diagnosticsWriter});const _0x48199e=await loadCreateUpdateController({'logger':mainLogger});updateController=_0x48199e({'shellConfig':shellConfig,'appName':()=>app[_0x33554c(0x35c)],'appVersion':()=>app[_0x33554c(0x1e3)+'on'](),'broadcast':broadcast,'logger':mainLogger}),updateController[_0x33554c(0x425)+'ze'](),registerProcessLogHooks(),mainLogger?.[_0x33554c(0x168)](_0x33554c(0x238)+_0x33554c(0x3e2)+'ot\x20start'+'ed',{'appVersion':app[_0x33554c(0x1e3)+'on'](),'electronVersion':process[_0x33554c(0x2cc)][_0x33554c(0x238)],'nodeVersion':process['versions'][_0x33554c(0x1a5)],'chromeVersion':process[_0x33554c(0x2cc)]['chrome'],'platform':process['platform'],'arch':process[_0x33554c(0x3a1)],'mode':getMode(),'projectRoot':shellConfig[_0x33554c(0x32b)+_0x33554c(0x485)],'configPath':shellConfig[_0x33554c(0x3fd)+'th'],'dataDir':shellConfig[_0x33554c(0x1f6)],'logsDir':configController[_0x33554c(0x3d8)][_0x33554c(0x235)],'rendererUrl':process.env.VITE_DEV_SERVER_URL||join(shellConfig[_0x33554c(0x32b)+_0x33554c(0x485)],_0x33554c(0x40b),_0x33554c(0x2e8)+'ml')}),gatewayController=createGatewayController({'shellConfig':shellConfig,'configController':configController,'appVersion':app['getVersi'+'on'](),'productRuntimeHooks':productRuntimeHooks,'userEventWriter':userEventWriter,'sessionSqliteStore':ensureSessionSqliteStore()}),typeof productRuntime['migrateP'+_0x33554c(0x333)+_0x33554c(0x313)]===_0x33554c(0x259)&&await productRuntime[_0x33554c(0x1da)+_0x33554c(0x333)+_0x33554c(0x313)]({'configController':configController,'mainLogger':mainLogger}),typeof productRuntime[_0x33554c(0x1da)+_0x33554c(0x275)+'ta']==='function'?await productRuntime['migrateP'+_0x33554c(0x275)+'ta']({'configController':configController,'generatedFilesStore':ensureGeneratedFilesStore(),'mainLogger':mainLogger,'sessionSqliteStore':ensureSessionSqliteStore()}):await ensureGeneratedFilesStore()[_0x33554c(0x381)+_0x33554c(0x1d7)+'d'](),attachGatewayBroadcastHandlers(gatewayController),await installIpcHandlers(),installClawspaceProtocolHandler(),registerShellShortcuts(),await createWindow(),await gatewayController[_0x33554c(0x2e9)](),updateController[_0x33554c(0x18d)+_0x33554c(0x417)+'hecks'](),mainLogger?.[_0x33554c(0x168)](_0x33554c(0x238)+_0x33554c(0x3e2)+_0x33554c(0x386)+_0x33554c(0x2ee));}function registerProcessLogHooks(){const _0x144dc4=_0x548820;if(registerProcessLogHooks[_0x144dc4(0x250)+'ed'])return;registerProcessLogHooks[_0x144dc4(0x250)+'ed']=!![],process['on'](_0x144dc4(0x1e8)+'Exceptio'+'n',_0x47c0d1=>{const _0xcadcca=_0x144dc4;mainLogger?.[_0xcadcca(0x2fe)](_0xcadcca(0x1e8)+_0xcadcca(0x3c7)+'on',summarizeError(_0x47c0d1));}),process['on'](_0x144dc4(0x321)+'dRejecti'+'on',_0x21d286=>{const _0x4604a0=_0x144dc4;mainLogger?.[_0x4604a0(0x2fe)](_0x4604a0(0x321)+_0x4604a0(0x299)+_0x4604a0(0x37e),summarizeError(_0x21d286));}),app['on'](_0x144dc4(0x308)+'rocess-g'+_0x144dc4(0x228),(_0x9447b0,_0x4f8992,_0x52d223)=>{const _0x2d419d=_0x144dc4;mainLogger?.[_0x2d419d(0x2fe)](_0x2d419d(0x2b9)+_0x2d419d(0x16a)+'\x20gone',{'url':_0x4f8992['getURL'](),'details':_0x52d223});}),app['on']('child-pr'+_0x144dc4(0x2b0)+'ne',(_0x543aa3,_0x249e14)=>{const _0x2000dc=_0x144dc4;mainLogger?.[_0x2000dc(0x2fe)]('child\x20pr'+_0x2000dc(0x20d)+'ne',{'details':_0x249e14});});}app['on'](_0x548820(0x1f0)+'ll-close'+'d',()=>{const _0x4b629f=_0x548820;if(process[_0x4b629f(0x293)]!=='darwin')app[_0x4b629f(0x404)]();}),app['on'](_0x548820(0x45a),async()=>{const _0xd89772=_0x548820;if(isQuitting){app['quit']();return;}updateController?.[_0xd89772(0x431)+'ackgroun'+_0xd89772(0x3bd)](_0xd89772(0x21c)+'vate'),BrowserWindow[_0xd89772(0x21f)+_0xd89772(0x2c8)]()[_0xd89772(0x367)]===0x0&&shellConfig&&await createWindow();}),app['on'](_0x548820(0x29c)+_0x548820(0x1c2),_0x466ded=>{const _0x300b92=_0x548820;isQuitting=!![],updateController?.[_0x300b92(0x430)+_0x300b92(0x42b)](),terminalManager?.[_0x300b92(0x19e)](),terminalManager=null,productRuntimeHooks?.[_0x300b92(0x19e)]?.();for(const _0x116e8a of Object['keys'](productRuntimeHooks))delete productRuntimeHooks[_0x116e8a];if(!gatewayController)return;mainLogger?.['info']('before\x20q'+_0x300b92(0x289)+_0x300b92(0x3f6)+_0x300b92(0x330)),_0x466ded[_0x300b92(0x1d0)+_0x300b92(0x3e5)](),void gatewayController[_0x300b92(0x254)]()[_0x300b92(0x2fd)](()=>{const _0x33ac0b=_0x300b92;gatewayController=null,mainLogger?.[_0x33ac0b(0x168)](_0x33ac0b(0x1aa)+_0x33ac0b(0x2f1)+_0x33ac0b(0x2af)+_0x33ac0b(0x1c2)),app['quit']();});}),app['on'](_0x548820(0x1a0)+'t',()=>{const _0x2cd292=_0x548820;globalShortcut[_0x2cd292(0x17a)+'er'](DEVTOOLS_ACCELERATOR);}),app[_0x548820(0x21b)+'y']()[_0x548820(0x40f)](boot)[_0x548820(0x22b)](_0x3f1a52=>{const _0x37a38e=_0x548820;bootError=_0x3f1a52 instanceof Error?_0x3f1a52[_0x37a38e(0x249)]:String(_0x3f1a52),mainLogger?.[_0x37a38e(0x2fe)](_0x37a38e(0x238)+_0x37a38e(0x3e2)+_0x37a38e(0x3ec)+'d',summarizeError(_0x3f1a52)),console[_0x37a38e(0x2fe)](_0x37a38e(0x16f)+'hell]\x20fa'+_0x37a38e(0x356)+_0x37a38e(0x42e)+'ctron\x20ma'+'in',_0x3f1a52);});
|