@wujie-shell/core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -3
- package/bin/wujie-shell.mjs +22 -1
- 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/agents/runtime-config.mjs +1 -0
- package/dist/src/chat/media-archive.mjs +1 -1
- package/dist/src/chat/queue.mjs +1 -1
- package/dist/src/common/cron-session-key.mjs +1 -0
- 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/sqlite-paths.mjs +1 -0
- 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/connectors/lark-cli.mjs +1 -0
- package/dist/src/electron/main.mjs +1 -1
- package/dist/src/electron/preload.mjs +1 -1
- package/dist/src/electron/protocol-url-state.mjs +1 -0
- package/dist/src/events/domain-event-journal.mjs +1 -0
- 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/request-id-title-events.mjs +1 -0
- 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/request-id/handlers.mjs +1 -0
- package/dist/src/request-id/runtime-bridge.mjs +1 -0
- package/dist/src/request-id/session-store.mjs +1 -0
- package/dist/src/request-id/title.mjs +1 -0
- package/dist/src/runtime/cron-missed-run-policy.mjs +1 -0
- 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-provider-request-id-header.mjs +1 -0
- package/dist/src/runtime/patch-qqbot-outbound-session-route.mjs +1 -0
- package/dist/src/runtime/patch-request-id-title-runtime.mjs +1 -0
- package/dist/src/runtime/patch-session-store-sqlite.mjs +1 -1
- package/dist/src/runtime/patch-weixin-outbound-session-route.mjs +1 -0
- 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-data-service.mjs +1 -0
- package/dist/src/sessions/session-runtime-state-service.mjs +1 -0
- package/dist/src/sessions/session-runtime-state.mjs +1 -0
- package/dist/src/sessions/session-sqlite-store.mjs +1 -1
- package/dist/src/sessions/sql/001_init.sql +2 -1
- package/dist/src/sessions/sql/003_session_message_index.sql +29 -0
- package/dist/src/sessions/sql/004_request_id_titles.sql +15 -0
- package/dist/src/sessions/sql/005_session_subagents.sql +31 -0
- package/dist/src/sessions/sql/006_session_process_snapshot.sql +24 -0
- package/dist/src/sessions/sql/schema.md +53 -3
- 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 _0x30af49=_0x3e4d;(function(_0x137564,_0x1d7b4d){const _0x503d41=_0x3e4d,_0x942ec3=_0x137564();while(!![]){try{const _0x4e4580=-parseInt(_0x503d41(0x2c2))/0x1+-parseInt(_0x503d41(0x16a))/0x2*(parseInt(_0x503d41(0x335))/0x3)+parseInt(_0x503d41(0x16d))/0x4*(-parseInt(_0x503d41(0x223))/0x5)+parseInt(_0x503d41(0x2e4))/0x6*(parseInt(_0x503d41(0x332))/0x7)+parseInt(_0x503d41(0x168))/0x8*(-parseInt(_0x503d41(0x1fd))/0x9)+-parseInt(_0x503d41(0x339))/0xa+parseInt(_0x503d41(0x2a7))/0xb;if(_0x4e4580===_0x1d7b4d)break;else _0x942ec3['push'](_0x942ec3['shift']());}catch(_0xb2d2e3){_0x942ec3['push'](_0x942ec3['shift']());}}}(_0x1e29,0x4dae9));import{existsSync}from'node:fs';import{createWriteStream}from'node:fs';import{chmod,cp,mkdir,readFile,readdir,rename,rm,stat,symlink,writeFile}from'node:fs/promises';import{basename,delimiter,dirname,join,relative,resolve}from'node:path';import{fileURLToPath,pathToFileURL}from'node:url';import{spawn}from'node:child_process';import{get}from'node:https';import{pipeline}from'node:stream/promises';import{getConfigPaths}from'@wujie-shell/config';import{copyDirFresh,getPackageMetadata,readJson,readPluginManifest,toRuntimeRelative,writeJson}from'../common/utils.mjs';import{createRuntimeLogger,summarizeRuntimeManifest,summarizeShellConfig}from'../common/runtime-logger.mjs';import{hasConfiguredKdocsSkill,installKdocsCliBinary}from'../connectors/kdocs-cli.mjs';import{patchMixedToolContentFromSource}from'./patch-chat-history-mixed-tool-content.mjs';import{patchChannelPluginRuntimeFromSource}from'./patch-channel-plugin-runtime.mjs';import{patchSessionStoreLoadFromSource,patchSessionStoreWriteFromSource}from'./patch-session-store-sqlite.mjs';const RUNTIME_DIR=_0x30af49(0x259)+_0x30af49(0x19a),MANIFEST_NAME=_0x30af49(0x22e)+'manifest'+_0x30af49(0x253),NPM_INSTALL_TIMEOUT_MS=0xf*0x3c*0x3e8;function _0x3e4d(_0x593325,_0x974a7c){_0x593325=_0x593325-0x131;const _0x1e291a=_0x1e29();let _0x3e4d69=_0x1e291a[_0x593325];return _0x3e4d69;}export function resolveRuntimeRoot(_0x177230){if(process.env.WUJIE_SHELL_RUNTIME_ROOT)return resolve(process.env.WUJIE_SHELL_RUNTIME_ROOT);return resolve(_0x177230,RUNTIME_DIR);}export function resolveManifestPath(_0x2186c2){return join(_0x2186c2,MANIFEST_NAME);}async function loadProductRuntime(_0xebadc9,_0x3b7795){const _0x5852ad=_0x30af49,_0x4138e3=[join(_0xebadc9,_0x5852ad(0x182)+_0x5852ad(0x1d6),_0x5852ad(0x302)+'s'),join(_0x3b7795,_0x5852ad(0x182)+_0x5852ad(0x1d6),_0x5852ad(0x302)+'s')];for(const _0x993fdf of _0x4138e3){if(!existsSync(_0x993fdf))continue;return await import(pathToFileURL(_0x993fdf)[_0x5852ad(0x14a)]+'?t='+Date['now']());}return{};}export async function prepareRuntime(_0x585ff6,{syncOnly:syncOnly=![]}={}){const _0x4e1078=_0x30af49,_0xe94f53=resolveRuntimeRoot(_0x585ff6[_0x4e1078(0x149)+_0x4e1078(0x28e)]),_0x102147=createRuntimeLogger(getConfigPaths(_0x585ff6),_0x4e1078(0x277)),_0x34cc45=Date[_0x4e1078(0x14d)]();_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x24a)+_0x4e1078(0x205)+_0x4e1078(0x20e),{'syncOnly':syncOnly,'runtimeRoot':_0xe94f53,'shellConfig':summarizeShellConfig(_0x585ff6)});try{const _0x1554c2=await ensureRuntimeBase(_0x585ff6,_0xe94f53,{'runtimeLogger':_0x102147,'syncOnly':syncOnly});_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x205)+'manifest'+_0x4e1078(0x1db),{'manifestPath':resolveManifestPath(_0xe94f53),'manifest':summarizeRuntimeManifest(_0x1554c2)}),validateRuntimeNodeVersion(_0x1554c2,_0x585ff6),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x205)+_0x4e1078(0x2ad)+_0x4e1078(0x201)+_0x4e1078(0x1a8),{'nodeVersion':_0x1554c2[_0x4e1078(0x1d0)+_0x4e1078(0x229)]});if(syncOnly)validateRuntimeOpenClawVersion(_0x1554c2,_0x585ff6),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x205)+'openclaw'+_0x4e1078(0x165)+_0x4e1078(0x1df)+'ed',{'openclawVersion':_0x1554c2[_0x4e1078(0x19b)+'Version']});else{if(_0x1554c2[_0x4e1078(0x19b)+_0x4e1078(0x26f)]!==_0x585ff6[_0x4e1078(0x19b)]['openclaw'+_0x4e1078(0x26f)]){const _0x257f22=await loadRuntimeInfo(_0x585ff6[_0x4e1078(0x149)+_0x4e1078(0x28e)]);_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x19b)+_0x4e1078(0x231)+'\x20install'+'\x20started',{'fromVersion':_0x1554c2[_0x4e1078(0x19b)+_0x4e1078(0x26f)]||_0x4e1078(0x2ce),'toVersion':_0x585ff6['openclaw'][_0x4e1078(0x19b)+'Version']}),await installOpenClawPackage(_0x257f22,_0x585ff6[_0x4e1078(0x19b)][_0x4e1078(0x19b)+_0x4e1078(0x26f)]),_0x1554c2[_0x4e1078(0x19b)+_0x4e1078(0x26f)]=_0x585ff6[_0x4e1078(0x19b)]['openclaw'+_0x4e1078(0x26f)],_0x102147?.['info']('openclaw'+_0x4e1078(0x231)+_0x4e1078(0x14c)+_0x4e1078(0x157)+'ed',{'openclawVersion':_0x1554c2[_0x4e1078(0x19b)+_0x4e1078(0x26f)]});}}_0x1554c2['generate'+_0x4e1078(0x2ea)]=new Date()['toISOStr'+_0x4e1078(0x329)](),_0x1554c2['nodeVers'+_0x4e1078(0x229)]=_0x585ff6[_0x4e1078(0x19b)][_0x4e1078(0x1d0)+_0x4e1078(0x229)],_0x1554c2[_0x4e1078(0x139)]={'appId':_0x585ff6[_0x4e1078(0x17b)],'productName':_0x585ff6[_0x4e1078(0x13f)+_0x4e1078(0x174)],'dataDirName':_0x585ff6['dataDirN'+'ame']},await patchChatHistoryMixedToolContentBug(_0xe94f53,_0x1554c2,{'runtimeLogger':_0x102147}),await patchChannelPluginRuntimeBug(_0xe94f53,_0x1554c2,{'runtimeLogger':_0x102147});const _0x1de50c=await loadProductRuntime(_0x585ff6[_0x4e1078(0x149)+_0x4e1078(0x28e)],_0xe94f53);if(typeof _0x1de50c[_0x4e1078(0x178)+_0x4e1078(0x1c9)+_0x4e1078(0x1d6)]==='function'){const _0x21e336=createRuntimeInfoFromManifest(_0xe94f53,_0x1554c2);await _0x1de50c['prepareP'+_0x4e1078(0x1c9)+'ntime']({'shellConfig':_0x585ff6,'runtime':_0x21e336,'runtimeLogger':_0x102147,'syncOnly':syncOnly}),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x256)+_0x4e1078(0x205)+_0x4e1078(0x280)+_0x4e1078(0x240));}await patchSessionStoreSqliteRuntime(_0xe94f53,_0x1554c2,{'runtimeLogger':_0x102147});!syncOnly&&(await hasConfiguredKdocsSkill(_0x585ff6)?(await installKdocsCliBinary(_0x585ff6,createRuntimeInfoFromManifest(_0xe94f53,_0x1554c2),{'runtimeLogger':_0x102147,'syncOnly':syncOnly}),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x32c)+_0x4e1078(0x323)+_0x4e1078(0x232)+'synced')):_0x102147?.['info']('connecto'+'r\x20runtim'+_0x4e1078(0x232)+_0x4e1078(0x230)+_0x4e1078(0x1f8)+_0x4e1078(0x147)+_0x4e1078(0x27a)+_0x4e1078(0x2fb)));const _0x3e27aa=Array[_0x4e1078(0x248)](_0x1554c2[_0x4e1078(0x28a)])?_0x1554c2[_0x4e1078(0x28a)][_0x4e1078(0x1c3)]:0x0;return await syncManifestPluginScope(_0x585ff6,_0xe94f53,_0x1554c2),_0x102147?.[_0x4e1078(0x144)]('runtime\x20'+_0x4e1078(0x221)+_0x4e1078(0x282)+'ced',{'beforePluginCount':_0x3e27aa,'afterPluginCount':Array[_0x4e1078(0x248)](_0x1554c2[_0x4e1078(0x28a)])?_0x1554c2[_0x4e1078(0x28a)][_0x4e1078(0x1c3)]:0x0,'pluginSpecCount':Array[_0x4e1078(0x248)](_0x1554c2[_0x4e1078(0x188)+_0x4e1078(0x235)])?_0x1554c2[_0x4e1078(0x188)+_0x4e1078(0x235)][_0x4e1078(0x1c3)]:0x0}),await syncConfiguredNpmPlugins(_0x585ff6,_0xe94f53,_0x1554c2,{'runtimeLogger':_0x102147,'syncOnly':syncOnly}),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x29b)+'ed\x20npm\x20p'+_0x4e1078(0x198)+_0x4e1078(0x162),{'pluginSpecCount':_0x585ff6['openclaw'][_0x4e1078(0x188)+_0x4e1078(0x235)][_0x4e1078(0x1c3)],'pluginCount':Array[_0x4e1078(0x248)](_0x1554c2['plugins'])?_0x1554c2[_0x4e1078(0x28a)][_0x4e1078(0x1c3)]:0x0}),await syncProductPlugins(_0x585ff6,_0xe94f53,_0x1554c2,{'runtimeLogger':_0x102147}),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x256)+'plugins\x20'+_0x4e1078(0x246),{'localPluginCount':_0x585ff6['openclaw'][_0x4e1078(0x1a2)+_0x4e1078(0x331)+_0x4e1078(0x181)][_0x4e1078(0x1c3)],'pluginCount':Array[_0x4e1078(0x248)](_0x1554c2[_0x4e1078(0x28a)])?_0x1554c2['plugins'][_0x4e1078(0x1c3)]:0x0}),await syncProductAgents(_0x585ff6,_0xe94f53,_0x1554c2),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x256)+_0x4e1078(0x167)+_0x4e1078(0x162),{'sources':_0x585ff6[_0x4e1078(0x19b)]['resolved'+_0x4e1078(0x21c)+_0x4e1078(0x255)],'entryCount':_0x1554c2['agents']?.[_0x4e1078(0x304)+'nt'],'installPath':_0x1554c2[_0x4e1078(0x2d3)]?.[_0x4e1078(0x1a6)+_0x4e1078(0x1a5)]}),await syncProductSkills(_0x585ff6,_0xe94f53,_0x1554c2),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x256)+'skills\x20s'+_0x4e1078(0x162),{'sources':_0x585ff6['openclaw'][_0x4e1078(0x1a2)+_0x4e1078(0x320)+_0x4e1078(0x300)],'entryCount':_0x1554c2['skills']?.[_0x4e1078(0x304)+'nt'],'installPath':_0x1554c2[_0x4e1078(0x24b)]?.['installP'+'ath']}),await syncRuntimeWrapper(_0x585ff6,_0xe94f53,_0x1554c2),_0x102147?.['info']('runtime\x20'+_0x4e1078(0x237)+_0x4e1078(0x246),{'wujieclawBin':_0x1554c2[_0x4e1078(0x272)+_0x4e1078(0x218)]}),await writeJson(resolveManifestPath(_0xe94f53),_0x1554c2),_0x102147?.[_0x4e1078(0x144)](_0x4e1078(0x205)+_0x4e1078(0x27f)+_0x4e1078(0x247),{'manifestPath':resolveManifestPath(_0xe94f53),'manifest':summarizeRuntimeManifest(_0x1554c2),'durationMs':Date['now']()-_0x34cc45}),await _0x102147?.[_0x4e1078(0x26e)](),_0x1554c2;}catch(_0x24bfbb){_0x102147?.[_0x4e1078(0x16e)](_0x4e1078(0x24a)+_0x4e1078(0x205)+_0x4e1078(0x1e8),{'syncOnly':syncOnly,'runtimeRoot':_0xe94f53,'durationMs':Date['now']()-_0x34cc45,'error':_0x24bfbb}),await _0x102147?.['flush']();throw _0x24bfbb;}}async function syncRuntimeWrapper(_0xcaa5fa,_0x4c8fe7,_0x4de3c4){const _0x367f5c=_0x30af49,_0x495a4=_0xcaa5fa[_0x367f5c(0x19b)]?.[_0x367f5c(0x1cc)+'leName']??_0x367f5c(0x2f7)+'json',_0x48e4b5=join(_0x4c8fe7,_0x367f5c(0x2a3),'wujiecla'+'w'),_0x30fed4=join(_0x4c8fe7,'bin',_0x367f5c(0x272)+_0x367f5c(0x252)),_0x1a6dbb=normalizeRuntimeRelativePath(relative(dirname(_0x48e4b5),resolve(_0x4c8fe7,_0x4de3c4[_0x367f5c(0x2c7)+'utable']))),_0x6a8c6e=normalizeRuntimeRelativePath(relative(dirname(_0x48e4b5),resolve(_0x4c8fe7,_0x4de3c4['openclaw'+_0x367f5c(0x21d)]))),_0x36a0e9=_0x367f5c(0x1b7)+_0xcaa5fa['dataDirN'+_0x367f5c(0x174)],_0x34ce12=_0x367f5c(0x1e4)+_0x367f5c(0x2ae)+_0xcaa5fa[_0x367f5c(0x1fc)+_0x367f5c(0x174)];await mkdir(dirname(_0x48e4b5),{'recursive':!![]});const _0x5e14fd=fileURLToPath(new URL(_0x367f5c(0x158)+_0x367f5c(0x2bb)+_0x367f5c(0x216)+_0x367f5c(0x2e0),import.meta.url)),_0x1967f=join(_0x4c8fe7,'bin',_0x367f5c(0x194)+'go.mjs');await cp(_0x5e14fd,_0x1967f),await writeFile(_0x48e4b5,[_0x367f5c(0x219)+'h',_0x367f5c(0x164)+_0x367f5c(0x185)+_0x367f5c(0x301)+'OPENCLAW'+'_HOME:-'+_0x36a0e9+'}\x22','export\x20O'+_0x367f5c(0x185)+_0x367f5c(0x33e)+_0x367f5c(0x288)+'NCLAW_ST'+_0x367f5c(0x1d5)+'-'+_0x36a0e9+'}\x22','export\x20O'+_0x367f5c(0x185)+'CONFIG_F'+_0x367f5c(0x284)+_0x367f5c(0x2fc)+_0x367f5c(0x170)+_0x367f5c(0x2b9)+_0x367f5c(0x274)+_0x495a4+'}\x22','export\x20O'+_0x367f5c(0x185)+_0x367f5c(0x33d)+_0x367f5c(0x29e)+'PENCLAW_'+_0x367f5c(0x33d)+_0x367f5c(0x20a)+_0x36a0e9+'/'+_0x495a4+'}\x22',_0x367f5c(0x203)+'IR=$(CDP'+_0x367f5c(0x306)+'--\x20\x22$(di'+_0x367f5c(0x25a)+_0x367f5c(0x2f2)+_0x367f5c(0x2cc),_0x367f5c(0x1a0)+_0x367f5c(0x31c)+_0x367f5c(0x1e7)+_0x367f5c(0x1a4)+'OGO\x22\x20];\x20'+'then','\x20\x20\x22$SCRI'+_0x367f5c(0x281)+_0x1a6dbb+(_0x367f5c(0x2b2)+'PT_DIR/w'+_0x367f5c(0x244)+'o.mjs\x22\x202'+_0x367f5c(0x2ec)+_0x367f5c(0x2d8)+'ue'),'fi',_0x367f5c(0x1a3)+'CRIPT_DI'+'R/'+_0x1a6dbb+(_0x367f5c(0x2b2)+_0x367f5c(0x281))+_0x6a8c6e+_0x367f5c(0x1ed),'']['join']('\x0a'),_0x367f5c(0x2f4)),await chmod(_0x48e4b5,0x1ed),await writeFile(_0x30fed4,[_0x367f5c(0x1fa)+'f',_0x367f5c(0x293)+'NCLAW_HO'+_0x367f5c(0x2e8)+_0x367f5c(0x271)+_0x367f5c(0x285)+_0x367f5c(0x334)+_0x34ce12+'\x22',_0x367f5c(0x293)+_0x367f5c(0x257)+_0x367f5c(0x199)+_0x367f5c(0x1c5)+_0x367f5c(0x200)+_0x367f5c(0x1b5)+_0x367f5c(0x1e2)+_0x34ce12+'\x22','if\x20\x22%OPE'+_0x367f5c(0x1f4)+_0x367f5c(0x2d2)+'E_NAME%\x22'+_0x367f5c(0x15b)+'\x20\x22OPENCL'+_0x367f5c(0x1b3)+_0x367f5c(0x242)+_0x367f5c(0x20d)+_0x495a4+'\x22',_0x367f5c(0x293)+_0x367f5c(0x1f4)+_0x367f5c(0x30f)+_0x367f5c(0x192)+_0x367f5c(0x1d8)+_0x367f5c(0x1f4)+_0x367f5c(0x30f)+'H='+_0x34ce12+'\x5c'+_0x495a4+'\x22',_0x367f5c(0x270)+_0x367f5c(0x1da)+_0x367f5c(0x30b),'\x22%SCRIPT'+_0x367f5c(0x1d2)+toWindowsPath(_0x1a6dbb)+(_0x367f5c(0x268)+_0x367f5c(0x22d))+toWindowsPath(_0x6a8c6e)+'\x22\x20%*',''][_0x367f5c(0x173)]('\x0d\x0a'),_0x367f5c(0x2f4)),_0x4de3c4['wujiecla'+_0x367f5c(0x218)]=toRuntimeRelative(_0x4c8fe7,process[_0x367f5c(0x1d1)]===_0x367f5c(0x2bf)?_0x30fed4:_0x48e4b5);}async function patchChatHistoryMixedToolContentBug(_0x5836f2,_0x3195c5,_0x35252e={}){const _0xf9dbc7=_0x30af49,_0x1ab62e=resolve(_0x5836f2,_0x3195c5[_0xf9dbc7(0x19b)+_0xf9dbc7(0x169)+'ir']),_0x34de72=join(_0x1ab62e,_0xf9dbc7(0x2b3));let _0xa8e808=[];try{_0xa8e808=await readdir(_0x34de72,{'withFileTypes':!![]});}catch{_0x35252e[_0xf9dbc7(0x1c4)+_0xf9dbc7(0x23b)]?.[_0xf9dbc7(0x1f1)]?.(_0xf9dbc7(0x313)+_0xf9dbc7(0x2f8)+_0xf9dbc7(0x278)+_0xf9dbc7(0x15e)+_0xf9dbc7(0x2eb)+'ist\x20not\x20'+_0xf9dbc7(0x1ae),{'distDir':_0x34de72,'openclawVersion':_0x3195c5[_0xf9dbc7(0x19b)+_0xf9dbc7(0x26f)]});return;}const _0x1dcaef=_0xa8e808['filter'](_0x58f285=>_0x58f285['isFile']()&&_0x58f285['name'][_0xf9dbc7(0x31d)+'th'](_0xf9dbc7(0x1c2)+_0xf9dbc7(0x215)+_0xf9dbc7(0x160))&&_0x58f285[_0xf9dbc7(0x187)][_0xf9dbc7(0x32a)](_0xf9dbc7(0x2d0)))[_0xf9dbc7(0x209)](_0x52560f=>join(_0x34de72,_0x52560f[_0xf9dbc7(0x187)]));if(_0x1dcaef[_0xf9dbc7(0x1c3)]===0x0){_0x35252e[_0xf9dbc7(0x1c4)+_0xf9dbc7(0x23b)]?.[_0xf9dbc7(0x1f1)]?.('chat\x20his'+_0xf9dbc7(0x2f8)+_0xf9dbc7(0x278)+_0xf9dbc7(0x15e)+_0xf9dbc7(0x298)+_0xf9dbc7(0x135)+_0xf9dbc7(0x1ae),{'openclawVersion':_0x3195c5['openclaw'+'Version']});return;}for(const _0x30e502 of _0x1dcaef){const _0x279143=await readFile(_0x30e502,_0xf9dbc7(0x2f4)),_0x435f90=patchMixedToolContentFromSource(_0x279143);if(!_0x435f90[_0xf9dbc7(0x2f5)]){if(_0x435f90[_0xf9dbc7(0x196)]===_0xf9dbc7(0x2d9)+_0xf9dbc7(0x2f5)){_0x35252e['runtimeL'+'ogger']?.[_0xf9dbc7(0x144)]?.(_0xf9dbc7(0x313)+_0xf9dbc7(0x2f8)+_0xf9dbc7(0x278)+_0xf9dbc7(0x13e)+_0xf9dbc7(0x2d5)+'plied',{'openclawVersion':_0x3195c5[_0xf9dbc7(0x19b)+_0xf9dbc7(0x26f)],'filePath':_0x30e502});return;}continue;}await writeFile(_0x30e502,_0x435f90[_0xf9dbc7(0x172)],_0xf9dbc7(0x2f4)),_0x35252e[_0xf9dbc7(0x1c4)+_0xf9dbc7(0x23b)]?.[_0xf9dbc7(0x144)]?.('chat\x20his'+_0xf9dbc7(0x2f8)+_0xf9dbc7(0x278)+_0xf9dbc7(0x291)+_0xf9dbc7(0x24c),{'openclawVersion':_0x3195c5[_0xf9dbc7(0x19b)+_0xf9dbc7(0x26f)],'filePath':_0x30e502,'note':_0xf9dbc7(0x326)+_0xf9dbc7(0x213)+'ibility\x20'+_0xf9dbc7(0x258)+_0xf9dbc7(0x1bf)+_0xf9dbc7(0x20b)+_0xf9dbc7(0x28f)+_0xf9dbc7(0x262)+_0xf9dbc7(0x245)+'jection\x20'+_0xf9dbc7(0x33c)+'ify\x20upst'+_0xf9dbc7(0x154)+_0xf9dbc7(0x1e0)+_0xf9dbc7(0x2c1)+_0xf9dbc7(0x1ab)});return;}_0x35252e[_0xf9dbc7(0x1c4)+_0xf9dbc7(0x23b)]?.[_0xf9dbc7(0x1f1)]?.(_0xf9dbc7(0x313)+_0xf9dbc7(0x2f8)+'ed-tool\x20'+_0xf9dbc7(0x15e)+_0xf9dbc7(0x298)+_0xf9dbc7(0x32b)+'not\x20foun'+'d',{'openclawVersion':_0x3195c5[_0xf9dbc7(0x19b)+_0xf9dbc7(0x26f)]});}async function patchChannelPluginRuntimeBug(_0x3f20da,_0x42c8aa,_0x154732={}){const _0x5249ed=_0x30af49,_0x34399f=resolve(_0x3f20da,_0x42c8aa[_0x5249ed(0x19b)+'WorkingD'+'ir']),_0x8ecf57=join(_0x34399f,_0x5249ed(0x2b3));let _0x34a90b=[];try{_0x34a90b=await readdir(_0x8ecf57,{'withFileTypes':!![]});}catch{_0x154732[_0x5249ed(0x1c4)+_0x5249ed(0x23b)]?.[_0x5249ed(0x1f1)]?.(_0x5249ed(0x2a6)+'plugin\x20r'+_0x5249ed(0x16f)+'atch\x20ski'+'pped;\x20di'+_0x5249ed(0x2c5)+_0x5249ed(0x279),{'distDir':_0x8ecf57,'openclawVersion':_0x42c8aa[_0x5249ed(0x19b)+_0x5249ed(0x26f)]});return;}const _0x3f4872=_0x34a90b[_0x5249ed(0x250)](_0x29e149=>_0x29e149[_0x5249ed(0x145)]()&&_0x29e149[_0x5249ed(0x187)][_0x5249ed(0x31d)+'th']('loader-')&&_0x29e149[_0x5249ed(0x187)][_0x5249ed(0x32a)](_0x5249ed(0x2d0)))[_0x5249ed(0x209)](_0x7e71e=>join(_0x8ecf57,_0x7e71e[_0x5249ed(0x187)])),_0x744bea=await resolveRuntimeChannelImportPath(_0x8ecf57,_0x34a90b);if(_0x3f4872[_0x5249ed(0x1c3)]===0x0){_0x154732[_0x5249ed(0x1c4)+'ogger']?.[_0x5249ed(0x1f1)]?.('channel\x20'+_0x5249ed(0x25e)+_0x5249ed(0x16f)+'atch\x20ski'+_0x5249ed(0x2c9)+_0x5249ed(0x2c4)+_0x5249ed(0x308),{'openclawVersion':_0x42c8aa[_0x5249ed(0x19b)+_0x5249ed(0x26f)]});return;}if(!_0x744bea){_0x154732[_0x5249ed(0x1c4)+_0x5249ed(0x23b)]?.[_0x5249ed(0x1f1)]?.(_0x5249ed(0x2a6)+_0x5249ed(0x25e)+_0x5249ed(0x16f)+_0x5249ed(0x21e)+_0x5249ed(0x254)+_0x5249ed(0x296)+_0x5249ed(0x150)+_0x5249ed(0x1d3)+_0x5249ed(0x1ae),{'openclawVersion':_0x42c8aa[_0x5249ed(0x19b)+_0x5249ed(0x26f)],'distDir':_0x8ecf57});return;}for(const _0x2d3446 of _0x3f4872){const _0x404931=await readFile(_0x2d3446,_0x5249ed(0x2f4)),_0x274685=patchChannelPluginRuntimeFromSource(_0x404931,{'runtimeChannelImportPath':_0x744bea});if(!_0x274685[_0x5249ed(0x2f5)]){if(_0x274685['reason']===_0x5249ed(0x2d9)+_0x5249ed(0x2f5)){_0x154732[_0x5249ed(0x1c4)+_0x5249ed(0x23b)]?.[_0x5249ed(0x144)]?.(_0x5249ed(0x2a6)+_0x5249ed(0x25e)+_0x5249ed(0x16f)+_0x5249ed(0x228)+_0x5249ed(0x156)+'lied',{'openclawVersion':_0x42c8aa[_0x5249ed(0x19b)+_0x5249ed(0x26f)],'filePath':_0x2d3446});return;}continue;}await writeFile(_0x2d3446,_0x274685[_0x5249ed(0x172)],_0x5249ed(0x2f4)),_0x154732[_0x5249ed(0x1c4)+'ogger']?.['info']?.(_0x5249ed(0x2a6)+_0x5249ed(0x25e)+_0x5249ed(0x16f)+'atch\x20app'+_0x5249ed(0x2b4),{'openclawVersion':_0x42c8aa[_0x5249ed(0x19b)+_0x5249ed(0x26f)],'filePath':_0x2d3446,'note':_0x5249ed(0x326)+_0x5249ed(0x213)+_0x5249ed(0x2cf)+_0x5249ed(0x258)+_0x5249ed(0x1bf)+'aw\x202026.'+_0x5249ed(0x2a2)+_0x5249ed(0x183)+_0x5249ed(0x1f6)+_0x5249ed(0x2cb)+_0x5249ed(0x1a9)+_0x5249ed(0x265)+_0x5249ed(0x2d6)+'rs;\x20veri'+_0x5249ed(0x233)+_0x5249ed(0x2a9)+_0x5249ed(0x22a)+_0x5249ed(0x2fa)+_0x5249ed(0x226)});return;}_0x154732['runtimeL'+_0x5249ed(0x23b)]?.[_0x5249ed(0x1f1)]?.(_0x5249ed(0x2a6)+_0x5249ed(0x25e)+_0x5249ed(0x16f)+'atch\x20ski'+'pped;\x20ru'+_0x5249ed(0x220)+_0x5249ed(0x2a0)+_0x5249ed(0x26b),{'openclawVersion':_0x42c8aa[_0x5249ed(0x19b)+'Version']});}async function patchSessionStoreSqliteRuntime(_0x21700f,_0x584efd,_0x2cf68f={}){const _0x37b005=_0x30af49,_0x5664f4=resolve(_0x21700f,_0x584efd[_0x37b005(0x19b)+'WorkingD'+'ir']),_0x2a8821=join(_0x5664f4,_0x37b005(0x2b3)),_0x49bbdd=_0x37b005(0x241)+_0x37b005(0x20c)+'ime/sess'+_0x37b005(0x238)+_0x37b005(0x22c)+_0x37b005(0x295),_0x16fd8d=join(_0x21700f,_0x37b005(0x182)+'ntime','sessions',_0x37b005(0x22e)+_0x37b005(0x27e)+'js'),_0x284665=(await readdir(_0x2a8821,{'withFileTypes':!![]})[_0x37b005(0x1e6)](()=>[]))[_0x37b005(0x250)](_0x56c1fa=>_0x56c1fa[_0x37b005(0x145)]()&&_0x56c1fa[_0x37b005(0x187)]['startsWi'+'th'](_0x37b005(0x19c)+_0x37b005(0x14f))&&_0x56c1fa['name'][_0x37b005(0x32a)]('.js'))[_0x37b005(0x209)](_0x1477c4=>join(_0x2a8821,_0x1477c4[_0x37b005(0x187)])),_0x75beb4=(await readdir(_0x2a8821,{'withFileTypes':!![]})[_0x37b005(0x1e6)](()=>[]))[_0x37b005(0x250)](_0x24a06f=>_0x24a06f[_0x37b005(0x145)]()&&_0x24a06f[_0x37b005(0x187)][_0x37b005(0x31d)+'th']('store-')&&!_0x24a06f[_0x37b005(0x187)][_0x37b005(0x31d)+'th'](_0x37b005(0x19c)+'ad-')&&_0x24a06f[_0x37b005(0x187)][_0x37b005(0x32a)](_0x37b005(0x2d0)))[_0x37b005(0x209)](_0x3fce7a=>join(_0x2a8821,_0x3fce7a[_0x37b005(0x187)]));if(!existsSync(_0x16fd8d)){_0x2cf68f[_0x37b005(0x1c4)+_0x37b005(0x23b)]?.[_0x37b005(0x144)]?.(_0x37b005(0x197)+_0x37b005(0x13b)+_0x37b005(0x134)+_0x37b005(0x202)+_0x37b005(0x15a)+_0x37b005(0x1d4)+_0x37b005(0x177),{'bridgePath':_0x16fd8d,'openclawVersion':_0x584efd[_0x37b005(0x19b)+_0x37b005(0x26f)]});return;}for(const _0xbd4f7e of _0x284665){const _0x23bad4=await readFile(_0xbd4f7e,_0x37b005(0x2f4)),_0x3b8f52=patchSessionStoreLoadFromSource(_0x23bad4,{'bridgeImportPath':_0x49bbdd});if(!_0x3b8f52['patched']){if(_0x3b8f52[_0x37b005(0x196)]===_0x37b005(0x2d9)+_0x37b005(0x2f5)){_0x2cf68f[_0x37b005(0x1c4)+_0x37b005(0x23b)]?.[_0x37b005(0x144)]?.('session\x20'+_0x37b005(0x143)+_0x37b005(0x222)+_0x37b005(0x131)+_0x37b005(0x29f),{'filePath':_0xbd4f7e,'openclawVersion':_0x584efd[_0x37b005(0x19b)+_0x37b005(0x26f)]});break;}continue;}await writeFile(_0xbd4f7e,_0x3b8f52[_0x37b005(0x172)],_0x37b005(0x2f4)),_0x2cf68f[_0x37b005(0x1c4)+_0x37b005(0x23b)]?.[_0x37b005(0x144)]?.(_0x37b005(0x197)+'store\x20lo'+_0x37b005(0x222)+_0x37b005(0x29f),{'filePath':_0xbd4f7e,'openclawVersion':_0x584efd[_0x37b005(0x19b)+'Version']});break;}for(const _0x549ae4 of _0x75beb4){const _0xf513be=await readFile(_0x549ae4,_0x37b005(0x2f4)),_0x35e487=patchSessionStoreWriteFromSource(_0xf513be,{'bridgeImportPath':_0x49bbdd});if(!_0x35e487['patched']){if(_0x35e487['reason']===_0x37b005(0x2d9)+_0x37b005(0x2f5)){_0x2cf68f[_0x37b005(0x1c4)+_0x37b005(0x23b)]?.['info']?.(_0x37b005(0x197)+_0x37b005(0x264)+_0x37b005(0x2ef)+_0x37b005(0x1fe)+_0x37b005(0x2cd)+'d',{'filePath':_0x549ae4,'openclawVersion':_0x584efd[_0x37b005(0x19b)+_0x37b005(0x26f)]});break;}continue;}await writeFile(_0x549ae4,_0x35e487[_0x37b005(0x172)],_0x37b005(0x2f4)),_0x2cf68f[_0x37b005(0x1c4)+_0x37b005(0x23b)]?.[_0x37b005(0x144)]?.(_0x37b005(0x197)+_0x37b005(0x264)+_0x37b005(0x2ef)+'h\x20applie'+'d',{'filePath':_0x549ae4,'openclawVersion':_0x584efd[_0x37b005(0x19b)+_0x37b005(0x26f)]});break;}}async function resolveRuntimeChannelImportPath(_0x54a409,_0x1f569b){const _0x386ac9=_0x30af49,_0x3cf18f=_0x1f569b['filter'](_0x45a254=>_0x45a254[_0x386ac9(0x145)]()&&_0x45a254['name'][_0x386ac9(0x31d)+'th'](_0x386ac9(0x22e)+_0x386ac9(0x2e1))&&_0x45a254[_0x386ac9(0x187)][_0x386ac9(0x32a)](_0x386ac9(0x2d0))&&!_0x45a254[_0x386ac9(0x187)][_0x386ac9(0x31d)+'th'](_0x386ac9(0x22e)+'channel-'+'state-'))[_0x386ac9(0x209)](_0x4dbb57=>_0x4dbb57[_0x386ac9(0x187)])['sort']();for(const _0x102948 of _0x3cf18f){const _0x3f8b8d=await readFile(join(_0x54a409,_0x102948),_0x386ac9(0x2f4));if(_0x3f8b8d[_0x386ac9(0x239)]('createRu'+_0x386ac9(0x195)+_0x386ac9(0x1c6)))return'./'+_0x102948;}return null;}function normalizeRuntimeRelativePath(_0x2e5f9e){const _0x1d9155=_0x30af49;return _0x2e5f9e[_0x1d9155(0x32e)+'ll']('\x5c','/');}function _0x1e29(){const _0x37249e=['re\x20upgra','112318hTXtSt','extract\x20','ader\x20not','st\x20not\x20f','-doctor.','nodeExec','https://','pped;\x20lo','time]\x20do','me\x20missi','&&\x20pwd)','y\x20applie','unknown','ibility\x20','.js','\x20doctor\x20','NFIG_FIL','agents','mismatch','ready\x20ap','nd\x20helpe','--fix','ll\x20||\x20tr','already-','pid','version','m-cli.js','has','npm-cli.','runtimeR','mjs','channel-','er\x20writt','te/cli\x20i','1467858SFTEuH','\x20return\x20','e\x20plugin','.node','ME%\x22==\x22\x22','jie-shel','dAt','ipped;\x20d','>/dev/nu','isDirect','/npm','ite\x20patc','-xzf','/node','\x20\x22$0\x22)\x22\x20','Invalid\x20','utf8','patched','with\x20cod','wujieai.','tory\x20mix','nodejs.o','e\x20upgrad','red','=\x22${OPEN','ie-shell','time]\x20ru','npm-cach','llPaths','HOME=\x22${','index.mj','d:\x20','entryCou','me.','ATH=\x20cd\x20','npm','\x20found','npm\x20inst','--omit=d','%~dp0\x22','fix\x20alre','\x20local\x20p','.cache','NFIG_PAT','st=','\x20returne','npm-glob','chat\x20his','g\x20from\x20O','d\x20an\x20inv','\x20is\x20miss','pack','lib/node','base\x20alr','_shared','values','1\x20]\x20&&\x20[','startsWi','in\x20insta','ignore','LocalSki','ing\x20\x22','toISOStr','r\x20runtim','add','\x20timed\x20o','Temporar','match','nd\x20after','ing','endsWith','unction\x20','connecto','tar.xz','replaceA','node-v','all\x20','LocalPlu','14ScIfxy','-extract','OME=','183624pFhIlX','ent','l\x20plugin','wnloadin','6216200nNcudZ','node/lib','execPath','bug;\x20ver','CONFIG_P','STATE_DI','\x20already','versions','find','lite\x20pat','ile\x20not\x20','Dependen','kill','utable','product','-peer-de','store\x20sq','stdout','rg/dist/','patch\x20al','productN','Configur','cli','headers','store\x20lo','info','isFile','configPa','kill\x20not','config=','projectR','href','node/bin','\x20install','now','runtime:','ad-','annel\x20en','ed\x20OpenC','devDepen','d\x20to\x20','ream\x20fix','fix\x20mark','eady\x20app','\x20complet','../../as','claw-run','ed;\x20brid','==\x22\x22\x20set','\x20failed\x20','ugin\x20spe','patch\x20sk','fix\x20star','jection-','ugin\x20dep','ynced','\x20bin\x20was','export\x20O','\x20version','\x20can\x20ins','agents\x20s','8jsZFoz','WorkingD','8grzToo','dataDir','s\x20not\x20fo','34096gpBPmb','error','untime\x20p','CLAW_CON','location','source','join','ame','spec','st\x20be\x20a\x20','vailable','prepareP','then','arm64','appId','eer','optional','ules','time]\x20in','hell:run','ginPaths','shell-ru','nel\x20plug','registry','PENCLAW_','\x20depende','name','pluginSp','m/bin/np','endencie','rebuilt\x20','pluginId','Name','SIGTERM','--no-fun','\x20prepare','o\x20resolv','H%\x22==\x22\x22\x20','base\x20bui','wujie-lo','ntimeCha','reason','session\x20','lugins\x20s','ATE_DIR%','time','openclaw','store-lo','/opencla','extensio','env','if\x20[\x20-t\x20','integrit','resolved','exec\x20\x22$S','JIE_NO_L','ath','installP','--no-aud','idated','ng\x20chann','keys','des.','string','lugin\x20de','found','parse','Claw','label','agent','AW_CONFI','lled','LAW_STAT','npmCli','$HOME/',',\x20shell.','ion\x20mism','shasum','sion.','dependen','s\x20instal','tarball:','r\x20OpenCl','tall\x20the','\x20resolve','chat-dis','length','runtimeL','\x22==\x22\x22\x20se','nnel','--legacy','Duplicat','roductRu','close','nning\x20op','configFi','win','in\x20','ime\x20buil','nodeVers','platform','_DIR%','try\x20not\x20','ge\x20not\x20a','ATE_DIR:','ntime','missing\x20','set\x20\x22OPE','ory','IPT_DIR=','\x20loaded','Bundled\x20','runtimeS','split','\x20validat','\x20on\x20futu','arch','E_DIR=','OpenClaw','%USERPRO','package','catch','\x20-z\x20\x22$WU','failed','red\x20Node','set','process.','\x20create\x20','\x22\x20\x22$@\x22','with\x20the','resume','load:\x20','warn','object','age\x20was\x20','NCLAW_CO','replace','in\x20runti','nifest=','\x20kdocs\x20s','cal\x20runt','@echo\x20of','npm\x20plug','dataDirN','2103183cVPfax','h\x20alread','fix','t\x20\x22OPENC','sion\x20val','ch\x20skipp','SCRIPT_D','path','runtime\x20','npm\x20pack','x64','pendenci','map','ATH:-','aw\x202026.','ell-runt','AME=','started','Claw\x20ver','every','node_mod','.plugin-','y\x20compat','syncOnly','play-pro','ie-logo.','Run\x20\x22wuj','wBin','#!/bin/s','d\x20for\x20lo','ady\x20curr','LocalAge','Bin','atch\x20ski','data','ntime\x20re','plugin\x20s','ad\x20patch','120dNMySs','--json','local','es.','[wujie-s','atch\x20alr','ion','on\x20futur','red\x20Open','time-bri','PT_DIR%','runtime-','slice','skipped;','\x20package','e\x20tools\x20','fy\x20upstr','push','ecs','.npmmirr','wrapper\x20','ions/run','includes','path:\x20','ogger','trim','dencies','\x20path\x20mu','@larksui','nced','../../sh','G_FILE_N','y:\x20','ujie-log','tory\x20pro','synced','\x20written','isArray','zip','prepare\x20','skills','plied','toString','pipe','\x20path\x20wa','filter','ld\x20compl','w.cmd','.json','pped;\x20ru','ntPaths','product\x20','NCLAW_ST','patch\x20fo','.tmp/run','rname\x20--','w-extrac','not\x20foun','led','plugin\x20r','skill','package.','lugin\x20','tool\x20his','null','store\x20wr','el.inbou','law\x20','--omit=p','\x22\x20\x22%SCRI','he\x20runti','ut\x20after','ot\x20found','log','tar','flush','Version','set\x20\x22SCR','\x20set\x20\x22OP','wujiecla','lib','_NAME:-','stalling','Spec','runtime','ed-tool\x20','ound','\x20configu','node','get','Version\x20','bridge.m','manifest','tools\x20sy','PT_DIR/','cope\x20syn','\x22\x20so\x20the','ILE_NAME','ENCLAW_H','scripts','statusCo','R=\x22${OPE','scoped\x20s','plugins','local\x20pl','filename','allowMis','oot','6\x20mixed\x20','-xJf','patch\x20ap','time-too','if\x20\x22%OPE','cies','dge.mjs','ntime\x20ch','director','ipped;\x20f','re\x22\x20to\x20r','_modules','configur','\x20runtime','root','ATH=\x22${O','\x20applied','solver\x20n','\x22\x20from\x20','6.6\x20chan','bin','extract-','\x20signal=','channel\x20','13705252AzBJtF','\x20and\x20','eam\x20fix\x20','cwd','unzip','\x20can\x20be\x20','node\x20ver','FILE%\x5c','\x20did\x20not','or.com','sion\x20mis','\x22\x20\x22$SCRI','dist','lied','install','\x20paths','json','Unable\x20t','FIG_FILE','\x20-g','sets/wuj','indexOf','lark-cli','fix\x20comp','win32','stderr'];_0x1e29=function(){return _0x37249e;};return _0x1e29();}function toWindowsPath(_0x54ec97){const _0x24207c=_0x30af49;return _0x54ec97[_0x24207c(0x32e)+'ll']('/','\x5c');}function validateRuntimeNodeVersion(_0x3a07b8,_0x3c2031){const _0x26feb9=_0x30af49;if(_0x3a07b8[_0x26feb9(0x1d0)+_0x26feb9(0x229)]===_0x3c2031[_0x26feb9(0x19b)][_0x26feb9(0x1d0)+_0x26feb9(0x229)])return;throw new Error('runtime\x20'+'nodeVers'+_0x26feb9(0x1b9)+'atch:\x20ma'+_0x26feb9(0x1f7)+(_0x3a07b8['nodeVers'+_0x26feb9(0x229)]||_0x26feb9(0x2ce))+(_0x26feb9(0x1b8)+_0x26feb9(0x148))+_0x3c2031[_0x26feb9(0x19b)]['nodeVers'+_0x26feb9(0x229)]+'.\x20'+(_0x26feb9(0x217)+_0x26feb9(0x2fd)+_0x26feb9(0x190)+_0x26feb9(0x283)+'\x20product'+_0x26feb9(0x29c)+_0x26feb9(0x2ac)+_0x26feb9(0x18b)+_0x26feb9(0x1ee)+'\x20configu'+_0x26feb9(0x1e9)+_0x26feb9(0x165)+'.'));}function validateRuntimeOpenClawVersion(_0x26a3a3,_0x10ee69){const _0x28251b=_0x30af49;if(_0x26a3a3[_0x28251b(0x19b)+'Version']===_0x10ee69[_0x28251b(0x19b)][_0x28251b(0x19b)+'Version'])return;throw new Error(_0x28251b(0x205)+_0x28251b(0x19b)+_0x28251b(0x27d)+_0x28251b(0x2d4)+':\x20manife'+_0x28251b(0x310)+(_0x26a3a3[_0x28251b(0x19b)+_0x28251b(0x26f)]||_0x28251b(0x2ce))+(',\x20shell.'+_0x28251b(0x148))+_0x10ee69[_0x28251b(0x19b)][_0x28251b(0x19b)+_0x28251b(0x26f)]+'.\x20'+(_0x28251b(0x217)+_0x28251b(0x2fd)+_0x28251b(0x190)+_0x28251b(0x283)+_0x28251b(0x29c)+_0x28251b(0x166)+_0x28251b(0x1c0)+_0x28251b(0x27a)+_0x28251b(0x22b)+_0x28251b(0x20f)+_0x28251b(0x1bb)));}function parseNpmPackJson(_0x3f0fbe){const _0x46582d=_0x30af49,_0x3dee41=_0x3f0fbe['trim'](),_0x5e9be2=_0x3dee41[_0x46582d(0x2bc)]('[');if(_0x5e9be2<0x0)throw new Error(_0x46582d(0x206)+_0x46582d(0x2af)+_0x46582d(0x2e5)+'JSON:\x20'+_0x3dee41['slice'](0x0,0x1f4));const _0x4b3dd4=JSON[_0x46582d(0x1af)](_0x3dee41[_0x46582d(0x22f)](_0x5e9be2)),_0x29bf72=Array[_0x46582d(0x248)](_0x4b3dd4)?_0x4b3dd4[0x0]:_0x4b3dd4;if(!_0x29bf72||typeof _0x29bf72!==_0x46582d(0x1f2))throw new Error(_0x46582d(0x206)+_0x46582d(0x311)+_0x46582d(0x315)+'alid\x20pay'+_0x46582d(0x1f0)+_0x3dee41[_0x46582d(0x22f)](0x0,0x1f4));return _0x29bf72;}function normalizePackedTarballFilename(_0x4cde9f){const _0x311ef5=_0x30af49;return _0x4cde9f['replace'](/^@/,'')['replaceA'+'ll']('/','-')[_0x311ef5(0x32e)+'ll']('\x5c','-');}async function runProcess(_0x135e8a,_0x2900b3,_0x198fa3={}){const _0x3e28e8=_0x30af49,_0x3e3af3=_0x198fa3[_0x3e28e8(0x1b1)]||[_0x135e8a,..._0x2900b3]['join']('\x20'),_0x14f41c=_0x198fa3['timeoutM'+'s']??NPM_INSTALL_TIMEOUT_MS,_0x3be0dc=spawn(_0x135e8a,_0x2900b3,{'cwd':_0x198fa3[_0x3e28e8(0x2aa)],'env':_0x198fa3[_0x3e28e8(0x19f)],'stdio':[_0x3e28e8(0x31f),'pipe',_0x3e28e8(0x24e)]});return await new Promise((_0x21a36d,_0x4c4b86)=>{const _0x1c799f=_0x3e28e8;let _0x55845b='',_0x5b8946='',_0x3843e1=![];const _0x442760=setTimeout(()=>{const _0xbf7fd4=_0x3e4d;if(_0x3843e1)return;_0x3843e1=!![],_0x3be0dc[_0xbf7fd4(0x137)](_0xbf7fd4(0x18e)),_0x4c4b86(new Error(_0x3e3af3+('\x20timed\x20o'+'ut\x20after'+'\x20')+_0x14f41c+'ms'));},_0x14f41c);_0x3be0dc[_0x1c799f(0x13c)]['on'](_0x1c799f(0x21f),_0x5a7594=>{const _0x52f366=_0x1c799f;_0x55845b+=_0x5a7594[_0x52f366(0x24d)]();}),_0x3be0dc[_0x1c799f(0x2c0)]['on'](_0x1c799f(0x21f),_0x2539d3=>{_0x5b8946+=_0x2539d3['toString']();}),_0x3be0dc['on'](_0x1c799f(0x16e),_0x324a07=>{if(_0x3843e1)return;_0x3843e1=!![],clearTimeout(_0x442760),_0x4c4b86(_0x324a07);}),_0x3be0dc['on'](_0x1c799f(0x1ca),(_0x1155f6,_0x5e2224)=>{const _0xce4d18=_0x1c799f;if(_0x3843e1)return;_0x3843e1=!![],clearTimeout(_0x442760);if(_0x1155f6===0x0){_0x21a36d({'stdout':_0x55845b,'stderr':_0x5b8946});return;}_0x4c4b86(new Error(_0x3e3af3+(_0xce4d18(0x15c)+_0xce4d18(0x2f6)+'e=')+(_0x1155f6??_0xce4d18(0x263))+_0xce4d18(0x2a5)+(_0x5e2224??'null')+'\x0a'+(''+(_0x5b8946||_0x55845b))['trim']()));});});}async function installOpenClawPackage(_0x47a39d,_0xd7dec6){const _0xf082a0=_0x30af49,_0x1ff94c=join(_0x47a39d[_0xf082a0(0x2df)+_0xf082a0(0x28e)],_0xf082a0(0x30e)),_0x440dba=join(_0x47a39d[_0xf082a0(0x2df)+_0xf082a0(0x28e)],'.opencla'+_0xf082a0(0x25b)+'t');await mkdir(_0x1ff94c,{'recursive':!![]}),await removePathWithRetries(_0x440dba),await mkdir(_0x440dba,{'recursive':!![]});const _0x29b405=await createRuntimeEnv(_0x47a39d),_0x26ee4f=_0xf082a0(0x19b)+'@'+_0xd7dec6;console['log'](_0xf082a0(0x227)+_0xf082a0(0x180)+_0xf082a0(0x17f)+_0xf082a0(0x275)+'\x20'+_0x26ee4f);const _0x2985b6=await runProcess(_0x47a39d[_0xf082a0(0x2c7)+_0xf082a0(0x138)],[_0x47a39d[_0xf082a0(0x1b6)],_0xf082a0(0x317),_0x26ee4f,'--json'],{'cwd':_0x1ff94c,'env':_0x29b405,'label':_0xf082a0(0x206)+'\x20'+_0x26ee4f}),_0x384f26=parseNpmPackJson(_0x2985b6[_0xf082a0(0x13c)]);if(_0x384f26[_0xf082a0(0x2db)]!==_0xd7dec6)throw new Error(_0xf082a0(0x140)+_0xf082a0(0x151)+_0xf082a0(0x266)+_0xd7dec6+(_0xf082a0(0x1c1)+_0xf082a0(0x153))+_0x384f26[_0xf082a0(0x2db)]);const _0x59d13e=resolve(_0x1ff94c,_0x384f26[_0xf082a0(0x28c)]);if(!existsSync(_0x59d13e))throw new Error(_0xf082a0(0x206)+_0xf082a0(0x2af)+_0xf082a0(0x1ec)+_0xf082a0(0x1be)+'\x20'+_0x59d13e);await runProcess('tar',[_0xf082a0(0x2f0),_0x59d13e,'-C',_0x440dba],{'label':_0xf082a0(0x2c3)+_0x384f26[_0xf082a0(0x28c)]}),await removePathWithRetries(_0x47a39d['openclaw'+_0xf082a0(0x169)+'ir']),await rename(join(_0x440dba,'package'),_0x47a39d[_0xf082a0(0x19b)+_0xf082a0(0x169)+'ir']),await removePathWithRetries(_0x440dba),await runProcess(_0x47a39d[_0xf082a0(0x2c7)+_0xf082a0(0x138)],[_0x47a39d['npmCli'],_0xf082a0(0x2b5),_0xf082a0(0x30a)+'ev',_0xf082a0(0x267)+_0xf082a0(0x17c),_0xf082a0(0x1a7)+'it',_0xf082a0(0x18f)+'d',_0xf082a0(0x1c7)+_0xf082a0(0x13a)+'ps'],{'cwd':_0x47a39d[_0xf082a0(0x19b)+'WorkingD'+'ir'],'env':_0x29b405,'label':_0xf082a0(0x309)+_0xf082a0(0x330)+_0x26ee4f+(_0xf082a0(0x29c)+_0xf082a0(0x186)+'ncies')});if(!existsSync(_0x47a39d['openclaw'+_0xf082a0(0x21d)]))throw new Error(_0xf082a0(0x1e3)+_0xf082a0(0x163)+'\x20not\x20fou'+_0xf082a0(0x328)+'\x20install'+':\x20'+_0x47a39d[_0xf082a0(0x19b)+'Bin']);}async function ensureRuntimeBase(_0x460e89,_0x57c466,_0x32bf16={}){const _0x3a31b5=_0x30af49;await mkdir(_0x57c466,{'recursive':!![]});let _0x4be06e=await readRuntimeManifest(_0x57c466);const _0x32c155=_0x460e89[_0x3a31b5(0x19b)]['nodeVers'+_0x3a31b5(0x229)],_0x36e926=_0x460e89[_0x3a31b5(0x19b)]['openclaw'+_0x3a31b5(0x26f)],_0x462bc2=existsSync(resolveManifestPath(_0x57c466)),_0x495aa2=runtimeHasRequiredPaths(_0x57c466,_0x4be06e),_0x2f0342=_0x4be06e[_0x3a31b5(0x1d0)+_0x3a31b5(0x229)]===_0x32c155;!_0x462bc2||!_0x495aa2||!_0x2f0342?(_0x32bf16[_0x3a31b5(0x1c4)+_0x3a31b5(0x23b)]?.[_0x3a31b5(0x144)]('runtime\x20'+_0x3a31b5(0x193)+'ld\x20start'+'ed',{'runtimeRoot':_0x57c466,'reason':!_0x462bc2?_0x3a31b5(0x1d7)+'manifest':!_0x495aa2?_0x3a31b5(0x1d7)+'required'+_0x3a31b5(0x29c)+_0x3a31b5(0x2b6):_0x3a31b5(0x2ad)+_0x3a31b5(0x2b1)+_0x3a31b5(0x327),'syncOnly':_0x32bf16['syncOnly']}),_0x4be06e=await buildRuntimeBase(_0x460e89,_0x57c466,_0x4be06e),_0x32bf16[_0x3a31b5(0x1c4)+_0x3a31b5(0x23b)]?.[_0x3a31b5(0x144)](_0x3a31b5(0x205)+_0x3a31b5(0x193)+_0x3a31b5(0x251)+'eted',{'manifest':summarizeRuntimeManifest(_0x4be06e)})):_0x32bf16['runtimeL'+_0x3a31b5(0x23b)]?.[_0x3a31b5(0x144)](_0x3a31b5(0x205)+_0x3a31b5(0x319)+'eady\x20cur'+'rent',{'manifest':summarizeRuntimeManifest(_0x4be06e)});if(!existsSync(resolve(_0x57c466,_0x4be06e[_0x3a31b5(0x19b)+_0x3a31b5(0x21d)]))){const _0x5777f4=createRuntimeInfoFromManifest(_0x57c466,_0x4be06e,{'allowMissingOpenClaw':!![]});await installOpenClawPackage(_0x5777f4,_0x36e926),_0x4be06e['openclaw'+'Version']=_0x36e926;}return _0x4be06e;}function runtimeHasRequiredPaths(_0x35fdda,_0x1dc174){const _0x22448e=_0x30af49;return[_0x22448e(0x2c7)+_0x22448e(0x138),_0x22448e(0x1b6),_0x22448e(0x19b)+_0x22448e(0x169)+'ir','openclaw'+_0x22448e(0x21d)][_0x22448e(0x210)](_0x4235be=>typeof _0x1dc174[_0x4235be]===_0x22448e(0x1ac)&&_0x1dc174[_0x4235be][_0x22448e(0x23c)]())&&[_0x22448e(0x2c7)+'utable',_0x22448e(0x1b6)][_0x22448e(0x210)](_0x42cf5c=>existsSync(resolve(_0x35fdda,_0x1dc174[_0x42cf5c])));}async function buildRuntimeBase(_0x533d64,_0x19178b,_0x56aa8e={}){const _0x4deff2=_0x30af49,_0x10a2b0=join(_0x19178b,_0x4deff2(0x27b));await ensureRuntimeNode(_0x533d64,_0x10a2b0);const _0x4366be={..._0x56aa8e,'generatedAt':new Date()[_0x4deff2(0x322)+_0x4deff2(0x329)](),'nodeVersion':_0x533d64[_0x4deff2(0x19b)][_0x4deff2(0x1d0)+_0x4deff2(0x229)],'openclawVersion':_0x56aa8e[_0x4deff2(0x19b)+_0x4deff2(0x26f)]||'','platform':process[_0x4deff2(0x1d1)],'arch':process[_0x4deff2(0x1e1)],'nodeExecutable':_0x4deff2(0x14b)+_0x4deff2(0x2f1),'npmCli':_0x4deff2(0x33a)+'/node_mo'+'dules/np'+_0x4deff2(0x189)+_0x4deff2(0x2dc),'openclawWorkingDir':_0x4deff2(0x19b),'openclawBin':_0x4deff2(0x19b)+_0x4deff2(0x19d)+'w.mjs'};return await writeJson(resolveManifestPath(_0x19178b),_0x4366be),_0x4366be;}async function removePathWithRetries(_0x51c595){await rm(_0x51c595,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96});}async function ensureRuntimeNode(_0x4b3325,_0x2a0fab){const _0x3fc686=_0x30af49,_0x5b87f3=_0x4b3325[_0x3fc686(0x19b)][_0x3fc686(0x1d0)+_0x3fc686(0x229)],_0x21aec3=join(_0x2a0fab,_0x3fc686(0x2a3),_0x3fc686(0x27b)),_0x2da232=join(_0x2a0fab,_0x3fc686(0x273),'node_mod'+_0x3fc686(0x17e),'npm',_0x3fc686(0x2a3),'npm-cli.'+'js');if(existsSync(_0x21aec3)&&existsSync(_0x2da232)&&await getNodeVersion(_0x21aec3)===_0x5b87f3)return;await removePathWithRetries(_0x2a0fab);if(process[_0x3fc686(0x132)][_0x3fc686(0x27b)]===_0x5b87f3){await linkCurrentNodeRuntime(_0x2a0fab);return;}await downloadNodeRuntime(_0x5b87f3,_0x2a0fab);}async function getNodeVersion(_0x4b10ca){const _0x535d6d=_0x30af49;try{const _0x78e30c=await runProcess(_0x4b10ca,['-p',_0x535d6d(0x1eb)+'versions'+_0x535d6d(0x2e7)],{'label':_0x4b10ca+_0x535d6d(0x165),'timeoutMs':0x7530});return _0x78e30c['stdout'][_0x535d6d(0x23c)]();}catch{return'';}}async function linkCurrentNodeRuntime(_0xa8d4d6){const _0x1b6120=_0x30af49,_0x3a9745=process[_0x1b6120(0x33b)],_0x19cd35=resolve(dirname(_0x3a9745),'..'),_0x405ede=resolve(_0x19cd35,_0x1b6120(0x318)+_0x1b6120(0x29a)+_0x1b6120(0x2ee)),_0x94bafb=join(_0xa8d4d6,_0x1b6120(0x2a3),_0x1b6120(0x27b)),_0x5cbfcc=join(_0xa8d4d6,'lib','node_mod'+_0x1b6120(0x17e),'npm');await mkdir(dirname(_0x94bafb),{'recursive':!![]}),await mkdir(dirname(_0x5cbfcc),{'recursive':!![]}),await symlink(_0x3a9745,_0x94bafb),existsSync(_0x405ede)?await symlink(_0x405ede,_0x5cbfcc):await symlink(await resolveNpmRoot(),_0x5cbfcc);}async function resolveNpmRoot(){const _0x7c32d0=_0x30af49,_0x4277c6=await runProcess(_0x7c32d0(0x307),[_0x7c32d0(0x29d),'-g'],{'label':'npm\x20root'+_0x7c32d0(0x2ba),'timeoutMs':0x7530}),_0x35039e=join(_0x4277c6[_0x7c32d0(0x13c)][_0x7c32d0(0x23c)](),_0x7c32d0(0x307));if(!existsSync(join(_0x35039e,'bin',_0x7c32d0(0x2de)+'js')))throw new Error(_0x7c32d0(0x206)+_0x7c32d0(0x1f3)+_0x7c32d0(0x25c)+_0x7c32d0(0x21a)+_0x7c32d0(0x1f9)+_0x7c32d0(0x1cf)+_0x7c32d0(0x303)+_0x35039e);return _0x35039e;}async function downloadNodeRuntime(_0x1cf3e6,_0x5e22b0){const _0x5b5285=_0x30af49,_0x469a51=process[_0x5b5285(0x1d1)]==='win32'?_0x5b5285(0x1cd):process[_0x5b5285(0x1d1)],_0x1ebda8=process['arch']===_0x5b5285(0x207)?_0x5b5285(0x207):process[_0x5b5285(0x1e1)]===_0x5b5285(0x17a)?_0x5b5285(0x17a):process[_0x5b5285(0x1e1)],_0x1d91a7=process[_0x5b5285(0x1d1)]==='win32'?_0x5b5285(0x249):_0x5b5285(0x32d),_0x2733f8=_0x5b5285(0x32f)+_0x1cf3e6+'-'+_0x469a51+'-'+_0x1ebda8,_0x572299=_0x2733f8+'.'+_0x1d91a7,_0x27c888=join(dirname(_0x5e22b0),_0x5b5285(0x30e)),_0x873279=join(_0x27c888,_0x572299),_0x471e7e=join(_0x27c888,_0x2733f8+(_0x5b5285(0x333)+'-')+process[_0x5b5285(0x2da)]+'-'+Date[_0x5b5285(0x14d)]()),_0x1b97c8='https://'+_0x5b5285(0x2f9)+_0x5b5285(0x13d)+'v'+_0x1cf3e6+'/'+_0x572299;await mkdir(_0x27c888,{'recursive':!![]}),!existsSync(_0x873279)&&(console['log'](_0x5b5285(0x227)+'hell:run'+_0x5b5285(0x2ca)+_0x5b5285(0x338)+'g\x20'+_0x1b97c8),await downloadFile(_0x1b97c8,_0x873279)),await rm(_0x471e7e,{'recursive':!![],'force':!![]}),await mkdir(_0x471e7e,{'recursive':!![]}),process[_0x5b5285(0x1d1)]==='win32'?await runProcess(_0x5b5285(0x2ab),['-q',_0x873279,'-d',_0x471e7e],{'label':_0x5b5285(0x2c3)+_0x572299}):await runProcess(_0x5b5285(0x26d),[_0x5b5285(0x290),_0x873279,'-C',_0x471e7e],{'label':_0x5b5285(0x2c3)+_0x572299}),await rename(join(_0x471e7e,_0x2733f8),_0x5e22b0),await rm(_0x471e7e,{'recursive':!![],'force':!![]});}async function downloadFile(_0x1b55ba,_0x2cf9df){await mkdir(dirname(_0x2cf9df),{'recursive':!![]});const _0x2b60b9=await new Promise((_0x1cea19,_0x5a42fc)=>{const _0x5801a8=_0x3e4d;get(_0x1b55ba,_0x4393f1=>{const _0x2fc40d=_0x3e4d;if(_0x4393f1[_0x2fc40d(0x287)+'de']>=0x12c&&_0x4393f1[_0x2fc40d(0x287)+'de']<0x190&&_0x4393f1[_0x2fc40d(0x142)][_0x2fc40d(0x171)]){_0x4393f1['resume'](),downloadFile(new URL(_0x4393f1['headers']['location'],_0x1b55ba)[_0x2fc40d(0x14a)],_0x2cf9df)[_0x2fc40d(0x179)](()=>_0x1cea19(null))[_0x2fc40d(0x1e6)](_0x5a42fc);return;}if(_0x4393f1[_0x2fc40d(0x287)+'de']!==0xc8){_0x4393f1[_0x2fc40d(0x1ef)](),_0x5a42fc(new Error('download'+'\x20failed\x20'+_0x4393f1[_0x2fc40d(0x287)+'de']+':\x20'+_0x1b55ba));return;}_0x1cea19(_0x4393f1);})['on'](_0x5801a8(0x16e),_0x5a42fc);});_0x2b60b9&&await pipeline(_0x2b60b9,createWriteStream(_0x2cf9df));}export async function ensureOpenClawDoctorFixed(_0xc77148,_0xb62b45={}){const _0x5e804e=_0x30af49,_0xac00de=await loadRuntimeInfo(_0xc77148[_0x5e804e(0x149)+_0x5e804e(0x28e)]),_0x2133e9=getConfigPaths(_0xc77148),_0x4ac493=join(_0x2133e9[_0x5e804e(0x1dd)+'tateDir'],'openclaw'+_0x5e804e(0x2c6)+_0x5e804e(0x2b7)),_0x2d1a98=await readJson(_0x4ac493,{});if(_0x2d1a98['openclaw'+_0x5e804e(0x26f)]===_0xac00de['openclaw'+'Version'])return _0xb62b45[_0x5e804e(0x1c4)+_0x5e804e(0x23b)]?.[_0x5e804e(0x144)](_0x5e804e(0x19b)+_0x5e804e(0x2d1)+_0x5e804e(0x30c)+_0x5e804e(0x21b)+_0x5e804e(0x336),{'openclawVersion':_0xac00de[_0x5e804e(0x19b)+_0x5e804e(0x26f)],'markerPath':_0x4ac493}),{'ran':![],'openclawVersion':_0xac00de[_0x5e804e(0x19b)+_0x5e804e(0x26f)],'markerPath':_0x4ac493};return await runOpenClawDoctorFix(_0xc77148,_0xac00de,{'fromVersion':_0x2d1a98[_0x5e804e(0x19b)+_0x5e804e(0x26f)]||_0x5e804e(0x2ce),'toVersion':_0xac00de[_0x5e804e(0x19b)+_0x5e804e(0x26f)],'markerPath':_0x4ac493,'runtimeLogger':_0xb62b45[_0x5e804e(0x1c4)+_0x5e804e(0x23b)]}),{'ran':!![],'openclawVersion':_0xac00de[_0x5e804e(0x19b)+_0x5e804e(0x26f)],'markerPath':_0x4ac493};}async function runOpenClawDoctorFix(_0x529355,_0x2ac6ed,{fromVersion:_0xdddeaf,toVersion:_0x187115,markerPath:markerPath='',runtimeLogger:_0xc04747}={}){const _0x3e0eb7=_0x30af49;_0xc04747?.[_0x3e0eb7(0x144)]('openclaw'+_0x3e0eb7(0x2d1)+_0x3e0eb7(0x15f)+'ted',{'fromVersion':_0xdddeaf,'toVersion':_0x187115});const _0x203d72=await createRuntimeEnv(_0x2ac6ed,{'OPENCLAW_HOME':_0x529355[_0x3e0eb7(0x16b)],'OPENCLAW_STATE_DIR':_0x529355[_0x3e0eb7(0x16b)],'OPENCLAW_CONFIG_PATH':getConfigPaths(_0x529355)[_0x3e0eb7(0x146)+'th']});console[_0x3e0eb7(0x26c)](_0x3e0eb7(0x227)+_0x3e0eb7(0x180)+_0x3e0eb7(0x2fe)+_0x3e0eb7(0x1cb)+'enclaw\x20d'+'octor\x20--'+_0x3e0eb7(0x1ff));const _0xcf2b4f=await runProcess(_0x2ac6ed[_0x3e0eb7(0x2c7)+'utable'],[_0x2ac6ed[_0x3e0eb7(0x19b)+'Bin'],'doctor',_0x3e0eb7(0x2d7)],{'cwd':_0x2ac6ed[_0x3e0eb7(0x19b)+'WorkingD'+'ir'],'env':_0x203d72,'label':_0x3e0eb7(0x19b)+_0x3e0eb7(0x2d1)+'--fix','timeoutMs':0x1d4c0});_0xc04747?.[_0x3e0eb7(0x144)](_0x3e0eb7(0x19b)+_0x3e0eb7(0x2d1)+_0x3e0eb7(0x2be)+'leted',{'fromVersion':_0xdddeaf,'toVersion':_0x187115,'stdout':_0xcf2b4f[_0x3e0eb7(0x13c)][_0x3e0eb7(0x23c)]()['slice'](-0xfa0),'stderr':_0xcf2b4f[_0x3e0eb7(0x2c0)]['trim']()[_0x3e0eb7(0x22f)](-0xfa0)}),markerPath&&(await writeJson(markerPath,{'openclawVersion':_0x2ac6ed[_0x3e0eb7(0x19b)+'Version'],'fixedAt':new Date()[_0x3e0eb7(0x322)+'ing']()}),_0xc04747?.['info'](_0x3e0eb7(0x19b)+_0x3e0eb7(0x2d1)+_0x3e0eb7(0x155)+_0x3e0eb7(0x2e2)+'en',{'markerPath':markerPath,'openclawVersion':_0x2ac6ed[_0x3e0eb7(0x19b)+_0x3e0eb7(0x26f)]}));}export async function readRuntimeManifest(_0x3c8c7b){return await readJson(resolveManifestPath(_0x3c8c7b),{});}export async function loadRuntimeInfo(_0x55874a){const _0x8cfb8e=resolveRuntimeRoot(_0x55874a),_0x496f3a=await readRuntimeManifest(_0x8cfb8e);return createRuntimeInfoFromManifest(_0x8cfb8e,_0x496f3a);}function createRuntimeInfoFromManifest(_0x4edc8b,_0x16dae1,_0x4f76e4={}){const _0x53896c=_0x30af49;for(const _0x3207eb of[_0x53896c(0x2c7)+_0x53896c(0x138),_0x53896c(0x1b6),_0x53896c(0x19b)+'WorkingD'+'ir','openclaw'+_0x53896c(0x21d)]){if(typeof _0x16dae1[_0x3207eb]!==_0x53896c(0x1ac)||!_0x16dae1[_0x3207eb][_0x53896c(0x23c)]())throw new Error(_0x53896c(0x205)+_0x53896c(0x27f)+_0x53896c(0x316)+_0x53896c(0x321)+_0x3207eb+'\x22\x20at\x20'+resolveManifestPath(_0x4edc8b)+(';\x20run\x20wu'+_0x53896c(0x2e9)+'l\x20prepar'+'e'));}const _0x377134=resolve(_0x4edc8b,_0x16dae1[_0x53896c(0x2c7)+'utable']),_0x24441c=resolve(_0x4edc8b,_0x16dae1[_0x53896c(0x1b6)]),_0x59b5bc=resolve(_0x4edc8b,_0x16dae1['openclaw'+_0x53896c(0x169)+'ir']),_0x39c89f=resolve(_0x4edc8b,_0x16dae1[_0x53896c(0x19b)+_0x53896c(0x21d)]),_0x4eaaf4=Array[_0x53896c(0x248)](_0x16dae1[_0x53896c(0x28a)])?_0x16dae1['plugins'][_0x53896c(0x209)](_0x34be04=>({..._0x34be04,'installPath':resolve(_0x4edc8b,_0x34be04[_0x53896c(0x1a6)+_0x53896c(0x1a5)])})):[],_0x2f8f05=_0x4f76e4[_0x53896c(0x28d)+'singOpen'+_0x53896c(0x1b0)]?[_0x377134,_0x24441c]:[_0x377134,_0x24441c,_0x59b5bc,_0x39c89f];for(const _0xb772d8 of _0x2f8f05){if(!existsSync(_0xb772d8))throw new Error(_0x53896c(0x205)+_0x53896c(0x1d7)+_0x53896c(0x23a)+_0xb772d8);}return{'runtimeRoot':_0x4edc8b,'manifest':_0x16dae1,'openclawVersion':_0x16dae1[_0x53896c(0x19b)+'Version']||_0x53896c(0x2ce),'nodeExecutable':_0x377134,'npmCli':_0x24441c,'openclawWorkingDir':_0x59b5bc,'openclawBin':_0x39c89f,'plugins':_0x4eaaf4};}export async function spawnClaw(_0x571853,_0x532446=[],_0x3a2fac={}){const _0x56ccc7=_0x30af49,_0xe399b7=await loadRuntimeInfo(_0x571853),_0x44485d=await createRuntimeEnv(_0xe399b7,_0x3a2fac[_0x56ccc7(0x19f)]??{});return spawn(_0xe399b7[_0x56ccc7(0x2c7)+_0x56ccc7(0x138)],[_0xe399b7['openclaw'+_0x56ccc7(0x21d)],..._0x532446],{'cwd':_0xe399b7[_0x56ccc7(0x19b)+'WorkingD'+'ir'],'stdio':'pipe',..._0x3a2fac,'env':_0x44485d});}export async function runClawOnce(_0x3ce4ef,_0xe1d0a3=[],_0x6713dc=0x15f90){const _0x2cd3b5=await spawnClaw(_0x3ce4ef,_0xe1d0a3);return await new Promise((_0x20e540,_0x499a1c)=>{const _0x21a06b=_0x3e4d;let _0x12be5d='',_0x4ef051='',_0x59f713=![];const _0x5df7a5=setTimeout(()=>{const _0x4230c1=_0x3e4d;if(_0x59f713)return;_0x59f713=!![],_0x2cd3b5[_0x4230c1(0x137)](_0x4230c1(0x18e)),_0x499a1c(new Error(_0x4230c1(0x19b)+_0x4230c1(0x325)+_0x4230c1(0x26a)+'\x20'+_0x6713dc+'ms'));},_0x6713dc);_0x2cd3b5[_0x21a06b(0x13c)]['on'](_0x21a06b(0x21f),_0x566bb2=>{const _0x3a85c8=_0x21a06b;_0x12be5d+=_0x566bb2[_0x3a85c8(0x24d)]();}),_0x2cd3b5[_0x21a06b(0x2c0)]['on'](_0x21a06b(0x21f),_0x1b4212=>{_0x4ef051+=_0x1b4212['toString']();}),_0x2cd3b5['on'](_0x21a06b(0x16e),_0xe1c717=>{if(_0x59f713)return;_0x59f713=!![],clearTimeout(_0x5df7a5),_0x499a1c(_0xe1c717);}),_0x2cd3b5['on'](_0x21a06b(0x1ca),(_0x58f8a1,_0x1a55c9)=>{if(_0x59f713)return;_0x59f713=!![],clearTimeout(_0x5df7a5),_0x20e540({'code':_0x58f8a1,'signal':_0x1a55c9,'stdout':_0x12be5d,'stderr':_0x4ef051});});});}async function findRuntimeLarkCliBin(_0x1a47ed){const _0x38e491=_0x30af49,_0x395087=join(_0x1a47ed[_0x38e491(0x19b)+_0x38e491(0x169)+'ir'],_0x38e491(0x211)+'ules',_0x38e491(0x23f)+'te',_0x38e491(0x141)),_0x2fc813=join(_0x395087,'package.'+'json');if(!existsSync(_0x2fc813))return{'packageDir':_0x395087,'binPath':null};try{const _0x599a6e=JSON[_0x38e491(0x1af)](await readFile(_0x2fc813,_0x38e491(0x2f4))),_0x1e23f9=typeof _0x599a6e[_0x38e491(0x2a3)]==='string'?_0x599a6e[_0x38e491(0x2a3)]:_0x599a6e[_0x38e491(0x2a3)]&&typeof _0x599a6e[_0x38e491(0x2a3)]===_0x38e491(0x1f2)?_0x599a6e['bin'][_0x38e491(0x2bd)]||Object[_0x38e491(0x31b)](_0x599a6e['bin'])[0x0]:'';return{'packageDir':_0x395087,'binPath':_0x1e23f9?join(_0x395087,_0x1e23f9):null};}catch{return{'packageDir':_0x395087,'binPath':null};}}export async function resolveRuntimeLarkCliCommand(_0x15b2e2){const _0xbffcbb=_0x30af49,{packageDir:_0x333551,binPath:_0x568d59}=await findRuntimeLarkCliBin(_0x15b2e2);if(!_0x568d59||!existsSync(_0x568d59))throw new Error(_0xbffcbb(0x1dc)+_0xbffcbb(0x23f)+_0xbffcbb(0x2e3)+'s\x20missin'+_0xbffcbb(0x314)+'penClaw\x20'+_0xbffcbb(0x14e)+'\x20'+_0x333551+('.\x20Run\x20\x22w'+'ujie-she'+'ll\x20prepa'+_0xbffcbb(0x299)+'ebuild\x20t'+_0xbffcbb(0x269)+_0xbffcbb(0x305)));return{'nodeExecutable':_0x15b2e2[_0xbffcbb(0x2c7)+_0xbffcbb(0x138)],'scriptPath':_0x568d59,'packageDir':_0x333551};}function resolvePackageNameFromNpmSpec(_0x37d197){const _0x4d7ec0=_0x30af49,_0x321531=_0x37d197[_0x4d7ec0(0x23c)]()[_0x4d7ec0(0x1f5)](/^npm:/,'');if(!_0x321531)throw new Error(_0x4d7ec0(0x2f3)+'empty\x20pl'+_0x4d7ec0(0x15d)+'c');if(_0x321531['startsWi'+'th']('@')){const _0x23b346=_0x321531['indexOf']('/');if(_0x23b346===-0x1)throw new Error('Invalid\x20'+_0x4d7ec0(0x289)+'pec:\x20'+_0x37d197);const _0x45f6d6=_0x321531[_0x4d7ec0(0x2bc)]('@',_0x23b346+0x1);return _0x45f6d6===-0x1?_0x321531:_0x321531[_0x4d7ec0(0x22f)](0x0,_0x45f6d6);}const _0x4a18b4=_0x321531[_0x4d7ec0(0x2bc)]('@');return _0x4a18b4===-0x1?_0x321531:_0x321531[_0x4d7ec0(0x22f)](0x0,_0x4a18b4);}async function createRuntimeEnv(_0x22ccd9,_0x2c2cf7={}){const _0x1dd821=_0x30af49,_0x117d3b=process.env.OPENCLAW_STATE_DIR||'',_0x5bc0f5=process.env.NPM_CONFIG_REGISTRY||_0x1dd821(0x2c8)+_0x1dd821(0x184)+_0x1dd821(0x236)+_0x1dd821(0x2b0),_0x39af5d=_0x117d3b?join(_0x117d3b,_0x1dd821(0x159)+_0x1dd821(0x292)+'ls'):join(_0x22ccd9[_0x1dd821(0x2df)+_0x1dd821(0x28e)],'.tools'),_0x42d6c3=join(_0x39af5d,_0x1dd821(0x312)+'al'),_0x1c1a15=join(_0x39af5d,_0x1dd821(0x2ff)+'e'),_0x21d6f1=join(_0x42d6c3,_0x1dd821(0x2a3));await mkdir(_0x21d6f1,{'recursive':!![]}),await mkdir(_0x1c1a15,{'recursive':!![]});const _0x169237=[_0x21d6f1,dirname(_0x22ccd9[_0x1dd821(0x2c7)+'utable']),process.env.PATH||''];return{...process.env,..._0x2c2cf7,'PATH':_0x169237['filter'](Boolean)['join'](delimiter),'npm_config_prefix':_0x42d6c3,'NPM_CONFIG_PREFIX':_0x42d6c3,'npm_config_cache':_0x1c1a15,'NPM_CONFIG_CACHE':_0x1c1a15,'NPM_CONFIG_REGISTRY':_0x5bc0f5,'npm_execpath':_0x22ccd9['npmCli'],'npm_node_execpath':_0x22ccd9[_0x1dd821(0x2c7)+_0x1dd821(0x138)],'OPENCLAW_RUNTIME_NPM_PREFIX':_0x42d6c3,'OPENCLAW_RUNTIME_NPM_BIN':_0x21d6f1};}export async function getRuntimeSpawnContext(_0x15eaa1,_0x421af1={}){const _0x2b5c8f=_0x30af49,_0x54e82d=await loadRuntimeInfo(_0x15eaa1),_0x5ad35f=await createRuntimeEnv(_0x54e82d,_0x421af1);return{'cwd':_0x54e82d[_0x2b5c8f(0x19b)+_0x2b5c8f(0x169)+'ir'],'env':_0x5ad35f,'runtime':_0x54e82d};}function resolvePluginDirNameFromSpec(_0x3ba9f8){const _0x30ce4b=_0x30af49,_0x2514d9=resolvePackageNameFromNpmSpec(_0x3ba9f8),_0x2d0246=_0x2514d9[_0x30ce4b(0x1de)]('/')[_0x30ce4b(0x250)](Boolean),_0x325a45=_0x2d0246['at'](-0x1)??'';if(!_0x325a45)throw new Error('Invalid\x20'+_0x30ce4b(0x221)+'pec:\x20'+_0x3ba9f8);return _0x325a45;}async function resolvePluginIdFromPackageDir(_0x2be043,_0x29212b){const _0x2e512a=_0x30af49,_0x18d6aa=await readJson(join(_0x2be043,'package.'+_0x2e512a(0x2b7)),{}),_0x48fa9c=await readPluginManifest(_0x2be043),_0x339472=[_0x48fa9c?.['id'],_0x48fa9c?.['pluginId'],_0x48fa9c?.[_0x2e512a(0x187)],_0x18d6aa?.[_0x2e512a(0x19b)]?.['id'],_0x18d6aa?.[_0x2e512a(0x19b)+'Id'],_0x29212b],_0x213346=_0x339472['find'](_0x2ad229=>typeof _0x2ad229===_0x2e512a(0x1ac)&&_0x2ad229['trim']());if(!_0x213346)throw new Error(_0x2e512a(0x2b8)+_0x2e512a(0x191)+_0x2e512a(0x2e6)+'\x20id\x20from'+'\x20'+_0x2be043);return _0x213346[_0x2e512a(0x23c)]();}function pluginSpecMatches(_0x126d67,_0xefbd6){const _0x4b7721=_0x30af49,_0x58527b=_0xefbd6[_0x4b7721(0x23c)](),_0x44031a=resolvePackageNameFromNpmSpec(_0x58527b);return[_0x126d67[_0x4b7721(0x175)],_0x126d67['resolved'+_0x4b7721(0x276)],_0x126d67[_0x4b7721(0x1a2)+_0x4b7721(0x18d)]]['some'](_0x14f6ea=>_0x14f6ea===_0x58527b||_0x14f6ea===_0x44031a);}async function installPluginFromNpmSpec(_0x75bfa1,_0x5dabfe,_0x452eb8={}){const _0x513566=_0x30af49,_0x82f93a=_0x75bfa1['trim']()[_0x513566(0x1f5)](/^npm:/,''),_0x316eab=resolvePluginDirNameFromSpec(_0x82f93a),_0x5bb066=join(_0x5dabfe[_0x513566(0x19b)+'WorkingD'+'ir'],'dist',_0x513566(0x19e)+'ns'),_0x45abeb=join(_0x5bb066,_0x316eab),_0x52361f=join(_0x5dabfe[_0x513566(0x2df)+_0x513566(0x28e)],_0x513566(0x212)+_0x513566(0x2a4)+process[_0x513566(0x2da)]+'-'+Date[_0x513566(0x14d)]()),_0x314dba=await createRuntimeEnv(_0x5dabfe),_0x53f90c=new Date()['toISOStr'+_0x513566(0x329)](),_0x45b22a=join(_0x5dabfe['runtimeR'+_0x513566(0x28e)],'.cache');await mkdir(_0x45b22a,{'recursive':!![]}),await rm(_0x52361f,{'recursive':!![],'force':!![]}),await rm(_0x45abeb,{'recursive':!![],'force':!![]}),await mkdir(_0x52361f,{'recursive':!![]}),await mkdir(_0x5bb066,{'recursive':!![]}),console[_0x513566(0x26c)]('[wujie-s'+_0x513566(0x180)+'time]\x20fe'+'tching\x20p'+_0x513566(0x261)+_0x82f93a);const _0x320aea=await runProcess(_0x5dabfe[_0x513566(0x2c7)+_0x513566(0x138)],[_0x5dabfe['npmCli'],_0x513566(0x317),_0x82f93a,_0x513566(0x224)],{'cwd':_0x45b22a,'env':_0x314dba,'label':'npm\x20pack'+'\x20'+_0x82f93a}),_0x1cee29=parseNpmPackJson(_0x320aea[_0x513566(0x13c)]),_0x26b631=normalizePackedTarballFilename(_0x1cee29['filename']),_0x3a4e91=join(_0x45b22a,_0x26b631);if(!existsSync(_0x3a4e91))throw new Error('npm\x20pack'+_0x513566(0x2af)+'\x20create\x20'+_0x513566(0x1be)+'\x20'+_0x3a4e91);await runProcess(_0x513566(0x26d),[_0x513566(0x2f0),_0x3a4e91,'-C',_0x52361f],{'label':_0x513566(0x2c3)+_0x26b631}),await rename(join(_0x52361f,_0x513566(0x1e5)),_0x45abeb),await rm(_0x52361f,{'recursive':!![],'force':!![]});const _0x1933a5=join(_0x45abeb,'package.'+_0x513566(0x2b7)),_0x3f5dc4=await readJson(_0x1933a5,{});(_0x3f5dc4['devDepen'+_0x513566(0x23d)]||_0x3f5dc4[_0x513566(0x286)])&&(delete _0x3f5dc4[_0x513566(0x152)+_0x513566(0x23d)],delete _0x3f5dc4[_0x513566(0x286)],await writeJson(_0x1933a5,_0x3f5dc4));await runProcess(_0x5dabfe[_0x513566(0x2c7)+_0x513566(0x138)],[_0x5dabfe[_0x513566(0x1b6)],_0x513566(0x2b5),'--omit=d'+'ev','--omit=p'+'eer','--no-aud'+'it',_0x513566(0x18f)+'d','--legacy'+_0x513566(0x13a)+'ps'],{'cwd':_0x45abeb,'env':_0x314dba,'label':_0x513566(0x309)+'all\x20plug'+_0x513566(0x1ce)+_0x82f93a});const _0x805fb1=new Date()['toISOStr'+'ing'](),_0x129d14=await resolvePluginIdFromPackageDir(_0x45abeb,_0x1cee29[_0x513566(0x187)]);return _0x452eb8[_0x513566(0x1c4)+_0x513566(0x23b)]?.[_0x513566(0x144)](_0x513566(0x1fb)+_0x513566(0x31e)+_0x513566(0x1b4),{'spec':_0x82f93a,'pluginId':_0x129d14,'installPath':_0x45abeb}),{'pluginId':_0x129d14,'source':_0x513566(0x307),'spec':_0x82f93a,'installPath':toRuntimeRelative(_0x5dabfe['runtimeR'+_0x513566(0x28e)],_0x45abeb),'version':_0x1cee29[_0x513566(0x2db)],'resolvedName':_0x1cee29[_0x513566(0x187)],'resolvedVersion':_0x1cee29[_0x513566(0x2db)],'resolvedSpec':_0x1cee29[_0x513566(0x187)]+'@'+_0x1cee29['version'],'integrity':typeof _0x1cee29['integrit'+'y']===_0x513566(0x1ac)?_0x1cee29[_0x513566(0x1a1)+'y']:'','shasum':typeof _0x1cee29[_0x513566(0x1ba)]==='string'?_0x1cee29[_0x513566(0x1ba)]:'','resolvedAt':_0x53f90c,'installedAt':_0x805fb1};}async function syncConfiguredNpmPlugins(_0x4d2d38,_0x4e0151,_0x3fabf2,_0x225fdb={}){const _0x25ef53=_0x30af49;if(_0x225fdb[_0x25ef53(0x214)])return;const _0x20f932=createRuntimeInfoFromManifest(_0x4e0151,_0x3fabf2),_0x347526=Array[_0x25ef53(0x248)](_0x3fabf2[_0x25ef53(0x28a)])?_0x3fabf2[_0x25ef53(0x28a)]:[],_0x250a7d=[];for(const _0x3e37bc of _0x4d2d38['openclaw']['pluginSp'+_0x25ef53(0x235)]){const _0x2e1f14=_0x347526[_0x25ef53(0x133)](_0x1edc10=>_0x1edc10?.[_0x25ef53(0x172)]===_0x25ef53(0x307)&&pluginSpecMatches(_0x1edc10,_0x3e37bc)&&typeof _0x1edc10['installP'+'ath']===_0x25ef53(0x1ac)&&existsSync(resolve(_0x4e0151,_0x1edc10[_0x25ef53(0x1a6)+_0x25ef53(0x1a5)])));if(_0x2e1f14){_0x250a7d[_0x25ef53(0x234)](_0x2e1f14);continue;}_0x250a7d[_0x25ef53(0x234)](await installPluginFromNpmSpec(_0x3e37bc,_0x20f932,_0x225fdb));}const _0x47c8c9=new Set(_0x4d2d38[_0x25ef53(0x19b)][_0x25ef53(0x188)+_0x25ef53(0x235)][_0x25ef53(0x209)](resolvePackageNameFromNpmSpec)),_0xc34dfd=_0x347526[_0x25ef53(0x250)](_0x7e5c55=>_0x7e5c55?.[_0x25ef53(0x172)]!==_0x25ef53(0x307)||!_0x47c8c9[_0x25ef53(0x2dd)](resolvePackageNameFromNpmSpec(_0x7e5c55['resolved'+_0x25ef53(0x18d)]||_0x7e5c55[_0x25ef53(0x175)]||'')));_0x3fabf2[_0x25ef53(0x28a)]=[..._0xc34dfd,..._0x250a7d];}function hasRuntimeDependencies(_0x29b83d){const _0x57d6a8=_0x30af49,_0x560083=_0x29b83d?.[_0x57d6a8(0x1bc)+_0x57d6a8(0x294)]&&typeof _0x29b83d['dependen'+'cies']===_0x57d6a8(0x1f2)?Object[_0x57d6a8(0x1aa)](_0x29b83d[_0x57d6a8(0x1bc)+_0x57d6a8(0x294)]):[],_0x2e9252=_0x29b83d?.[_0x57d6a8(0x17d)+'Dependen'+_0x57d6a8(0x294)]&&typeof _0x29b83d[_0x57d6a8(0x17d)+'Dependen'+'cies']==='object'?Object['keys'](_0x29b83d['optional'+_0x57d6a8(0x136)+_0x57d6a8(0x294)]):[];return _0x560083[_0x57d6a8(0x1c3)]>0x0||_0x2e9252['length']>0x0;}async function installLocalPluginRuntimeDependencies(_0xd84df4,_0x283602,_0x488e20){const _0xc3dc3a=_0x30af49,_0x66c394=join(_0xd84df4,_0xc3dc3a(0x260)+_0xc3dc3a(0x2b7)),_0x332d34=await readJson(_0x66c394,{});(_0x332d34[_0xc3dc3a(0x152)+'dencies']||_0x332d34['scripts'])&&(delete _0x332d34[_0xc3dc3a(0x152)+'dencies'],delete _0x332d34[_0xc3dc3a(0x286)],await writeJson(_0x66c394,_0x332d34));if(!hasRuntimeDependencies(_0x332d34))return;const _0x36f9de=await createRuntimeEnv(_0x283602);console[_0xc3dc3a(0x26c)](_0xc3dc3a(0x227)+_0xc3dc3a(0x180)+_0xc3dc3a(0x17f)+_0xc3dc3a(0x275)+_0xc3dc3a(0x30d)+_0xc3dc3a(0x1ad)+_0xc3dc3a(0x208)+'es\x20'+_0xd84df4),await runProcess(_0x283602[_0xc3dc3a(0x2c7)+'utable'],[_0x283602[_0xc3dc3a(0x1b6)],_0xc3dc3a(0x2b5),_0xc3dc3a(0x30a)+'ev',_0xc3dc3a(0x267)+_0xc3dc3a(0x17c),_0xc3dc3a(0x1a7)+'it','--no-fun'+'d',_0xc3dc3a(0x1c7)+_0xc3dc3a(0x13a)+'ps'],{'cwd':_0xd84df4,'env':_0x36f9de,'label':_0xc3dc3a(0x309)+'all\x20loca'+_0xc3dc3a(0x337)+'\x20'+_0xd84df4}),_0x488e20[_0xc3dc3a(0x1c4)+_0xc3dc3a(0x23b)]?.[_0xc3dc3a(0x144)](_0xc3dc3a(0x28b)+_0xc3dc3a(0x161)+_0xc3dc3a(0x18a)+_0xc3dc3a(0x1bd)+_0xc3dc3a(0x25d),{'installPath':_0xd84df4});}async function syncSharedPluginModules(_0x1a7322,_0x2d9b4e){const _0x59be5f=_0x30af49,_0x39d1fb=new Set();for(const _0x59818c of _0x1a7322){const _0x3ee05f=join(dirname(_0x59818c),_0x59be5f(0x31a));if(existsSync(_0x3ee05f))_0x39d1fb[_0x59be5f(0x324)](_0x3ee05f);}for(const _0x14872c of _0x39d1fb){await copyDirFresh(_0x14872c,join(_0x2d9b4e,'_shared'));}}async function syncProductPlugins(_0x4267ca,_0x16baaf,_0x3f2445,_0x2aade5={}){const _0x107988=_0x30af49,_0x455255=join(_0x16baaf,_0x107988(0x19b),'dist',_0x107988(0x19e)+'ns'),_0x403212=createRuntimeInfoFromManifest(_0x16baaf,_0x3f2445),_0x139965=[];await syncSharedPluginModules(_0x4267ca[_0x107988(0x19b)][_0x107988(0x1a2)+_0x107988(0x331)+_0x107988(0x181)],_0x455255);for(const _0x44010e of _0x4267ca[_0x107988(0x19b)][_0x107988(0x1a2)+'LocalPlu'+_0x107988(0x181)]){const _0x368b0b=await getPackageMetadata(_0x44010e),_0xa5478d=await readPluginManifest(_0x44010e),_0x26c280=join(_0x455255,_0x368b0b[_0x107988(0x18c)]);await copyDirFresh(_0x44010e,_0x26c280),await installLocalPluginRuntimeDependencies(_0x26c280,_0x403212,_0x2aade5),_0x139965[_0x107988(0x234)]({'pluginId':_0x368b0b['pluginId'],'source':_0x107988(0x225),'spec':'local:'+_0x44010e,'installPath':toRuntimeRelative(_0x16baaf,_0x26c280),'version':_0x368b0b[_0x107988(0x2db)],'resolvedName':_0x368b0b[_0x107988(0x187)],'resolvedVersion':_0x368b0b[_0x107988(0x2db)],'resolvedSpec':'local:'+_0x44010e,'integrity':'','shasum':'','resolvedAt':new Date()[_0x107988(0x322)+'ing'](),'installedAt':new Date()[_0x107988(0x322)+'ing'](),'agentScope':_0xa5478d['agentSco'+'pe'],'skills':_0xa5478d[_0x107988(0x24b)]});}const _0x48c259=new Set(_0x139965['map'](_0x204600=>_0x204600[_0x107988(0x18c)])),_0x209093=Array[_0x107988(0x248)](_0x3f2445[_0x107988(0x28a)])?_0x3f2445[_0x107988(0x28a)]['filter'](_0x163409=>!_0x48c259[_0x107988(0x2dd)](_0x163409['pluginId'])):[];_0x3f2445[_0x107988(0x28a)]=[..._0x209093,..._0x139965];}async function syncManifestPluginScope(_0x70f23b,_0x5ef734,_0xd40677){const _0x5f5d81=_0x30af49,_0x217a25=join(_0x5ef734,'openclaw',_0x5f5d81(0x2b3),'extensio'+'ns'),_0xed6d94=new Set(_0x70f23b[_0x5f5d81(0x19b)]['pluginSp'+_0x5f5d81(0x235)]??[]),_0x2102c5=new Set([..._0xed6d94][_0x5f5d81(0x209)](_0x5e12e2=>_0x5e12e2[_0x5f5d81(0x1f5)](/^npm:/,''))[_0x5f5d81(0x209)](_0xca079c=>{const _0x329d16=_0x5f5d81;if(_0xca079c[_0x329d16(0x31d)+'th']('@')){const _0x536468=_0xca079c[_0x329d16(0x1de)]('@');return _0x536468[_0x329d16(0x1c3)]>=0x3?'@'+_0x536468[0x1]:_0xca079c;}return _0xca079c[_0x329d16(0x1de)]('@')[0x0];})[_0x5f5d81(0x250)](Boolean)),_0x5a3910=new Set();for(const _0x228e27 of _0x70f23b[_0x5f5d81(0x19b)][_0x5f5d81(0x1a2)+_0x5f5d81(0x331)+_0x5f5d81(0x181)]){const _0x3e1a26=await getPackageMetadata(_0x228e27);if(_0x3e1a26[_0x5f5d81(0x18c)])_0x5a3910[_0x5f5d81(0x324)](_0x3e1a26[_0x5f5d81(0x18c)]);}const _0x1da548=Array['isArray'](_0xd40677[_0x5f5d81(0x28a)])?_0xd40677['plugins']:[];_0xd40677[_0x5f5d81(0x188)+'ecs']=[..._0x70f23b[_0x5f5d81(0x19b)][_0x5f5d81(0x188)+'ecs'],..._0x70f23b[_0x5f5d81(0x19b)]['resolved'+_0x5f5d81(0x331)+'ginPaths'][_0x5f5d81(0x209)](_0x59c90f=>'local:'+_0x59c90f)],_0xd40677[_0x5f5d81(0x28a)]=_0x1da548[_0x5f5d81(0x250)](_0x25e44a=>{const _0x487ae8=_0x5f5d81;if(!_0x25e44a||typeof _0x25e44a!==_0x487ae8(0x1f2))return![];if(_0x25e44a[_0x487ae8(0x172)]==='local')return _0x5a3910[_0x487ae8(0x2dd)](_0x25e44a[_0x487ae8(0x18c)]);if(_0x25e44a['source']===_0x487ae8(0x307))return _0xed6d94[_0x487ae8(0x2dd)](_0x25e44a[_0x487ae8(0x175)])||_0xed6d94[_0x487ae8(0x2dd)](_0x25e44a[_0x487ae8(0x1a2)+_0x487ae8(0x276)])||_0x2102c5[_0x487ae8(0x2dd)](_0x25e44a[_0x487ae8(0x1a2)+_0x487ae8(0x18d)]);return![];});const _0x594e17=new Set(_0xd40677['plugins'][_0x5f5d81(0x209)](_0x219bb9=>_0x219bb9[_0x5f5d81(0x18c)]));for(const _0x4e3f69 of _0x1da548){if(!_0x4e3f69['pluginId']||_0x594e17[_0x5f5d81(0x2dd)](_0x4e3f69[_0x5f5d81(0x18c)]))continue;const _0x123dbe=typeof _0x4e3f69['installP'+_0x5f5d81(0x1a5)]===_0x5f5d81(0x1ac)&&_0x4e3f69[_0x5f5d81(0x1a6)+_0x5f5d81(0x1a5)][_0x5f5d81(0x23c)]()?resolve(_0x5ef734,_0x4e3f69[_0x5f5d81(0x1a6)+_0x5f5d81(0x1a5)]):join(_0x217a25,_0x4e3f69[_0x5f5d81(0x18c)]),_0x45c0b0=relative(_0x217a25,_0x123dbe);if(_0x45c0b0[_0x5f5d81(0x31d)+'th']('..')||_0x45c0b0==='')continue;await rm(_0x123dbe,{'recursive':!![],'force':!![]});}}async function collectCapabilityEntries(_0x3d6dc6,_0x2f8a10){const _0x46b503=_0x30af49,_0x2b4861=new Map();for(const _0xa829d7 of _0x3d6dc6){let _0x541137;try{_0x541137=await stat(_0xa829d7);}catch{throw new Error(_0x2f8a10+(_0x46b503(0x24f)+_0x46b503(0x16c)+'und:\x20')+_0xa829d7);}if(!_0x541137[_0x46b503(0x2ed)+_0x46b503(0x1d9)]())throw new Error(_0x2f8a10+(_0x46b503(0x23e)+_0x46b503(0x176)+_0x46b503(0x297)+_0x46b503(0x243))+_0xa829d7);const _0x45bdf5={'name':basename(_0xa829d7),'path':_0xa829d7},_0x1a8778=_0x2b4861[_0x46b503(0x27c)](_0x45bdf5[_0x46b503(0x187)]);if(_0x1a8778)throw new Error(_0x46b503(0x1c8)+'e\x20'+_0x2f8a10+'\x20entry\x20\x22'+_0x45bdf5[_0x46b503(0x187)]+_0x46b503(0x2a1)+_0x1a8778[_0x46b503(0x204)]+_0x46b503(0x2a8)+_0x45bdf5[_0x46b503(0x204)]);_0x2b4861[_0x46b503(0x1ea)](_0x45bdf5[_0x46b503(0x187)],_0x45bdf5);}return[..._0x2b4861['values']()];}async function syncProductCapabilityDirs(_0x9ca9d0,_0x1082dc,_0x511fb8){const _0x174eb6=_0x30af49,_0x4c59f3=await collectCapabilityEntries(_0x9ca9d0,_0x511fb8);await rm(_0x1082dc,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96}),await mkdir(_0x1082dc,{'recursive':!![]});for(const _0x5efb3d of _0x4c59f3){await cp(_0x5efb3d[_0x174eb6(0x204)],join(_0x1082dc,_0x5efb3d[_0x174eb6(0x187)]),{'recursive':!![]});}return _0x4c59f3[_0x174eb6(0x1c3)];}export const __test__={'collectCapabilityEntries':collectCapabilityEntries,'syncProductCapabilityDirs':syncProductCapabilityDirs};async function syncProductAgents(_0x2a82cb,_0x2ac77b,_0x3b1610){const _0xc7716f=_0x30af49,_0x249bd6=join(_0x2ac77b,_0xc7716f(0x19b),_0xc7716f(0x2d3)),_0x5bd863=await syncProductCapabilityDirs(_0x2a82cb['openclaw'][_0xc7716f(0x1a2)+_0xc7716f(0x21c)+'ntPaths'],_0x249bd6,_0xc7716f(0x1b2));_0x3b1610['agents']={'source':_0xc7716f(0x139),'installPath':toRuntimeRelative(_0x2ac77b,_0x249bd6),'localPaths':_0x2a82cb[_0xc7716f(0x19b)][_0xc7716f(0x1a2)+'LocalAge'+_0xc7716f(0x255)],'entryCount':_0x5bd863};}async function syncProductSkills(_0xef6ee8,_0x5dfb7d,_0x395143){const _0x286361=_0x30af49,_0x5c7491=join(_0x5dfb7d,_0x286361(0x19b),'skills'),_0xa786b2=await syncProductCapabilityDirs(_0xef6ee8['openclaw'][_0x286361(0x1a2)+_0x286361(0x320)+'llPaths'],_0x5c7491,_0x286361(0x25f));_0x395143[_0x286361(0x24b)]={'source':_0x286361(0x139),'installPath':toRuntimeRelative(_0x5dfb7d,_0x5c7491),'localPaths':_0xef6ee8[_0x286361(0x19b)]['resolved'+'LocalSki'+_0x286361(0x300)],'entryCount':_0xa786b2};}
|
|
1
|
+
const _0x3d918c=_0x1d92;(function(_0x1ac0b9,_0x4fb2e9){const _0x513519=_0x1d92,_0x9c2d43=_0x1ac0b9();while(!![]){try{const _0x508069=-parseInt(_0x513519(0x11b))/0x1+-parseInt(_0x513519(0x2a0))/0x2*(-parseInt(_0x513519(0x26d))/0x3)+-parseInt(_0x513519(0x1d6))/0x4*(-parseInt(_0x513519(0x126))/0x5)+parseInt(_0x513519(0x2b2))/0x6+-parseInt(_0x513519(0x1b3))/0x7+parseInt(_0x513519(0x200))/0x8*(-parseInt(_0x513519(0x299))/0x9)+parseInt(_0x513519(0x1ec))/0xa;if(_0x508069===_0x4fb2e9)break;else _0x9c2d43['push'](_0x9c2d43['shift']());}catch(_0x26a9f0){_0x9c2d43['push'](_0x9c2d43['shift']());}}}(_0x4fd9,0xbd75f));import{existsSync}from'node:fs';function _0x1d92(_0xe049b7,_0x544037){_0xe049b7=_0xe049b7-0x95;const _0x4fd9ec=_0x4fd9();let _0x1d92b8=_0x4fd9ec[_0xe049b7];return _0x1d92b8;}import{createWriteStream}from'node:fs';import{chmod,cp,mkdir,readFile,readdir,rename,rm,stat,symlink,writeFile}from'node:fs/promises';import{basename,delimiter,dirname,join,extname,parse,relative,resolve}from'node:path';import{fileURLToPath,pathToFileURL}from'node:url';import{spawn}from'node:child_process';import{get}from'node:https';import{pipeline}from'node:stream/promises';import{getConfigPaths}from'@wujie-shell/config';import{copyDirFresh,getPackageMetadata,readJson,readPluginManifest,toRuntimeRelative,writeJson}from'../common/utils.mjs';import{createRuntimeLogger,summarizeRuntimeManifest,summarizeShellConfig}from'../common/runtime-logger.mjs';import{hasConfiguredKdocsSkill,installKdocsCliBinary}from'../connectors/kdocs-cli.mjs';import{installRuntimeLarkCliPackage,resolveRuntimeLarkCliCommand}from'../connectors/lark-cli.mjs';import{patchMixedToolContentFromSource}from'./patch-chat-history-mixed-tool-content.mjs';import{patchChannelPluginRuntimeFromSource}from'./patch-channel-plugin-runtime.mjs';import{patchProviderRequestIdHeaderFromSource}from'./patch-provider-request-id-header.mjs';import{patchSessionStoreLoadFromSource,patchSessionStoreWriteFromSource}from'./patch-session-store-sqlite.mjs';import{patchQQBotOutboundFallbackFromSource,patchQQBotOutboundSessionRouteFromSource}from'./patch-qqbot-outbound-session-route.mjs';import{patchWeixinOutboundFallbackFromSource,patchWeixinOutboundSessionRouteFromSource}from'./patch-weixin-outbound-session-route.mjs';import{patchRequestIdTitleRuntimeFromSource}from'./patch-request-id-title-runtime.mjs';const RUNTIME_DIR=_0x3d918c(0x2ee)+_0x3d918c(0xef),MANIFEST_NAME=_0x3d918c(0x27c)+_0x3d918c(0x209)+_0x3d918c(0xbf),NPM_INSTALL_TIMEOUT_MS=0xf*0x3c*0x3e8;export function resolveRuntimeRoot(_0x4be870){if(process.env.WUJIE_SHELL_RUNTIME_ROOT)return resolve(process.env.WUJIE_SHELL_RUNTIME_ROOT);return resolve(_0x4be870,RUNTIME_DIR);}export function resolveManifestPath(_0x576ce1){return join(_0x576ce1,MANIFEST_NAME);}async function loadProductRuntime(_0x3354f4,_0x70e727){const _0x3bf8a9=_0x3d918c,_0x317b82=[join(_0x3354f4,_0x3bf8a9(0x181)+_0x3bf8a9(0x25d),_0x3bf8a9(0x18d)+'s'),join(_0x70e727,'shell-ru'+_0x3bf8a9(0x25d),'index.mj'+'s')];for(const _0x379097 of _0x317b82){if(!existsSync(_0x379097))continue;return await import(pathToFileURL(_0x379097)[_0x3bf8a9(0x178)]+_0x3bf8a9(0x19c)+Date['now']());}return{};}export async function prepareRuntime(_0x172163,{syncOnly:syncOnly=![],pruneForPackaging:pruneForPackaging=![]}={}){const _0x4062b0=_0x3d918c,_0x2ddd94=resolveRuntimeRoot(_0x172163[_0x4062b0(0x149)+_0x4062b0(0x302)]),_0x16703e=createRuntimeLogger(getConfigPaths(_0x172163),'runtime'),_0x5f04e2=Date[_0x4062b0(0x242)]();_0x16703e?.[_0x4062b0(0x143)+'t']?.('prepare\x20'+'runtime\x20'+'started',{'syncOnly':syncOnly,'runtimeRoot':_0x2ddd94,'shellConfig':summarizeShellConfig(_0x172163)});try{const _0x24ecbd=await ensureRuntimeBase(_0x172163,_0x2ddd94,{'runtimeLogger':_0x16703e,'syncOnly':syncOnly});_0x16703e?.[_0x4062b0(0x143)+'t']?.('runtime\x20'+'manifest'+_0x4062b0(0x2c6),{'manifestPath':resolveManifestPath(_0x2ddd94),'manifest':summarizeRuntimeManifest(_0x24ecbd)}),validateRuntimeNodeVersion(_0x24ecbd,_0x172163),_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x1eb)+_0x4062b0(0x10d)+'sion\x20val'+_0x4062b0(0x2fc),{'nodeVersion':_0x24ecbd[_0x4062b0(0x232)+_0x4062b0(0x156)]});if(syncOnly)validateRuntimeOpenClawVersion(_0x24ecbd,_0x172163),_0x16703e?.[_0x4062b0(0x143)+'t']?.('runtime\x20'+'openclaw'+_0x4062b0(0x19a)+_0x4062b0(0x227)+'ed',{'openclawVersion':_0x24ecbd[_0x4062b0(0x21d)+'Version']});else{if(_0x24ecbd['openclaw'+_0x4062b0(0x323)]!==_0x172163['openclaw'][_0x4062b0(0x21d)+'Version']){const _0x25b85b=await loadRuntimeInfo(_0x172163[_0x4062b0(0x149)+_0x4062b0(0x302)]);_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x21d)+_0x4062b0(0x2f2)+_0x4062b0(0xa0)+'\x20started',{'fromVersion':_0x24ecbd[_0x4062b0(0x21d)+'Version']||_0x4062b0(0xa5),'toVersion':_0x172163['openclaw'][_0x4062b0(0x21d)+_0x4062b0(0x323)]}),await installOpenClawPackage(_0x25b85b,_0x172163[_0x4062b0(0x21d)][_0x4062b0(0x21d)+_0x4062b0(0x323)]),_0x24ecbd[_0x4062b0(0x21d)+_0x4062b0(0x323)]=_0x172163[_0x4062b0(0x21d)]['openclaw'+_0x4062b0(0x323)],_0x16703e?.['importan'+'t']?.(_0x4062b0(0x21d)+_0x4062b0(0x2f2)+_0x4062b0(0xa0)+'\x20complet'+'ed',{'openclawVersion':_0x24ecbd[_0x4062b0(0x21d)+_0x4062b0(0x323)]});}}_0x24ecbd[_0x4062b0(0x318)+'dAt']=new Date()[_0x4062b0(0xb8)+'ing'](),_0x24ecbd[_0x4062b0(0x232)+_0x4062b0(0x156)]=_0x172163[_0x4062b0(0x21d)][_0x4062b0(0x232)+_0x4062b0(0x156)],_0x24ecbd[_0x4062b0(0x1c5)]={'appId':_0x172163[_0x4062b0(0x17b)],'productName':_0x172163['productN'+_0x4062b0(0x257)],'dataDirName':_0x172163[_0x4062b0(0xb7)+_0x4062b0(0x257)]},await patchChatHistoryMixedToolContentBug(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),await patchProviderRequestIdHeader(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),await patchChannelPluginRuntimeBug(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),await patchWeixinOutboundFallbackRuntime(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),await patchQQBotOutboundFallbackRuntime(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e});const _0x40b745=await loadProductRuntime(_0x172163['projectR'+'oot'],_0x2ddd94);if(typeof _0x40b745[_0x4062b0(0xd1)+_0x4062b0(0x1b5)+_0x4062b0(0x25d)]===_0x4062b0(0x202)){const _0x5e9528=createRuntimeInfoFromManifest(_0x2ddd94,_0x24ecbd);await _0x40b745[_0x4062b0(0xd1)+'roductRu'+_0x4062b0(0x25d)]({'shellConfig':_0x172163,'runtime':_0x5e9528,'runtimeLogger':_0x16703e,'syncOnly':syncOnly}),_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x99)+_0x4062b0(0x1eb)+_0x4062b0(0x1a9)+'nced');}await patchSessionStoreSqliteRuntime(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),await patchRequestIdTitleRuntime(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e});!syncOnly&&(await installRuntimeLarkCliPackage(createRuntimeInfoFromManifest(_0x2ddd94,_0x24ecbd),{'runtimeLogger':_0x16703e,'createRuntimeEnv':createRuntimeEnv}),_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x11a)+_0x4062b0(0x1ab)+'\x20package'+_0x4062b0(0x141)),await hasConfiguredKdocsSkill(_0x172163)?(await installKdocsCliBinary(_0x172163,createRuntimeInfoFromManifest(_0x2ddd94,_0x24ecbd),{'runtimeLogger':_0x16703e,'syncOnly':syncOnly}),_0x16703e?.['importan'+'t']?.('connecto'+_0x4062b0(0x142)+'e\x20tools\x20'+_0x4062b0(0x15a))):_0x16703e?.[_0x4062b0(0xc9)]('connecto'+_0x4062b0(0x142)+_0x4062b0(0x25e)+'skipped;'+_0x4062b0(0x291)+_0x4062b0(0x1b8)+_0x4062b0(0x316)+'red'));const _0x1254aa=Array['isArray'](_0x24ecbd[_0x4062b0(0x218)])?_0x24ecbd['plugins']['length']:0x0;return await syncManifestPluginScope(_0x172163,_0x2ddd94,_0x24ecbd),_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x1eb)+_0x4062b0(0x2ea)+_0x4062b0(0x16f)+_0x4062b0(0xff),{'beforePluginCount':_0x1254aa,'afterPluginCount':Array['isArray'](_0x24ecbd['plugins'])?_0x24ecbd[_0x4062b0(0x218)][_0x4062b0(0xde)]:0x0,'pluginSpecCount':Array['isArray'](_0x24ecbd['pluginSp'+_0x4062b0(0xbb)])?_0x24ecbd[_0x4062b0(0x23e)+_0x4062b0(0xbb)]['length']:0x0}),await syncConfiguredNpmPlugins(_0x172163,_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e,'syncOnly':syncOnly}),_0x16703e?.['importan'+'t']?.(_0x4062b0(0x24e)+_0x4062b0(0x324)+_0x4062b0(0x1de)+_0x4062b0(0x146),{'pluginSpecCount':_0x172163[_0x4062b0(0x21d)][_0x4062b0(0x23e)+_0x4062b0(0xbb)][_0x4062b0(0xde)],'pluginCount':Array['isArray'](_0x24ecbd[_0x4062b0(0x218)])?_0x24ecbd['plugins'][_0x4062b0(0xde)]:0x0}),await patchWeixinOutboundSessionRoute(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),await patchQQBotOutboundSessionRoute(_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),await syncProductPlugins(_0x172163,_0x2ddd94,_0x24ecbd,{'runtimeLogger':_0x16703e}),_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x99)+_0x4062b0(0x123)+'synced',{'localPluginCount':_0x172163['openclaw'][_0x4062b0(0x214)+_0x4062b0(0x20f)+'ginPaths'][_0x4062b0(0xde)],'pluginCount':Array[_0x4062b0(0x233)](_0x24ecbd[_0x4062b0(0x218)])?_0x24ecbd[_0x4062b0(0x218)][_0x4062b0(0xde)]:0x0}),await syncProductAgents(_0x172163,_0x2ddd94,_0x24ecbd),_0x16703e?.['importan'+'t']?.('product\x20'+_0x4062b0(0x2c4)+'ynced',{'sources':_0x172163['openclaw']['resolved'+_0x4062b0(0x139)+_0x4062b0(0x1db)],'entryCount':_0x24ecbd[_0x4062b0(0x337)]?.[_0x4062b0(0xe2)+'nt'],'installPath':_0x24ecbd[_0x4062b0(0x337)]?.[_0x4062b0(0x100)+_0x4062b0(0x2c9)]}),await syncProductSkills(_0x172163,_0x2ddd94,_0x24ecbd),_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x99)+_0x4062b0(0x117)+'ynced',{'sources':_0x172163[_0x4062b0(0x21d)][_0x4062b0(0x214)+_0x4062b0(0x2bf)+'llPaths'],'entryCount':_0x24ecbd['skills']?.[_0x4062b0(0xe2)+'nt'],'installPath':_0x24ecbd['skills']?.[_0x4062b0(0x100)+_0x4062b0(0x2c9)]}),await syncRuntimeWrapper(_0x172163,_0x2ddd94,_0x24ecbd),_0x16703e?.[_0x4062b0(0x143)+'t']?.(_0x4062b0(0x1eb)+'wrapper\x20'+_0x4062b0(0x15a),{'wujieclawBin':_0x24ecbd[_0x4062b0(0x1f5)+'wBin']}),await prunePackagedRuntimeCaches(_0x2ddd94,_0x16703e),pruneForPackaging&&await prunePackagedRuntimePayload(_0x2ddd94,_0x24ecbd,_0x16703e),await writeJson(resolveManifestPath(_0x2ddd94),_0x24ecbd),_0x16703e?.['importan'+'t']?.('runtime\x20'+_0x4062b0(0x209)+_0x4062b0(0x1d2),{'manifestPath':resolveManifestPath(_0x2ddd94),'manifest':summarizeRuntimeManifest(_0x24ecbd),'durationMs':Date[_0x4062b0(0x242)]()-_0x5f04e2}),await _0x16703e?.['flush'](),_0x24ecbd;}catch(_0x366dcd){_0x16703e?.[_0x4062b0(0x2aa)](_0x4062b0(0x189)+'runtime\x20'+_0x4062b0(0xd8),{'syncOnly':syncOnly,'runtimeRoot':_0x2ddd94,'durationMs':Date['now']()-_0x5f04e2,'error':_0x366dcd}),await _0x16703e?.['flush']();throw _0x366dcd;}}async function prunePackagedRuntimeCaches(_0xa00abc,_0x42c60b){const _0x2327c1=_0x3d918c,_0x59b877=[join(_0xa00abc,_0x2327c1(0x333)),join(_0xa00abc,_0x2327c1(0x1df),_0x2327c1(0x16e)+'e'),join(_0xa00abc,_0x2327c1(0x2e1)+'time-bac'+_0x2327c1(0x14a)),join(_0xa00abc,_0x2327c1(0x14c)+_0x2327c1(0x2cd)+'ackup')];for(const _0x2a3f14 of _0x59b877){if(!existsSync(_0x2a3f14))continue;await rm(_0x2a3f14,{'recursive':!![],'force':!![]}),_0x42c60b?.[_0x2327c1(0xc9)]('pruned\x20r'+'untime\x20c'+_0x2327c1(0x1b2)+_0x2327c1(0xe8)+_0x2327c1(0x1cd),{'cachePath':_0x2a3f14});}}async function prunePackagedRuntimePayload(_0x5ea7d1,_0x207093,_0xb5226e){const _0x4ed637=_0x3d918c,_0x4675c0=createRuntimeInfoFromManifest(_0x5ea7d1,_0x207093),_0x2f730b=[join(_0x5ea7d1,process[_0x4ed637(0x1a4)]==='win32'?_0x4ed637(0x225)+_0x4ed637(0x11f)+_0x4ed637(0x11c):_0x4ed637(0x198)+_0x4ed637(0x1ae)+'dules/np'+'m'),join(_0x4675c0[_0x4ed637(0x21d)+_0x4ed637(0x1a6)+'ir'],_0x4ed637(0x2e9)+_0x4ed637(0xb3))],_0xba01=join(_0x4675c0[_0x4ed637(0x21d)+_0x4ed637(0x1a6)+'ir'],_0x4ed637(0x315),'extensio'+'ns');if(existsSync(_0xba01))for(const _0x1a5e12 of await readdir(_0xba01,{'withFileTypes':!![]})){_0x1a5e12['isDirect'+_0x4ed637(0x9a)]()&&_0x2f730b[_0x4ed637(0x2e8)](join(_0xba01,_0x1a5e12[_0x4ed637(0x22d)],_0x4ed637(0x2e9)+_0x4ed637(0xb3)));}const _0x45768e={'files':0x0,'directories':0x0,'bytes':0x0};for(const _0x485e56 of _0x2f730b){await pruneRuntimeDependencyTree(_0x485e56,_0x45768e);}await pruneOpenClawDocs(_0x4675c0['openclaw'+_0x4ed637(0x1a6)+'ir'],_0x45768e),_0xb5226e?.[_0x4ed637(0xc9)](_0x4ed637(0x1bd)+_0x4ed637(0xc3)+_0x4ed637(0xcf)+_0x4ed637(0x12b)+_0x4ed637(0x24d),_0x45768e);}async function pruneOpenClawDocs(_0x81019e,_0x534fb0){const _0x5ce35b=_0x3d918c,_0x42e1ca=join(_0x81019e,_0x5ce35b(0x183));if(!existsSync(_0x42e1ca))return;for(const _0x6193d1 of await readdir(_0x42e1ca,{'withFileTypes':!![]})){if(_0x6193d1[_0x5ce35b(0x22d)]===_0x5ce35b(0x1d9)+'e')continue;await removePrunedPath(join(_0x42e1ca,_0x6193d1['name']),_0x534fb0);}}async function pruneRuntimeDependencyTree(_0x2b984d,_0x476492){const _0x150da1=_0x3d918c;if(!existsSync(_0x2b984d))return;for(const _0x484071 of await readdir(_0x2b984d,{'withFileTypes':!![]})){const _0xdc7a17=join(_0x2b984d,_0x484071['name']);if(_0x484071[_0x150da1(0x268)+_0x150da1(0x9a)]()){if(shouldPruneRuntimeDirectory(_0x2b984d,_0x484071[_0x150da1(0x22d)])){await removePrunedPath(_0xdc7a17,_0x476492);continue;}await pruneRuntimeDependencyTree(_0xdc7a17,_0x476492);continue;}_0x484071[_0x150da1(0x2b7)]()&&shouldPruneRuntimeFile(_0x484071[_0x150da1(0x22d)])&&await removePrunedPath(_0xdc7a17,_0x476492);}}function shouldPruneRuntimeDirectory(_0x3db639,_0x89f8e2){const _0x39d47d=_0x3d918c;if(_0x89f8e2===_0x39d47d(0x2a5))return!![];if(new Set([_0x39d47d(0x17c),_0x39d47d(0x183),'man'])[_0x39d47d(0x2b5)](_0x89f8e2))return existsSync(join(_0x3db639,_0x39d47d(0x1ee)+_0x39d47d(0x155)));return new Set([_0x39d47d(0x325)+'_',_0x39d47d(0x109),_0x39d47d(0x1e2),_0x39d47d(0x17a),_0x39d47d(0x166)])[_0x39d47d(0x2b5)](_0x89f8e2);}function shouldPruneRuntimeFile(_0x2a213d){const _0x7a199d=_0x3d918c;if(_0x2a213d==='package-'+'lock.jso'+'n'||_0x2a213d[_0x7a199d(0xac)](_0x7a199d(0x1bc)))return!![];return new Set([_0x7a199d(0x1fe),_0x7a199d(0x1b6),_0x7a199d(0x18f)+'n'])[_0x7a199d(0x2b5)](extname(_0x2a213d)[_0x7a199d(0x2ae)+'ase']());}async function removePrunedPath(_0x1fccb4,_0x8fd6ec){const _0x172e85=_0x3d918c;if(!existsSync(_0x1fccb4))return;const _0x21be5a=await getPathSize(_0x1fccb4),_0x3fbc39=await stat(_0x1fccb4);await rm(_0x1fccb4,{'recursive':!![],'force':!![]}),_0x8fd6ec[_0x172e85(0x2d6)]+=_0x21be5a;if(_0x3fbc39[_0x172e85(0x268)+_0x172e85(0x9a)]())_0x8fd6ec[_0x172e85(0x245)+_0x172e85(0x199)]+=0x1;else _0x8fd6ec[_0x172e85(0xab)]+=0x1;}async function getPathSize(_0x3636d4){const _0x5da755=_0x3d918c,_0x5a6544=await stat(_0x3636d4);if(!_0x5a6544[_0x5da755(0x268)+_0x5da755(0x9a)]())return _0x5a6544['size'];let _0x1a754a=0x0;for(const _0x167e34 of await readdir(_0x3636d4,{'withFileTypes':!![]})){_0x1a754a+=await getPathSize(join(_0x3636d4,_0x167e34['name']));}return _0x1a754a;}async function syncRuntimeWrapper(_0x206980,_0x281b7f,_0x941c6){const _0x1cb30b=_0x3d918c,_0x4d4bd1=_0x206980[_0x1cb30b(0x21d)]?.[_0x1cb30b(0x30d)+'leName']??_0x1cb30b(0x129)+'json',_0x5bb607=join(_0x281b7f,_0x1cb30b(0x10b),_0x1cb30b(0x1f5)+'w'),_0x5e507d=join(_0x281b7f,_0x1cb30b(0x10b),_0x1cb30b(0x1f5)+_0x1cb30b(0xf6)),_0x23cac3=normalizeRuntimeRelativePath(relative(dirname(_0x5bb607),resolve(_0x281b7f,_0x941c6[_0x1cb30b(0x334)+_0x1cb30b(0x219)]))),_0x935335=normalizeRuntimeRelativePath(relative(dirname(_0x5bb607),resolve(_0x281b7f,_0x941c6[_0x1cb30b(0x21d)+_0x1cb30b(0x2d5)]))),_0x1585fd=_0x1cb30b(0x1ff)+_0x206980[_0x1cb30b(0xb7)+_0x1cb30b(0x257)],_0xbcc12e=_0x1cb30b(0x300)+_0x1cb30b(0x30b)+_0x206980[_0x1cb30b(0xb7)+_0x1cb30b(0x257)];await mkdir(dirname(_0x5bb607),{'recursive':!![]});const _0x5e8d52=fileURLToPath(new URL(_0x1cb30b(0x31e)+'sets/wuj'+_0x1cb30b(0x2d9)+_0x1cb30b(0x293),import.meta.url)),_0x21cd43=join(_0x281b7f,_0x1cb30b(0x10b),'wujie-lo'+_0x1cb30b(0x31d));await cp(_0x5e8d52,_0x21cd43),await writeFile(_0x5bb607,[_0x1cb30b(0x280)+'h',_0x1cb30b(0xf7)+_0x1cb30b(0x102)+_0x1cb30b(0x9e)+_0x1cb30b(0x2a2)+'_HOME:-'+_0x1585fd+'}\x22',_0x1cb30b(0xf7)+_0x1cb30b(0x102)+_0x1cb30b(0x23a)+_0x1cb30b(0x10c)+_0x1cb30b(0x1da)+_0x1cb30b(0x2b4)+'-'+_0x1585fd+'}\x22',_0x1cb30b(0xf7)+_0x1cb30b(0x102)+'CONFIG_F'+_0x1cb30b(0x284)+_0x1cb30b(0x1c3)+'CLAW_CON'+_0x1cb30b(0x217)+_0x1cb30b(0x1b7)+_0x4d4bd1+'}\x22',_0x1cb30b(0xf7)+'PENCLAW_'+_0x1cb30b(0x235)+'ATH=\x22${O'+_0x1cb30b(0x102)+_0x1cb30b(0x235)+_0x1cb30b(0x221)+_0x1585fd+'/'+_0x4d4bd1+'}\x22',_0x1cb30b(0x231)+'IR=$(CDP'+'ATH=\x20cd\x20'+_0x1cb30b(0x224)+'rname\x20--'+'\x20\x22$0\x22)\x22\x20'+_0x1cb30b(0xe7),_0x1cb30b(0x122)+_0x1cb30b(0x1bb)+'\x20-z\x20\x22$WU'+_0x1cb30b(0x1dc)+_0x1cb30b(0xd3)+_0x1cb30b(0x114),'\x20\x20\x22$SCRI'+_0x1cb30b(0x29f)+_0x23cac3+('\x22\x20\x22$SCRI'+'PT_DIR/w'+_0x1cb30b(0xd0)+_0x1cb30b(0x2d0)+_0x1cb30b(0x98)+_0x1cb30b(0x230)+'ue'),'fi',_0x1cb30b(0x29a)+_0x1cb30b(0x310)+'R/'+_0x23cac3+('\x22\x20\x22$SCRI'+_0x1cb30b(0x29f))+_0x935335+_0x1cb30b(0xcd),''][_0x1cb30b(0x13f)]('\x0a'),_0x1cb30b(0x1ce)),await chmod(_0x5bb607,0x1ed),await writeFile(_0x5e507d,[_0x1cb30b(0x1b0)+'f',_0x1cb30b(0x23c)+_0x1cb30b(0x27b)+_0x1cb30b(0x2c2)+'\x20set\x20\x22OP'+_0x1cb30b(0x22f)+_0x1cb30b(0x2e6)+_0xbcc12e+'\x22',_0x1cb30b(0x23c)+_0x1cb30b(0x1da)+'ATE_DIR%'+_0x1cb30b(0x2ed)+_0x1cb30b(0x22e)+_0x1cb30b(0x105)+_0x1cb30b(0x2dd)+_0xbcc12e+'\x22','if\x20\x22%OPE'+_0x1cb30b(0x274)+'NFIG_FIL'+'E_NAME%\x22'+_0x1cb30b(0xf5)+_0x1cb30b(0x159)+_0x1cb30b(0x1a1)+'G_FILE_N'+'AME='+_0x4d4bd1+'\x22','if\x20\x22%OPE'+'NCLAW_CO'+'NFIG_PAT'+'H%\x22==\x22\x22\x20'+_0x1cb30b(0x190)+_0x1cb30b(0x274)+_0x1cb30b(0x212)+'H='+_0xbcc12e+'\x5c'+_0x4d4bd1+'\x22',_0x1cb30b(0x13c)+_0x1cb30b(0x1e7)+_0x1cb30b(0x16d),'\x22%SCRIPT'+_0x1cb30b(0x17e)+toWindowsPath(_0x23cac3)+(_0x1cb30b(0x1cf)+_0x1cb30b(0x2eb))+toWindowsPath(_0x935335)+_0x1cb30b(0x2b8),''][_0x1cb30b(0x13f)]('\x0d\x0a'),'utf8'),_0x941c6['wujiecla'+_0x1cb30b(0x206)]=toRuntimeRelative(_0x281b7f,process[_0x1cb30b(0x1a4)]==='win32'?_0x5e507d:_0x5bb607);}async function patchChatHistoryMixedToolContentBug(_0xf7d1,_0x3d7442,_0x108eac={}){const _0x597ce8=_0x3d918c,_0x3287da=resolve(_0xf7d1,_0x3d7442['openclaw'+_0x597ce8(0x1a6)+'ir']),_0xa3c9b8=join(_0x3287da,'dist');let _0x2f56b4=[];try{_0x2f56b4=await readdir(_0xa3c9b8,{'withFileTypes':!![]});}catch{_0x108eac[_0x597ce8(0x285)+'ogger']?.[_0x597ce8(0x1b4)]?.(_0x597ce8(0x135)+_0x597ce8(0xa9)+_0x597ce8(0x1f0)+'patch\x20sk'+_0x597ce8(0xc6)+'ist\x20not\x20'+'found',{'distDir':_0xa3c9b8,'openclawVersion':_0x3d7442['openclaw'+_0x597ce8(0x323)]});return;}const _0x2c1e36=_0x2f56b4[_0x597ce8(0x254)](_0x2bc797=>_0x2bc797[_0x597ce8(0x2b7)]()&&(_0x2bc797[_0x597ce8(0x22d)][_0x597ce8(0x1c6)+'th'](_0x597ce8(0x2f4)+_0x597ce8(0x12a)+'jection-')||_0x2bc797[_0x597ce8(0x22d)][_0x597ce8(0x1c6)+'th']('session-'+_0x597ce8(0xe3)+_0x597ce8(0x28b)))&&_0x2bc797[_0x597ce8(0x22d)]['endsWith'](_0x597ce8(0x153)))['map'](_0x34fd08=>join(_0xa3c9b8,_0x34fd08[_0x597ce8(0x22d)]));if(_0x2c1e36['length']===0x0){_0x108eac[_0x597ce8(0x285)+'ogger']?.[_0x597ce8(0x1b4)]?.(_0x597ce8(0x135)+_0x597ce8(0xa9)+'ed-tool\x20'+'patch\x20sk'+_0x597ce8(0x169)+_0x597ce8(0x15e)+_0x597ce8(0x104),{'openclawVersion':_0x3d7442[_0x597ce8(0x21d)+_0x597ce8(0x323)]});return;}for(const _0x235d20 of _0x2c1e36){const _0x2b5a41=await readFile(_0x235d20,_0x597ce8(0x1ce)),_0x4f6f9a=patchMixedToolContentFromSource(_0x2b5a41);if(!_0x4f6f9a[_0x597ce8(0x32c)]){if(_0x4f6f9a['reason']==='already-'+_0x597ce8(0x32c)){_0x108eac[_0x597ce8(0x285)+_0x597ce8(0x10a)]?.[_0x597ce8(0xc9)]?.(_0x597ce8(0x135)+_0x597ce8(0xa9)+_0x597ce8(0x1f0)+'patch\x20al'+_0x597ce8(0x16a)+_0x597ce8(0x255),{'openclawVersion':_0x3d7442[_0x597ce8(0x21d)+_0x597ce8(0x323)],'filePath':_0x235d20});return;}continue;}await writeFile(_0x235d20,_0x4f6f9a['source'],_0x597ce8(0x1ce)),_0x108eac[_0x597ce8(0x285)+'ogger']?.['info']?.('chat\x20his'+'tory\x20mix'+_0x597ce8(0x1f0)+'patch\x20ap'+_0x597ce8(0x255),{'openclawVersion':_0x3d7442[_0x597ce8(0x21d)+_0x597ce8(0x323)],'filePath':_0x235d20,'note':_0x597ce8(0x30a)+_0x597ce8(0x111)+_0x597ce8(0x2ba)+'patch\x20fo'+_0x597ce8(0x180)+'aw\x202026.'+_0x597ce8(0x32d)+_0x597ce8(0x2e7)+_0x597ce8(0x168)+_0x597ce8(0x1cb)+_0x597ce8(0x2de)+_0x597ce8(0x137)+_0x597ce8(0x1e0)+_0x597ce8(0x12e)+'re\x20upgra'+_0x597ce8(0x265)});return;}_0x108eac[_0x597ce8(0x285)+'ogger']?.[_0x597ce8(0x1b4)]?.(_0x597ce8(0x135)+_0x597ce8(0xa9)+_0x597ce8(0x1f0)+_0x597ce8(0x326)+'ipped;\x20f'+'unction\x20'+_0x597ce8(0x127)+'d',{'openclawVersion':_0x3d7442[_0x597ce8(0x21d)+_0x597ce8(0x323)]});}async function patchProviderRequestIdHeader(_0x79e1db,_0x40b11f,_0x448c08={}){const _0x304b2b=_0x3d918c,_0x171b9e=resolve(_0x79e1db,_0x40b11f['openclaw'+_0x304b2b(0x1a6)+'ir']),_0x42a2c6=join(_0x171b9e,_0x304b2b(0x315));let _0x1be71d=[];try{_0x1be71d=await readdir(_0x42a2c6,{'withFileTypes':!![]});}catch{_0x448c08['runtimeL'+'ogger']?.[_0x304b2b(0x1b4)]?.(_0x304b2b(0x260)+_0x304b2b(0x27f)+_0x304b2b(0x15c)+_0x304b2b(0x2ad)+'\x20skipped'+_0x304b2b(0x154)+_0x304b2b(0x241),{'distDir':_0x42a2c6,'openclawVersion':_0x40b11f[_0x304b2b(0x21d)+'Version']});return;}const _0x34e4e8=_0x1be71d[_0x304b2b(0x254)](_0x4bd7df=>_0x4bd7df[_0x304b2b(0x2b7)]()&&_0x4bd7df[_0x304b2b(0x22d)][_0x304b2b(0xac)]('.js'))[_0x304b2b(0x1f6)](_0x539324=>join(_0x42a2c6,_0x539324[_0x304b2b(0x22d)]));let _0x5a387c=0x0,_0xee9aa7=0x0;for(const _0x201497 of _0x34e4e8){const _0x463c41=await readFile(_0x201497,_0x304b2b(0x1ce)),_0x4a2e4a=patchProviderRequestIdHeaderFromSource(_0x463c41);if(_0x4a2e4a[_0x304b2b(0x32c)]){await writeFile(_0x201497,_0x4a2e4a[_0x304b2b(0x96)],_0x304b2b(0x1ce)),_0x5a387c+=0x1,_0x448c08[_0x304b2b(0x285)+_0x304b2b(0x10a)]?.['info']?.(_0x304b2b(0x260)+'\x20request'+_0x304b2b(0x15c)+_0x304b2b(0x2ad)+_0x304b2b(0x1d5),{'openclawVersion':_0x40b11f['openclaw'+'Version'],'filePath':_0x201497});continue;}if(_0x4a2e4a[_0x304b2b(0x2f3)]==='already-'+_0x304b2b(0x32c))_0xee9aa7+=0x1;}if(_0x5a387c>0x0){_0x448c08['runtimeL'+_0x304b2b(0x10a)]?.[_0x304b2b(0xc9)]?.('provider'+_0x304b2b(0x27f)+_0x304b2b(0x15c)+_0x304b2b(0x2ad)+_0x304b2b(0xa3),{'openclawVersion':_0x40b11f[_0x304b2b(0x21d)+_0x304b2b(0x323)],'patchedCount':_0x5a387c,'alreadyPatchedCount':_0xee9aa7});return;}if(_0xee9aa7>0x0){_0x448c08[_0x304b2b(0x285)+_0x304b2b(0x10a)]?.['info']?.(_0x304b2b(0x260)+_0x304b2b(0x27f)+_0x304b2b(0x15c)+_0x304b2b(0x2ad)+_0x304b2b(0x9d)+_0x304b2b(0x1d5),{'openclawVersion':_0x40b11f[_0x304b2b(0x21d)+_0x304b2b(0x323)],'alreadyPatchedCount':_0xee9aa7});return;}_0x448c08[_0x304b2b(0x285)+_0x304b2b(0x10a)]?.[_0x304b2b(0x1b4)]?.('provider'+_0x304b2b(0x27f)+_0x304b2b(0x15c)+_0x304b2b(0x2ad)+_0x304b2b(0xbe)+_0x304b2b(0x2a7)+_0x304b2b(0x20e)+_0x304b2b(0x335)+_0x304b2b(0xc7)+'nd',{'openclawVersion':_0x40b11f[_0x304b2b(0x21d)+_0x304b2b(0x323)]});}async function patchChannelPluginRuntimeBug(_0x4917b9,_0x110e6c,_0x480c92={}){const _0x1517e1=_0x3d918c,_0x3dd283=resolve(_0x4917b9,_0x110e6c[_0x1517e1(0x21d)+_0x1517e1(0x1a6)+'ir']),_0xb7cd2e=join(_0x3dd283,'dist');let _0x1e9a9e=[];try{_0x1e9a9e=await readdir(_0xb7cd2e,{'withFileTypes':!![]});}catch{_0x480c92[_0x1517e1(0x285)+_0x1517e1(0x10a)]?.[_0x1517e1(0x1b4)]?.(_0x1517e1(0x175)+'plugin\x20r'+_0x1517e1(0xc3)+'atch\x20ski'+'pped;\x20di'+'st\x20not\x20f'+'ound',{'distDir':_0xb7cd2e,'openclawVersion':_0x110e6c['openclaw'+_0x1517e1(0x323)]});return;}const _0x38e762=_0x1e9a9e[_0x1517e1(0x254)](_0x188c0a=>_0x188c0a[_0x1517e1(0x2b7)]()&&_0x188c0a[_0x1517e1(0x22d)][_0x1517e1(0x1c6)+'th'](_0x1517e1(0x9b))&&_0x188c0a[_0x1517e1(0x22d)][_0x1517e1(0xac)](_0x1517e1(0x153)))[_0x1517e1(0x1f6)](_0x5e1a32=>join(_0xb7cd2e,_0x5e1a32[_0x1517e1(0x22d)])),_0x1cc4ce=await resolveRuntimeChannelImportPath(_0xb7cd2e,_0x1e9a9e);if(_0x38e762[_0x1517e1(0xde)]===0x0){_0x480c92[_0x1517e1(0x285)+'ogger']?.['warn']?.('channel\x20'+_0x1517e1(0x2e2)+_0x1517e1(0xc3)+_0x1517e1(0x244)+'pped;\x20lo'+'ader\x20not'+_0x1517e1(0x18a),{'openclawVersion':_0x110e6c[_0x1517e1(0x21d)+_0x1517e1(0x323)]});return;}if(!_0x1cc4ce){_0x480c92['runtimeL'+_0x1517e1(0x10a)]?.['warn']?.(_0x1517e1(0x175)+_0x1517e1(0x2e2)+_0x1517e1(0xc3)+'atch\x20ski'+_0x1517e1(0x294)+_0x1517e1(0x243)+_0x1517e1(0x1a8)+_0x1517e1(0x278)+_0x1517e1(0x104),{'openclawVersion':_0x110e6c[_0x1517e1(0x21d)+'Version'],'distDir':_0xb7cd2e});return;}for(const _0x4780a9 of _0x38e762){const _0x3f46a3=await readFile(_0x4780a9,_0x1517e1(0x1ce)),_0x48139d=patchChannelPluginRuntimeFromSource(_0x3f46a3,{'runtimeChannelImportPath':_0x1cc4ce});if(!_0x48139d[_0x1517e1(0x32c)]){if(_0x48139d['reason']===_0x1517e1(0x2ac)+_0x1517e1(0x32c)){_0x480c92[_0x1517e1(0x285)+_0x1517e1(0x10a)]?.[_0x1517e1(0xc9)]?.(_0x1517e1(0x175)+_0x1517e1(0x2e2)+_0x1517e1(0xc3)+_0x1517e1(0x262)+_0x1517e1(0x1af)+_0x1517e1(0xe0),{'openclawVersion':_0x110e6c[_0x1517e1(0x21d)+'Version'],'filePath':_0x4780a9});return;}continue;}await writeFile(_0x4780a9,_0x48139d[_0x1517e1(0x96)],_0x1517e1(0x1ce)),_0x480c92['runtimeL'+_0x1517e1(0x10a)]?.[_0x1517e1(0xc9)]?.(_0x1517e1(0x175)+_0x1517e1(0x2e2)+_0x1517e1(0xc3)+_0x1517e1(0x187)+'lied',{'openclawVersion':_0x110e6c['openclaw'+'Version'],'filePath':_0x4780a9,'note':_0x1517e1(0x30a)+_0x1517e1(0x111)+_0x1517e1(0x2ba)+_0x1517e1(0x140)+_0x1517e1(0x180)+_0x1517e1(0x162)+_0x1517e1(0x15f)+_0x1517e1(0xcc)+_0x1517e1(0x136)+_0x1517e1(0x161)+_0x1517e1(0x32f)+_0x1517e1(0x249)+_0x1517e1(0x2c0)+'rs;\x20veri'+_0x1517e1(0x2bd)+_0x1517e1(0x226)+_0x1517e1(0x10e)+_0x1517e1(0x29e)+_0x1517e1(0x115)});return;}_0x480c92[_0x1517e1(0x285)+'ogger']?.[_0x1517e1(0x1b4)]?.(_0x1517e1(0x175)+_0x1517e1(0x2e2)+'untime\x20p'+'atch\x20ski'+_0x1517e1(0x294)+'ntime\x20re'+_0x1517e1(0x2c7)+_0x1517e1(0x241),{'openclawVersion':_0x110e6c[_0x1517e1(0x21d)+_0x1517e1(0x323)]});}async function patchSessionStoreSqliteRuntime(_0x3857c7,_0x2798ad,_0x7bc3f0={}){const _0x250785=_0x3d918c,_0x3a46b5=resolve(_0x3857c7,_0x2798ad[_0x250785(0x21d)+'WorkingD'+'ir']),_0x4e861b=join(_0x3a46b5,_0x250785(0x315)),_0x116cb5=_0x250785(0x30c)+_0x250785(0x2b9)+_0x250785(0xb2)+'ions/run'+_0x250785(0x194)+'dge.mjs',_0x1996bc=join(_0x3857c7,_0x250785(0x181)+_0x250785(0x25d),_0x250785(0x2f0),_0x250785(0x27c)+_0x250785(0xfb)+'js'),_0x563408=(await readdir(_0x4e861b,{'withFileTypes':!![]})[_0x250785(0x298)](()=>[]))[_0x250785(0x254)](_0x59c8d4=>_0x59c8d4[_0x250785(0x2b7)]()&&_0x59c8d4['name']['startsWi'+'th'](_0x250785(0x295)+_0x250785(0x22c))&&_0x59c8d4[_0x250785(0x22d)][_0x250785(0xac)](_0x250785(0x153)))[_0x250785(0x1f6)](_0x552700=>join(_0x4e861b,_0x552700[_0x250785(0x22d)])),_0x2b3ac8=(await readdir(_0x4e861b,{'withFileTypes':!![]})[_0x250785(0x298)](()=>[]))[_0x250785(0x254)](_0x14d2b5=>_0x14d2b5[_0x250785(0x2b7)]()&&_0x14d2b5[_0x250785(0x22d)][_0x250785(0x1c6)+'th'](_0x250785(0x103))&&!_0x14d2b5[_0x250785(0x22d)][_0x250785(0x1c6)+'th']('store-lo'+_0x250785(0x22c))&&_0x14d2b5[_0x250785(0x22d)][_0x250785(0xac)](_0x250785(0x153)))['map'](_0x486786=>join(_0x4e861b,_0x486786[_0x250785(0x22d)]));if(!existsSync(_0x1996bc)){_0x7bc3f0[_0x250785(0x285)+'ogger']?.[_0x250785(0xc9)]?.('session\x20'+'store\x20sq'+'lite\x20pat'+'ch\x20skipp'+_0x250785(0x172)+'ge\x20not\x20a'+'vailable',{'bridgePath':_0x1996bc,'openclawVersion':_0x2798ad[_0x250785(0x21d)+_0x250785(0x323)]});return;}for(const _0x2c3c30 of _0x563408){const _0x47c9bf=await readFile(_0x2c3c30,_0x250785(0x1ce)),_0x3d5aa0=patchSessionStoreLoadFromSource(_0x47c9bf,{'bridgeImportPath':_0x116cb5});if(!_0x3d5aa0['patched']){if(_0x3d5aa0[_0x250785(0x2f3)]==='already-'+_0x250785(0x32c)){_0x7bc3f0[_0x250785(0x285)+_0x250785(0x10a)]?.[_0x250785(0xc9)]?.(_0x250785(0x147)+'store\x20lo'+_0x250785(0x24c)+_0x250785(0x9d)+_0x250785(0x1d5),{'filePath':_0x2c3c30,'openclawVersion':_0x2798ad['openclaw'+'Version']});break;}continue;}await writeFile(_0x2c3c30,_0x3d5aa0[_0x250785(0x96)],_0x250785(0x1ce)),_0x7bc3f0[_0x250785(0x285)+'ogger']?.['info']?.(_0x250785(0x147)+_0x250785(0x321)+'ad\x20patch'+_0x250785(0x1d5),{'filePath':_0x2c3c30,'openclawVersion':_0x2798ad[_0x250785(0x21d)+_0x250785(0x323)]});break;}for(const _0x293c6b of _0x2b3ac8){const _0xbb6878=await readFile(_0x293c6b,_0x250785(0x1ce)),_0x502d42=patchSessionStoreWriteFromSource(_0xbb6878,{'bridgeImportPath':_0x116cb5});if(!_0x502d42[_0x250785(0x32c)]){if(_0x502d42[_0x250785(0x2f3)]===_0x250785(0x2ac)+'patched'){_0x7bc3f0[_0x250785(0x285)+_0x250785(0x10a)]?.[_0x250785(0xc9)]?.(_0x250785(0x147)+_0x250785(0x2d7)+_0x250785(0x1c9)+_0x250785(0x330)+_0x250785(0x272)+'d',{'filePath':_0x293c6b,'openclawVersion':_0x2798ad[_0x250785(0x21d)+_0x250785(0x323)]});break;}continue;}await writeFile(_0x293c6b,_0x502d42[_0x250785(0x96)],_0x250785(0x1ce)),_0x7bc3f0[_0x250785(0x285)+_0x250785(0x10a)]?.[_0x250785(0xc9)]?.(_0x250785(0x147)+_0x250785(0x2d7)+_0x250785(0x1c9)+_0x250785(0x21b)+'d',{'filePath':_0x293c6b,'openclawVersion':_0x2798ad[_0x250785(0x21d)+_0x250785(0x323)]});break;}}async function patchWeixinOutboundSessionRoute(_0x393b6,_0xda1a75,_0x2944d0={}){const _0x3d77d5=_0x3d918c,_0x316dbf=join(_0x393b6,_0x3d77d5(0x21d),_0x3d77d5(0x315),_0x3d77d5(0xe1)+'ns',_0x3d77d5(0x21d)+_0x3d77d5(0x164),_0x3d77d5(0x315),_0x3d77d5(0xb6),_0x3d77d5(0xbd)+'js');if(!existsSync(_0x316dbf)){_0x2944d0[_0x3d77d5(0x285)+_0x3d77d5(0x10a)]?.[_0x3d77d5(0xc9)]?.(_0x3d77d5(0xfa)+_0x3d77d5(0x2a4)+'session\x20'+'route\x20pa'+'tch\x20skip'+'ped;\x20plu'+_0x3d77d5(0x188)+'installe'+'d',{'openclawVersion':_0xda1a75[_0x3d77d5(0x21d)+_0x3d77d5(0x323)],'filePath':_0x316dbf});return;}const _0x46de1b=await readFile(_0x316dbf,'utf8'),_0x3f4c4a=patchWeixinOutboundSessionRouteFromSource(_0x46de1b);if(!_0x3f4c4a[_0x3d77d5(0x32c)]){if(_0x3f4c4a[_0x3d77d5(0x2f3)]===_0x3d77d5(0x2ac)+_0x3d77d5(0x32c)){_0x2944d0['runtimeL'+_0x3d77d5(0x10a)]?.['info']?.(_0x3d77d5(0xfa)+'utbound\x20'+_0x3d77d5(0x147)+_0x3d77d5(0x173)+_0x3d77d5(0x2b6)+_0x3d77d5(0x21e)+_0x3d77d5(0x26f),{'openclawVersion':_0xda1a75[_0x3d77d5(0x21d)+_0x3d77d5(0x323)],'filePath':_0x316dbf});return;}_0x2944d0[_0x3d77d5(0x285)+_0x3d77d5(0x10a)]?.[_0x3d77d5(0x1b4)]?.(_0x3d77d5(0xfa)+_0x3d77d5(0x2a4)+_0x3d77d5(0x147)+_0x3d77d5(0x173)+_0x3d77d5(0x170)+_0x3d77d5(0x25f)+_0x3d77d5(0xce)+_0x3d77d5(0x216)+'ound',{'openclawVersion':_0xda1a75[_0x3d77d5(0x21d)+_0x3d77d5(0x323)],'filePath':_0x316dbf,'reason':_0x3f4c4a[_0x3d77d5(0x2f3)]});return;}await writeFile(_0x316dbf,_0x3f4c4a[_0x3d77d5(0x96)],_0x3d77d5(0x1ce)),_0x2944d0['runtimeL'+_0x3d77d5(0x10a)]?.[_0x3d77d5(0xc9)]?.(_0x3d77d5(0xfa)+_0x3d77d5(0x2a4)+_0x3d77d5(0x147)+_0x3d77d5(0x173)+'tch\x20appl'+'ied',{'openclawVersion':_0xda1a75[_0x3d77d5(0x21d)+_0x3d77d5(0x323)],'filePath':_0x316dbf,'note':_0x3d77d5(0x30a)+_0x3d77d5(0x111)+'ibility\x20'+_0x3d77d5(0x140)+'r\x20@tence'+_0x3d77d5(0x1fa)+_0x3d77d5(0x286)+_0x3d77d5(0x197)+_0x3d77d5(0x28c)+_0x3d77d5(0x2d1)+_0x3d77d5(0x138)+_0x3d77d5(0xd2)+'g\x20indexe'+_0x3d77d5(0x26b)+_0x3d77d5(0xf1)+_0x3d77d5(0x336)+_0x3d77d5(0x137)+_0x3d77d5(0x1e0)+_0x3d77d5(0x12e)+_0x3d77d5(0x107)+'des.'});}async function patchWeixinOutboundFallbackRuntime(_0x2e8c2a,_0x29c9b1,_0x141c1d={}){const _0x2df960=_0x3d918c,_0x39fda4=resolve(_0x2e8c2a,_0x29c9b1[_0x2df960(0x21d)+_0x2df960(0x1a6)+'ir']),_0x1d34da=join(_0x39fda4,_0x2df960(0x315)),_0x45506d=(await readdir(_0x1d34da,{'withFileTypes':!![]})[_0x2df960(0x298)](()=>[]))[_0x2df960(0x254)](_0x53b8d9=>_0x53b8d9['isFile']()&&_0x53b8d9[_0x2df960(0x22d)]['startsWi'+'th'](_0x2df960(0x116)+'-session'+'-')&&_0x53b8d9[_0x2df960(0x22d)][_0x2df960(0xac)](_0x2df960(0x153)))['map'](_0x4a1f82=>join(_0x1d34da,_0x4a1f82[_0x2df960(0x22d)]));if(_0x45506d[_0x2df960(0xde)]===0x0){_0x141c1d[_0x2df960(0x285)+'ogger']?.[_0x2df960(0x1b4)]?.(_0x2df960(0xfa)+_0x2df960(0x2a4)+'fallback'+'\x20patch\x20s'+_0x2df960(0x131)+'outbound'+_0x2df960(0x1ab)+_0x2df960(0xc7)+'nd',{'openclawVersion':_0x29c9b1[_0x2df960(0x21d)+_0x2df960(0x323)],'distDir':_0x1d34da});return;}for(const _0x9e872 of _0x45506d){const _0x236b65=await readFile(_0x9e872,'utf8'),_0x493320=patchWeixinOutboundFallbackFromSource(_0x236b65);if(!_0x493320[_0x2df960(0x32c)]){if(_0x493320['reason']==='already-'+_0x2df960(0x32c)){_0x141c1d[_0x2df960(0x285)+'ogger']?.['info']?.(_0x2df960(0xfa)+_0x2df960(0x2a4)+_0x2df960(0x10f)+_0x2df960(0x215)+_0x2df960(0x133)+_0x2df960(0x2cc),{'openclawVersion':_0x29c9b1[_0x2df960(0x21d)+_0x2df960(0x323)],'filePath':_0x9e872});return;}continue;}await writeFile(_0x9e872,_0x493320[_0x2df960(0x96)],_0x2df960(0x1ce)),_0x141c1d[_0x2df960(0x285)+_0x2df960(0x10a)]?.[_0x2df960(0xc9)]?.(_0x2df960(0xfa)+_0x2df960(0x2a4)+'fallback'+_0x2df960(0x215)+_0x2df960(0x2cc),{'openclawVersion':_0x29c9b1[_0x2df960(0x21d)+'Version'],'filePath':_0x9e872,'note':_0x2df960(0x30a)+_0x2df960(0x111)+_0x2df960(0x2ba)+_0x2df960(0x140)+_0x2df960(0x2a1)+_0x2df960(0x193)+_0x2df960(0x237)+'m.wechat'+_0x2df960(0xc4)+_0x2df960(0x25c)+_0x2df960(0x287)+_0x2df960(0x303)+_0x2df960(0x128)+_0x2df960(0x1dd)+_0x2df960(0xa8)+'\x20is\x20unav'+_0x2df960(0x14e)});return;}_0x141c1d[_0x2df960(0x285)+_0x2df960(0x10a)]?.[_0x2df960(0x1b4)]?.(_0x2df960(0xfa)+_0x2df960(0x2a4)+'fallback'+'\x20patch\x20s'+_0x2df960(0x131)+_0x2df960(0x1e6)+_0x2df960(0x20b)+_0x2df960(0x241),{'openclawVersion':_0x29c9b1[_0x2df960(0x21d)+_0x2df960(0x323)]});}async function patchRequestIdTitleRuntime(_0x48a257,_0x43323f,_0x2bd473={}){const _0x4d222a=_0x3d918c,_0x3add64=resolve(_0x48a257,_0x43323f[_0x4d222a(0x21d)+_0x4d222a(0x1a6)+'ir']),_0x59c40a=join(_0x3add64,_0x4d222a(0x315)),_0x520d58=_0x4d222a(0x30c)+'ell-runt'+_0x4d222a(0x165)+'est-id/r'+'untime-b'+'ridge.mj'+'s',_0x3c81b0=join(_0x48a257,'shell-ru'+_0x4d222a(0x25d),_0x4d222a(0x2d3)+'id',_0x4d222a(0x27c)+_0x4d222a(0xfb)+'js');if(!existsSync(_0x3c81b0)){_0x2bd473[_0x4d222a(0x285)+_0x4d222a(0x10a)]?.[_0x4d222a(0xc9)]?.(_0x4d222a(0x2d3)+_0x4d222a(0x279)+_0x4d222a(0x1ab)+_0x4d222a(0xb0)+_0x4d222a(0x131)+_0x4d222a(0x21a)+'ot\x20avail'+_0x4d222a(0x320),{'bridgePath':_0x3c81b0,'openclawVersion':_0x43323f[_0x4d222a(0x21d)+'Version']});return;}const _0x217210=(await readdir(_0x59c40a,{'withFileTypes':!![]})[_0x4d222a(0x298)](()=>[]))['filter'](_0x23b80c=>_0x23b80c[_0x4d222a(0x2b7)]()&&_0x23b80c[_0x4d222a(0x22d)][_0x4d222a(0x1c6)+'th'](_0x4d222a(0x9b))&&_0x23b80c['name'][_0x4d222a(0xac)](_0x4d222a(0x153)))[_0x4d222a(0x1f6)](_0x3985f7=>join(_0x59c40a,_0x3985f7[_0x4d222a(0x22d)]));for(const _0x2c3640 of _0x217210){const _0x7d5be8=await readFile(_0x2c3640,_0x4d222a(0x1ce)),_0x29cbe6=patchRequestIdTitleRuntimeFromSource(_0x7d5be8,{'bridgeImportPath':_0x520d58});if(!_0x29cbe6[_0x4d222a(0x32c)]){if(_0x29cbe6[_0x4d222a(0x2f3)]==='already-'+'patched'){_0x2bd473[_0x4d222a(0x285)+_0x4d222a(0x10a)]?.[_0x4d222a(0xc9)]?.(_0x4d222a(0x2d3)+_0x4d222a(0x279)+_0x4d222a(0x1ab)+'\x20patch\x20a'+_0x4d222a(0x133)+_0x4d222a(0x2cc),{'filePath':_0x2c3640,'openclawVersion':_0x43323f[_0x4d222a(0x21d)+'Version']});break;}continue;}await writeFile(_0x2c3640,_0x29cbe6['source'],_0x4d222a(0x1ce)),_0x2bd473['runtimeL'+_0x4d222a(0x10a)]?.[_0x4d222a(0xc9)]?.('request-'+_0x4d222a(0x279)+_0x4d222a(0x1ab)+_0x4d222a(0x215)+_0x4d222a(0x2cc),{'filePath':_0x2c3640,'openclawVersion':_0x43323f['openclaw'+_0x4d222a(0x323)]});break;}}async function patchQQBotOutboundFallbackRuntime(_0x14fe2e,_0x2020d4,_0x5ca1b8={}){const _0x123792=_0x3d918c,_0xd13fad=resolve(_0x14fe2e,_0x2020d4[_0x123792(0x21d)+'WorkingD'+'ir']),_0x58256d=join(_0xd13fad,_0x123792(0x315)),_0x1f9db1=(await readdir(_0x58256d,{'withFileTypes':!![]})[_0x123792(0x298)](()=>[]))[_0x123792(0x254)](_0x4dc779=>_0x4dc779[_0x123792(0x2b7)]()&&_0x4dc779[_0x123792(0x22d)]['startsWi'+'th'](_0x123792(0x116)+_0x123792(0x177)+'-')&&_0x4dc779[_0x123792(0x22d)]['endsWith'](_0x123792(0x153)))[_0x123792(0x1f6)](_0x24ba63=>join(_0x58256d,_0x24ba63[_0x123792(0x22d)]));if(_0x1f9db1['length']===0x0){_0x5ca1b8[_0x123792(0x285)+_0x123792(0x10a)]?.['warn']?.('qqbot\x20ou'+_0x123792(0xeb)+_0x123792(0x1c7)+_0x123792(0x326)+_0x123792(0xa6)+_0x123792(0x2a4)+_0x123792(0x1eb)+_0x123792(0x127)+'d',{'openclawVersion':_0x2020d4[_0x123792(0x21d)+_0x123792(0x323)],'distDir':_0x58256d});return;}for(const _0x275374 of _0x1f9db1){const _0x2b642c=await readFile(_0x275374,'utf8'),_0x35adfd=patchQQBotOutboundFallbackFromSource(_0x2b642c);if(!_0x35adfd[_0x123792(0x32c)]){if(_0x35adfd[_0x123792(0x2f3)]===_0x123792(0x2ac)+'patched'){_0x5ca1b8[_0x123792(0x285)+_0x123792(0x10a)]?.[_0x123792(0xc9)]?.(_0x123792(0x246)+_0x123792(0xeb)+'allback\x20'+_0x123792(0x119)+'ready\x20ap'+'plied',{'openclawVersion':_0x2020d4['openclaw'+_0x123792(0x323)],'filePath':_0x275374});return;}continue;}await writeFile(_0x275374,_0x35adfd[_0x123792(0x96)],_0x123792(0x1ce)),_0x5ca1b8['runtimeL'+'ogger']?.[_0x123792(0xc9)]?.(_0x123792(0x246)+_0x123792(0xeb)+_0x123792(0x1c7)+'patch\x20ap'+_0x123792(0x255),{'openclawVersion':_0x2020d4[_0x123792(0x21d)+_0x123792(0x323)],'filePath':_0x275374,'note':_0x123792(0x30a)+_0x123792(0x111)+'ibility\x20'+'patch\x20fo'+_0x123792(0x2fa)+_0x123792(0x1b9)+_0x123792(0x116)+_0x123792(0x250)+_0x123792(0xba)+_0x123792(0x2ce)+_0x123792(0x1f8)+_0x123792(0x1e9)+_0x123792(0x106)+_0x123792(0x308)+_0x123792(0x21c)});return;}_0x5ca1b8[_0x123792(0x285)+_0x123792(0x10a)]?.[_0x123792(0x1b4)]?.('qqbot\x20ou'+'tbound\x20f'+_0x123792(0x1c7)+_0x123792(0x326)+_0x123792(0x267)+'esolver\x20'+_0x123792(0xb1)+_0x123792(0x1a3),{'openclawVersion':_0x2020d4[_0x123792(0x21d)+_0x123792(0x323)]});}async function patchQQBotOutboundSessionRoute(_0x4be5e0,_0x4a4127,_0x31ff6a={}){const _0x3cc489=_0x3d918c,_0x1fd741=join(_0x4be5e0,'openclaw',_0x3cc489(0x315),'extensio'+'ns','qqbot',_0x3cc489(0x315));if(!existsSync(_0x1fd741)){_0x31ff6a['runtimeL'+_0x3cc489(0x10a)]?.[_0x3cc489(0xc9)]?.(_0x3cc489(0x246)+_0x3cc489(0xee)+_0x3cc489(0x150)+'oute\x20pat'+_0x3cc489(0x29b)+_0x3cc489(0x11d)+_0x3cc489(0x160)+'nstalled',{'openclawVersion':_0x4a4127[_0x3cc489(0x21d)+_0x3cc489(0x323)],'distDir':_0x1fd741});return;}const _0x511ad6=(await readdir(_0x1fd741,{'withFileTypes':!![]})[_0x3cc489(0x298)](()=>[]))[_0x3cc489(0x254)](_0x4dde76=>_0x4dde76[_0x3cc489(0x2b7)]()&&_0x4dde76[_0x3cc489(0x22d)]['endsWith'](_0x3cc489(0x153)))[_0x3cc489(0x1f6)](_0x5443ae=>join(_0x1fd741,_0x5443ae[_0x3cc489(0x22d)]));for(const _0x1f6b64 of _0x511ad6){const _0x41dcda=await readFile(_0x1f6b64,'utf8'),_0x78cc30=patchQQBotOutboundSessionRouteFromSource(_0x41dcda);if(!_0x78cc30[_0x3cc489(0x32c)]){if(_0x78cc30[_0x3cc489(0x2f3)]==='already-'+'patched'){_0x31ff6a[_0x3cc489(0x285)+_0x3cc489(0x10a)]?.[_0x3cc489(0xc9)]?.('qqbot\x20ou'+_0x3cc489(0xee)+_0x3cc489(0x150)+_0x3cc489(0x31b)+_0x3cc489(0xa7)+_0x3cc489(0x31f)+'ed',{'openclawVersion':_0x4a4127[_0x3cc489(0x21d)+_0x3cc489(0x323)],'filePath':_0x1f6b64});return;}continue;}await writeFile(_0x1f6b64,_0x78cc30[_0x3cc489(0x96)],_0x3cc489(0x1ce)),_0x31ff6a['runtimeL'+_0x3cc489(0x10a)]?.['info']?.(_0x3cc489(0x246)+_0x3cc489(0xee)+_0x3cc489(0x150)+'oute\x20pat'+_0x3cc489(0x2da)+'ed',{'openclawVersion':_0x4a4127[_0x3cc489(0x21d)+_0x3cc489(0x323)],'filePath':_0x1f6b64,'note':_0x3cc489(0x30a)+_0x3cc489(0x111)+'ibility\x20'+_0x3cc489(0x140)+_0x3cc489(0x2db)+_0x3cc489(0x14d)+'t\x20c2c\x20ou'+'tbound\x20d'+_0x3cc489(0xf8)+_0x3cc489(0x331)+'being\x20in'+_0x3cc489(0xdd)+_0x3cc489(0x277)+_0x3cc489(0x28f)+'rect\x20pee'+_0x3cc489(0x25b)});return;}_0x31ff6a[_0x3cc489(0x285)+_0x3cc489(0x10a)]?.[_0x3cc489(0x1b4)]?.(_0x3cc489(0x246)+'tbound\x20s'+_0x3cc489(0x150)+_0x3cc489(0x31b)+_0x3cc489(0x29b)+_0x3cc489(0x2af)+_0x3cc489(0x18c)+_0x3cc489(0x2c1)+_0x3cc489(0x201),{'openclawVersion':_0x4a4127[_0x3cc489(0x21d)+_0x3cc489(0x323)],'distDir':_0x1fd741});}async function resolveRuntimeChannelImportPath(_0x33c481,_0x46ab94){const _0x1d4d38=_0x3d918c,_0x2f3090=_0x46ab94[_0x1d4d38(0x254)](_0x42faa3=>_0x42faa3[_0x1d4d38(0x2b7)]()&&_0x42faa3[_0x1d4d38(0x22d)][_0x1d4d38(0x1c6)+'th'](_0x1d4d38(0x27c)+_0x1d4d38(0x247))&&_0x42faa3[_0x1d4d38(0x22d)][_0x1d4d38(0xac)](_0x1d4d38(0x153))&&!_0x42faa3[_0x1d4d38(0x22d)]['startsWi'+'th'](_0x1d4d38(0x27c)+_0x1d4d38(0x247)+_0x1d4d38(0x270)))[_0x1d4d38(0x1f6)](_0x3defb2=>_0x3defb2['name'])[_0x1d4d38(0x20a)]();for(const _0x52673c of _0x2f3090){const _0x49794e=await readFile(join(_0x33c481,_0x52673c),_0x1d4d38(0x1ce));if(_0x49794e[_0x1d4d38(0x281)](_0x1d4d38(0x1d8)+_0x1d4d38(0xa2)+_0x1d4d38(0x213)))return'./'+_0x52673c;}return null;}function normalizeRuntimeRelativePath(_0x2841b9){return _0x2841b9['replaceA'+'ll']('\x5c','/');}function toWindowsPath(_0x54b57f){const _0x509e26=_0x3d918c;return _0x54b57f[_0x509e26(0x19f)+'ll']('/','\x5c');}function validateRuntimeNodeVersion(_0x650858,_0x1a2732){const _0x19a33d=_0x3d918c;if(_0x650858[_0x19a33d(0x232)+'ion']===_0x1a2732[_0x19a33d(0x21d)][_0x19a33d(0x232)+_0x19a33d(0x156)])return;throw new Error(_0x19a33d(0x1eb)+_0x19a33d(0x232)+_0x19a33d(0x273)+_0x19a33d(0x1c1)+_0x19a33d(0x1ef)+(_0x650858[_0x19a33d(0x232)+_0x19a33d(0x156)]||'unknown')+(_0x19a33d(0x252)+'config=')+_0x1a2732[_0x19a33d(0x21d)][_0x19a33d(0x232)+_0x19a33d(0x156)]+'.\x20'+(_0x19a33d(0xd9)+_0x19a33d(0xc8)+_0x19a33d(0x191)+_0x19a33d(0x26a)+_0x19a33d(0xb4)+_0x19a33d(0x1ab)+_0x19a33d(0x2bc)+_0x19a33d(0x2e4)+_0x19a33d(0x275)+_0x19a33d(0x316)+_0x19a33d(0x24f)+_0x19a33d(0x19a)+'.'));}function validateRuntimeOpenClawVersion(_0x2ab26f,_0x5b41c2){const _0x5f5d24=_0x3d918c;if(_0x2ab26f[_0x5f5d24(0x21d)+_0x5f5d24(0x323)]===_0x5b41c2['openclaw'][_0x5f5d24(0x21d)+_0x5f5d24(0x323)])return;throw new Error(_0x5f5d24(0x1eb)+'openclaw'+_0x5f5d24(0xcb)+_0x5f5d24(0x171)+_0x5f5d24(0x1ac)+_0x5f5d24(0x13d)+(_0x2ab26f[_0x5f5d24(0x21d)+_0x5f5d24(0x323)]||_0x5f5d24(0xa5))+(_0x5f5d24(0x252)+_0x5f5d24(0x1e3))+_0x5b41c2[_0x5f5d24(0x21d)][_0x5f5d24(0x21d)+_0x5f5d24(0x323)]+'.\x20'+(_0x5f5d24(0xd9)+_0x5f5d24(0xc8)+'\x20prepare'+'\x22\x20so\x20the'+'\x20runtime'+_0x5f5d24(0x1fd)+'tall\x20the'+'\x20configu'+_0x5f5d24(0x222)+_0x5f5d24(0x2ec)+_0x5f5d24(0x2be)));}function parseNpmPackJson(_0x4ae1cb){const _0x53f580=_0x3d918c,_0x5311c4=_0x4ae1cb[_0x53f580(0x2f9)](),_0x532a67=_0x5311c4[_0x53f580(0x163)]('[');if(_0x532a67<0x0)throw new Error(_0x53f580(0xa4)+_0x53f580(0x234)+'\x20return\x20'+_0x53f580(0x1e1)+_0x5311c4[_0x53f580(0x1a5)](0x0,0x1f4));const _0x19a190=JSON[_0x53f580(0x276)](_0x5311c4[_0x53f580(0x1a5)](_0x532a67)),_0x4f2f70=Array[_0x53f580(0x233)](_0x19a190)?_0x19a190[0x0]:_0x19a190;if(!_0x4f2f70||typeof _0x4f2f70!==_0x53f580(0x112))throw new Error(_0x53f580(0xa4)+_0x53f580(0x239)+_0x53f580(0xdf)+_0x53f580(0xf9)+_0x53f580(0x319)+_0x5311c4[_0x53f580(0x1a5)](0x0,0x1f4));return _0x4f2f70;}function normalizePackedTarballFilename(_0xece905){const _0x55c2e1=_0x3d918c;return _0xece905[_0x55c2e1(0x1d7)](/^@/,'')['replaceA'+'ll']('/','-')[_0x55c2e1(0x19f)+'ll']('\x5c','-');}async function runProcess(_0x2cf4f9,_0x460747,_0x7ede80={}){const _0x381122=_0x3d918c,_0x1a0a6a=_0x7ede80[_0x381122(0x240)]||[_0x2cf4f9,..._0x460747]['join']('\x20'),_0x164ff0=_0x7ede80['timeoutM'+'s']??NPM_INSTALL_TIMEOUT_MS,_0x2864d1=spawn(_0x2cf4f9,_0x460747,{'cwd':_0x7ede80[_0x381122(0x25a)],'env':_0x7ede80[_0x381122(0x95)],'stdio':[_0x381122(0x2b0),'pipe','pipe']});return await new Promise((_0xc8c53f,_0x741598)=>{const _0x1b7163=_0x381122;let _0x18edbc='',_0x43c5a4='',_0x59a167=![];const _0x599f23=setTimeout(()=>{const _0x978511=_0x1d92;if(_0x59a167)return;_0x59a167=!![],_0x2864d1['kill'](_0x978511(0x1d0)),_0x741598(new Error(_0x1a0a6a+(_0x978511(0x253)+_0x978511(0x18e)+'\x20')+_0x164ff0+'ms'));},_0x164ff0);_0x2864d1[_0x1b7163(0xfd)]['on']('data',_0x43504d=>{const _0x490f57=_0x1b7163;_0x18edbc+=_0x43504d[_0x490f57(0x174)]();}),_0x2864d1[_0x1b7163(0x2c5)]['on'](_0x1b7163(0x2d8),_0x5a4005=>{const _0x383c01=_0x1b7163;_0x43c5a4+=_0x5a4005[_0x383c01(0x174)]();}),_0x2864d1['on'](_0x1b7163(0x2aa),_0x2462f8=>{if(_0x59a167)return;_0x59a167=!![],clearTimeout(_0x599f23),_0x741598(_0x2462f8);}),_0x2864d1['on'](_0x1b7163(0x309),(_0xd42766,_0x48792f)=>{const _0x5745ff=_0x1b7163;if(_0x59a167)return;_0x59a167=!![],clearTimeout(_0x599f23);if(_0xd42766===0x0){_0xc8c53f({'stdout':_0x18edbc,'stderr':_0x43c5a4});return;}_0x741598(new Error(_0x1a0a6a+(_0x5745ff(0xc2)+_0x5745ff(0x121)+'e=')+(_0xd42766??'null')+_0x5745ff(0x1ba)+(_0x48792f??_0x5745ff(0x15b))+'\x0a'+(''+(_0x43c5a4||_0x18edbc))[_0x5745ff(0x2f9)]()));});});}async function installOpenClawPackage(_0x2bde9e,_0x3c4990){const _0x286cc4=_0x3d918c,_0x2dc38c=join(_0x2bde9e[_0x286cc4(0x207)+_0x286cc4(0x302)],'.cache'),_0x378a4b=join(_0x2bde9e['runtimeR'+_0x286cc4(0x302)],'.opencla'+_0x286cc4(0x258)+'t');await mkdir(_0x2dc38c,{'recursive':!![]}),await removePathWithRetries(_0x378a4b),await mkdir(_0x378a4b,{'recursive':!![]});const _0x50b9f2=await createRuntimeEnv(_0x2bde9e),_0x59e34c='openclaw'+'@'+_0x3c4990;console['log'](_0x286cc4(0xbc)+'hell:run'+'time]\x20in'+_0x286cc4(0x1d3)+'\x20'+_0x59e34c);const _0x4e031f=await runProcess(_0x2bde9e[_0x286cc4(0x334)+_0x286cc4(0x219)],[_0x2bde9e[_0x286cc4(0x1e5)],'pack',_0x59e34c,_0x286cc4(0x22a)],{'cwd':_0x2dc38c,'env':_0x50b9f2,'label':'npm\x20pack'+'\x20'+_0x59e34c}),_0xf058fb=parseNpmPackJson(_0x4e031f[_0x286cc4(0xfd)]);if(_0xf058fb['version']!==_0x3c4990)throw new Error(_0x286cc4(0x296)+_0x286cc4(0x196)+_0x286cc4(0xfe)+_0x3c4990+(_0x286cc4(0x236)+_0x286cc4(0x1f7))+_0xf058fb[_0x286cc4(0xae)]);const _0x2a7cbd=resolve(_0x2dc38c,_0xf058fb[_0x286cc4(0xe9)]);if(!existsSync(_0x2a7cbd))throw new Error('npm\x20pack'+'\x20did\x20not'+_0x286cc4(0x152)+_0x286cc4(0x32e)+'\x20'+_0x2a7cbd);await runProcess(_0x286cc4(0x151),[_0x286cc4(0xea),_0x2a7cbd,'-C',_0x378a4b],{'label':'extract\x20'+_0xf058fb[_0x286cc4(0xe9)]}),await removePathWithRetries(_0x2bde9e[_0x286cc4(0x21d)+_0x286cc4(0x1a6)+'ir']),await rename(join(_0x378a4b,'package'),_0x2bde9e[_0x286cc4(0x21d)+_0x286cc4(0x1a6)+'ir']),await removePathWithRetries(_0x378a4b),await runProcess(_0x2bde9e[_0x286cc4(0x334)+_0x286cc4(0x219)],[_0x2bde9e['npmCli'],_0x286cc4(0x312),_0x286cc4(0x2dc)+'ev','--omit=p'+_0x286cc4(0xc1),_0x286cc4(0x261)+'it',_0x286cc4(0x144)+'d',_0x286cc4(0x108)+_0x286cc4(0x2f5)+'ps'],{'cwd':_0x2bde9e[_0x286cc4(0x21d)+_0x286cc4(0x1a6)+'ir'],'env':_0x50b9f2,'label':'npm\x20inst'+_0x286cc4(0x328)+_0x59e34c+(_0x286cc4(0x1ab)+_0x286cc4(0x2cf)+_0x286cc4(0x264))});if(!existsSync(_0x2bde9e['openclaw'+_0x286cc4(0x2d5)]))throw new Error('OpenClaw'+_0x286cc4(0x12f)+_0x286cc4(0xc7)+_0x286cc4(0x1fc)+'\x20install'+':\x20'+_0x2bde9e['openclaw'+_0x286cc4(0x2d5)]);}async function ensureRuntimeBase(_0x28e03f,_0x5275a6,_0x156cbd={}){const _0x27129a=_0x3d918c;await mkdir(_0x5275a6,{'recursive':!![]});let _0x4a2b63=await readRuntimeManifest(_0x5275a6);const _0x48494a=_0x28e03f['openclaw'][_0x27129a(0x232)+'ion'],_0x276d29=_0x28e03f['openclaw']['openclaw'+_0x27129a(0x323)],_0x5e0628=existsSync(resolveManifestPath(_0x5275a6)),_0x449392=runtimeHasRequiredPaths(_0x5275a6,_0x4a2b63),_0x2ad4b6=_0x4a2b63[_0x27129a(0x232)+_0x27129a(0x156)]===_0x48494a;!_0x5e0628||!_0x449392||!_0x2ad4b6?(_0x156cbd['runtimeL'+_0x27129a(0x10a)]?.[_0x27129a(0x143)+'t']?.(_0x27129a(0x1eb)+_0x27129a(0x185)+_0x27129a(0x1f4)+'ed',{'runtimeRoot':_0x5275a6,'reason':!_0x5e0628?_0x27129a(0x1d1)+_0x27129a(0x209):!_0x449392?_0x27129a(0x1d1)+_0x27129a(0x130)+_0x27129a(0x1ab)+_0x27129a(0xd7):_0x27129a(0x10d)+_0x27129a(0x2e5)+_0x27129a(0x1c0),'syncOnly':_0x156cbd[_0x27129a(0x184)]}),_0x4a2b63=await buildRuntimeBase(_0x28e03f,_0x5275a6,_0x4a2b63),_0x156cbd['runtimeL'+_0x27129a(0x10a)]?.[_0x27129a(0x143)+'t']?.(_0x27129a(0x1eb)+'base\x20bui'+_0x27129a(0x19d)+'eted',{'manifest':summarizeRuntimeManifest(_0x4a2b63)})):_0x156cbd[_0x27129a(0x285)+_0x27129a(0x10a)]?.['importan'+'t']?.(_0x27129a(0x1eb)+_0x27129a(0x327)+_0x27129a(0x26c)+_0x27129a(0x192),{'manifest':summarizeRuntimeManifest(_0x4a2b63)});if(!existsSync(resolve(_0x5275a6,_0x4a2b63[_0x27129a(0x21d)+_0x27129a(0x2d5)]))){const _0x35f228=createRuntimeInfoFromManifest(_0x5275a6,_0x4a2b63,{'allowMissingOpenClaw':!![]});await installOpenClawPackage(_0x35f228,_0x276d29),_0x4a2b63[_0x27129a(0x21d)+'Version']=_0x276d29;}return _0x4a2b63;}function runtimeHasRequiredPaths(_0x17f4c2,_0x1efaa6){const _0x5823cd=_0x3d918c;return[_0x5823cd(0x334)+_0x5823cd(0x219),_0x5823cd(0x1e5),_0x5823cd(0x21d)+_0x5823cd(0x1a6)+'ir','openclaw'+_0x5823cd(0x2d5)][_0x5823cd(0x30f)](_0x53b0d8=>typeof _0x1efaa6[_0x53b0d8]==='string'&&_0x1efaa6[_0x53b0d8]['trim']())&&[_0x5823cd(0x334)+_0x5823cd(0x219),_0x5823cd(0x1e5)][_0x5823cd(0x30f)](_0x2038e7=>existsSync(resolve(_0x17f4c2,_0x1efaa6[_0x2038e7])));}function _0x4fd9(){const _0xf60fa=['json','ion','arm64','node/bin','\x20\x22OPENCL','synced','null','-id\x20head','log','ile\x20not\x20','6.6\x20chan','in\x20not\x20i','me\x20missi','aw\x202026.','indexOf','-weixin','ime/requ','tests','untime\x20r','tory\x20pro','ipped;\x20f','ready\x20ap','cal\x20runt','\x20path\x20mu','%~dp0\x22','npm-cach','cope\x20syn','tch\x20skip','mismatch','ed;\x20brid','route\x20pa','toString','channel\x20','dependen','-session','href','led','test','appId','doc','npm','_DIR%','LiteralP','r\x20OpenCl','shell-ru','in\x20','docs','syncOnly','base\x20bui','nodejs.o','atch\x20app','gin\x20not\x20','prepare\x20','\x20found','x64','nel\x20shap','index.mj','ut\x20after','.markdow','set\x20\x22OPE','\x20prepare','rent','enclaw-w','time-bri','location','ed\x20OpenC','aw-weixi','node/lib','ies','\x20version','find','?t=','ld\x20compl','-NoProfi','replaceA','\x20doctor\x20','AW_CONFI','node.exe','t\x20found','platform','slice','WorkingD','headers','annel\x20en','tools\x20sy','local\x20pl','\x20runtime',':\x20manife','pendenci','/node_mo','eady\x20app','@echo\x20of','er\x20writt','ache\x20bef','6969655omxvOI','warn','roductRu','.md','_NAME:-','kill\x20not','Bot\x20c2c\x20','\x20signal=','1\x20]\x20&&\x20[','.d.ts','pruned\x20r','nPath\x20$e','root','match','atch:\x20ma','lugin\x20','=\x22${OPEN','-xJf','product','startsWi','allback\x20','fix','ite\x20patc','https://','jection\x20','agent','aging','utf8','\x22\x20\x22%SCRI','SIGTERM','missing\x20','\x20written','stalling','e.exe','\x20applied','2604nLctCN','replace','createRu','referenc','NCLAW_ST','ntPaths','JIE_NO_L','n\x20plugin','lugins\x20s','.tools','ream\x20fix','JSON:\x20','examples','config=','und:\x20','npmCli','resolver','IPT_DIR=','leted','out\x20c2c\x20','fix\x20comp','runtime\x20','25663320uHQvSK','skills','package.','nifest=','ed-tool\x20','ent','configPa','\x20and\x20','ld\x20start','wujiecla','map','d\x20to\x20','ons\x20with','s\x20not\x20fo','nt-weixi','split','nd\x20after','\x20can\x20ins','.map','$HOME/','2021272jaEWHK','und','function','spec','in\x20insta','some','wBin','runtimeR','pluginId','manifest','sort','\x20shape\x20n','\x20entry\x20\x22','dencies','er\x20respo','LocalPlu','--omit=p','win32','NFIG_PAT','nnel','resolved','\x20patch\x20a','pe\x20not\x20f','FIG_FILE','plugins','utable','bridge\x20n','h\x20applie','er\x20id.','openclaw','ady\x20appl','ime\x20buil','m-cli.js','ATH:-','red\x20Open','execPath','--\x20\x22$(di','node/nod','eam\x20fix\x20','\x20validat','Spec','time]\x20do','--json','oot\x20was\x20','ad-','name','t\x20\x22OPENC','ENCLAW_H','ll\x20||\x20tr','SCRIPT_D','nodeVers','isArray','\x20did\x20not','CONFIG_P','\x20resolve','eixin\x20@i','endencie','\x20returne','STATE_DI','shift','if\x20\x22%OPE','pid','pluginSp','octor\x20--','label','ot\x20found','now','ntime\x20ch','atch\x20ski','director','qqbot\x20ou','channel-','package','el.inbou','Dependen','age\x20was\x20','ad\x20patch','ckaging','configur','red\x20Node','\x20mirrors','lib',',\x20shell.','\x20timed\x20o','filter','plied','Name','ame','w-extrac','npm\x20plug','cwd','r\x20id.','d\x20mirror','ntime','e\x20tools\x20','ped;\x20cha','provider','--no-aud','atch\x20alr','/npm','ncies','des.','scripts','ipped;\x20r','isDirect','keys','\x22\x20so\x20the','d\x20as\x20gro','eady\x20cur','49227KeqpgL','w.mjs','ied','state-','extract\x20','y\x20applie','ion\x20mism','NCLAW_CO','with\x20the','parse','th\x20c2c\x20i','try\x20not\x20','id\x20title','HIVE\x20-De','NCLAW_HO','runtime-','ugin\x20dep','process.','\x20request','#!/bin/s','includes','arch','allowMis','ILE_NAME','runtimeL','n/opencl','s\x20to\x20dir','time-too','ugin\x20spe','integrit','pt-path-','n\x20outbou','set','npm-cli.','n\x20the\x20di','o\x20resolv','\x20kdocs\x20s','path:\x20','mjs','pped;\x20ru','store-lo','Configur','singOpen','catch','45qakmyM','exec\x20\x22$S','ch\x20skipp','fix\x20star','versions','e\x20upgrad','PT_DIR/','38jojZKg','rcing\x20op','OPENCLAW','or.com','utbound\x20','@types','wnloadin',';\x20provid','.npmmirr','hell:run','error','-Executi','already-','er\x20patch','toLowerC','ed;\x20chan','ignore','all\x20plug','6353160WWwWPx','(empty)','ATE_DIR:','has','tch\x20alre','isFile','\x22\x20%*','ell-runt','ibility\x20','string','\x20can\x20be\x20','fy\x20upstr','sion.','LocalSki','nd\x20helpe','e\x20not\x20fo','ME%\x22==\x22\x22','local','agents\x20s','stderr','\x20loaded','solver\x20n','dataDir','ath','es\x20','add','pplied','nloads-b','ct\x20sessi','\x20depende','o.mjs\x22\x202','nd\x20deliv','_modules','request-','kill','Bin','bytes','store\x20wr','data','ie-logo.','ch\x20appli','r\x20@openc','--omit=d','E_DIR=','bug;\x20ver','Invalid\x20','m/bin/np','aipc-run','plugin\x20r','Bypass','rebuilt\x20','sion\x20mis','OME=','tool\x20his','push','node_mod','plugin\x20s','PT_DIR%','Claw\x20ver','\x22==\x22\x22\x20se','.tmp/run','stinatio','sessions','d:\x20','\x20package','reason','chat-dis','-peer-de','ules/npm','/node','lled','trim','rcing\x20QQ','Expand-A','idated','shasum','ginPaths','vel\x20entr','%USERPRO','OOT\x20-For','oot','ect\x20sess','\x20-g','node-v','fix\x20alre','onPolicy','n\x20the\x20pe','close','Temporar','FILE%\x5c','../../sh','configFi','jie-shel','every','CRIPT_DI','get','install','ies:\x20','ll.exe','dist','\x20configu','tching\x20p','generate','load:\x20','pec:\x20','oute\x20pat','enclaw\x20d','go.mjs','../../as','dy\x20appli','able','store\x20lo','optional','Version','ed\x20npm\x20p','__tests_','patch\x20sk','base\x20alr','all\x20','_SHELL_E','path','d\x20Node\x20r','patched','6\x20mixed\x20','tarball:','ng\x20chann','h\x20alread','mirrors\x20','fix\x20mark','.cache','nodeExec','nse\x20hook','ons;\x20ver','agents','env','source','cies','>/dev/nu','product\x20','ory','loader-','rchive\x20-','\x20already','HOME=\x22${','l\x20prepar','\x20install','\x20id\x20from','ntimeCha','\x20summary','npm\x20pack','unknown','ipped;\x20o','ch\x20alrea','\x20routing','tory\x20mix',':WUJIE_S','files','endsWith','pipe','version','d\x20for\x20lo','\x20patch\x20s','shape\x20no','ime/sess','ules','\x20product','st\x20be\x20a\x20','src','dataDirN','toISOStr','\x22\x20at\x20','\x20to\x20dire','ecs','[wujie-s','channel.','\x20skipped','.json','XTRACT_R','eer','\x20failed\x20','untime\x20p','\x20outboun','lugin\x20de','ipped;\x20d','\x20not\x20fou','ie-shell','info','Duplicat','Version\x20','nel\x20plug','\x22\x20\x22$@\x22','nnel\x20sha','ayload\x20b','ujie-log','prepareP','ors\x20bein','OGO\x22\x20];\x20','all\x20loca','s\x20instal','ing\x20\x22','\x20paths','failed','Run\x20\x22wuj','registry','pack','n/npm-cl','dexed\x20wi','length','d\x20an\x20inv','lied','extensio','entryCou','transcri','npm-glob','\x20in\x20','--fix','&&\x20pwd)','ore\x20pack','filename','-xzf','tbound\x20f','node','devDepen','tbound\x20s','time','npm\x20inst','up\x20sessi','statusCo','time]\x20fe','\x20path\x20wa','==\x22\x22\x20set','w.cmd','export\x20O','elivery\x20','alid\x20pay','weixin\x20o','bridge.m','Extracte','stdout','law\x20','ced','installP','doctor','PENCLAW_','store-','found','LAW_STAT','prefix\x20i','re\x20upgra','--legacy','example','ogger','bin','R=\x22${OPE','node\x20ver','on\x20futur','fallback','lib/node','y\x20compat','object','scoped\x20s','then','es.','outbound','skills\x20s','\x20is\x20miss','patch\x20al','lark-cli','1119406tWTtlq','s/npm','ed;\x20plug','\x5cwjrt-','e_module','ing','with\x20cod','if\x20[\x20-t\x20','plugins\x20','local:','_shared','1670NGPtMy','not\x20foun','ions\x20whe','wujieai.','play-pro','efore\x20pa','time]\x20in','rg/dist/','\x20on\x20futu','\x20bin\x20was','required','kipped;\x20','exec','lready\x20a','resume','chat\x20his','in\x20runti','ify\x20upst','ery\x20mirr','LocalAge','y:\x20','llPaths','set\x20\x22SCR','st=','values','join','patch\x20fo','\x20synced','r\x20runtim','importan','--no-fun','l\x20plugin','ynced','session\x20','agentSco','projectR','kup','.node','aipc-dow','law/qqbo','ailable.','\x20local\x20p','ession\x20r','tar','\x20create\x20','.js',';\x20dist\x20n'];_0x4fd9=function(){return _0xf60fa;};return _0x4fd9();}async function buildRuntimeBase(_0x12b3d5,_0x576a38,_0x46d387={}){const _0x355327=_0x3d918c,_0x56ebe4=join(_0x576a38,_0x355327(0xec));await ensureRuntimeNode(_0x12b3d5,_0x56ebe4);const _0x1fba70=process['platform']===_0x355327(0x211)?_0x355327(0x225)+_0x355327(0x1d4):_0x355327(0x158)+_0x355327(0x2f7),_0x178259=process[_0x355327(0x1a4)]===_0x355327(0x211)?_0x355327(0x225)+_0x355327(0x11f)+'s/npm/bi'+_0x355327(0xdc)+'i.js':_0x355327(0x198)+_0x355327(0x1ae)+'dules/np'+_0x355327(0x2e0)+_0x355327(0x220),_0x24ef13={..._0x46d387,'generatedAt':new Date()[_0x355327(0xb8)+_0x355327(0x120)](),'nodeVersion':_0x12b3d5['openclaw'][_0x355327(0x232)+_0x355327(0x156)],'openclawVersion':_0x46d387['openclaw'+_0x355327(0x323)]||'','platform':process['platform'],'arch':process[_0x355327(0x282)],'nodeExecutable':_0x1fba70,'npmCli':_0x178259,'openclawWorkingDir':_0x355327(0x21d),'openclawBin':_0x355327(0x21d)+'/opencla'+_0x355327(0x26e)};return await writeJson(resolveManifestPath(_0x576a38),_0x24ef13),_0x24ef13;}async function removePathWithRetries(_0x383384){await rm(_0x383384,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96});}async function ensureRuntimeNode(_0x527f7f,_0xbd59db){const _0x139222=_0x3d918c,_0x2e2b65=_0x527f7f['openclaw']['nodeVers'+_0x139222(0x156)],_0x4b84bf=process[_0x139222(0x1a4)]===_0x139222(0x211)?join(_0xbd59db,_0x139222(0x1a2)):join(_0xbd59db,_0x139222(0x10b),_0x139222(0xec)),_0x2083de=process[_0x139222(0x1a4)]===_0x139222(0x211)?join(_0xbd59db,_0x139222(0x2e9)+_0x139222(0xb3),'npm',_0x139222(0x10b),'npm-cli.'+'js'):join(_0xbd59db,'lib',_0x139222(0x2e9)+'ules',_0x139222(0x17d),'bin',_0x139222(0x28e)+'js');if(existsSync(_0x4b84bf)&&existsSync(_0x2083de)&&await getNodeVersion(_0x4b84bf)===_0x2e2b65)return;await removePathWithRetries(_0xbd59db);if(process[_0x139222(0x29d)]['node']===_0x2e2b65){await linkCurrentNodeRuntime(_0xbd59db);return;}await downloadNodeRuntime(_0x2e2b65,_0xbd59db);}async function getNodeVersion(_0x1f72d2){const _0x225708=_0x3d918c;try{const _0x483c6f=await runProcess(_0x1f72d2,['-p',_0x225708(0x27e)+_0x225708(0x29d)+_0x225708(0x14b)],{'label':_0x1f72d2+_0x225708(0x19a),'timeoutMs':0x7530});return _0x483c6f[_0x225708(0xfd)][_0x225708(0x2f9)]();}catch{return'';}}async function linkCurrentNodeRuntime(_0x3b45a2){const _0x135680=_0x3d918c,_0x416aef=process[_0x135680(0x223)],_0x5ce336=resolve(dirname(_0x416aef),'..'),_0x2368d3=process[_0x135680(0x1a4)]===_0x135680(0x211)?resolve(_0x5ce336,_0x135680(0x2e9)+_0x135680(0x2f6)):resolve(_0x5ce336,_0x135680(0x110)+_0x135680(0x2d2)+_0x135680(0x263)),_0x3cb50c=process[_0x135680(0x1a4)]===_0x135680(0x211)?join(_0x3b45a2,_0x135680(0x1a2)):join(_0x3b45a2,'bin',_0x135680(0xec)),_0x939adc=process['platform']===_0x135680(0x211)?join(_0x3b45a2,'node_mod'+_0x135680(0xb3),_0x135680(0x17d)):join(_0x3b45a2,_0x135680(0x251),_0x135680(0x2e9)+'ules',_0x135680(0x17d));await mkdir(dirname(_0x3cb50c),{'recursive':!![]}),await mkdir(dirname(_0x939adc),{'recursive':!![]}),await symlink(_0x416aef,_0x3cb50c),existsSync(_0x2368d3)?await symlink(_0x2368d3,_0x939adc):await symlink(await resolveNpmRoot(),_0x939adc);}async function resolveNpmRoot(){const _0x328616=_0x3d918c,_0x1ea27f=await runProcess(_0x328616(0x17d),['root','-g'],{'label':'npm\x20root'+_0x328616(0x304),'timeoutMs':0x7530}),_0x5d87f4=process[_0x328616(0x1a4)]===_0x328616(0x211)?_0x1ea27f['stdout'][_0x328616(0x2f9)]():join(_0x1ea27f[_0x328616(0xfd)][_0x328616(0x2f9)](),'npm');if(!existsSync(join(_0x5d87f4,_0x328616(0x10b),'npm-cli.'+'js')))throw new Error(_0x328616(0xa4)+_0x328616(0x24b)+'not\x20foun'+_0x328616(0xaf)+_0x328616(0x16b)+_0x328616(0x21f)+_0x328616(0x2f1)+_0x5d87f4);return _0x5d87f4;}async function resolveExtractedNodeRoot(_0x3c95dd,_0xeba5ec){const _0x37a20b=_0x3d918c,_0x5ca177=join(_0x3c95dd,_0xeba5ec);if(existsSync(_0x5ca177))return _0x5ca177;const _0x26ed51=await readdir(_0x3c95dd,{'withFileTypes':!![]}),_0x13b9bb=_0x26ed51[_0x37a20b(0x254)](_0x43f60a=>_0x43f60a['isDirect'+_0x37a20b(0x9a)]());if(_0x13b9bb[_0x37a20b(0xde)]===0x1)return join(_0x3c95dd,_0x13b9bb[0x0][_0x37a20b(0x22d)]);const _0x55c945=process[_0x37a20b(0x1a4)]==='win32'?join(_0x3c95dd,_0x37a20b(0x1a2)):join(_0x3c95dd,_0x37a20b(0x10b),'node');if(existsSync(_0x55c945))return _0x3c95dd;const _0x2f330c=await findNodeRuntimeRoot(_0x3c95dd);if(_0x2f330c)return _0x2f330c;const _0x3bea00=_0x26ed51[_0x37a20b(0x1f6)](_0x464e2f=>_0x464e2f['name'])[_0x37a20b(0x13f)](',\x20');throw new Error(_0x37a20b(0xfc)+_0x37a20b(0x32b)+_0x37a20b(0x167)+_0x37a20b(0x22b)+_0x37a20b(0x127)+'d\x20for\x20'+_0xeba5ec+_0x37a20b(0xe5)+_0x3c95dd+('.\x20Top-le'+_0x37a20b(0x2ff)+_0x37a20b(0x313))+(_0x3bea00||_0x37a20b(0x2b3)));}function resolveNodeExtractRoot(_0x2219a0,_0x1aa215,_0x35b971){const _0x598f7e=_0x3d918c;if(process['platform']!==_0x598f7e(0x211))return join(_0x2219a0,_0x1aa215+('-extract'+'-')+process[_0x598f7e(0x23d)]+'-'+Date[_0x598f7e(0x242)]()+'-'+_0x35b971);const _0x20f85d=/^[A-Za-z]:[\\/]/[_0x598f7e(0x132)](_0x2219a0),_0x36e2dd=parse(_0x2219a0),_0x2853c0=_0x20f85d?_0x20f85d[0x0][_0x598f7e(0x1a5)](0x0,0x2)+'\x5c':_0x36e2dd[_0x598f7e(0x1bf)]&&_0x36e2dd[_0x598f7e(0x1bf)]!=='/'?_0x36e2dd[_0x598f7e(0x1bf)]:_0x2219a0,_0x1c57ac=_0x2853c0[_0x598f7e(0x1d7)](/[\\/]+$/,'');return _0x1c57ac+_0x598f7e(0x11e)+process[_0x598f7e(0x23d)]+'-'+Date['now']()+'-'+_0x35b971;}async function findNodeRuntimeRoot(_0x5c23d0){const _0x2256d2=_0x3d918c,_0x5439cd=[_0x5c23d0],_0x4be828=new Set();while(_0x5439cd[_0x2256d2(0xde)]>0x0){const _0x29b1a8=_0x5439cd[_0x2256d2(0x23b)]();if(!_0x29b1a8||_0x4be828[_0x2256d2(0x2b5)](_0x29b1a8))continue;_0x4be828[_0x2256d2(0x2cb)](_0x29b1a8);const _0x717fa3=process[_0x2256d2(0x1a4)]==='win32'?join(_0x29b1a8,_0x2256d2(0x1a2)):join(_0x29b1a8,_0x2256d2(0x10b),_0x2256d2(0xec)),_0x339ac8=process[_0x2256d2(0x1a4)]===_0x2256d2(0x211)?join(_0x29b1a8,_0x2256d2(0x2e9)+_0x2256d2(0xb3),'npm','bin','npm-cli.'+'js'):join(_0x29b1a8,_0x2256d2(0x251),_0x2256d2(0x2e9)+_0x2256d2(0xb3),'npm','bin',_0x2256d2(0x28e)+'js');if(existsSync(_0x717fa3)&&existsSync(_0x339ac8))return _0x29b1a8;const _0x5accef=await readdir(_0x29b1a8,{'withFileTypes':!![]});for(const _0x4fa8b0 of _0x5accef){_0x4fa8b0[_0x2256d2(0x268)+_0x2256d2(0x9a)]()&&_0x5439cd[_0x2256d2(0x2e8)](join(_0x29b1a8,_0x4fa8b0[_0x2256d2(0x22d)]));}}return'';}async function downloadNodeRuntime(_0x4223ff,_0x1d4d8d){const _0x180d85=_0x3d918c,_0x21e65f=process['platform']===_0x180d85(0x211)?'win':process['platform'],_0x259fce=process['arch']==='x64'?_0x180d85(0x18b):process[_0x180d85(0x282)]===_0x180d85(0x157)?_0x180d85(0x157):process[_0x180d85(0x282)],_0x120052=process['platform']==='win32'?'zip':'tar.xz',_0x556cbb=_0x180d85(0x305)+_0x4223ff+'-'+_0x21e65f+'-'+_0x259fce,_0x5f9f70=_0x556cbb+'.'+_0x120052,_0x4d1c5c=join(dirname(_0x1d4d8d),_0x180d85(0x333)),_0x5974ce=join(_0x4d1c5c,_0x5f9f70),_0x588b17=_0x180d85(0x1ca)+_0x180d85(0x186)+_0x180d85(0x12d)+'v'+_0x4223ff+'/'+_0x5f9f70;await mkdir(_0x4d1c5c,{'recursive':!![]});const _0x2b2e74=resolveNodeExtractRoot(_0x4d1c5c,_0x556cbb,0x1);!existsSync(_0x5974ce)&&(console[_0x180d85(0x15d)](_0x180d85(0xbc)+_0x180d85(0x2a9)+_0x180d85(0x229)+_0x180d85(0x2a6)+'g\x20'+_0x588b17),await downloadFile(_0x588b17,_0x5974ce));await rm(_0x2b2e74,{'recursive':!![],'force':!![]}),await mkdir(_0x2b2e74,{'recursive':!![]});process['platform']===_0x180d85(0x211)?await extractZipArchive(_0x5974ce,_0x2b2e74,_0x5f9f70):await runProcess('tar',[_0x180d85(0x1c4),_0x5974ce,'-C',_0x2b2e74],{'label':'extract\x20'+_0x5f9f70});const _0xb66ad7=await resolveExtractedNodeRoot(_0x2b2e74,_0x556cbb);await mkdir(dirname(_0x1d4d8d),{'recursive':!![]}),await rename(_0xb66ad7,_0x1d4d8d),_0xb66ad7!==_0x2b2e74&&await rm(_0x2b2e74,{'recursive':!![],'force':!![]});}async function extractZipArchive(_0xd709e3,_0x1b21b0,_0x4c9a3f){const _0x43214a=_0x3d918c;await runProcess('powershe'+_0x43214a(0x314),[_0x43214a(0x19e)+'le',_0x43214a(0x2ab)+_0x43214a(0x307),_0x43214a(0x2e3),'-Command',_0x43214a(0x2fb)+_0x43214a(0x9c)+_0x43214a(0x17f)+'ath\x20$env'+_0x43214a(0xaa)+'HELL_ARC'+_0x43214a(0x27a)+_0x43214a(0x2ef)+_0x43214a(0x1be)+'nv:WUJIE'+_0x43214a(0x329)+_0x43214a(0xc0)+_0x43214a(0x301)+'ce'],{'env':{...process.env,'WUJIE_SHELL_ARCHIVE':_0xd709e3,'WUJIE_SHELL_EXTRACT_ROOT':_0x1b21b0},'label':_0x43214a(0x271)+_0x4c9a3f});}async function downloadFile(_0x552155,_0x10574e){await mkdir(dirname(_0x10574e),{'recursive':!![]});const _0x359dc0=await new Promise((_0xefcf19,_0x18845a)=>{get(_0x552155,_0x2beda6=>{const _0x5739e3=_0x1d92;if(_0x2beda6[_0x5739e3(0xf2)+'de']>=0x12c&&_0x2beda6[_0x5739e3(0xf2)+'de']<0x190&&_0x2beda6['headers'][_0x5739e3(0x195)]){_0x2beda6[_0x5739e3(0x134)](),downloadFile(new URL(_0x2beda6[_0x5739e3(0x1a7)][_0x5739e3(0x195)],_0x552155)[_0x5739e3(0x178)],_0x10574e)[_0x5739e3(0x114)](()=>_0xefcf19(null))[_0x5739e3(0x298)](_0x18845a);return;}if(_0x2beda6[_0x5739e3(0xf2)+'de']!==0xc8){_0x2beda6['resume'](),_0x18845a(new Error('download'+'\x20failed\x20'+_0x2beda6['statusCo'+'de']+':\x20'+_0x552155));return;}_0xefcf19(_0x2beda6);})['on']('error',_0x18845a);});_0x359dc0&&await pipeline(_0x359dc0,createWriteStream(_0x10574e));}export async function ensureOpenClawDoctorFixed(_0x4e3242,_0x105d92={}){const _0x3b0cb7=_0x3d918c,_0x332655=await loadRuntimeInfo(_0x4e3242[_0x3b0cb7(0x149)+'oot']),_0x358fc1=getConfigPaths(_0x4e3242),_0x4e6202=join(_0x358fc1['runtimeS'+'tateDir'],_0x3b0cb7(0x21d)+'-doctor.'+'json'),_0xbc6186=await readJson(_0x4e6202,{});if(_0xbc6186['openclaw'+_0x3b0cb7(0x323)]===_0x332655[_0x3b0cb7(0x21d)+'Version'])return _0x105d92[_0x3b0cb7(0x285)+_0x3b0cb7(0x10a)]?.[_0x3b0cb7(0xc9)](_0x3b0cb7(0x21d)+'\x20doctor\x20'+_0x3b0cb7(0x306)+'ady\x20curr'+_0x3b0cb7(0x1f1),{'openclawVersion':_0x332655['openclaw'+_0x3b0cb7(0x323)],'markerPath':_0x4e6202}),{'ran':![],'openclawVersion':_0x332655[_0x3b0cb7(0x21d)+_0x3b0cb7(0x323)],'markerPath':_0x4e6202};return await runOpenClawDoctorFix(_0x4e3242,_0x332655,{'fromVersion':_0xbc6186[_0x3b0cb7(0x21d)+'Version']||_0x3b0cb7(0xa5),'toVersion':_0x332655[_0x3b0cb7(0x21d)+_0x3b0cb7(0x323)],'markerPath':_0x4e6202,'runtimeLogger':_0x105d92[_0x3b0cb7(0x285)+_0x3b0cb7(0x10a)]}),{'ran':!![],'openclawVersion':_0x332655['openclaw'+_0x3b0cb7(0x323)],'markerPath':_0x4e6202};}async function runOpenClawDoctorFix(_0x30536a,_0x186a1d,{fromVersion:_0x8f71ec,toVersion:_0x176d28,markerPath:markerPath='',runtimeLogger:_0x1ff076}={}){const _0x5e690b=_0x3d918c;_0x1ff076?.[_0x5e690b(0x143)+'t']?.(_0x5e690b(0x21d)+_0x5e690b(0x1a0)+_0x5e690b(0x29c)+'ted',{'fromVersion':_0x8f71ec,'toVersion':_0x176d28});const _0x3c7257=await createRuntimeEnv(_0x186a1d,{'OPENCLAW_HOME':_0x30536a['dataDir'],'OPENCLAW_STATE_DIR':_0x30536a[_0x5e690b(0x2c8)],'OPENCLAW_CONFIG_PATH':getConfigPaths(_0x30536a)[_0x5e690b(0x1f2)+'th']});console['log'](_0x5e690b(0xbc)+_0x5e690b(0x2a9)+'time]\x20ru'+'nning\x20op'+_0x5e690b(0x31c)+_0x5e690b(0x23f)+_0x5e690b(0x1c8));const _0x2fb083=await runProcess(_0x186a1d[_0x5e690b(0x334)+_0x5e690b(0x219)],[_0x186a1d[_0x5e690b(0x21d)+'Bin'],_0x5e690b(0x101),_0x5e690b(0xe6)],{'cwd':_0x186a1d[_0x5e690b(0x21d)+'WorkingD'+'ir'],'env':_0x3c7257,'label':'openclaw'+_0x5e690b(0x1a0)+'--fix','timeoutMs':0x1d4c0});_0x1ff076?.['importan'+'t']?.(_0x5e690b(0x21d)+_0x5e690b(0x1a0)+_0x5e690b(0x1ea)+_0x5e690b(0x1e8),{'fromVersion':_0x8f71ec,'toVersion':_0x176d28,'stdout':_0x2fb083[_0x5e690b(0xfd)][_0x5e690b(0x2f9)]()[_0x5e690b(0x1a5)](-0xfa0),'stderr':_0x2fb083[_0x5e690b(0x2c5)][_0x5e690b(0x2f9)]()[_0x5e690b(0x1a5)](-0xfa0)}),markerPath&&(await writeJson(markerPath,{'openclawVersion':_0x186a1d['openclaw'+'Version'],'fixedAt':new Date()[_0x5e690b(0xb8)+_0x5e690b(0x120)]()}),_0x1ff076?.[_0x5e690b(0x143)+'t']?.('openclaw'+'\x20doctor\x20'+_0x5e690b(0x332)+_0x5e690b(0x1b1)+'en',{'markerPath':markerPath,'openclawVersion':_0x186a1d[_0x5e690b(0x21d)+_0x5e690b(0x323)]}));}export async function readRuntimeManifest(_0x387b8d){return await readJson(resolveManifestPath(_0x387b8d),{});}export async function loadRuntimeInfo(_0x45f1e7){const _0x5da5e1=resolveRuntimeRoot(_0x45f1e7),_0x20dc2f=await readRuntimeManifest(_0x5da5e1);return createRuntimeInfoFromManifest(_0x5da5e1,_0x20dc2f);}function createRuntimeInfoFromManifest(_0x49c32c,_0x5675ec,_0x77151d={}){const _0x54e515=_0x3d918c;for(const _0x174506 of[_0x54e515(0x334)+_0x54e515(0x219),_0x54e515(0x1e5),_0x54e515(0x21d)+_0x54e515(0x1a6)+'ir',_0x54e515(0x21d)+_0x54e515(0x2d5)]){if(typeof _0x5675ec[_0x174506]!==_0x54e515(0x2bb)||!_0x5675ec[_0x174506]['trim']())throw new Error(_0x54e515(0x1eb)+_0x54e515(0x209)+_0x54e515(0x118)+_0x54e515(0xd6)+_0x174506+_0x54e515(0xb9)+resolveManifestPath(_0x49c32c)+(';\x20run\x20wu'+_0x54e515(0x30e)+_0x54e515(0x9f)+'e'));}const _0x4e8179=resolve(_0x49c32c,_0x5675ec['nodeExec'+_0x54e515(0x219)]),_0x502c75=resolve(_0x49c32c,_0x5675ec[_0x54e515(0x1e5)]),_0x27745b=resolve(_0x49c32c,_0x5675ec[_0x54e515(0x21d)+_0x54e515(0x1a6)+'ir']),_0x11ccef=resolve(_0x49c32c,_0x5675ec[_0x54e515(0x21d)+'Bin']),_0x14eea2=Array['isArray'](_0x5675ec[_0x54e515(0x218)])?_0x5675ec[_0x54e515(0x218)][_0x54e515(0x1f6)](_0x27a9dd=>({..._0x27a9dd,'installPath':resolve(_0x49c32c,_0x27a9dd['installP'+_0x54e515(0x2c9)])})):[],_0x193d90=_0x77151d[_0x54e515(0x283)+_0x54e515(0x297)+'Claw']?[_0x4e8179,_0x502c75]:[_0x4e8179,_0x502c75,_0x27745b,_0x11ccef];for(const _0x4dbdbb of _0x193d90){if(!existsSync(_0x4dbdbb))throw new Error(_0x54e515(0x1eb)+_0x54e515(0x1d1)+_0x54e515(0x292)+_0x4dbdbb);}return{'runtimeRoot':_0x49c32c,'manifest':_0x5675ec,'openclawVersion':_0x5675ec[_0x54e515(0x21d)+_0x54e515(0x323)]||'unknown','nodeExecutable':_0x4e8179,'npmCli':_0x502c75,'openclawWorkingDir':_0x27745b,'openclawBin':_0x11ccef,'plugins':_0x14eea2};}export async function spawnClaw(_0x546c97,_0x50b662=[],_0x145d3f={}){const _0x380c48=_0x3d918c,_0x492745=await loadRuntimeInfo(_0x546c97),_0x484907=await createRuntimeEnv(_0x492745,_0x145d3f['env']??{});return spawn(_0x492745[_0x380c48(0x334)+'utable'],[_0x492745[_0x380c48(0x21d)+_0x380c48(0x2d5)],..._0x50b662],{'cwd':_0x492745['openclaw'+_0x380c48(0x1a6)+'ir'],'stdio':_0x380c48(0xad),..._0x145d3f,'env':_0x484907});}export async function runClawOnce(_0x4b3b2d,_0x11143b=[],_0x275199=0x15f90){const _0x2555e0=await spawnClaw(_0x4b3b2d,_0x11143b);return await new Promise((_0x4b296d,_0x42322d)=>{const _0x51a2af=_0x1d92;let _0x14c4ec='',_0x2cddcf='',_0x3e07e3=![];const _0x5f0b3c=setTimeout(()=>{const _0x3bcd63=_0x1d92;if(_0x3e07e3)return;_0x3e07e3=!![],_0x2555e0[_0x3bcd63(0x2d4)](_0x3bcd63(0x1d0)),_0x42322d(new Error(_0x3bcd63(0x21d)+_0x3bcd63(0x253)+_0x3bcd63(0x18e)+'\x20'+_0x275199+'ms'));},_0x275199);_0x2555e0[_0x51a2af(0xfd)]['on'](_0x51a2af(0x2d8),_0x5545ab=>{_0x14c4ec+=_0x5545ab['toString']();}),_0x2555e0[_0x51a2af(0x2c5)]['on']('data',_0x36bce1=>{const _0x5581e3=_0x51a2af;_0x2cddcf+=_0x36bce1[_0x5581e3(0x174)]();}),_0x2555e0['on'](_0x51a2af(0x2aa),_0x183ece=>{if(_0x3e07e3)return;_0x3e07e3=!![],clearTimeout(_0x5f0b3c),_0x42322d(_0x183ece);}),_0x2555e0['on'](_0x51a2af(0x309),(_0x2b62ca,_0x9c481f)=>{if(_0x3e07e3)return;_0x3e07e3=!![],clearTimeout(_0x5f0b3c),_0x4b296d({'code':_0x2b62ca,'signal':_0x9c481f,'stdout':_0x14c4ec,'stderr':_0x2cddcf});});});}export{resolveRuntimeLarkCliCommand};function resolvePackageNameFromNpmSpec(_0x2aa89a){const _0x10b06c=_0x3d918c,_0xab2072=_0x2aa89a[_0x10b06c(0x2f9)]()[_0x10b06c(0x1d7)](/^npm:/,'');if(!_0xab2072)throw new Error('Invalid\x20'+'empty\x20pl'+_0x10b06c(0x289)+'c');if(_0xab2072[_0x10b06c(0x1c6)+'th']('@')){const _0x43ad4e=_0xab2072[_0x10b06c(0x163)]('/');if(_0x43ad4e===-0x1)throw new Error(_0x10b06c(0x2df)+_0x10b06c(0x113)+'pec:\x20'+_0x2aa89a);const _0x56b5a2=_0xab2072[_0x10b06c(0x163)]('@',_0x43ad4e+0x1);return _0x56b5a2===-0x1?_0xab2072:_0xab2072[_0x10b06c(0x1a5)](0x0,_0x56b5a2);}const _0x3f852f=_0xab2072[_0x10b06c(0x163)]('@');return _0x3f852f===-0x1?_0xab2072:_0xab2072['slice'](0x0,_0x3f852f);}async function createRuntimeEnv(_0x201179,_0x695f3c={}){const _0xd5c0f3=_0x3d918c,_0x52e78=process.env.OPENCLAW_STATE_DIR||'',_0x36d990=process.env.NPM_CONFIG_REGISTRY||_0xd5c0f3(0x1ca)+_0xd5c0f3(0xda)+_0xd5c0f3(0x2a8)+_0xd5c0f3(0x2a3),_0xdd5d20=_0x52e78?join(_0x52e78,'claw-run'+_0xd5c0f3(0x288)+'ls'):join(_0x201179['runtimeR'+_0xd5c0f3(0x302)],'.tools'),_0x21000c=join(_0xdd5d20,_0xd5c0f3(0xe4)+'al'),_0x1f3d48=join(_0xdd5d20,'npm-cach'+'e'),_0x100fee=join(_0x21000c,_0xd5c0f3(0x10b));await mkdir(_0x100fee,{'recursive':!![]}),await mkdir(_0x1f3d48,{'recursive':!![]});const _0x4cabeb=[_0x100fee,dirname(_0x201179['nodeExec'+_0xd5c0f3(0x219)]),process.env.PATH||''];return{...process.env,..._0x695f3c,'PATH':_0x4cabeb[_0xd5c0f3(0x254)](Boolean)[_0xd5c0f3(0x13f)](delimiter),'npm_config_prefix':_0x21000c,'NPM_CONFIG_PREFIX':_0x21000c,'npm_config_cache':_0x1f3d48,'NPM_CONFIG_CACHE':_0x1f3d48,'NPM_CONFIG_REGISTRY':_0x36d990,'npm_execpath':_0x201179[_0xd5c0f3(0x1e5)],'npm_node_execpath':_0x201179[_0xd5c0f3(0x334)+_0xd5c0f3(0x219)],'OPENCLAW_RUNTIME_NPM_PREFIX':_0x21000c,'OPENCLAW_RUNTIME_NPM_BIN':_0x100fee};}export async function getRuntimeSpawnContext(_0x1efcf7,_0x2c0e37={}){const _0x5f33f5=_0x3d918c,_0x26eacf=await loadRuntimeInfo(_0x1efcf7),_0x1aef87=await createRuntimeEnv(_0x26eacf,_0x2c0e37);return{'cwd':_0x26eacf[_0x5f33f5(0x21d)+_0x5f33f5(0x1a6)+'ir'],'env':_0x1aef87,'runtime':_0x26eacf};}function resolvePluginDirNameFromSpec(_0x5143e5){const _0xb88768=_0x3d918c,_0x2909a4=resolvePackageNameFromNpmSpec(_0x5143e5),_0x5dde39=_0x2909a4[_0xb88768(0x1fb)]('/')[_0xb88768(0x254)](Boolean),_0x488764=_0x5dde39['at'](-0x1)??'';if(!_0x488764)throw new Error(_0xb88768(0x2df)+_0xb88768(0x2ea)+_0xb88768(0x31a)+_0x5143e5);return _0x488764;}async function resolvePluginIdFromPackageDir(_0x54d8cf,_0x48e92e){const _0x44e612=_0x3d918c,_0x517540=await readJson(join(_0x54d8cf,_0x44e612(0x1ee)+_0x44e612(0x155)),{}),_0x3bd7de=await readPluginManifest(_0x54d8cf),_0x54a0ea=[_0x3bd7de?.['id'],_0x3bd7de?.['pluginId'],_0x3bd7de?.[_0x44e612(0x22d)],_0x517540?.[_0x44e612(0x21d)]?.['id'],_0x517540?.[_0x44e612(0x21d)+'Id'],_0x48e92e],_0x21bed2=_0x54a0ea[_0x44e612(0x19b)](_0x186cf7=>typeof _0x186cf7==='string'&&_0x186cf7['trim']());if(!_0x21bed2)throw new Error('Unable\x20t'+_0x44e612(0x290)+'e\x20plugin'+_0x44e612(0xa1)+'\x20'+_0x54d8cf);return _0x21bed2['trim']();}function pluginSpecMatches(_0x56b3f8,_0x9ff7b2){const _0x1278ea=_0x3d918c,_0x50ce9a=_0x9ff7b2[_0x1278ea(0x2f9)](),_0x225a72=resolvePackageNameFromNpmSpec(_0x50ce9a);return[_0x56b3f8['spec'],_0x56b3f8[_0x1278ea(0x214)+'Spec'],_0x56b3f8['resolved'+_0x1278ea(0x256)]][_0x1278ea(0x205)](_0x19a39f=>_0x19a39f===_0x50ce9a||_0x19a39f===_0x225a72);}async function installPluginFromNpmSpec(_0x289549,_0x162727,_0x51eb65={}){const _0x26f76f=_0x3d918c,_0x1d5201=_0x289549[_0x26f76f(0x2f9)]()[_0x26f76f(0x1d7)](/^npm:/,''),_0x2dead6=resolvePluginDirNameFromSpec(_0x1d5201),_0x5aefd6=join(_0x162727[_0x26f76f(0x21d)+_0x26f76f(0x1a6)+'ir'],_0x26f76f(0x315),_0x26f76f(0xe1)+'ns'),_0x230f8b=join(_0x5aefd6,_0x2dead6),_0x523536=join(_0x162727[_0x26f76f(0x207)+_0x26f76f(0x302)],'.plugin-'+'extract-'+process['pid']+'-'+Date[_0x26f76f(0x242)]()),_0x30c823=await createRuntimeEnv(_0x162727),_0x3311b8=new Date()['toISOStr'+_0x26f76f(0x120)](),_0x34eaf0=join(_0x162727['runtimeR'+_0x26f76f(0x302)],'.cache');await mkdir(_0x34eaf0,{'recursive':!![]}),await rm(_0x523536,{'recursive':!![],'force':!![]}),await rm(_0x230f8b,{'recursive':!![],'force':!![]}),await mkdir(_0x523536,{'recursive':!![]}),await mkdir(_0x5aefd6,{'recursive':!![]}),console['log'](_0x26f76f(0xbc)+_0x26f76f(0x2a9)+_0x26f76f(0xf3)+_0x26f76f(0x317)+_0x26f76f(0x1c2)+_0x1d5201);const _0x52d5ac=await runProcess(_0x162727[_0x26f76f(0x334)+'utable'],[_0x162727['npmCli'],_0x26f76f(0xdb),_0x1d5201,'--json'],{'cwd':_0x34eaf0,'env':_0x30c823,'label':_0x26f76f(0xa4)+'\x20'+_0x1d5201}),_0x49488a=parseNpmPackJson(_0x52d5ac[_0x26f76f(0xfd)]),_0x1564d2=normalizePackedTarballFilename(_0x49488a['filename']),_0x493275=join(_0x34eaf0,_0x1564d2);if(!existsSync(_0x493275))throw new Error('npm\x20pack'+_0x26f76f(0x234)+'\x20create\x20'+'tarball:'+'\x20'+_0x493275);await runProcess(_0x26f76f(0x151),[_0x26f76f(0xea),_0x493275,'-C',_0x523536],{'label':_0x26f76f(0x271)+_0x1564d2}),await rename(join(_0x523536,_0x26f76f(0x248)),_0x230f8b),await rm(_0x523536,{'recursive':!![],'force':!![]});const _0x404a55=join(_0x230f8b,'package.'+_0x26f76f(0x155)),_0x48dff5=await readJson(_0x404a55,{});(_0x48dff5['devDepen'+_0x26f76f(0x20d)]||_0x48dff5['scripts'])&&(delete _0x48dff5['devDepen'+_0x26f76f(0x20d)],delete _0x48dff5['scripts'],await writeJson(_0x404a55,_0x48dff5));await runProcess(_0x162727[_0x26f76f(0x334)+'utable'],[_0x162727[_0x26f76f(0x1e5)],'install',_0x26f76f(0x2dc)+'ev',_0x26f76f(0x210)+_0x26f76f(0xc1),'--no-aud'+'it',_0x26f76f(0x144)+'d','--legacy'+_0x26f76f(0x2f5)+'ps'],{'cwd':_0x230f8b,'env':_0x30c823,'label':_0x26f76f(0xf0)+_0x26f76f(0x2b1)+_0x26f76f(0x182)+_0x1d5201});const _0x54d9ca=new Date()[_0x26f76f(0xb8)+_0x26f76f(0x120)](),_0x59a1bb=await resolvePluginIdFromPackageDir(_0x230f8b,_0x49488a['name']);return _0x51eb65['runtimeL'+_0x26f76f(0x10a)]?.[_0x26f76f(0xc9)](_0x26f76f(0x259)+_0x26f76f(0x204)+_0x26f76f(0x2f8),{'spec':_0x1d5201,'pluginId':_0x59a1bb,'installPath':_0x230f8b}),{'pluginId':_0x59a1bb,'source':'npm','spec':_0x1d5201,'installPath':toRuntimeRelative(_0x162727[_0x26f76f(0x207)+_0x26f76f(0x302)],_0x230f8b),'version':_0x49488a['version'],'resolvedName':_0x49488a[_0x26f76f(0x22d)],'resolvedVersion':_0x49488a['version'],'resolvedSpec':_0x49488a['name']+'@'+_0x49488a['version'],'integrity':typeof _0x49488a[_0x26f76f(0x28a)+'y']===_0x26f76f(0x2bb)?_0x49488a['integrit'+'y']:'','shasum':typeof _0x49488a[_0x26f76f(0x2fd)]===_0x26f76f(0x2bb)?_0x49488a['shasum']:'','resolvedAt':_0x3311b8,'installedAt':_0x54d9ca};}async function syncConfiguredNpmPlugins(_0x4b0968,_0x506f3a,_0x3c5562,_0x20f146={}){const _0x174342=_0x3d918c;if(_0x20f146[_0x174342(0x184)])return;const _0x103263=createRuntimeInfoFromManifest(_0x506f3a,_0x3c5562),_0x49b28c=Array['isArray'](_0x3c5562['plugins'])?_0x3c5562[_0x174342(0x218)]:[],_0x2de83d=[];for(const _0x2499b9 of _0x4b0968[_0x174342(0x21d)][_0x174342(0x23e)+_0x174342(0xbb)]){const _0x4143bd=_0x49b28c[_0x174342(0x19b)](_0x55761e=>_0x55761e?.[_0x174342(0x96)]===_0x174342(0x17d)&&pluginSpecMatches(_0x55761e,_0x2499b9)&&typeof _0x55761e[_0x174342(0x100)+_0x174342(0x2c9)]===_0x174342(0x2bb)&&existsSync(resolve(_0x506f3a,_0x55761e[_0x174342(0x100)+_0x174342(0x2c9)])));if(_0x4143bd){_0x2de83d[_0x174342(0x2e8)](_0x4143bd);continue;}_0x2de83d[_0x174342(0x2e8)](await installPluginFromNpmSpec(_0x2499b9,_0x103263,_0x20f146));}const _0x41c3dc=new Set(_0x4b0968[_0x174342(0x21d)][_0x174342(0x23e)+_0x174342(0xbb)]['map'](resolvePackageNameFromNpmSpec)),_0x1d7085=_0x49b28c[_0x174342(0x254)](_0x1b1110=>_0x1b1110?.['source']!==_0x174342(0x17d)||!_0x41c3dc['has'](resolvePackageNameFromNpmSpec(_0x1b1110[_0x174342(0x214)+_0x174342(0x256)]||_0x1b1110[_0x174342(0x203)]||'')));_0x3c5562[_0x174342(0x218)]=[..._0x1d7085,..._0x2de83d];}function hasRuntimeDependencies(_0x4a1b28){const _0x21a0c4=_0x3d918c,_0x7c2198=_0x4a1b28?.[_0x21a0c4(0x176)+_0x21a0c4(0x97)]&&typeof _0x4a1b28[_0x21a0c4(0x176)+_0x21a0c4(0x97)]===_0x21a0c4(0x112)?Object[_0x21a0c4(0x269)](_0x4a1b28[_0x21a0c4(0x176)+_0x21a0c4(0x97)]):[],_0x228017=_0x4a1b28?.[_0x21a0c4(0x322)+'Dependen'+'cies']&&typeof _0x4a1b28['optional'+_0x21a0c4(0x24a)+_0x21a0c4(0x97)]===_0x21a0c4(0x112)?Object[_0x21a0c4(0x269)](_0x4a1b28[_0x21a0c4(0x322)+_0x21a0c4(0x24a)+'cies']):[];return _0x7c2198[_0x21a0c4(0xde)]>0x0||_0x228017[_0x21a0c4(0xde)]>0x0;}async function installLocalPluginRuntimeDependencies(_0x24c84a,_0x4cbbfe,_0x3bb5c1){const _0x415853=_0x3d918c,_0xb8a561=join(_0x24c84a,'package.'+'json'),_0x564b85=await readJson(_0xb8a561,{});(_0x564b85[_0x415853(0xed)+'dencies']||_0x564b85[_0x415853(0x266)])&&(delete _0x564b85[_0x415853(0xed)+_0x415853(0x20d)],delete _0x564b85[_0x415853(0x266)],await writeJson(_0xb8a561,_0x564b85));if(!hasRuntimeDependencies(_0x564b85))return;const _0xb58ec0=await createRuntimeEnv(_0x4cbbfe);console['log'](_0x415853(0xbc)+_0x415853(0x2a9)+_0x415853(0x12c)+'stalling'+_0x415853(0x14f)+_0x415853(0xc5)+_0x415853(0x1ad)+_0x415853(0x2ca)+_0x24c84a),await runProcess(_0x4cbbfe[_0x415853(0x334)+_0x415853(0x219)],[_0x4cbbfe[_0x415853(0x1e5)],_0x415853(0x312),'--omit=d'+'ev',_0x415853(0x210)+_0x415853(0xc1),_0x415853(0x261)+'it',_0x415853(0x144)+'d',_0x415853(0x108)+_0x415853(0x2f5)+'ps'],{'cwd':_0x24c84a,'env':_0xb58ec0,'label':_0x415853(0xf0)+_0x415853(0xd4)+_0x415853(0x145)+'\x20'+_0x24c84a}),_0x3bb5c1[_0x415853(0x285)+_0x415853(0x10a)]?.[_0x415853(0xc9)](_0x415853(0x1aa)+_0x415853(0x27d)+_0x415853(0x238)+_0x415853(0xd5)+_0x415853(0x179),{'installPath':_0x24c84a});}async function syncSharedPluginModules(_0x29c3e7,_0x595596){const _0x145487=_0x3d918c,_0x3b9738=new Set();for(const _0x1d6cc0 of _0x29c3e7){const _0x394fbe=join(dirname(_0x1d6cc0),_0x145487(0x125));if(existsSync(_0x394fbe))_0x3b9738['add'](_0x394fbe);}for(const _0x7d5bc0 of _0x3b9738){await copyDirFresh(_0x7d5bc0,join(_0x595596,'_shared'));}}async function syncProductPlugins(_0x3e6f03,_0x2d09bc,_0x24add9,_0xfeade9={}){const _0x19e251=_0x3d918c,_0x296505=join(_0x2d09bc,_0x19e251(0x21d),_0x19e251(0x315),'extensio'+'ns'),_0x5dbbfd=createRuntimeInfoFromManifest(_0x2d09bc,_0x24add9),_0x2f1f47=[];await syncSharedPluginModules(_0x3e6f03[_0x19e251(0x21d)][_0x19e251(0x214)+_0x19e251(0x20f)+'ginPaths'],_0x296505);for(const _0x38db54 of _0x3e6f03[_0x19e251(0x21d)]['resolved'+_0x19e251(0x20f)+_0x19e251(0x2fe)]){const _0x228272=await getPackageMetadata(_0x38db54),_0x209915=await readPluginManifest(_0x38db54),_0x1250fa=join(_0x296505,_0x228272[_0x19e251(0x208)]);await copyDirFresh(_0x38db54,_0x1250fa),await installLocalPluginRuntimeDependencies(_0x1250fa,_0x5dbbfd,_0xfeade9),_0x2f1f47['push']({'pluginId':_0x228272[_0x19e251(0x208)],'source':_0x19e251(0x2c3),'spec':_0x19e251(0x124)+_0x38db54,'installPath':toRuntimeRelative(_0x2d09bc,_0x1250fa),'version':_0x228272[_0x19e251(0xae)],'resolvedName':_0x228272['name'],'resolvedVersion':_0x228272[_0x19e251(0xae)],'resolvedSpec':_0x19e251(0x124)+_0x38db54,'integrity':'','shasum':'','resolvedAt':new Date()[_0x19e251(0xb8)+_0x19e251(0x120)](),'installedAt':new Date()[_0x19e251(0xb8)+_0x19e251(0x120)](),'agentScope':_0x209915[_0x19e251(0x148)+'pe'],'skills':_0x209915[_0x19e251(0x1ed)]});}const _0x23a882=new Set(_0x2f1f47[_0x19e251(0x1f6)](_0x4f3ef0=>_0x4f3ef0[_0x19e251(0x208)])),_0x3466fc=Array[_0x19e251(0x233)](_0x24add9[_0x19e251(0x218)])?_0x24add9['plugins'][_0x19e251(0x254)](_0x434975=>!_0x23a882[_0x19e251(0x2b5)](_0x434975['pluginId'])):[];_0x24add9[_0x19e251(0x218)]=[..._0x3466fc,..._0x2f1f47];}async function syncManifestPluginScope(_0x4c5bb3,_0x2b08cb,_0x635692){const _0x4bc81c=_0x3d918c,_0x4f82a8=join(_0x2b08cb,_0x4bc81c(0x21d),_0x4bc81c(0x315),_0x4bc81c(0xe1)+'ns'),_0x2a5870=new Set(_0x4c5bb3[_0x4bc81c(0x21d)]['pluginSp'+_0x4bc81c(0xbb)]??[]),_0x279fa4=new Set([..._0x2a5870][_0x4bc81c(0x1f6)](_0xfcf527=>_0xfcf527[_0x4bc81c(0x1d7)](/^npm:/,''))[_0x4bc81c(0x1f6)](_0x228b38=>{const _0x480530=_0x4bc81c;if(_0x228b38[_0x480530(0x1c6)+'th']('@')){const _0xcb2018=_0x228b38[_0x480530(0x1fb)]('@');return _0xcb2018[_0x480530(0xde)]>=0x3?'@'+_0xcb2018[0x1]:_0x228b38;}return _0x228b38[_0x480530(0x1fb)]('@')[0x0];})[_0x4bc81c(0x254)](Boolean)),_0x3fca7a=new Set();for(const _0x5cbd3f of _0x4c5bb3[_0x4bc81c(0x21d)][_0x4bc81c(0x214)+_0x4bc81c(0x20f)+_0x4bc81c(0x2fe)]){const _0x3e26e5=await getPackageMetadata(_0x5cbd3f);if(_0x3e26e5['pluginId'])_0x3fca7a[_0x4bc81c(0x2cb)](_0x3e26e5[_0x4bc81c(0x208)]);}const _0x3b808c=Array[_0x4bc81c(0x233)](_0x635692['plugins'])?_0x635692[_0x4bc81c(0x218)]:[];_0x635692[_0x4bc81c(0x23e)+_0x4bc81c(0xbb)]=[..._0x4c5bb3[_0x4bc81c(0x21d)][_0x4bc81c(0x23e)+_0x4bc81c(0xbb)],..._0x4c5bb3[_0x4bc81c(0x21d)][_0x4bc81c(0x214)+_0x4bc81c(0x20f)+'ginPaths'][_0x4bc81c(0x1f6)](_0x24fb78=>_0x4bc81c(0x124)+_0x24fb78)],_0x635692[_0x4bc81c(0x218)]=_0x3b808c[_0x4bc81c(0x254)](_0x829dd3=>{const _0x3d3199=_0x4bc81c;if(!_0x829dd3||typeof _0x829dd3!==_0x3d3199(0x112))return![];if(_0x829dd3[_0x3d3199(0x96)]===_0x3d3199(0x2c3))return _0x3fca7a[_0x3d3199(0x2b5)](_0x829dd3['pluginId']);if(_0x829dd3[_0x3d3199(0x96)]==='npm')return _0x2a5870[_0x3d3199(0x2b5)](_0x829dd3[_0x3d3199(0x203)])||_0x2a5870['has'](_0x829dd3['resolved'+_0x3d3199(0x228)])||_0x279fa4[_0x3d3199(0x2b5)](_0x829dd3[_0x3d3199(0x214)+_0x3d3199(0x256)]);return![];});const _0xef6254=new Set(_0x635692['plugins'][_0x4bc81c(0x1f6)](_0x5684c4=>_0x5684c4[_0x4bc81c(0x208)]));for(const _0x42455a of _0x3b808c){if(!_0x42455a[_0x4bc81c(0x208)]||_0xef6254[_0x4bc81c(0x2b5)](_0x42455a[_0x4bc81c(0x208)]))continue;const _0x481d23=typeof _0x42455a['installP'+_0x4bc81c(0x2c9)]==='string'&&_0x42455a[_0x4bc81c(0x100)+'ath']['trim']()?resolve(_0x2b08cb,_0x42455a[_0x4bc81c(0x100)+_0x4bc81c(0x2c9)]):join(_0x4f82a8,_0x42455a[_0x4bc81c(0x208)]),_0x8192ba=relative(_0x4f82a8,_0x481d23);if(_0x8192ba[_0x4bc81c(0x1c6)+'th']('..')||_0x8192ba==='')continue;await rm(_0x481d23,{'recursive':!![],'force':!![]});}}async function collectCapabilityEntries(_0x24e0b1,_0x25de40){const _0x142b7d=_0x3d918c,_0x25bc99=new Map();for(const _0x4e93a7 of _0x24e0b1){let _0x192d4c;try{_0x192d4c=await stat(_0x4e93a7);}catch{throw new Error(_0x25de40+(_0x142b7d(0xf4)+_0x142b7d(0x1f9)+_0x142b7d(0x1e4))+_0x4e93a7);}if(!_0x192d4c['isDirect'+'ory']())throw new Error(_0x25de40+(_0x142b7d(0x16c)+_0x142b7d(0xb5)+_0x142b7d(0x245)+_0x142b7d(0x13a))+_0x4e93a7);const _0x14d2cb={'name':basename(_0x4e93a7),'path':_0x4e93a7},_0x1a725b=_0x25bc99[_0x142b7d(0x311)](_0x14d2cb['name']);if(_0x1a725b)throw new Error(_0x142b7d(0xca)+'e\x20'+_0x25de40+_0x142b7d(0x20c)+_0x14d2cb['name']+'\x22\x20from\x20'+_0x1a725b[_0x142b7d(0x32a)]+_0x142b7d(0x1f3)+_0x14d2cb[_0x142b7d(0x32a)]);_0x25bc99[_0x142b7d(0x28d)](_0x14d2cb[_0x142b7d(0x22d)],_0x14d2cb);}return[..._0x25bc99[_0x142b7d(0x13e)]()];}async function syncProductCapabilityDirs(_0x59fa09,_0x12344d,_0x1506d3){const _0x476565=_0x3d918c,_0x2f36c4=await collectCapabilityEntries(_0x59fa09,_0x1506d3);await rm(_0x12344d,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96}),await mkdir(_0x12344d,{'recursive':!![]});for(const _0x9307be of _0x2f36c4){await cp(_0x9307be[_0x476565(0x32a)],join(_0x12344d,_0x9307be[_0x476565(0x22d)]),{'recursive':!![]});}return _0x2f36c4[_0x476565(0xde)];}export const __test__={'collectCapabilityEntries':collectCapabilityEntries,'prunePackagedRuntimePayload':prunePackagedRuntimePayload,'syncProductCapabilityDirs':syncProductCapabilityDirs,'resolveNodeExtractRoot':resolveNodeExtractRoot};async function syncProductAgents(_0x5041fe,_0x5cd989,_0xe1a1db){const _0x10723f=_0x3d918c,_0x1573c5=join(_0x5cd989,'openclaw',_0x10723f(0x337)),_0x3bf946=await syncProductCapabilityDirs(_0x5041fe[_0x10723f(0x21d)][_0x10723f(0x214)+_0x10723f(0x139)+_0x10723f(0x1db)],_0x1573c5,_0x10723f(0x1cc));_0xe1a1db['agents']={'source':_0x10723f(0x1c5),'installPath':toRuntimeRelative(_0x5cd989,_0x1573c5),'localPaths':_0x5041fe['openclaw'][_0x10723f(0x214)+_0x10723f(0x139)+_0x10723f(0x1db)],'entryCount':_0x3bf946};}async function syncProductSkills(_0x57e7ed,_0x5d799d,_0x2a106d){const _0x3b57b1=_0x3d918c,_0x5eaf9c=join(_0x5d799d,_0x3b57b1(0x21d),'skills'),_0x105679=await syncProductCapabilityDirs(_0x57e7ed[_0x3b57b1(0x21d)][_0x3b57b1(0x214)+'LocalSki'+_0x3b57b1(0x13b)],_0x5eaf9c,'skill');_0x2a106d[_0x3b57b1(0x1ed)]={'source':_0x3b57b1(0x1c5),'installPath':toRuntimeRelative(_0x5d799d,_0x5eaf9c),'localPaths':_0x57e7ed[_0x3b57b1(0x21d)]['resolved'+_0x3b57b1(0x2bf)+_0x3b57b1(0x13b)],'entryCount':_0x105679};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2b3114,_0x5b35ef){const _0x28a661=_0x3984,_0x153b60=_0x2b3114();while(!![]){try{const _0x2d8905=parseInt(_0x28a661(0x160))/0x1+-parseInt(_0x28a661(0x146))/0x2+parseInt(_0x28a661(0x18c))/0x3*(parseInt(_0x28a661(0x18f))/0x4)+parseInt(_0x28a661(0x18a))/0x5+parseInt(_0x28a661(0x14c))/0x6*(-parseInt(_0x28a661(0x16c))/0x7)+parseInt(_0x28a661(0x192))/0x8*(-parseInt(_0x28a661(0x1be))/0x9)+parseInt(_0x28a661(0x120))/0xa;if(_0x2d8905===_0x5b35ef)break;else _0x153b60['push'](_0x153b60['shift']());}catch(_0x542fbf){_0x153b60['push'](_0x153b60['shift']());}}}(_0x21b3,0x55b34));export function patchChannelPluginRuntimeFromSource(_0x45a9ba,_0x35ede5={}){const _0x3f9dc1=_0x3984,_0x39835f=_0x35ede5['runtimeC'+_0x3f9dc1(0x17f)+_0x3f9dc1(0x138)];if(!_0x39835f)return{'patched':![],'reason':_0x3f9dc1(0x13f)+_0x3f9dc1(0x167)+_0x3f9dc1(0x1c3)+_0x3f9dc1(0x188)+_0x3f9dc1(0x17b)};if(_0x45a9ba[_0x3f9dc1(0x1a8)](_0x3f9dc1(0x16f)+_0x3f9dc1(0x1bd)+_0x3f9dc1(0x18e)+'l')){if(_0x45a9ba[_0x3f9dc1(0x1a8)](_0x3f9dc1(0x19d)+'istingCh'+_0x3f9dc1(0x173)+'rn\x20??')&&hasRuntimeChannelImport(_0x45a9ba,_0x39835f))return{'patched':![],'reason':_0x3f9dc1(0x185)+'patched'};return patchExistingChannelPluginRuntimeFromSource(_0x45a9ba,{'runtimeChannelImportPath':_0x39835f});}if(_0x45a9ba[_0x3f9dc1(0x1a8)]('wujieCha'+_0x3f9dc1(0x172)+_0x3f9dc1(0x1c1)+'se'))return patchExistingChannelPluginRuntimeFromSource(_0x45a9ba,{'runtimeChannelImportPath':_0x39835f});const _0x3a62b0=_0x3f9dc1(0x168)+_0x3f9dc1(0x1af)+'ntime\x20=\x20'+_0x3f9dc1(0x198)+'const\x20re'+'solveRun'+_0x3f9dc1(0x136)+_0x3f9dc1(0x145)+_0x3f9dc1(0x148)+'edRuntim'+_0x3f9dc1(0x1a2)+_0x3f9dc1(0x126)+_0x3f9dc1(0x1b4)+_0x3f9dc1(0x17c)+_0x3f9dc1(0x1c7)+_0x3f9dc1(0x196)+_0x3f9dc1(0x13a)+'s);\x0a\x09\x09\x09r'+_0x3f9dc1(0x165)+'solvedRu'+_0x3f9dc1(0x17a)+_0x3f9dc1(0x187);if(!_0x45a9ba['includes'](_0x3a62b0))return{'patched':![],'reason':_0x3f9dc1(0x169)+'d'};const _0x5004da=_0x3f9dc1(0x1a1)+'\x20createH'+_0x3f9dc1(0x121)+_0x3f9dc1(0x193)+':crypto\x22'+';';if(!_0x45a9ba[_0x3f9dc1(0x1a8)](_0x5004da))return{'patched':![],'reason':_0x3f9dc1(0x1c3)+_0x3f9dc1(0x181)};const _0x2c81aa=_0x3f9dc1(0x168)+_0x3f9dc1(0x1af)+_0x3f9dc1(0x178)+'null;\x0a\x09\x09'+'const\x20en'+_0x3f9dc1(0x143)+_0x3f9dc1(0x15f)+_0x3f9dc1(0x128)+'elpers\x20='+_0x3f9dc1(0x124)+_0x3f9dc1(0x144)+_0x3f9dc1(0x1b2)+'runtime\x20'+_0x3f9dc1(0x147)+_0x3f9dc1(0x1b6)+_0x3f9dc1(0x14e)+'bject\x22)\x20'+'return\x20r'+_0x3f9dc1(0x161)+_0x3f9dc1(0x1b5)+_0x3f9dc1(0x164)+'hannel?.'+_0x3f9dc1(0x156)+_0x3f9dc1(0x1b1)+_0x3f9dc1(0x135)+'nnel?.in'+_0x3f9dc1(0x1bb)+_0x3f9dc1(0x122)+_0x3f9dc1(0x1a0)+_0x3f9dc1(0x180)+_0x3f9dc1(0x1b3)+_0x3f9dc1(0x172)+'ime\x20=\x20wu'+_0x3f9dc1(0x18d)+_0x3f9dc1(0x1b0)+_0x3f9dc1(0x190)+_0x3f9dc1(0x139)+_0x3f9dc1(0x18b)+_0x3f9dc1(0x189)+'nel\x20=\x20ru'+_0x3f9dc1(0x16d)+'annel\x20&&'+_0x3f9dc1(0x15b)+_0x3f9dc1(0x16b)+_0x3f9dc1(0x15d)+_0x3f9dc1(0x131)+_0x3f9dc1(0x151)+_0x3f9dc1(0x164)+_0x3f9dc1(0x1b9)+_0x3f9dc1(0x14d)+_0x3f9dc1(0x16b)+_0x3f9dc1(0x15d)+_0x3f9dc1(0x16e)+_0x3f9dc1(0x123)+_0x3f9dc1(0x129)+_0x3f9dc1(0x157)+_0x3f9dc1(0x184)+_0x3f9dc1(0x19e)+_0x3f9dc1(0x1ac)+_0x3f9dc1(0x174)+'ntexts:\x20'+'existing'+_0x3f9dc1(0x13c)+_0x3f9dc1(0x12c)+_0x3f9dc1(0x170)+_0x3f9dc1(0x1ab)+_0x3f9dc1(0x129)+_0x3f9dc1(0x153)+'eContext'+'s,\x0a\x09\x09\x09\x09i'+_0x3f9dc1(0x155)+_0x3f9dc1(0x1ad)+_0x3f9dc1(0x13c)+_0x3f9dc1(0x149)+'??\x20chann'+_0x3f9dc1(0x129)+_0x3f9dc1(0x158)+_0x3f9dc1(0x13d)+'urn:\x20exi'+'stingCha'+_0x3f9dc1(0x1a3)+'n\x20??\x20exi'+_0x3f9dc1(0x12a)+_0x3f9dc1(0x186)+_0x3f9dc1(0x13b)+_0x3f9dc1(0x1bf)+_0x3f9dc1(0x13e)+'urn\x20??\x20c'+_0x3f9dc1(0x1c2)+'ntime.in'+_0x3f9dc1(0x12e)+_0x3f9dc1(0x152)+_0x3f9dc1(0x19a)+'ngChanne'+_0x3f9dc1(0x1a7)+'??\x20chann'+'elRuntim'+_0x3f9dc1(0x127)+_0x3f9dc1(0x166)+_0x3f9dc1(0x19b)+_0x3f9dc1(0x17d)+'annel.se'+'ssion\x20??'+_0x3f9dc1(0x125)+_0x3f9dc1(0x1bc)+'session\x0a'+_0x3f9dc1(0x14a)+_0x3f9dc1(0x19f)+'runtime;'+_0x3f9dc1(0x1b7)+_0x3f9dc1(0x12b)+_0x3f9dc1(0x1a5)+_0x3f9dc1(0x136)+_0x3f9dc1(0x145)+'\x09\x09resolv'+_0x3f9dc1(0x1aa)+_0x3f9dc1(0x133)+_0x3f9dc1(0x143)+_0x3f9dc1(0x15f)+_0x3f9dc1(0x128)+_0x3f9dc1(0x159)+'esolveCr'+'eatePlug'+_0x3f9dc1(0x1c4)+_0x3f9dc1(0x15c)+('ons.runt'+_0x3f9dc1(0x12d)+_0x3f9dc1(0x1ba)+_0x3f9dc1(0x19f)+_0x3f9dc1(0x15e)+_0x3f9dc1(0x15a)+_0x3f9dc1(0x171));return{'patched':!![],'source':_0x45a9ba[_0x3f9dc1(0x1a6)](_0x5004da,_0x5004da+'\x0a'+createRuntimeChannelImport(_0x39835f))[_0x3f9dc1(0x1a6)](_0x3a62b0,_0x2c81aa)};}function patchExistingChannelPluginRuntimeFromSource(_0x53c4ff,_0x2018f0){const _0x4d1f0c=_0x3984,{runtimeChannelImportPath:_0x589da7}=_0x2018f0,_0x19c246=_0x4d1f0c(0x1a1)+'\x20createH'+_0x4d1f0c(0x121)+_0x4d1f0c(0x193)+_0x4d1f0c(0x130)+';';if(!_0x53c4ff[_0x4d1f0c(0x1a8)](_0x19c246))return{'patched':![],'reason':_0x4d1f0c(0x1c3)+'ot-found'};const _0x500af1=_0x4d1f0c(0x168)+_0x4d1f0c(0x1af)+_0x4d1f0c(0x178)+'null;',_0x494909=_0x4d1f0c(0x12f)+_0x4d1f0c(0x1a9)+_0x4d1f0c(0x1c6)+_0x4d1f0c(0x176)+'Set\x20=\x20ne'+_0x4d1f0c(0x195)+_0x4d1f0c(0x194)+_0x4d1f0c(0x17e)+_0x4d1f0c(0x16a)+_0x4d1f0c(0x197),_0x1912ef=_0x53c4ff[_0x4d1f0c(0x182)](_0x500af1),_0x5dd8f4=_0x53c4ff[_0x4d1f0c(0x182)](_0x494909,_0x1912ef);if(_0x1912ef===-0x1||_0x5dd8f4===-0x1)return{'patched':![],'reason':'not-foun'+'d'};const _0x984d41=_0x4d1f0c(0x168)+'solvedRu'+_0x4d1f0c(0x178)+_0x4d1f0c(0x198)+'const\x20en'+_0x4d1f0c(0x143)+_0x4d1f0c(0x15f)+'RuntimeH'+_0x4d1f0c(0x141)+_0x4d1f0c(0x124)+_0x4d1f0c(0x144)+_0x4d1f0c(0x1b2)+_0x4d1f0c(0x177)+_0x4d1f0c(0x147)+_0x4d1f0c(0x1b6)+'e\x20!==\x20\x22o'+_0x4d1f0c(0x1c5)+'return\x20r'+_0x4d1f0c(0x161)+_0x4d1f0c(0x1b5)+_0x4d1f0c(0x164)+_0x4d1f0c(0x14b)+_0x4d1f0c(0x156)+_0x4d1f0c(0x1b1)+_0x4d1f0c(0x135)+'nnel?.in'+_0x4d1f0c(0x1bb)+_0x4d1f0c(0x122)+_0x4d1f0c(0x1a0)+_0x4d1f0c(0x180)+_0x4d1f0c(0x1b3)+_0x4d1f0c(0x172)+_0x4d1f0c(0x179)+'jieCreat'+_0x4d1f0c(0x1b0)+_0x4d1f0c(0x190)+_0x4d1f0c(0x139)+'nst\x20exis'+_0x4d1f0c(0x189)+'nel\x20=\x20ru'+'ntime.ch'+_0x4d1f0c(0x191)+'\x20typeof\x20'+'runtime.'+_0x4d1f0c(0x15d)+_0x4d1f0c(0x131)+_0x4d1f0c(0x151)+_0x4d1f0c(0x164)+_0x4d1f0c(0x1b9)+_0x4d1f0c(0x14d)+_0x4d1f0c(0x16b)+'channel\x20'+_0x4d1f0c(0x16e)+_0x4d1f0c(0x123)+'elRuntim'+_0x4d1f0c(0x157)+_0x4d1f0c(0x184)+_0x4d1f0c(0x19e)+_0x4d1f0c(0x1ac)+_0x4d1f0c(0x174)+_0x4d1f0c(0x1b8)+_0x4d1f0c(0x1ad)+_0x4d1f0c(0x13c)+_0x4d1f0c(0x12c)+_0x4d1f0c(0x170)+_0x4d1f0c(0x1ab)+'elRuntim'+'e.runtim'+'eContext'+'s,\x0a\x09\x09\x09\x09i'+_0x4d1f0c(0x155)+'existing'+_0x4d1f0c(0x13c)+_0x4d1f0c(0x149)+_0x4d1f0c(0x1ab)+_0x4d1f0c(0x129)+_0x4d1f0c(0x158)+_0x4d1f0c(0x13d)+_0x4d1f0c(0x163)+_0x4d1f0c(0x12a)+_0x4d1f0c(0x1a3)+_0x4d1f0c(0x154)+'stingCha'+_0x4d1f0c(0x186)+_0x4d1f0c(0x13b)+_0x4d1f0c(0x1bf)+_0x4d1f0c(0x13e)+'urn\x20??\x20c'+_0x4d1f0c(0x1c2)+_0x4d1f0c(0x137)+_0x4d1f0c(0x12e)+'\x09\x09\x09reply'+_0x4d1f0c(0x19a)+_0x4d1f0c(0x19e)+_0x4d1f0c(0x1a7)+_0x4d1f0c(0x1ab)+_0x4d1f0c(0x129)+_0x4d1f0c(0x127)+_0x4d1f0c(0x166)+_0x4d1f0c(0x19b)+_0x4d1f0c(0x17d)+_0x4d1f0c(0x14f)+_0x4d1f0c(0x1c0)+_0x4d1f0c(0x125)+_0x4d1f0c(0x1bc)+_0x4d1f0c(0x19c)+'\x09\x09\x09};\x0a\x09\x09'+_0x4d1f0c(0x19f)+'runtime;'+'\x0a\x09\x09};\x0a\x09\x09'+_0x4d1f0c(0x12b)+_0x4d1f0c(0x1a5)+_0x4d1f0c(0x136)+_0x4d1f0c(0x145)+_0x4d1f0c(0x148)+_0x4d1f0c(0x1aa)+'e\x20??=\x20en'+_0x4d1f0c(0x143)+_0x4d1f0c(0x15f)+_0x4d1f0c(0x128)+_0x4d1f0c(0x159)+'esolveCr'+_0x4d1f0c(0x162)+_0x4d1f0c(0x1c4)+_0x4d1f0c(0x15c)+(_0x4d1f0c(0x183)+_0x4d1f0c(0x12d)+_0x4d1f0c(0x1ba)+'\x09return\x20'+_0x4d1f0c(0x15e)+'Runtime;'+'\x0a\x09\x09};\x0a'),_0x3b66da=_0x53c4ff[_0x4d1f0c(0x1ae)](0x0,_0x1912ef)+_0x984d41+_0x53c4ff[_0x4d1f0c(0x1ae)](_0x5dd8f4);return{'patched':!![],'source':ensureRuntimeChannelImport(_0x3b66da,{'importMarker':_0x19c246,'runtimeChannelImportPath':_0x589da7})};}function createRuntimeChannelImport(_0x9af3d8){const _0x4af62b=_0x3984;return _0x4af62b(0x1a1)+_0x4af62b(0x1a4)+_0x4af62b(0x199)+'annel\x20as'+_0x4af62b(0x142)+_0x4af62b(0x132)+_0x4af62b(0x140)+_0x4af62b(0x134)+_0x4af62b(0x175)+_0x9af3d8+'\x22;';}function _0x3984(_0x5a064f,_0x2e114d){_0x5a064f=_0x5a064f-0x120;const _0x21b30b=_0x21b3();let _0x3984e7=_0x21b30b[_0x5a064f];return _0x3984e7;}function hasRuntimeChannelImport(_0x40b017,_0x5235c9){return _0x40b017['includes'](createRuntimeChannelImport(_0x5235c9));}function ensureRuntimeChannelImport(_0x4312b7,{importMarker:_0x5972b5,runtimeChannelImportPath:_0x2987f3}){const _0x1e8440=_0x3984,_0xe4e293=createRuntimeChannelImport(_0x2987f3),_0x58ff98=/import \{ createRuntimeChannel as wujieCreateRuntimeChannel \} from "\.\/runtime-channel-[^"]+\.js";\n?/;if(_0x58ff98[_0x1e8440(0x150)](_0x4312b7))return _0x4312b7[_0x1e8440(0x1a6)](_0x58ff98,_0xe4e293+'\x0a');return _0x4312b7[_0x1e8440(0x1a6)](_0x5972b5,_0x5972b5+'\x0a'+_0xe4e293);}function _0x21b3(){const _0x256cce=['452804meDFpC','untime;\x0a','eatePlug','urn:\x20exi','untime.c','eturn\x20re','\x0a\x09\x09\x09\x09ses','channel-','\x09\x09let\x20re','not-foun','CTION_KE','runtime.','7qyvoJj','ntime.ch','=\x20{\x0a\x09\x09\x09\x09','wujieCre','ontexts\x20','\x0a\x09\x09};','nnelRunt','annel.tu','untimeCo','m\x20\x22','ctionKey','runtime\x20','ntime\x20=\x20','ime\x20=\x20wu','ntime;\x0a\x09','ded','nRuntime','istingCh','ME_REFLE','hannelIm','me;\x0a\x09\x09\x09c','ot-found','indexOf','ons.runt','..existi','already-','nnel.inb','\x09};','ot-provi','tingChan','436500xouWMd','nst\x20exis','3XqlHwc','jieCreat','meChanne','589348AKlUpw','Channel(','annel\x20&&','528OGpVuX','om\x20\x22node','ZY_RUNTI','w\x20Set(LA','ns.runti','YS);','null;\x0a\x09\x09','untimeCh',':\x20existi','sion:\x20ex','session\x0a','turn:\x20ex','ngChanne','\x09return\x20','rn\x20runti','import\x20{','e\x20??=\x20re','nnel.tur','\x20createR','solveRun','replace','l.reply\x20','includes','lazyRunt','edRuntim','??\x20chann','l,\x0a\x09\x09\x09\x09r','existing','slice','solvedRu','eRuntime','n\x20&&\x20run','\x09\x09\x09if\x20(!','onst\x20cha','atePlugi','\x09\x09\x09if\x20(r','f\x20runtim','\x0a\x09\x09};\x0a\x09\x09','ntexts:\x20','hannel\x20:','ns));\x0a\x09\x09','bound?.r','Runtime.','ateRunti','49968IQJRFV','channelR','ssion\x20??','imePromi','hannelRu','import-n','inRuntim','bject\x22)\x20','imeRefle','()(optio','7439530bNRBGf','ash\x20}\x20fr','un)\x20retu','...chann','\x20(runtim','\x20channel','solveCre','e.reply,','RuntimeH','elRuntim','stingCha','const\x20re','runtimeC','imeOptio','bound,\x0a\x09','\x09\x09const\x20',':crypto\x22','===\x20\x22obj','eateRunt','e\x20??=\x20en','el\x20}\x20fro','time.cha','time\x20=\x20(','ntime.in','portPath',');\x0a\x09\x09\x09co','meOption','ound\x20??\x20','Channel.','d,\x0a\x09\x09\x09\x09t','untime.t','runtime-','imeChann','elpers\x20=','\x20wujieCr','sureWuji','e)\x20=>\x20{\x0a',')\x20=>\x20{\x0a\x09','952842adcTOL','||\x20typeo','\x09\x09resolv','inbound\x20','\x09\x09\x09};\x0a\x09\x09','hannel?.','1425078TLCfFw','\x20{};\x0a\x09\x09\x09','e\x20!==\x20\x22o','annel.se','test','ect\x22\x20?\x20r','\x09\x09\x09reply','e.runtim','n\x20??\x20exi','nbound:\x20','turn?.ru','e,\x0a\x09\x09\x09\x09.','e.inboun','elpers(r','Runtime;','\x20typeof\x20','e()(opti','channel\x20','resolved','eChannel'];_0x21b3=function(){return _0x256cce;};return _0x21b3();}
|
|
1
|
+
(function(_0x51e222,_0x4963f2){const _0x5976b1=_0xfd0a,_0x134ccc=_0x51e222();while(!![]){try{const _0xc80241=-parseInt(_0x5976b1(0x267))/0x1+parseInt(_0x5976b1(0x249))/0x2*(parseInt(_0x5976b1(0x1d7))/0x3)+-parseInt(_0x5976b1(0x1e2))/0x4+parseInt(_0x5976b1(0x23b))/0x5*(parseInt(_0x5976b1(0x26a))/0x6)+parseInt(_0x5976b1(0x239))/0x7+parseInt(_0x5976b1(0x25e))/0x8*(parseInt(_0x5976b1(0x251))/0x9)+-parseInt(_0x5976b1(0x20b))/0xa*(parseInt(_0x5976b1(0x1ea))/0xb);if(_0xc80241===_0x4963f2)break;else _0x134ccc['push'](_0x134ccc['shift']());}catch(_0x42ade4){_0x134ccc['push'](_0x134ccc['shift']());}}}(_0x3a95,0xf0383));export function patchChannelPluginRuntimeFromSource(_0x3c19ac,_0x3a3dee={}){const _0x21d64d=_0xfd0a,_0x270970=_0x3a3dee[_0x21d64d(0x244)+'hannelIm'+_0x21d64d(0x272)];if(!_0x270970)return{'patched':![],'reason':'runtime-'+'channel-'+_0x21d64d(0x1f3)+'ot-provi'+'ded'};if(_0x3c19ac[_0x21d64d(0x1fc)](_0x21d64d(0x221)+'ateRunti'+'meChanne'+'l')){if(_0x3c19ac['includes'](_0x21d64d(0x1e0)+'istingCh'+_0x21d64d(0x204)+_0x21d64d(0x1f4))&&hasRuntimeChannelImport(_0x3c19ac,_0x270970))return{'patched':![],'reason':'already-'+_0x21d64d(0x1fd)};return patchExistingChannelPluginRuntimeFromSource(_0x3c19ac,{'runtimeChannelImportPath':_0x270970});}if(_0x3c19ac[_0x21d64d(0x1fc)](_0x21d64d(0x23d)+_0x21d64d(0x20c)+_0x21d64d(0x230)+'se'))return patchExistingChannelPluginRuntimeFromSource(_0x3c19ac,{'runtimeChannelImportPath':_0x270970});const _0x5c8c73=_0x21d64d(0x254)+_0x21d64d(0x269)+_0x21d64d(0x278)+_0x21d64d(0x1de)+_0x21d64d(0x22a)+_0x21d64d(0x241)+_0x21d64d(0x223)+_0x21d64d(0x24d)+_0x21d64d(0x225)+_0x21d64d(0x234)+_0x21d64d(0x1ee)+_0x21d64d(0x259)+_0x21d64d(0x211)+_0x21d64d(0x1e1)+_0x21d64d(0x21f)+_0x21d64d(0x228)+_0x21d64d(0x220)+_0x21d64d(0x208)+_0x21d64d(0x243)+_0x21d64d(0x269)+_0x21d64d(0x25b)+_0x21d64d(0x24b);if(!_0x3c19ac[_0x21d64d(0x1fc)](_0x5c8c73))return{'patched':![],'reason':_0x21d64d(0x257)+'d'};const _0x5590cf=_0x21d64d(0x23c)+'\x20createH'+_0x21d64d(0x205)+'om\x20\x22node'+':crypto\x22'+';';if(!_0x3c19ac[_0x21d64d(0x1fc)](_0x5590cf))return{'patched':![],'reason':_0x21d64d(0x1f3)+_0x21d64d(0x1f5)};const _0x1be336=_0x21d64d(0x254)+_0x21d64d(0x269)+_0x21d64d(0x278)+'null;\x0a\x09\x09'+_0x21d64d(0x246)+_0x21d64d(0x1db)+'eChannel'+_0x21d64d(0x1fe)+_0x21d64d(0x21b)+_0x21d64d(0x1f9)+_0x21d64d(0x23e)+_0x21d64d(0x202)+'runtime\x20'+_0x21d64d(0x260)+_0x21d64d(0x201)+_0x21d64d(0x24f)+_0x21d64d(0x258)+_0x21d64d(0x224)+_0x21d64d(0x1f1)+_0x21d64d(0x1dd)+'untime.c'+_0x21d64d(0x20e)+'turn?.ru'+'n\x20&&\x20run'+_0x21d64d(0x235)+_0x21d64d(0x25f)+_0x21d64d(0x1e5)+_0x21d64d(0x1e8)+_0x21d64d(0x214)+_0x21d64d(0x26b)+'onst\x20cha'+_0x21d64d(0x20c)+_0x21d64d(0x200)+_0x21d64d(0x1fb)+_0x21d64d(0x24c)+_0x21d64d(0x275)+_0x21d64d(0x1e4)+_0x21d64d(0x233)+_0x21d64d(0x1ed)+_0x21d64d(0x23a)+_0x21d64d(0x1d3)+_0x21d64d(0x270)+_0x21d64d(0x20d)+_0x21d64d(0x253)+_0x21d64d(0x279)+'===\x20\x22obj'+'ect\x22\x20?\x20r'+_0x21d64d(0x24e)+_0x21d64d(0x1eb)+_0x21d64d(0x250)+_0x21d64d(0x253)+'channel\x20'+_0x21d64d(0x248)+_0x21d64d(0x217)+_0x21d64d(0x242)+_0x21d64d(0x271)+'..existi'+'ngChanne'+_0x21d64d(0x277)+_0x21d64d(0x1e9)+_0x21d64d(0x232)+_0x21d64d(0x21c)+_0x21d64d(0x266)+_0x21d64d(0x244)+_0x21d64d(0x26c)+_0x21d64d(0x222)+_0x21d64d(0x242)+_0x21d64d(0x25d)+_0x21d64d(0x1fa)+_0x21d64d(0x209)+_0x21d64d(0x26e)+_0x21d64d(0x21c)+_0x21d64d(0x266)+_0x21d64d(0x1e6)+_0x21d64d(0x222)+_0x21d64d(0x242)+_0x21d64d(0x212)+_0x21d64d(0x1f2)+_0x21d64d(0x1f7)+_0x21d64d(0x1d6)+_0x21d64d(0x1ff)+_0x21d64d(0x245)+_0x21d64d(0x1d6)+_0x21d64d(0x219)+_0x21d64d(0x261)+_0x21d64d(0x1f0)+'untime.t'+_0x21d64d(0x231)+_0x21d64d(0x264)+_0x21d64d(0x1dc)+'bound,\x0a\x09'+'\x09\x09\x09reply'+':\x20existi'+_0x21d64d(0x206)+'l.reply\x20'+'??\x20chann'+_0x21d64d(0x242)+_0x21d64d(0x1ef)+_0x21d64d(0x22f)+_0x21d64d(0x227)+'istingCh'+'annel.se'+_0x21d64d(0x240)+_0x21d64d(0x1df)+_0x21d64d(0x1d9)+_0x21d64d(0x265)+_0x21d64d(0x26d)+_0x21d64d(0x1d4)+'runtime;'+_0x21d64d(0x207)+_0x21d64d(0x22a)+'solveRun'+_0x21d64d(0x223)+')\x20=>\x20{\x0a\x09'+_0x21d64d(0x225)+_0x21d64d(0x234)+_0x21d64d(0x229)+_0x21d64d(0x1db)+_0x21d64d(0x23f)+_0x21d64d(0x1fe)+_0x21d64d(0x21d)+_0x21d64d(0x256)+'eatePlug'+'inRuntim'+_0x21d64d(0x1e3)+(_0x21d64d(0x21a)+_0x21d64d(0x213)+_0x21d64d(0x263)+_0x21d64d(0x1d4)+_0x21d64d(0x276)+_0x21d64d(0x268)+_0x21d64d(0x24a));return{'patched':!![],'source':_0x3c19ac[_0x21d64d(0x22c)](_0x5590cf,_0x5590cf+'\x0a'+createRuntimeChannelImport(_0x270970))[_0x21d64d(0x22c)](_0x5c8c73,_0x1be336)};}function _0x3a95(){const _0x5140a4=['urn:\x20exi','istingCh','\x20(runtim','eContext','jieCreat','includes','patched','RuntimeH','nnel.tur','ime\x20=\x20wu','f\x20runtim','\x09\x09\x09if\x20(!','..existi','annel.tu','ash\x20}\x20fr','ngChanne','\x0a\x09\x09};\x0a\x09\x09','s);\x0a\x09\x09\x09r','s,\x0a\x09\x09\x09\x09i','Set\x20=\x20ne','230vIbTeM','nnelRunt','\x20typeof\x20','hannel?.','turn?.ru','ZY_RUNTI','atePlugi','e.inboun','imeOptio','rn\x20runti','null;','CTION_KE','...chann','\x0a\x09\x09};\x0a','nnel.inb','ons.runt','elpers\x20=','existing','elpers(r','onst\x20cha','()(optio','meOption','wujieCre','??\x20chann','time\x20=\x20(','return\x20r','\x09\x09resolv','bound,\x0a\x09','sion:\x20ex','ns.runti','e\x20??=\x20en','const\x20re','slice','replace','eatePlug','runtime;','\x0a\x09\x09\x09\x09ses','imePromi','urn\x20??\x20c','ntexts:\x20','nst\x20exis','edRuntim','time.cha','YS);','n\x20&&\x20run','ME_REFLE','1906058AyJnPX','nel\x20=\x20ru','7855dpzBhA','import\x20{','wujieCha','e)\x20=>\x20{\x0a','eChannel','ssion\x20??','solveRun','elRuntim','eturn\x20re','runtimeC','n\x20??\x20exi','const\x20en','w\x20Set(LA','=\x20{\x0a\x09\x09\x09\x09','71698aCKKss','\x0a\x09\x09};','\x09};','eRuntime',')\x20=>\x20{\x0a\x09','untime.c','e\x20!==\x20\x22o','\x20{};\x0a\x09\x09\x09','3628017lfYpPw','imeChann','runtime.','\x09\x09let\x20re','l.reply\x20','esolveCr','not-foun','bject\x22)\x20','solveCre','indexOf','ntime;\x0a\x09','ctionKey','e.runtim','24KsYiwi','nnel?.in','||\x20typeo','ound\x20??\x20','\x20wujieCr','ns));\x0a\x09\x09','hannelRu','session\x0a','Channel.','890281GvasAe','Runtime;','solvedRu','3594EnGklZ','me;\x0a\x09\x09\x09c','ontexts\x20','\x09\x09\x09};\x0a\x09\x09','nbound:\x20','\x09\x09\x09reply','annel\x20&&','e,\x0a\x09\x09\x09\x09.','portPath',':crypto\x22','\x20createR','Channel(','resolved','l,\x0a\x09\x09\x09\x09r','ntime\x20=\x20','channel\x20','annel.se','ntime.ch','\x09return\x20',':\x20existi','stingCha','129dZmywl','untimeCh','Runtime.','imeRefle','sureWuji','ntime.in','\x09\x09\x09if\x20(r','null;\x0a\x09\x09','\x20channel','turn:\x20ex','nRuntime','836680KnCYJO','e()(opti',');\x0a\x09\x09\x09co','bound?.r','inbound\x20','lazyRunt','un)\x20retu','untimeCo','899503WcCTgv','hannel\x20:','annel\x20as','tingChan','e\x20??=\x20re','e.reply,','channelR','untime;\x0a','d,\x0a\x09\x09\x09\x09t','import-n','rn\x20??','ot-found','\x20createH'];_0x3a95=function(){return _0x5140a4;};return _0x3a95();}function _0xfd0a(_0x2fa4bf,_0x5b84e8){_0x2fa4bf=_0x2fa4bf-0x1d3;const _0x3a9561=_0x3a95();let _0xfd0a80=_0x3a9561[_0x2fa4bf];return _0xfd0a80;}function patchExistingChannelPluginRuntimeFromSource(_0x1b4258,_0x340054){const _0xf632c9=_0xfd0a,{runtimeChannelImportPath:_0x11a5f7}=_0x340054,_0x155cbe=_0xf632c9(0x23c)+_0xf632c9(0x1f6)+_0xf632c9(0x205)+'om\x20\x22node'+_0xf632c9(0x273)+';';if(!_0x1b4258[_0xf632c9(0x1fc)](_0x155cbe))return{'patched':![],'reason':_0xf632c9(0x1f3)+_0xf632c9(0x1f5)};const _0x2802fe=_0xf632c9(0x254)+_0xf632c9(0x269)+_0xf632c9(0x278)+_0xf632c9(0x215),_0xa6aa8c='\x09\x09const\x20'+_0xf632c9(0x1e7)+_0xf632c9(0x1da)+_0xf632c9(0x25c)+_0xf632c9(0x20a)+_0xf632c9(0x247)+_0xf632c9(0x210)+_0xf632c9(0x238)+_0xf632c9(0x216)+_0xf632c9(0x236),_0xfb48fa=_0x1b4258[_0xf632c9(0x25a)](_0x2802fe),_0x515212=_0x1b4258[_0xf632c9(0x25a)](_0xa6aa8c,_0xfb48fa);if(_0xfb48fa===-0x1||_0x515212===-0x1)return{'patched':![],'reason':_0xf632c9(0x257)+'d'};const _0x5185e8='\x09\x09let\x20re'+_0xf632c9(0x269)+_0xf632c9(0x278)+_0xf632c9(0x1de)+_0xf632c9(0x246)+'sureWuji'+_0xf632c9(0x23f)+_0xf632c9(0x1fe)+_0xf632c9(0x21b)+'\x20(runtim'+_0xf632c9(0x23e)+_0xf632c9(0x202)+'runtime\x20'+_0xf632c9(0x260)+_0xf632c9(0x201)+_0xf632c9(0x24f)+_0xf632c9(0x258)+'return\x20r'+'untime;\x0a'+'\x09\x09\x09if\x20(r'+_0xf632c9(0x24e)+_0xf632c9(0x20e)+_0xf632c9(0x20f)+_0xf632c9(0x237)+_0xf632c9(0x235)+'nnel?.in'+_0xf632c9(0x1e5)+_0xf632c9(0x1e8)+_0xf632c9(0x214)+_0xf632c9(0x26b)+_0xf632c9(0x21e)+_0xf632c9(0x20c)+_0xf632c9(0x200)+_0xf632c9(0x1fb)+_0xf632c9(0x24c)+_0xf632c9(0x275)+_0xf632c9(0x1e4)+_0xf632c9(0x233)+_0xf632c9(0x1ed)+'nel\x20=\x20ru'+_0xf632c9(0x1d3)+'annel\x20&&'+'\x20typeof\x20'+_0xf632c9(0x253)+_0xf632c9(0x279)+'===\x20\x22obj'+'ect\x22\x20?\x20r'+_0xf632c9(0x24e)+'hannel\x20:'+_0xf632c9(0x250)+'runtime.'+_0xf632c9(0x279)+'=\x20{\x0a\x09\x09\x09\x09'+_0xf632c9(0x217)+_0xf632c9(0x242)+_0xf632c9(0x271)+_0xf632c9(0x203)+_0xf632c9(0x206)+_0xf632c9(0x277)+'untimeCo'+_0xf632c9(0x232)+_0xf632c9(0x21c)+_0xf632c9(0x266)+_0xf632c9(0x244)+_0xf632c9(0x26c)+_0xf632c9(0x222)+_0xf632c9(0x242)+_0xf632c9(0x25d)+'eContext'+_0xf632c9(0x209)+'nbound:\x20'+_0xf632c9(0x21c)+'Channel.'+_0xf632c9(0x1e6)+_0xf632c9(0x222)+_0xf632c9(0x242)+'e.inboun'+'d,\x0a\x09\x09\x09\x09t'+_0xf632c9(0x1f7)+'stingCha'+_0xf632c9(0x1ff)+'n\x20??\x20exi'+'stingCha'+_0xf632c9(0x219)+'ound\x20??\x20'+_0xf632c9(0x1f0)+'untime.t'+'urn\x20??\x20c'+'hannelRu'+_0xf632c9(0x1dc)+_0xf632c9(0x226)+_0xf632c9(0x26f)+_0xf632c9(0x1d5)+_0xf632c9(0x206)+_0xf632c9(0x255)+_0xf632c9(0x222)+'elRuntim'+'e.reply,'+_0xf632c9(0x22f)+_0xf632c9(0x227)+_0xf632c9(0x1f8)+_0xf632c9(0x27a)+'ssion\x20??'+'\x20channel'+'Runtime.'+_0xf632c9(0x265)+'\x09\x09\x09};\x0a\x09\x09'+_0xf632c9(0x1d4)+_0xf632c9(0x22e)+_0xf632c9(0x207)+'const\x20re'+_0xf632c9(0x241)+_0xf632c9(0x223)+_0xf632c9(0x24d)+'\x09\x09resolv'+_0xf632c9(0x234)+_0xf632c9(0x229)+'sureWuji'+'eChannel'+_0xf632c9(0x1fe)+_0xf632c9(0x21d)+_0xf632c9(0x256)+_0xf632c9(0x22d)+'inRuntim'+_0xf632c9(0x1e3)+(_0xf632c9(0x21a)+'imeOptio'+_0xf632c9(0x263)+'\x09return\x20'+'resolved'+_0xf632c9(0x268)+_0xf632c9(0x218)),_0x450ed7=_0x1b4258['slice'](0x0,_0xfb48fa)+_0x5185e8+_0x1b4258[_0xf632c9(0x22b)](_0x515212);return{'patched':!![],'source':ensureRuntimeChannelImport(_0x450ed7,{'importMarker':_0x155cbe,'runtimeChannelImportPath':_0x11a5f7})};}function createRuntimeChannelImport(_0x325886){const _0x4b3372=_0xfd0a;return'import\x20{'+_0x4b3372(0x274)+_0x4b3372(0x1d8)+_0x4b3372(0x1ec)+_0x4b3372(0x262)+'eateRunt'+_0x4b3372(0x252)+'el\x20}\x20fro'+'m\x20\x22'+_0x325886+'\x22;';}function hasRuntimeChannelImport(_0x33a83a,_0x409a32){return _0x33a83a['includes'](createRuntimeChannelImport(_0x409a32));}function ensureRuntimeChannelImport(_0x5979ea,{importMarker:_0x27969d,runtimeChannelImportPath:_0x16d915}){const _0x35f9dc=_0xfd0a,_0x449115=createRuntimeChannelImport(_0x16d915),_0x2840d1=/import \{ createRuntimeChannel as wujieCreateRuntimeChannel \} from "\.\/runtime-channel-[^"]+\.js";\n?/;if(_0x2840d1['test'](_0x5979ea))return _0x5979ea[_0x35f9dc(0x22c)](_0x2840d1,_0x449115+'\x0a');return _0x5979ea['replace'](_0x27969d,_0x27969d+'\x0a'+_0x449115);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x14b1c8,_0x4823d7){const _0x2ddba0=_0x1c53,_0x454082=_0x14b1c8();while(!![]){try{const _0x229c03=-parseInt(_0x2ddba0(0x18a))/0x1+-parseInt(_0x2ddba0(0x18b))/0x2*(parseInt(_0x2ddba0(0x169))/0x3)+-parseInt(_0x2ddba0(0x168))/0x4+parseInt(_0x2ddba0(0x17b))/0x5*(parseInt(_0x2ddba0(0x1a2))/0x6)+-parseInt(_0x2ddba0(0x19e))/0x7*(parseInt(_0x2ddba0(0x191))/0x8)+-parseInt(_0x2ddba0(0x1b1))/0x9*(-parseInt(_0x2ddba0(0x162))/0xa)+parseInt(_0x2ddba0(0x16d))/0xb;if(_0x229c03===_0x4823d7)break;else _0x454082['push'](_0x454082['shift']());}catch(_0x215f86){_0x454082['push'](_0x454082['shift']());}}}(_0x5b95,0x6a98e));export function patchMixedToolContentFromSource(_0x32bb83){const _0x59da22=_0x1c53,_0x4effc7='function'+_0x59da22(0x18f)+_0x59da22(0x19d)+_0x59da22(0x1b8)+_0x59da22(0x1bb)+_0x59da22(0x19a)+'t',_0x294a09=_0x32bb83[_0x59da22(0x1bc)](_0x4effc7);if(_0x294a09===-0x1)return{'patched':![],'reason':_0x59da22(0x1b7)+'d'};let _0x3903ff=0x0,_0x5b6dc7=![],_0x545e81=_0x294a09;for(let _0x5350fd=_0x294a09;_0x5350fd<_0x32bb83[_0x59da22(0x1ba)];_0x5350fd+=0x1){_0x32bb83[_0x5350fd]==='{'&&(_0x3903ff+=0x1,_0x5b6dc7=!![]);_0x32bb83[_0x5350fd]==='}'&&(_0x3903ff-=0x1);if(_0x5b6dc7&&_0x3903ff===0x0){_0x545e81=_0x5350fd+0x1;break;}}const _0x4acad9=_0x32bb83[_0x59da22(0x199)+'g'](_0x294a09,_0x545e81);if(_0x4acad9['includes'](_0x59da22(0x16a)+_0x59da22(0x16f)+_0x59da22(0x17f)))return{'patched':![],'reason':_0x59da22(0x171)+_0x59da22(0x1a0)};const _0x24c43a=_0x59da22(0x167)+_0x59da22(0x18f)+_0x59da22(0x19d)+_0x59da22(0x1b8)+_0x59da22(0x1bb)+_0x59da22(0x19a)+_0x59da22(0x16e)+_0x59da22(0x15e)+_0x59da22(0x17d)+_0x59da22(0x1a7)+'tent.som'+'e((block'+_0x59da22(0x19c)+_0x59da22(0x1a9)+'ock\x20||\x20t'+_0x59da22(0x15b)+_0x59da22(0x195)+'\x22object\x22'+_0x59da22(0x16b)+'\x20false;\x0a'+_0x59da22(0x15a)+'\x20isToolH'+_0x59da22(0x15f)+_0x59da22(0x17e)+'block.ty'+_0x59da22(0x1a1)+_0x59da22(0x16b)+_0x59da22(0x1b2)+_0x59da22(0x172)+_0x59da22(0x192)+_0x59da22(0x181)+_0x59da22(0x1a4)+_0x59da22(0x177)+_0x59da22(0x178)+'\x20(const\x20'+_0x59da22(0x15d)+_0x59da22(0x15c)+_0x59da22(0x1b5)+_0x59da22(0x197)+_0x59da22(0x1b4)+_0x59da22(0x1a5)+_0x59da22(0x18c)+_0x59da22(0x186)+'\x0a\x09\x09\x09proj'+_0x59da22(0x198)+'sh(block'+_0x59da22(0x19f)+_0x59da22(0x166)+_0x59da22(0x1af)+_0x59da22(0x196)+_0x59da22(0x1a3)+'k;\x0a\x09\x09if\x20'+'(entry.t'+_0x59da22(0x163)+_0x59da22(0x18e)+_0x59da22(0x1ad)+_0x59da22(0x173)+_0x59da22(0x1ab)+_0x59da22(0x176)+'\x20&&\x20entr'+_0x59da22(0x161)+_0x59da22(0x165)+_0x59da22(0x18d)+_0x59da22(0x182)+_0x59da22(0x1b9)+_0x59da22(0x1a6)+_0x59da22(0x174)+_0x59da22(0x17c)+'eChatHis'+_0x59da22(0x188)+_0x59da22(0x1ac)+_0x59da22(0x193)+_0x59da22(0x183)+_0x59da22(0x1a8)+_0x59da22(0x190)+_0x59da22(0x179)+_0x59da22(0x160)+'xChars);'+'\x0a\x09\x09\x09proj'+_0x59da22(0x198)+_0x59da22(0x1b6)+_0x59da22(0x1b0)+_0x59da22(0x187)+_0x59da22(0x185)+_0x59da22(0x17c)+_0x59da22(0x16c)+_0x59da22(0x175)+_0x59da22(0x184)+_0x59da22(0x170)+_0x59da22(0x1ae)+'ush(bloc'+'k);\x0a\x09\x09}\x0a'+_0x59da22(0x1b3)+_0x59da22(0x17a)+'xt\x20?\x20{\x0a\x09'+_0x59da22(0x189)+_0x59da22(0x1aa)+_0x59da22(0x194)+_0x59da22(0x19b)+'true\x0a\x09}\x20'+_0x59da22(0x164)+'}';return{'patched':!![],'source':_0x32bb83[_0x59da22(0x180)](_0x4acad9,_0x24c43a)};}function _0x1c53(_0x53d529,_0x4ee955){_0x53d529=_0x53d529-0x15a;const _0x5b95fe=_0x5b95();let _0x1c53b2=_0x5b95fe[_0x53d529];return _0x1c53b2;}function _0x5b95(){const _0x57bf84=['\x09}\x0a\x09retu','\x20||\x20type',')\x20{\x0a\x09\x09if','sh({\x0a\x09\x09\x09','not-foun','tTextFro','ue;\x0a\x09\x09\x09c','length','mMixedTo','indexOf','\x09\x09return','ypeof\x20bl','\x20content','block\x20of','t,\x20maxCh','istoryBl','text,\x20ma','y.text.t','20OxElue','ype\x20===\x20',':\x20null;\x0a','rim())\x20{','ntinue;\x0a','function','275400mVBuuy','144iQRdyn','projecte',')\x20return','ed.text\x0a','22858110lnCCiX','t(conten','d.push(b','{\x0a\x09\x09\x09pro','already-','let\x20hasT','\x20entry.t','ncated\x20=','\x09\x09\x09});\x0a\x09','\x22string\x22','ected\x20=\x20','[];\x0a\x09for','y.text).','rn\x20hasTe','3455xtwtql','\x20truncat','ars)\x20{\x0a\x09','ockType(','lock)','replace','lse;\x0a\x09co','ext\x20=\x20tr','ctiveTag','\x09}\x20else\x20','\x09\x09\x09text:','ject\x22)\x20{','text\x22,\x0a\x09','toryText','\x09content','461071YRASdU','33176UzRfMV','\x20!==\x20\x22ob','\x0a\x09\x09\x09hasT','\x22text\x22\x20&','\x20project','lay(entr','8ltnwYj','ext\x20=\x20fa','lineDire','ted,\x0a\x09\x09c','ock\x20!==\x20','nst\x20entr','\x20(!block','ected.pu','substrin','olConten','hanged:\x20',')\x20=>\x20{\x0a\x09','Assistan','6021463buwqZt',');\x0a\x09\x09\x09co','patched','pe);\x0a\x09})','3816NHWiOV','y\x20=\x20bloc','nst\x20proj','of\x20block','onst\x20tru','if\x20(!con','sForDisp','\x09if\x20(!bl',':\x20projec','ext\x20===\x20','(stripIn','&\x20typeof','jected.p','\x09\x09}\x0a\x09\x09co','\x09type:\x20\x22','474705vFUNBI','\x20null;\x0a\x09'];_0x5b95=function(){return _0x57bf84;};return _0x5b95();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x4c27(_0x5d6273,_0x15d338){_0x5d6273=_0x5d6273-0x1eb;const _0xb0df1a=_0xb0df();let _0x4c273b=_0xb0df1a[_0x5d6273];return _0x4c273b;}const _0xb28653=_0x4c27;(function(_0x2189e8,_0x590ed8){const _0x1ad11d=_0x4c27,_0x39f56d=_0x2189e8();while(!![]){try{const _0x16b407=parseInt(_0x1ad11d(0x201))/0x1+parseInt(_0x1ad11d(0x212))/0x2+-parseInt(_0x1ad11d(0x214))/0x3*(-parseInt(_0x1ad11d(0x21b))/0x4)+parseInt(_0x1ad11d(0x20a))/0x5*(-parseInt(_0x1ad11d(0x20f))/0x6)+-parseInt(_0x1ad11d(0x221))/0x7*(parseInt(_0x1ad11d(0x229))/0x8)+-parseInt(_0x1ad11d(0x1ff))/0x9*(parseInt(_0x1ad11d(0x21a))/0xa)+parseInt(_0x1ad11d(0x230))/0xb*(-parseInt(_0x1ad11d(0x232))/0xc);if(_0x16b407===_0x590ed8)break;else _0x39f56d['push'](_0x39f56d['shift']());}catch(_0x578df0){_0x39f56d['push'](_0x39f56d['shift']());}}}(_0xb0df,0xb650d));const REQUEST_ID_HEADER_PATCH_MARKER=_0xb28653(0x210)+_0xb28653(0x223)+_0xb28653(0x1f5)+_0xb28653(0x1fd)+_0xb28653(0x1f1)+'request-'+_0xb28653(0x22d),OPENAI_COMPLETIONS_TRANSPORT_CREATE_LINE=_0xb28653(0x210)+'sponseSt'+_0xb28653(0x233)+_0xb28653(0x21e)+_0xb28653(0x23d)+_0xb28653(0x1f7)+_0xb28653(0x21c)+_0xb28653(0x220)+_0xb28653(0x23c)+_0xb28653(0x1fe)+_0xb28653(0x226)+_0xb28653(0x205)+'(model,\x20'+_0xb28653(0x1f3)+'.signal)'+');',OPENAI_COMPLETIONS_TRANSPORT_PATCH_MARKER=_0xb28653(0x231)+'data:\x20re'+'sponseSt'+'ream,\x20re'+_0xb28653(0x1eb)+_0xb28653(0x22c)+_0xb28653(0x234)+'chat.com'+'pletions'+_0xb28653(0x218)+'params,\x20'+_0xb28653(0x1f2)+_0xb28653(0x1f0)+_0xb28653(0x20e)+_0xb28653(0x215)+_0xb28653(0x206)+'ons?.sig'+'nal)).wi'+_0xb28653(0x204)+'se();';function _0xb0df(){const _0x307335=['buildOpe','options?','rovider-','=\x20respon','r:\x20model','.complet','split','length','not-foun','headers:','patched','se.heade','dOpenAIS','45xvpVQn','request-','1482053BQYBpx','ll,','e?.({','thRespon','tOptions','el,\x20opti','ToRecord','(respons','?.provid','5prmmGo','if\x20(requ','utput[\x22r','match','questOpt','6517230SfxYQY','const\x20re','push','1406094iVugFa','equest-i','12JpAWxF','ions(mod','er\x20??\x20nu','d\x20??\x20nul','.create(','estId:\x20B','1092380GQjKou','1031284PnMkll','ions.cre','\x09provide','wait\x20cli','questId;','ate(para','7ANnCCJ','oolean(r','questId\x20','nRespons','id]\x20resp','dkReques','join','\x20headers','4902416lFlrKw','der\x22,\x20{','onse\x20hea','\x20=\x20await','id\x22);','\x09status:','d\x22]\x20=\x20re','12221pxqXVM','const\x20{\x20','2424MPdnwz','ream\x20=\x20a','\x20client.','estId)\x20o','console.','},\x20model','slice','includes','await\x20op','e.header','ms,\x20buil','ent.chat','sponse\x20}','equestId','trim','tions?.o','test','nAISdkRe','rs.get(\x22'];_0xb0df=function(){return _0x307335;};return _0xb0df();}export function patchProviderRequestIdHeaderFromSource(_0x3c440a){const _0x4db119=_0xb28653,_0x3f3be4=_0x3c440a[_0x4db119(0x1f8)]('\x0a'),_0x5aeffb=[];let _0x4e0943=![],_0x42fdec=_0x3c440a[_0x4db119(0x239)](OPENAI_COMPLETIONS_TRANSPORT_PATCH_MARKER),_0x362e19=/if \(requestId\) output\["request-id"\] = requestId;\s*await options\?\.onResponse\?\.\(\{/[_0x4db119(0x1ef)](_0x3c440a);for(let _0x221a8d=0x0;_0x221a8d<_0x3f3be4[_0x4db119(0x1f9)];_0x221a8d+=0x1){const _0x34b9e0=_0x3f3be4[_0x221a8d];if(!_0x42fdec&&_0x34b9e0[_0x4db119(0x239)](OPENAI_COMPLETIONS_TRANSPORT_CREATE_LINE)){const _0x5551f4=_0x34b9e0[_0x4db119(0x20d)](/^\s*/)?.[0x0]??'';_0x5aeffb['push'](''+_0x5551f4+OPENAI_COMPLETIONS_TRANSPORT_PATCH_MARKER,_0x5551f4+(_0x4db119(0x210)+_0x4db119(0x223)+_0x4db119(0x1f5)+_0x4db119(0x1fd)+_0x4db119(0x1f1)+_0x4db119(0x200)+_0x4db119(0x22d)),_0x5551f4+(_0x4db119(0x236)+'info(\x22[p'+_0x4db119(0x1f4)+_0x4db119(0x200)+_0x4db119(0x225)+_0x4db119(0x22b)+_0x4db119(0x22a)),_0x5551f4+(_0x4db119(0x21d)+_0x4db119(0x1f6)+_0x4db119(0x209)+_0x4db119(0x216)+_0x4db119(0x202)),_0x5551f4+('\x09model:\x20'+'model?.i'+_0x4db119(0x217)+'l,'),_0x5551f4+(_0x4db119(0x22e)+'\x20respons'+'e.status'+','),_0x5551f4+('\x09hasRequ'+_0x4db119(0x219)+_0x4db119(0x222)+_0x4db119(0x1ec)+'),'),_0x5551f4+'});',_0x5551f4+(_0x4db119(0x20b)+_0x4db119(0x235)+_0x4db119(0x20c)+_0x4db119(0x213)+_0x4db119(0x22f)+_0x4db119(0x21f))),_0x4e0943=!![],_0x42fdec=!![];continue;}if(_0x362e19||!_0x34b9e0[_0x4db119(0x239)](_0x4db119(0x23a)+_0x4db119(0x1ee)+_0x4db119(0x224)+_0x4db119(0x203))){_0x5aeffb[_0x4db119(0x211)](_0x34b9e0);continue;}let _0x453f6e=_0x221a8d;while(_0x453f6e<_0x3f3be4[_0x4db119(0x1f9)]&&_0x453f6e-_0x221a8d<0x8&&_0x3f3be4[_0x453f6e][_0x4db119(0x1ed)]()!==_0x4db119(0x237)+');'){_0x453f6e+=0x1;}const _0x9e9b9f=_0x3f3be4[_0x4db119(0x238)](_0x221a8d,_0x453f6e+0x1)[_0x4db119(0x227)]('\x0a');if(!_0x9e9b9f[_0x4db119(0x239)](_0x4db119(0x1fb)+_0x4db119(0x228)+_0x4db119(0x207)+_0x4db119(0x208)+_0x4db119(0x23b)+'s)')){_0x5aeffb[_0x4db119(0x211)](_0x34b9e0);continue;}const _0x256b1e=_0x34b9e0[_0x4db119(0x20d)](/^\s*/)?.[0x0]??'';_0x5aeffb['push'](_0x256b1e+(_0x4db119(0x210)+_0x4db119(0x223)+'=\x20respon'+_0x4db119(0x1fd)+_0x4db119(0x1f1)+_0x4db119(0x200)+_0x4db119(0x22d)),_0x256b1e+(_0x4db119(0x20b)+'estId)\x20o'+_0x4db119(0x20c)+_0x4db119(0x213)+_0x4db119(0x22f)+_0x4db119(0x21f))),_0x4e0943=!![],_0x362e19=!![],_0x5aeffb['push'](_0x34b9e0);}if(!_0x4e0943)return{'patched':![],'reason':_0x3c440a[_0x4db119(0x239)](REQUEST_ID_HEADER_PATCH_MARKER)||_0x3c440a[_0x4db119(0x239)](OPENAI_COMPLETIONS_TRANSPORT_PATCH_MARKER)?'already-'+_0x4db119(0x1fc):_0x4db119(0x1fa)+'d'};return{'patched':!![],'source':_0x5aeffb[_0x4db119(0x227)]('\x0a')};}
|