@wujie-shell/core 1.0.2 → 1.0.4
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 +7 -5
- 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 -1
- 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 -1
- 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 -1
- 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 -1
- 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/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 _0x96c1f6=_0x2ee8;(function(_0x4ca1df,_0x2355fb){const _0x34e9ce=_0x2ee8,_0x2cab87=_0x4ca1df();while(!![]){try{const _0x3b1040=-parseInt(_0x34e9ce(0x299))/0x1+-parseInt(_0x34e9ce(0x2e7))/0x2*(parseInt(_0x34e9ce(0x36f))/0x3)+-parseInt(_0x34e9ce(0x350))/0x4*(-parseInt(_0x34e9ce(0x197))/0x5)+parseInt(_0x34e9ce(0x35b))/0x6*(-parseInt(_0x34e9ce(0x321))/0x7)+-parseInt(_0x34e9ce(0x307))/0x8*(parseInt(_0x34e9ce(0x278))/0x9)+-parseInt(_0x34e9ce(0x2fc))/0xa*(parseInt(_0x34e9ce(0x26f))/0xb)+-parseInt(_0x34e9ce(0x2fa))/0xc*(-parseInt(_0x34e9ce(0x20d))/0xd);if(_0x3b1040===_0x2355fb)break;else _0x2cab87['push'](_0x2cab87['shift']());}catch(_0x1745ba){_0x2cab87['push'](_0x2cab87['shift']());}}}(_0x29ee,0xe4e4e));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,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';function _0x2ee8(_0x171734,_0x534cd3){_0x171734=_0x171734-0x177;const _0x29ee8f=_0x29ee();let _0x2ee820=_0x29ee8f[_0x171734];return _0x2ee820;}import{patchSessionStoreLoadFromSource,patchSessionStoreWriteFromSource}from'./patch-session-store-sqlite.mjs';const RUNTIME_DIR=_0x96c1f6(0x2b4)+'time',MANIFEST_NAME='runtime-'+_0x96c1f6(0x1d3)+'.json',NPM_INSTALL_TIMEOUT_MS=0xf*0x3c*0x3e8;export function resolveRuntimeRoot(_0x5ed689){if(process.env.WUJIE_SHELL_RUNTIME_ROOT)return resolve(process.env.WUJIE_SHELL_RUNTIME_ROOT);return resolve(_0x5ed689,RUNTIME_DIR);}export function resolveManifestPath(_0x50153){return join(_0x50153,MANIFEST_NAME);}async function loadProductRuntime(_0x167913,_0x3e112d){const _0x5f5cac=_0x96c1f6,_0x1f6b02=[join(_0x167913,'shell-ru'+_0x5f5cac(0x1a9),_0x5f5cac(0x375)+'s'),join(_0x3e112d,'shell-ru'+_0x5f5cac(0x1a9),_0x5f5cac(0x375)+'s')];for(const _0x170adb of _0x1f6b02){if(!existsSync(_0x170adb))continue;return await import(pathToFileURL(_0x170adb)[_0x5f5cac(0x17d)]+_0x5f5cac(0x389)+Date[_0x5f5cac(0x1b7)]());}return{};}export async function prepareRuntime(_0x5874e5,{syncOnly:syncOnly=![]}={}){const _0x3c2f90=_0x96c1f6,_0x7fc3e6=resolveRuntimeRoot(_0x5874e5[_0x3c2f90(0x250)+_0x3c2f90(0x310)]),_0x535141=createRuntimeLogger(getConfigPaths(_0x5874e5),_0x3c2f90(0x200)),_0x594b91=Date[_0x3c2f90(0x1b7)]();_0x535141?.['info'](_0x3c2f90(0x29e)+_0x3c2f90(0x1df)+_0x3c2f90(0x18f),{'syncOnly':syncOnly,'runtimeRoot':_0x7fc3e6,'shellConfig':summarizeShellConfig(_0x5874e5)});try{const _0x59e799=await ensureRuntimeBase(_0x5874e5,_0x7fc3e6,{'runtimeLogger':_0x535141,'syncOnly':syncOnly});_0x535141?.[_0x3c2f90(0x1f5)]('runtime\x20'+_0x3c2f90(0x1d3)+'\x20loaded',{'manifestPath':resolveManifestPath(_0x7fc3e6),'manifest':summarizeRuntimeManifest(_0x59e799)}),validateRuntimeNodeVersion(_0x59e799,_0x5874e5),_0x535141?.['info']('runtime\x20'+_0x3c2f90(0x1ab)+_0x3c2f90(0x36b)+_0x3c2f90(0x270),{'nodeVersion':_0x59e799[_0x3c2f90(0x1a5)+_0x3c2f90(0x2aa)]});if(syncOnly)validateRuntimeOpenClawVersion(_0x59e799,_0x5874e5),_0x535141?.[_0x3c2f90(0x1f5)]('runtime\x20'+'openclaw'+_0x3c2f90(0x28c)+_0x3c2f90(0x1c5)+'ed',{'openclawVersion':_0x59e799[_0x3c2f90(0x3ac)+_0x3c2f90(0x373)]});else{if(_0x59e799[_0x3c2f90(0x3ac)+_0x3c2f90(0x373)]!==_0x5874e5[_0x3c2f90(0x3ac)][_0x3c2f90(0x3ac)+'Version']){const _0x304538=await loadRuntimeInfo(_0x5874e5['projectR'+_0x3c2f90(0x310)]);_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x3ac)+_0x3c2f90(0x2d4)+_0x3c2f90(0x23a)+_0x3c2f90(0x27d),{'fromVersion':_0x59e799[_0x3c2f90(0x3ac)+_0x3c2f90(0x373)]||_0x3c2f90(0x35a),'toVersion':_0x5874e5[_0x3c2f90(0x3ac)]['openclaw'+'Version']}),await installOpenClawPackage(_0x304538,_0x5874e5[_0x3c2f90(0x3ac)]['openclaw'+_0x3c2f90(0x373)]),_0x59e799[_0x3c2f90(0x3ac)+_0x3c2f90(0x373)]=_0x5874e5[_0x3c2f90(0x3ac)][_0x3c2f90(0x3ac)+_0x3c2f90(0x373)],_0x535141?.['info']('openclaw'+_0x3c2f90(0x2d4)+_0x3c2f90(0x23a)+_0x3c2f90(0x2f7)+'ed',{'openclawVersion':_0x59e799[_0x3c2f90(0x3ac)+'Version']});}}_0x59e799[_0x3c2f90(0x34c)+_0x3c2f90(0x1c7)]=new Date()[_0x3c2f90(0x264)+_0x3c2f90(0x248)](),_0x59e799[_0x3c2f90(0x1a5)+'ion']=_0x5874e5[_0x3c2f90(0x3ac)][_0x3c2f90(0x1a5)+'ion'],_0x59e799[_0x3c2f90(0x27b)]={'appId':_0x5874e5[_0x3c2f90(0x3a5)],'productName':_0x5874e5[_0x3c2f90(0x249)+'ame'],'dataDirName':_0x5874e5[_0x3c2f90(0x351)+_0x3c2f90(0x183)]},await patchChatHistoryMixedToolContentBug(_0x7fc3e6,_0x59e799,{'runtimeLogger':_0x535141}),await patchProviderRequestIdHeader(_0x7fc3e6,_0x59e799,{'runtimeLogger':_0x535141}),await patchChannelPluginRuntimeBug(_0x7fc3e6,_0x59e799,{'runtimeLogger':_0x535141});const _0x50711c=await loadProductRuntime(_0x5874e5[_0x3c2f90(0x250)+_0x3c2f90(0x310)],_0x7fc3e6);if(typeof _0x50711c[_0x3c2f90(0x30e)+_0x3c2f90(0x2a0)+'ntime']===_0x3c2f90(0x2a5)){const _0x54fd4=createRuntimeInfoFromManifest(_0x7fc3e6,_0x59e799);await _0x50711c[_0x3c2f90(0x30e)+_0x3c2f90(0x2a0)+_0x3c2f90(0x1a9)]({'shellConfig':_0x5874e5,'runtime':_0x54fd4,'runtimeLogger':_0x535141,'syncOnly':syncOnly}),_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x382)+_0x3c2f90(0x1df)+'tools\x20sy'+_0x3c2f90(0x34e));}await patchSessionStoreSqliteRuntime(_0x7fc3e6,_0x59e799,{'runtimeLogger':_0x535141});!syncOnly&&(await installRuntimeLarkCliPackage(createRuntimeInfoFromManifest(_0x7fc3e6,_0x59e799),{'runtimeLogger':_0x535141,'createRuntimeEnv':createRuntimeEnv}),_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x29f)+_0x3c2f90(0x2b5)+_0x3c2f90(0x2d4)+'\x20synced'),await hasConfiguredKdocsSkill(_0x5874e5)?(await installKdocsCliBinary(_0x5874e5,createRuntimeInfoFromManifest(_0x7fc3e6,_0x59e799),{'runtimeLogger':_0x535141,'syncOnly':syncOnly}),_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x1a8)+_0x3c2f90(0x1ef)+_0x3c2f90(0x38e)+_0x3c2f90(0x288))):_0x535141?.['info'](_0x3c2f90(0x1a8)+_0x3c2f90(0x1ef)+_0x3c2f90(0x38e)+_0x3c2f90(0x2e1)+_0x3c2f90(0x202)+_0x3c2f90(0x39d)+_0x3c2f90(0x1dd)+'red'));const _0x570e05=Array[_0x3c2f90(0x182)](_0x59e799[_0x3c2f90(0x251)])?_0x59e799[_0x3c2f90(0x251)][_0x3c2f90(0x1c9)]:0x0;return await syncManifestPluginScope(_0x5874e5,_0x7fc3e6,_0x59e799),_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x1df)+_0x3c2f90(0x2f0)+'cope\x20syn'+_0x3c2f90(0x1bd),{'beforePluginCount':_0x570e05,'afterPluginCount':Array['isArray'](_0x59e799[_0x3c2f90(0x251)])?_0x59e799[_0x3c2f90(0x251)][_0x3c2f90(0x1c9)]:0x0,'pluginSpecCount':Array[_0x3c2f90(0x182)](_0x59e799[_0x3c2f90(0x25d)+_0x3c2f90(0x325)])?_0x59e799[_0x3c2f90(0x25d)+'ecs'][_0x3c2f90(0x1c9)]:0x0}),await syncConfiguredNpmPlugins(_0x5874e5,_0x7fc3e6,_0x59e799,{'runtimeLogger':_0x535141,'syncOnly':syncOnly}),_0x535141?.[_0x3c2f90(0x1f5)]('configur'+_0x3c2f90(0x18d)+_0x3c2f90(0x38b)+_0x3c2f90(0x398),{'pluginSpecCount':_0x5874e5[_0x3c2f90(0x3ac)][_0x3c2f90(0x25d)+_0x3c2f90(0x325)][_0x3c2f90(0x1c9)],'pluginCount':Array[_0x3c2f90(0x182)](_0x59e799[_0x3c2f90(0x251)])?_0x59e799['plugins']['length']:0x0}),await syncProductPlugins(_0x5874e5,_0x7fc3e6,_0x59e799,{'runtimeLogger':_0x535141}),_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x382)+'plugins\x20'+_0x3c2f90(0x288),{'localPluginCount':_0x5874e5['openclaw'][_0x3c2f90(0x216)+'LocalPlu'+_0x3c2f90(0x198)][_0x3c2f90(0x1c9)],'pluginCount':Array[_0x3c2f90(0x182)](_0x59e799['plugins'])?_0x59e799[_0x3c2f90(0x251)][_0x3c2f90(0x1c9)]:0x0}),await syncProductAgents(_0x5874e5,_0x7fc3e6,_0x59e799),_0x535141?.[_0x3c2f90(0x1f5)]('product\x20'+_0x3c2f90(0x1d1)+_0x3c2f90(0x398),{'sources':_0x5874e5[_0x3c2f90(0x3ac)][_0x3c2f90(0x216)+_0x3c2f90(0x2fd)+_0x3c2f90(0x282)],'entryCount':_0x59e799['agents']?.[_0x3c2f90(0x33c)+'nt'],'installPath':_0x59e799[_0x3c2f90(0x394)]?.[_0x3c2f90(0x1f6)+_0x3c2f90(0x2dc)]}),await syncProductSkills(_0x5874e5,_0x7fc3e6,_0x59e799),_0x535141?.['info'](_0x3c2f90(0x382)+'skills\x20s'+_0x3c2f90(0x398),{'sources':_0x5874e5[_0x3c2f90(0x3ac)][_0x3c2f90(0x216)+'LocalSki'+_0x3c2f90(0x273)],'entryCount':_0x59e799[_0x3c2f90(0x2e2)]?.[_0x3c2f90(0x33c)+'nt'],'installPath':_0x59e799[_0x3c2f90(0x2e2)]?.[_0x3c2f90(0x1f6)+'ath']}),await syncRuntimeWrapper(_0x5874e5,_0x7fc3e6,_0x59e799),_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x1df)+_0x3c2f90(0x38a)+_0x3c2f90(0x288),{'wujieclawBin':_0x59e799['wujiecla'+_0x3c2f90(0x240)]}),await prunePackagedRuntimeCaches(_0x7fc3e6,_0x535141),await writeJson(resolveManifestPath(_0x7fc3e6),_0x59e799),_0x535141?.[_0x3c2f90(0x1f5)](_0x3c2f90(0x1df)+_0x3c2f90(0x1d3)+'\x20written',{'manifestPath':resolveManifestPath(_0x7fc3e6),'manifest':summarizeRuntimeManifest(_0x59e799),'durationMs':Date['now']()-_0x594b91}),await _0x535141?.['flush'](),_0x59e799;}catch(_0x3d4c6c){_0x535141?.[_0x3c2f90(0x1e8)](_0x3c2f90(0x29e)+_0x3c2f90(0x1df)+_0x3c2f90(0x1cd),{'syncOnly':syncOnly,'runtimeRoot':_0x7fc3e6,'durationMs':Date[_0x3c2f90(0x1b7)]()-_0x594b91,'error':_0x3d4c6c}),await _0x535141?.[_0x3c2f90(0x2f5)]();throw _0x3d4c6c;}}async function prunePackagedRuntimeCaches(_0x1be02b,_0x2bd3ff){const _0x227b03=_0x96c1f6,_0x2f0864=[join(_0x1be02b,'.cache'),join(_0x1be02b,'.tools',_0x227b03(0x39a)+'e'),join(_0x1be02b,'aipc-run'+_0x227b03(0x184)+_0x227b03(0x2d5)),join(_0x1be02b,_0x227b03(0x334)+_0x227b03(0x226)+'ackup')];for(const _0x385d28 of _0x2f0864){if(!existsSync(_0x385d28))continue;await rm(_0x385d28,{'recursive':!![],'force':!![]}),_0x2bd3ff?.[_0x227b03(0x1f5)](_0x227b03(0x32c)+_0x227b03(0x2ab)+_0x227b03(0x2bd)+_0x227b03(0x23c)+_0x227b03(0x24a),{'cachePath':_0x385d28});}}async function syncRuntimeWrapper(_0x11ac52,_0x3af118,_0xeea617){const _0x5317aa=_0x96c1f6,_0x2605c8=_0x11ac52['openclaw']?.['configFi'+_0x5317aa(0x32d)]??_0x5317aa(0x2e6)+_0x5317aa(0x296),_0x4fee55=join(_0x3af118,'bin',_0x5317aa(0x1af)+'w'),_0x1ef2fa=join(_0x3af118,_0x5317aa(0x1b8),_0x5317aa(0x1af)+_0x5317aa(0x2a6)),_0x21c863=normalizeRuntimeRelativePath(relative(dirname(_0x4fee55),resolve(_0x3af118,_0xeea617[_0x5317aa(0x206)+_0x5317aa(0x1cb)]))),_0x7a6342=normalizeRuntimeRelativePath(relative(dirname(_0x4fee55),resolve(_0x3af118,_0xeea617[_0x5317aa(0x3ac)+_0x5317aa(0x1f2)]))),_0x268c87=_0x5317aa(0x348)+_0x11ac52[_0x5317aa(0x351)+_0x5317aa(0x183)],_0x17772c='%USERPRO'+_0x5317aa(0x341)+_0x11ac52['dataDirN'+_0x5317aa(0x183)];await mkdir(dirname(_0x4fee55),{'recursive':!![]});const _0x1497e6=fileURLToPath(new URL(_0x5317aa(0x1fd)+_0x5317aa(0x228)+_0x5317aa(0x38f)+'mjs',import.meta.url)),_0x58db88=join(_0x3af118,_0x5317aa(0x1b8),_0x5317aa(0x246)+_0x5317aa(0x26e));await cp(_0x1497e6,_0x58db88),await writeFile(_0x4fee55,[_0x5317aa(0x229)+'h',_0x5317aa(0x1b3)+'PENCLAW_'+'HOME=\x22${'+_0x5317aa(0x3a8)+_0x5317aa(0x23b)+_0x268c87+'}\x22',_0x5317aa(0x1b3)+_0x5317aa(0x258)+_0x5317aa(0x20e)+_0x5317aa(0x286)+_0x5317aa(0x195)+_0x5317aa(0x284)+'-'+_0x268c87+'}\x22',_0x5317aa(0x1b3)+_0x5317aa(0x258)+_0x5317aa(0x2c9)+_0x5317aa(0x309)+_0x5317aa(0x383)+_0x5317aa(0x241)+_0x5317aa(0x358)+_0x5317aa(0x1b5)+_0x2605c8+'}\x22',_0x5317aa(0x1b3)+_0x5317aa(0x258)+'CONFIG_P'+_0x5317aa(0x1c1)+_0x5317aa(0x258)+_0x5317aa(0x180)+_0x5317aa(0x2d8)+_0x268c87+'/'+_0x2605c8+'}\x22','SCRIPT_D'+_0x5317aa(0x1d5)+_0x5317aa(0x277)+'--\x20\x22$(di'+_0x5317aa(0x25e)+_0x5317aa(0x2c5)+_0x5317aa(0x294),_0x5317aa(0x263)+_0x5317aa(0x223)+_0x5317aa(0x304)+_0x5317aa(0x2ef)+_0x5317aa(0x31f)+_0x5317aa(0x1ec),_0x5317aa(0x386)+_0x5317aa(0x34a)+_0x21c863+('\x22\x20\x22$SCRI'+_0x5317aa(0x1a3)+_0x5317aa(0x3a6)+_0x5317aa(0x220)+_0x5317aa(0x21d)+_0x5317aa(0x1f1)+'ue'),'fi',_0x5317aa(0x1f3)+_0x5317aa(0x318)+'R/'+_0x21c863+(_0x5317aa(0x292)+'PT_DIR/')+_0x7a6342+'\x22\x20\x22$@\x22',''][_0x5317aa(0x28b)]('\x0a'),_0x5317aa(0x2a3)),await chmod(_0x4fee55,0x1ed),await writeFile(_0x1ef2fa,[_0x5317aa(0x267)+'f','if\x20\x22%OPE'+_0x5317aa(0x33d)+'ME%\x22==\x22\x22'+_0x5317aa(0x2e5)+_0x5317aa(0x39e)+'OME='+_0x17772c+'\x22',_0x5317aa(0x25c)+_0x5317aa(0x195)+_0x5317aa(0x209)+_0x5317aa(0x2f9)+_0x5317aa(0x221)+_0x5317aa(0x1f0)+_0x5317aa(0x392)+_0x17772c+'\x22',_0x5317aa(0x25c)+_0x5317aa(0x285)+_0x5317aa(0x32f)+_0x5317aa(0x388)+'==\x22\x22\x20set'+_0x5317aa(0x327)+_0x5317aa(0x368)+_0x5317aa(0x36d)+_0x5317aa(0x1f9)+_0x2605c8+'\x22',_0x5317aa(0x25c)+_0x5317aa(0x285)+_0x5317aa(0x233)+'H%\x22==\x22\x22\x20'+_0x5317aa(0x255)+_0x5317aa(0x285)+'NFIG_PAT'+'H='+_0x17772c+'\x5c'+_0x2605c8+'\x22',_0x5317aa(0x237)+_0x5317aa(0x2ec)+'%~dp0\x22',_0x5317aa(0x20a)+_0x5317aa(0x31a)+toWindowsPath(_0x21c863)+('\x22\x20\x22%SCRI'+_0x5317aa(0x365))+toWindowsPath(_0x7a6342)+_0x5317aa(0x355),'']['join']('\x0d\x0a'),_0x5317aa(0x2a3)),_0xeea617['wujiecla'+_0x5317aa(0x240)]=toRuntimeRelative(_0x3af118,process[_0x5317aa(0x300)]===_0x5317aa(0x315)?_0x1ef2fa:_0x4fee55);}async function patchChatHistoryMixedToolContentBug(_0x3f540f,_0x54f4bc,_0x1816fb={}){const _0x1aa3ba=_0x96c1f6,_0x23dca0=resolve(_0x3f540f,_0x54f4bc[_0x1aa3ba(0x3ac)+_0x1aa3ba(0x380)+'ir']),_0x2a1416=join(_0x23dca0,'dist');let _0x59db2d=[];try{_0x59db2d=await readdir(_0x2a1416,{'withFileTypes':!![]});}catch{_0x1816fb['runtimeL'+_0x1aa3ba(0x344)]?.[_0x1aa3ba(0x1aa)]?.(_0x1aa3ba(0x177)+_0x1aa3ba(0x24d)+_0x1aa3ba(0x208)+_0x1aa3ba(0x1b4)+_0x1aa3ba(0x326)+_0x1aa3ba(0x2e4)+_0x1aa3ba(0x1fa),{'distDir':_0x2a1416,'openclawVersion':_0x54f4bc[_0x1aa3ba(0x3ac)+_0x1aa3ba(0x373)]});return;}const _0x55aef6=_0x59db2d['filter'](_0x3c716f=>_0x3c716f[_0x1aa3ba(0x1dc)]()&&(_0x3c716f['name'][_0x1aa3ba(0x23e)+'th'](_0x1aa3ba(0x302)+'play-pro'+'jection-')||_0x3c716f[_0x1aa3ba(0x32a)][_0x1aa3ba(0x23e)+'th'](_0x1aa3ba(0x235)+_0x1aa3ba(0x27c)+_0x1aa3ba(0x28a)))&&_0x3c716f[_0x1aa3ba(0x32a)][_0x1aa3ba(0x2f4)](_0x1aa3ba(0x22e)))[_0x1aa3ba(0x18e)](_0x34a3cd=>join(_0x2a1416,_0x34a3cd[_0x1aa3ba(0x32a)]));if(_0x55aef6[_0x1aa3ba(0x1c9)]===0x0){_0x1816fb[_0x1aa3ba(0x2db)+_0x1aa3ba(0x344)]?.['warn']?.(_0x1aa3ba(0x177)+_0x1aa3ba(0x24d)+_0x1aa3ba(0x208)+'patch\x20sk'+_0x1aa3ba(0x26a)+_0x1aa3ba(0x31b)+_0x1aa3ba(0x1fa),{'openclawVersion':_0x54f4bc[_0x1aa3ba(0x3ac)+_0x1aa3ba(0x373)]});return;}for(const _0x398c21 of _0x55aef6){const _0xc89c1d=await readFile(_0x398c21,_0x1aa3ba(0x2a3)),_0x33e23b=patchMixedToolContentFromSource(_0xc89c1d);if(!_0x33e23b[_0x1aa3ba(0x27f)]){if(_0x33e23b[_0x1aa3ba(0x20b)]===_0x1aa3ba(0x24f)+_0x1aa3ba(0x27f)){_0x1816fb['runtimeL'+_0x1aa3ba(0x344)]?.[_0x1aa3ba(0x1f5)]?.(_0x1aa3ba(0x177)+_0x1aa3ba(0x24d)+'ed-tool\x20'+_0x1aa3ba(0x312)+'ready\x20ap'+_0x1aa3ba(0x1e3),{'openclawVersion':_0x54f4bc['openclaw'+_0x1aa3ba(0x373)],'filePath':_0x398c21});return;}continue;}await writeFile(_0x398c21,_0x33e23b[_0x1aa3ba(0x17a)],_0x1aa3ba(0x2a3)),_0x1816fb[_0x1aa3ba(0x2db)+'ogger']?.[_0x1aa3ba(0x1f5)]?.(_0x1aa3ba(0x177)+_0x1aa3ba(0x24d)+_0x1aa3ba(0x208)+_0x1aa3ba(0x28e)+'plied',{'openclawVersion':_0x54f4bc['openclaw'+_0x1aa3ba(0x373)],'filePath':_0x398c21,'note':_0x1aa3ba(0x3ab)+_0x1aa3ba(0x1f4)+'ibility\x20'+'patch\x20fo'+_0x1aa3ba(0x367)+_0x1aa3ba(0x2c1)+_0x1aa3ba(0x192)+'tool\x20his'+_0x1aa3ba(0x29a)+_0x1aa3ba(0x366)+_0x1aa3ba(0x21c)+_0x1aa3ba(0x35c)+_0x1aa3ba(0x35e)+_0x1aa3ba(0x23d)+_0x1aa3ba(0x2ed)+_0x1aa3ba(0x2b0)});return;}_0x1816fb['runtimeL'+_0x1aa3ba(0x344)]?.['warn']?.(_0x1aa3ba(0x177)+_0x1aa3ba(0x24d)+_0x1aa3ba(0x208)+'patch\x20sk'+'ipped;\x20f'+'unction\x20'+'not\x20foun'+'d',{'openclawVersion':_0x54f4bc['openclaw'+_0x1aa3ba(0x373)]});}async function patchProviderRequestIdHeader(_0x1433f7,_0x420f08,_0x1f96fa={}){const _0x58b52b=_0x96c1f6,_0x617cc=resolve(_0x1433f7,_0x420f08[_0x58b52b(0x3ac)+_0x58b52b(0x380)+'ir']),_0x25b38f=join(_0x617cc,_0x58b52b(0x2ad));let _0x3e194f=[];try{_0x3e194f=await readdir(_0x25b38f,{'withFileTypes':!![]});}catch{_0x1f96fa['runtimeL'+_0x58b52b(0x344)]?.[_0x58b52b(0x1aa)]?.(_0x58b52b(0x314)+_0x58b52b(0x378)+_0x58b52b(0x260)+_0x58b52b(0x18c)+_0x58b52b(0x19d)+_0x58b52b(0x1a0)+_0x58b52b(0x2da),{'distDir':_0x25b38f,'openclawVersion':_0x420f08[_0x58b52b(0x3ac)+'Version']});return;}const _0x46b969=_0x3e194f[_0x58b52b(0x399)](_0x48a8a6=>_0x48a8a6[_0x58b52b(0x1dc)]()&&_0x48a8a6[_0x58b52b(0x32a)][_0x58b52b(0x2f4)]('.js'))[_0x58b52b(0x18e)](_0x6301c3=>join(_0x25b38f,_0x6301c3[_0x58b52b(0x32a)]));let _0x5cd37a=0x0,_0x235fdc=0x0;for(const _0x2bf9ca of _0x46b969){const _0x778284=await readFile(_0x2bf9ca,_0x58b52b(0x2a3)),_0x3f9d7e=patchProviderRequestIdHeaderFromSource(_0x778284);if(_0x3f9d7e[_0x58b52b(0x27f)]){await writeFile(_0x2bf9ca,_0x3f9d7e[_0x58b52b(0x17a)],_0x58b52b(0x2a3)),_0x5cd37a+=0x1,_0x1f96fa[_0x58b52b(0x2db)+'ogger']?.[_0x58b52b(0x1f5)]?.(_0x58b52b(0x314)+_0x58b52b(0x378)+'-id\x20head'+_0x58b52b(0x18c)+'\x20applied',{'openclawVersion':_0x420f08[_0x58b52b(0x3ac)+_0x58b52b(0x373)],'filePath':_0x2bf9ca});continue;}if(_0x3f9d7e[_0x58b52b(0x20b)]===_0x58b52b(0x24f)+_0x58b52b(0x27f))_0x235fdc+=0x1;}if(_0x5cd37a>0x0){_0x1f96fa[_0x58b52b(0x2db)+_0x58b52b(0x344)]?.[_0x58b52b(0x1f5)]?.(_0x58b52b(0x314)+'\x20request'+'-id\x20head'+_0x58b52b(0x18c)+_0x58b52b(0x32b),{'openclawVersion':_0x420f08['openclaw'+_0x58b52b(0x373)],'patchedCount':_0x5cd37a,'alreadyPatchedCount':_0x235fdc});return;}if(_0x235fdc>0x0){_0x1f96fa[_0x58b52b(0x2db)+_0x58b52b(0x344)]?.[_0x58b52b(0x1f5)]?.('provider'+_0x58b52b(0x378)+'-id\x20head'+'er\x20patch'+'\x20already'+'\x20applied',{'openclawVersion':_0x420f08['openclaw'+_0x58b52b(0x373)],'alreadyPatchedCount':_0x235fdc});return;}_0x1f96fa[_0x58b52b(0x2db)+_0x58b52b(0x344)]?.[_0x58b52b(0x1aa)]?.(_0x58b52b(0x314)+_0x58b52b(0x378)+_0x58b52b(0x260)+_0x58b52b(0x18c)+_0x58b52b(0x19d)+_0x58b52b(0x291)+'er\x20respo'+_0x58b52b(0x2c0)+_0x58b52b(0x1b9)+'nd',{'openclawVersion':_0x420f08[_0x58b52b(0x3ac)+_0x58b52b(0x373)]});}async function patchChannelPluginRuntimeBug(_0x4d7e76,_0x364eff,_0x2e37b1={}){const _0x224dd8=_0x96c1f6,_0x2c6ff9=resolve(_0x4d7e76,_0x364eff[_0x224dd8(0x3ac)+_0x224dd8(0x380)+'ir']),_0x5c412f=join(_0x2c6ff9,_0x224dd8(0x2ad));let _0x123614=[];try{_0x123614=await readdir(_0x5c412f,{'withFileTypes':!![]});}catch{_0x2e37b1[_0x224dd8(0x2db)+'ogger']?.[_0x224dd8(0x1aa)]?.(_0x224dd8(0x38c)+_0x224dd8(0x19c)+_0x224dd8(0x272)+'atch\x20ski'+_0x224dd8(0x196)+_0x224dd8(0x204)+'ound',{'distDir':_0x5c412f,'openclawVersion':_0x364eff[_0x224dd8(0x3ac)+'Version']});return;}const _0x5b9cb1=_0x123614[_0x224dd8(0x399)](_0x143849=>_0x143849['isFile']()&&_0x143849['name'][_0x224dd8(0x23e)+'th']('loader-')&&_0x143849[_0x224dd8(0x32a)][_0x224dd8(0x2f4)](_0x224dd8(0x22e)))['map'](_0x57444c=>join(_0x5c412f,_0x57444c[_0x224dd8(0x32a)])),_0x555a84=await resolveRuntimeChannelImportPath(_0x5c412f,_0x123614);if(_0x5b9cb1[_0x224dd8(0x1c9)]===0x0){_0x2e37b1['runtimeL'+'ogger']?.['warn']?.(_0x224dd8(0x38c)+'plugin\x20r'+_0x224dd8(0x272)+_0x224dd8(0x297)+_0x224dd8(0x269)+_0x224dd8(0x21e)+_0x224dd8(0x332),{'openclawVersion':_0x364eff[_0x224dd8(0x3ac)+_0x224dd8(0x373)]});return;}if(!_0x555a84){_0x2e37b1['runtimeL'+'ogger']?.[_0x224dd8(0x1aa)]?.('channel\x20'+_0x224dd8(0x19c)+_0x224dd8(0x272)+_0x224dd8(0x297)+_0x224dd8(0x361)+_0x224dd8(0x1d9)+_0x224dd8(0x245)+_0x224dd8(0x1e2)+'found',{'openclawVersion':_0x364eff[_0x224dd8(0x3ac)+_0x224dd8(0x373)],'distDir':_0x5c412f});return;}for(const _0x25ec6e of _0x5b9cb1){const _0x187e4f=await readFile(_0x25ec6e,'utf8'),_0x426fcc=patchChannelPluginRuntimeFromSource(_0x187e4f,{'runtimeChannelImportPath':_0x555a84});if(!_0x426fcc['patched']){if(_0x426fcc[_0x224dd8(0x20b)]==='already-'+_0x224dd8(0x27f)){_0x2e37b1['runtimeL'+'ogger']?.['info']?.(_0x224dd8(0x38c)+_0x224dd8(0x19c)+_0x224dd8(0x272)+_0x224dd8(0x244)+_0x224dd8(0x1e9)+'lied',{'openclawVersion':_0x364eff[_0x224dd8(0x3ac)+_0x224dd8(0x373)],'filePath':_0x25ec6e});return;}continue;}await writeFile(_0x25ec6e,_0x426fcc[_0x224dd8(0x17a)],'utf8'),_0x2e37b1[_0x224dd8(0x2db)+_0x224dd8(0x344)]?.[_0x224dd8(0x1f5)]?.('channel\x20'+_0x224dd8(0x19c)+_0x224dd8(0x272)+_0x224dd8(0x384)+_0x224dd8(0x17b),{'openclawVersion':_0x364eff[_0x224dd8(0x3ac)+'Version'],'filePath':_0x25ec6e,'note':'Temporar'+_0x224dd8(0x1f4)+_0x224dd8(0x2cd)+_0x224dd8(0x2cf)+_0x224dd8(0x367)+_0x224dd8(0x2c1)+_0x224dd8(0x26b)+'nel\x20plug'+_0x224dd8(0x35d)+_0x224dd8(0x329)+'ng\x20chann'+_0x224dd8(0x360)+_0x224dd8(0x397)+'rs;\x20veri'+_0x224dd8(0x395)+_0x224dd8(0x371)+_0x224dd8(0x1e5)+'e\x20upgrad'+'es.'});return;}_0x2e37b1[_0x224dd8(0x2db)+_0x224dd8(0x344)]?.[_0x224dd8(0x1aa)]?.(_0x224dd8(0x38c)+_0x224dd8(0x19c)+_0x224dd8(0x272)+'atch\x20ski'+_0x224dd8(0x361)+'ntime\x20re'+_0x224dd8(0x376)+'ot\x20found',{'openclawVersion':_0x364eff['openclaw'+_0x224dd8(0x373)]});}async function patchSessionStoreSqliteRuntime(_0x4ced34,_0x2e2719,_0x3b4434={}){const _0x22cea0=_0x96c1f6,_0xa9a996=resolve(_0x4ced34,_0x2e2719[_0x22cea0(0x3ac)+_0x22cea0(0x380)+'ir']),_0x5bf34a=join(_0xa9a996,_0x22cea0(0x2ad)),_0x1b416e=_0x22cea0(0x194)+'ell-runt'+_0x22cea0(0x2fe)+'ions/run'+_0x22cea0(0x271)+_0x22cea0(0x203),_0x48b1b2=join(_0x4ced34,_0x22cea0(0x1be)+_0x22cea0(0x1a9),_0x22cea0(0x2f6),'runtime-'+'bridge.m'+'js'),_0x7d49ed=(await readdir(_0x5bf34a,{'withFileTypes':!![]})['catch'](()=>[]))['filter'](_0x39164f=>_0x39164f[_0x22cea0(0x1dc)]()&&_0x39164f[_0x22cea0(0x32a)]['startsWi'+'th'](_0x22cea0(0x2a2)+_0x22cea0(0x2eb))&&_0x39164f[_0x22cea0(0x32a)]['endsWith'](_0x22cea0(0x22e)))[_0x22cea0(0x18e)](_0x1e99d8=>join(_0x5bf34a,_0x1e99d8[_0x22cea0(0x32a)])),_0x483aa9=(await readdir(_0x5bf34a,{'withFileTypes':!![]})[_0x22cea0(0x2d1)](()=>[]))[_0x22cea0(0x399)](_0x5b2be1=>_0x5b2be1[_0x22cea0(0x1dc)]()&&_0x5b2be1[_0x22cea0(0x32a)][_0x22cea0(0x23e)+'th'](_0x22cea0(0x30a))&&!_0x5b2be1[_0x22cea0(0x32a)][_0x22cea0(0x23e)+'th'](_0x22cea0(0x2a2)+_0x22cea0(0x2eb))&&_0x5b2be1[_0x22cea0(0x32a)][_0x22cea0(0x2f4)](_0x22cea0(0x22e)))['map'](_0x31d04f=>join(_0x5bf34a,_0x31d04f[_0x22cea0(0x32a)]));if(!existsSync(_0x48b1b2)){_0x3b4434['runtimeL'+_0x22cea0(0x344)]?.['info']?.('session\x20'+_0x22cea0(0x369)+_0x22cea0(0x230)+_0x22cea0(0x37e)+_0x22cea0(0x256)+_0x22cea0(0x2f1)+'vailable',{'bridgePath':_0x48b1b2,'openclawVersion':_0x2e2719[_0x22cea0(0x3ac)+'Version']});return;}for(const _0x1e86cc of _0x7d49ed){const _0x2ccebc=await readFile(_0x1e86cc,_0x22cea0(0x2a3)),_0x5e5396=patchSessionStoreLoadFromSource(_0x2ccebc,{'bridgeImportPath':_0x1b416e});if(!_0x5e5396['patched']){if(_0x5e5396[_0x22cea0(0x20b)]===_0x22cea0(0x24f)+_0x22cea0(0x27f)){_0x3b4434[_0x22cea0(0x2db)+'ogger']?.[_0x22cea0(0x1f5)]?.(_0x22cea0(0x19b)+'store\x20lo'+_0x22cea0(0x2dd)+_0x22cea0(0x238)+'\x20applied',{'filePath':_0x1e86cc,'openclawVersion':_0x2e2719[_0x22cea0(0x3ac)+'Version']});break;}continue;}await writeFile(_0x1e86cc,_0x5e5396[_0x22cea0(0x17a)],'utf8'),_0x3b4434[_0x22cea0(0x2db)+'ogger']?.['info']?.(_0x22cea0(0x19b)+_0x22cea0(0x34d)+'ad\x20patch'+_0x22cea0(0x2f3),{'filePath':_0x1e86cc,'openclawVersion':_0x2e2719[_0x22cea0(0x3ac)+_0x22cea0(0x373)]});break;}for(const _0x35a534 of _0x483aa9){const _0x27bf52=await readFile(_0x35a534,_0x22cea0(0x2a3)),_0x2a6eb5=patchSessionStoreWriteFromSource(_0x27bf52,{'bridgeImportPath':_0x1b416e});if(!_0x2a6eb5[_0x22cea0(0x27f)]){if(_0x2a6eb5[_0x22cea0(0x20b)]==='already-'+_0x22cea0(0x27f)){_0x3b4434[_0x22cea0(0x2db)+_0x22cea0(0x344)]?.[_0x22cea0(0x1f5)]?.(_0x22cea0(0x19b)+_0x22cea0(0x35f)+'ite\x20patc'+_0x22cea0(0x219)+_0x22cea0(0x207)+'d',{'filePath':_0x35a534,'openclawVersion':_0x2e2719[_0x22cea0(0x3ac)+_0x22cea0(0x373)]});break;}continue;}await writeFile(_0x35a534,_0x2a6eb5[_0x22cea0(0x17a)],_0x22cea0(0x2a3)),_0x3b4434[_0x22cea0(0x2db)+_0x22cea0(0x344)]?.[_0x22cea0(0x1f5)]?.(_0x22cea0(0x19b)+_0x22cea0(0x35f)+_0x22cea0(0x333)+_0x22cea0(0x2ee)+'d',{'filePath':_0x35a534,'openclawVersion':_0x2e2719[_0x22cea0(0x3ac)+_0x22cea0(0x373)]});break;}}async function resolveRuntimeChannelImportPath(_0x3ccfeb,_0x145e35){const _0x2d0c14=_0x96c1f6,_0x497522=_0x145e35['filter'](_0x44f5e0=>_0x44f5e0[_0x2d0c14(0x1dc)]()&&_0x44f5e0[_0x2d0c14(0x32a)][_0x2d0c14(0x23e)+'th'](_0x2d0c14(0x36e)+_0x2d0c14(0x2de))&&_0x44f5e0[_0x2d0c14(0x32a)][_0x2d0c14(0x2f4)](_0x2d0c14(0x22e))&&!_0x44f5e0[_0x2d0c14(0x32a)]['startsWi'+'th'](_0x2d0c14(0x36e)+_0x2d0c14(0x2de)+_0x2d0c14(0x363)))[_0x2d0c14(0x18e)](_0x5f074e=>_0x5f074e[_0x2d0c14(0x32a)])[_0x2d0c14(0x18b)]();for(const _0x23836c of _0x497522){const _0x3ecd85=await readFile(join(_0x3ccfeb,_0x23836c),_0x2d0c14(0x2a3));if(_0x3ecd85[_0x2d0c14(0x1eb)](_0x2d0c14(0x1ca)+_0x2d0c14(0x345)+'nnel'))return'./'+_0x23836c;}return null;}function normalizeRuntimeRelativePath(_0x579363){return _0x579363['replaceA'+'ll']('\x5c','/');}function toWindowsPath(_0xc22ae6){const _0x558058=_0x96c1f6;return _0xc22ae6[_0x558058(0x357)+'ll']('/','\x5c');}function validateRuntimeNodeVersion(_0x55bcd2,_0xf3572e){const _0x41ee03=_0x96c1f6;if(_0x55bcd2['nodeVers'+_0x41ee03(0x2aa)]===_0xf3572e[_0x41ee03(0x3ac)][_0x41ee03(0x1a5)+'ion'])return;throw new Error(_0x41ee03(0x1df)+_0x41ee03(0x1a5)+_0x41ee03(0x396)+_0x41ee03(0x2a1)+_0x41ee03(0x2ba)+(_0x55bcd2[_0x41ee03(0x1a5)+'ion']||_0x41ee03(0x35a))+(',\x20shell.'+_0x41ee03(0x2d6))+_0xf3572e[_0x41ee03(0x3ac)][_0x41ee03(0x1a5)+_0x41ee03(0x2aa)]+'.\x20'+(_0x41ee03(0x3a0)+'ie-shell'+_0x41ee03(0x1a1)+_0x41ee03(0x335)+_0x41ee03(0x252)+_0x41ee03(0x2b5)+'\x20can\x20be\x20'+_0x41ee03(0x324)+_0x41ee03(0x179)+_0x41ee03(0x1dd)+_0x41ee03(0x23f)+_0x41ee03(0x28c)+'.'));}function validateRuntimeOpenClawVersion(_0x584b84,_0x1bda8a){const _0x4d024f=_0x96c1f6;if(_0x584b84[_0x4d024f(0x3ac)+_0x4d024f(0x373)]===_0x1bda8a[_0x4d024f(0x3ac)][_0x4d024f(0x3ac)+_0x4d024f(0x373)])return;throw new Error(_0x4d024f(0x1df)+_0x4d024f(0x3ac)+'Version\x20'+_0x4d024f(0x2c8)+_0x4d024f(0x2fb)+_0x4d024f(0x2e3)+(_0x584b84['openclaw'+_0x4d024f(0x373)]||_0x4d024f(0x35a))+(_0x4d024f(0x261)+_0x4d024f(0x2d6))+_0x1bda8a[_0x4d024f(0x3ac)][_0x4d024f(0x3ac)+_0x4d024f(0x373)]+'.\x20'+(_0x4d024f(0x3a0)+_0x4d024f(0x37a)+_0x4d024f(0x1a1)+_0x4d024f(0x335)+_0x4d024f(0x2b5)+_0x4d024f(0x1f7)+_0x4d024f(0x390)+_0x4d024f(0x1dd)+_0x4d024f(0x1fb)+_0x4d024f(0x29c)+_0x4d024f(0x298)));}function parseNpmPackJson(_0x4eaaf9){const _0x542e3a=_0x96c1f6,_0x375c23=_0x4eaaf9[_0x542e3a(0x1d8)](),_0x44c8a6=_0x375c23[_0x542e3a(0x2e0)]('[');if(_0x44c8a6<0x0)throw new Error(_0x542e3a(0x205)+_0x542e3a(0x212)+_0x542e3a(0x186)+'JSON:\x20'+_0x375c23[_0x542e3a(0x336)](0x0,0x1f4));const _0x356ca1=JSON[_0x542e3a(0x2be)](_0x375c23[_0x542e3a(0x336)](_0x44c8a6)),_0x2f4639=Array['isArray'](_0x356ca1)?_0x356ca1[0x0]:_0x356ca1;if(!_0x2f4639||typeof _0x2f4639!==_0x542e3a(0x20c))throw new Error(_0x542e3a(0x205)+_0x542e3a(0x362)+_0x542e3a(0x283)+_0x542e3a(0x231)+_0x542e3a(0x1bb)+_0x375c23[_0x542e3a(0x336)](0x0,0x1f4));return _0x2f4639;}function normalizePackedTarballFilename(_0x57647c){const _0x247a8e=_0x96c1f6;return _0x57647c['replace'](/^@/,'')[_0x247a8e(0x357)+'ll']('/','-')[_0x247a8e(0x357)+'ll']('\x5c','-');}async function runProcess(_0x3a4b8b,_0x57ad59,_0x588357={}){const _0x43a2a1=_0x96c1f6,_0x4a47ad=_0x588357[_0x43a2a1(0x377)]||[_0x3a4b8b,..._0x57ad59][_0x43a2a1(0x28b)]('\x20'),_0x90e73f=_0x588357[_0x43a2a1(0x38d)+'s']??NPM_INSTALL_TIMEOUT_MS,_0x22c61f=spawn(_0x3a4b8b,_0x57ad59,{'cwd':_0x588357[_0x43a2a1(0x1d7)],'env':_0x588357[_0x43a2a1(0x33b)],'stdio':[_0x43a2a1(0x31e),_0x43a2a1(0x225),_0x43a2a1(0x225)]});return await new Promise((_0x31e744,_0x4f1068)=>{const _0x37a368=_0x43a2a1;let _0x569337='',_0x25d2cb='',_0x242d3c=![];const _0x19e5f2=setTimeout(()=>{const _0x2831e5=_0x2ee8;if(_0x242d3c)return;_0x242d3c=!![],_0x22c61f[_0x2831e5(0x1ac)]('SIGTERM'),_0x4f1068(new Error(_0x4a47ad+(_0x2831e5(0x2a4)+_0x2831e5(0x2e8)+'\x20')+_0x90e73f+'ms'));},_0x90e73f);_0x22c61f[_0x37a368(0x2bc)]['on'](_0x37a368(0x232),_0xd04824=>{const _0x242501=_0x37a368;_0x569337+=_0xd04824[_0x242501(0x2ce)]();}),_0x22c61f[_0x37a368(0x381)]['on'](_0x37a368(0x232),_0x901fca=>{const _0x280dec=_0x37a368;_0x25d2cb+=_0x901fca[_0x280dec(0x2ce)]();}),_0x22c61f['on'](_0x37a368(0x1e8),_0x130d74=>{if(_0x242d3c)return;_0x242d3c=!![],clearTimeout(_0x19e5f2),_0x4f1068(_0x130d74);}),_0x22c61f['on']('close',(_0x40724a,_0x40dc30)=>{const _0x37dbb8=_0x37a368;if(_0x242d3c)return;_0x242d3c=!![],clearTimeout(_0x19e5f2);if(_0x40724a===0x0){_0x31e744({'stdout':_0x569337,'stderr':_0x25d2cb});return;}_0x4f1068(new Error(_0x4a47ad+(_0x37dbb8(0x1fc)+_0x37dbb8(0x3a2)+'e=')+(_0x40724a??_0x37dbb8(0x2d9))+_0x37dbb8(0x259)+(_0x40dc30??'null')+'\x0a'+(''+(_0x25d2cb||_0x569337))['trim']()));});});}async function installOpenClawPackage(_0x35ee7f,_0x56235b){const _0x14128c=_0x96c1f6,_0x13bc05=join(_0x35ee7f[_0x14128c(0x2a9)+'oot'],_0x14128c(0x393)),_0x3e95a4=join(_0x35ee7f[_0x14128c(0x2a9)+_0x14128c(0x310)],_0x14128c(0x215)+_0x14128c(0x349)+'t');await mkdir(_0x13bc05,{'recursive':!![]}),await removePathWithRetries(_0x3e95a4),await mkdir(_0x3e95a4,{'recursive':!![]});const _0x234c41=await createRuntimeEnv(_0x35ee7f),_0x18d15d='openclaw'+'@'+_0x56235b;console['log']('[wujie-s'+_0x14128c(0x199)+_0x14128c(0x32e)+_0x14128c(0x347)+'\x20'+_0x18d15d);const _0x28ffb4=await runProcess(_0x35ee7f['nodeExec'+_0x14128c(0x1cb)],[_0x35ee7f['npmCli'],'pack',_0x18d15d,'--json'],{'cwd':_0x13bc05,'env':_0x234c41,'label':_0x14128c(0x205)+'\x20'+_0x18d15d}),_0x2d5179=parseNpmPackJson(_0x28ffb4[_0x14128c(0x2bc)]);if(_0x2d5179['version']!==_0x56235b)throw new Error(_0x14128c(0x370)+_0x14128c(0x1b2)+'law\x20'+_0x56235b+(_0x14128c(0x2d0)+_0x14128c(0x26d))+_0x2d5179[_0x14128c(0x266)]);const _0x2d0076=resolve(_0x13bc05,_0x2d5179[_0x14128c(0x22d)]);if(!existsSync(_0x2d0076))throw new Error(_0x14128c(0x205)+_0x14128c(0x212)+_0x14128c(0x2b9)+_0x14128c(0x18a)+'\x20'+_0x2d0076);await runProcess(_0x14128c(0x2c7),['-xzf',_0x2d0076,'-C',_0x3e95a4],{'label':_0x14128c(0x2f8)+_0x2d5179[_0x14128c(0x22d)]}),await removePathWithRetries(_0x35ee7f['openclaw'+'WorkingD'+'ir']),await rename(join(_0x3e95a4,_0x14128c(0x26c)),_0x35ee7f[_0x14128c(0x3ac)+_0x14128c(0x380)+'ir']),await removePathWithRetries(_0x3e95a4),await runProcess(_0x35ee7f[_0x14128c(0x206)+_0x14128c(0x1cb)],[_0x35ee7f['npmCli'],_0x14128c(0x214),_0x14128c(0x236)+'ev',_0x14128c(0x354)+'eer',_0x14128c(0x1c4)+'it','--no-fun'+'d',_0x14128c(0x364)+_0x14128c(0x1a6)+'ps'],{'cwd':_0x35ee7f[_0x14128c(0x3ac)+'WorkingD'+'ir'],'env':_0x234c41,'label':'npm\x20inst'+_0x14128c(0x1b1)+_0x18d15d+(_0x14128c(0x2b5)+_0x14128c(0x268)+_0x14128c(0x33f))});if(!existsSync(_0x35ee7f[_0x14128c(0x3ac)+'Bin']))throw new Error(_0x14128c(0x276)+_0x14128c(0x191)+'\x20not\x20fou'+'nd\x20after'+_0x14128c(0x23a)+':\x20'+_0x35ee7f[_0x14128c(0x3ac)+_0x14128c(0x1f2)]);}async function ensureRuntimeBase(_0x1c39ba,_0x2a3f2e,_0x5d9d63={}){const _0x49b060=_0x96c1f6;await mkdir(_0x2a3f2e,{'recursive':!![]});let _0x602e67=await readRuntimeManifest(_0x2a3f2e);const _0x20d02d=_0x1c39ba[_0x49b060(0x3ac)]['nodeVers'+_0x49b060(0x2aa)],_0x9ac69f=_0x1c39ba['openclaw'][_0x49b060(0x3ac)+_0x49b060(0x373)],_0x274ad0=existsSync(resolveManifestPath(_0x2a3f2e)),_0x54b460=runtimeHasRequiredPaths(_0x2a3f2e,_0x602e67),_0x4dbe17=_0x602e67['nodeVers'+_0x49b060(0x2aa)]===_0x20d02d;!_0x274ad0||!_0x54b460||!_0x4dbe17?(_0x5d9d63[_0x49b060(0x2db)+'ogger']?.[_0x49b060(0x1f5)](_0x49b060(0x1df)+_0x49b060(0x39c)+_0x49b060(0x2b8)+'ed',{'runtimeRoot':_0x2a3f2e,'reason':!_0x274ad0?_0x49b060(0x227)+_0x49b060(0x1d3):!_0x54b460?_0x49b060(0x227)+_0x49b060(0x2f2)+_0x49b060(0x2b5)+_0x49b060(0x2c3):_0x49b060(0x1ab)+_0x49b060(0x331)+'match','syncOnly':_0x5d9d63[_0x49b060(0x33a)]}),_0x602e67=await buildRuntimeBase(_0x1c39ba,_0x2a3f2e,_0x602e67),_0x5d9d63['runtimeL'+_0x49b060(0x344)]?.[_0x49b060(0x1f5)](_0x49b060(0x1df)+_0x49b060(0x39c)+'ld\x20compl'+_0x49b060(0x210),{'manifest':summarizeRuntimeManifest(_0x602e67)})):_0x5d9d63[_0x49b060(0x2db)+_0x49b060(0x344)]?.[_0x49b060(0x1f5)]('runtime\x20'+'base\x20alr'+'eady\x20cur'+'rent',{'manifest':summarizeRuntimeManifest(_0x602e67)});if(!existsSync(resolve(_0x2a3f2e,_0x602e67[_0x49b060(0x3ac)+_0x49b060(0x1f2)]))){const _0x2688c6=createRuntimeInfoFromManifest(_0x2a3f2e,_0x602e67,{'allowMissingOpenClaw':!![]});await installOpenClawPackage(_0x2688c6,_0x9ac69f),_0x602e67[_0x49b060(0x3ac)+'Version']=_0x9ac69f;}return _0x602e67;}function runtimeHasRequiredPaths(_0x25d4db,_0x3f3a9a){const _0x11ed59=_0x96c1f6;return['nodeExec'+'utable',_0x11ed59(0x1c8),_0x11ed59(0x3ac)+_0x11ed59(0x380)+'ir',_0x11ed59(0x3ac)+_0x11ed59(0x1f2)][_0x11ed59(0x337)](_0x6a01a9=>typeof _0x3f3a9a[_0x6a01a9]===_0x11ed59(0x2df)&&_0x3f3a9a[_0x6a01a9][_0x11ed59(0x1d8)]())&&[_0x11ed59(0x206)+'utable',_0x11ed59(0x1c8)][_0x11ed59(0x337)](_0x4ebd0d=>existsSync(resolve(_0x25d4db,_0x3f3a9a[_0x4ebd0d])));}async function buildRuntimeBase(_0x2e015b,_0x1d2ab3,_0x2d9f40={}){const _0x493464=_0x96c1f6,_0x2f87f5=join(_0x1d2ab3,_0x493464(0x17e));await ensureRuntimeNode(_0x2e015b,_0x2f87f5);const _0x134985=process[_0x493464(0x300)]===_0x493464(0x315)?_0x493464(0x323)+_0x493464(0x34b):_0x493464(0x22a)+_0x493464(0x30c),_0x439b16=process[_0x493464(0x300)]==='win32'?_0x493464(0x323)+_0x493464(0x280)+_0x493464(0x25f)+_0x493464(0x287)+'i.js':_0x493464(0x1db)+_0x493464(0x372)+_0x493464(0x2ca)+_0x493464(0x1a4)+'m-cli.js',_0x45c07f={..._0x2d9f40,'generatedAt':new Date()[_0x493464(0x264)+_0x493464(0x248)](),'nodeVersion':_0x2e015b[_0x493464(0x3ac)][_0x493464(0x1a5)+_0x493464(0x2aa)],'openclawVersion':_0x2d9f40['openclaw'+_0x493464(0x373)]||'','platform':process[_0x493464(0x300)],'arch':process['arch'],'nodeExecutable':_0x134985,'npmCli':_0x439b16,'openclawWorkingDir':_0x493464(0x3ac),'openclawBin':_0x493464(0x3ac)+_0x493464(0x1f8)+'w.mjs'};return await writeJson(resolveManifestPath(_0x1d2ab3),_0x45c07f),_0x45c07f;}async function removePathWithRetries(_0x57b54f){await rm(_0x57b54f,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96});}async function ensureRuntimeNode(_0x3fe8ed,_0x804915){const _0x566ee0=_0x96c1f6,_0x25bd22=_0x3fe8ed[_0x566ee0(0x3ac)]['nodeVers'+_0x566ee0(0x2aa)],_0x4ed790=process[_0x566ee0(0x300)]===_0x566ee0(0x315)?join(_0x804915,_0x566ee0(0x1fe)):join(_0x804915,'bin',_0x566ee0(0x17e)),_0x4691f0=process['platform']===_0x566ee0(0x315)?join(_0x804915,_0x566ee0(0x24b)+_0x566ee0(0x305),_0x566ee0(0x340),_0x566ee0(0x1b8),_0x566ee0(0x188)+'js'):join(_0x804915,_0x566ee0(0x1da),'node_mod'+_0x566ee0(0x305),_0x566ee0(0x340),_0x566ee0(0x1b8),'npm-cli.'+'js');if(existsSync(_0x4ed790)&&existsSync(_0x4691f0)&&await getNodeVersion(_0x4ed790)===_0x25bd22)return;await removePathWithRetries(_0x804915);if(process[_0x566ee0(0x39f)]['node']===_0x25bd22){await linkCurrentNodeRuntime(_0x804915);return;}await downloadNodeRuntime(_0x25bd22,_0x804915);}async function getNodeVersion(_0x6e372a){const _0x4f21af=_0x96c1f6;try{const _0x660aec=await runProcess(_0x6e372a,['-p',_0x4f21af(0x2af)+_0x4f21af(0x39f)+_0x4f21af(0x290)],{'label':_0x6e372a+_0x4f21af(0x28c),'timeoutMs':0x7530});return _0x660aec[_0x4f21af(0x2bc)][_0x4f21af(0x1d8)]();}catch{return'';}}async function linkCurrentNodeRuntime(_0xee10a8){const _0x1fc5e8=_0x96c1f6,_0x5e4ad2=process['execPath'],_0x400c6b=resolve(dirname(_0x5e4ad2),'..'),_0x7bfa09=process[_0x1fc5e8(0x300)]===_0x1fc5e8(0x315)?resolve(_0x400c6b,_0x1fc5e8(0x24b)+_0x1fc5e8(0x1bf)):resolve(_0x400c6b,_0x1fc5e8(0x254)+_0x1fc5e8(0x1ed)+_0x1fc5e8(0x295)),_0x408fc3=process[_0x1fc5e8(0x300)]==='win32'?join(_0xee10a8,_0x1fc5e8(0x1fe)):join(_0xee10a8,_0x1fc5e8(0x1b8),_0x1fc5e8(0x17e)),_0x1d4cc0=process[_0x1fc5e8(0x300)]===_0x1fc5e8(0x315)?join(_0xee10a8,_0x1fc5e8(0x24b)+_0x1fc5e8(0x305),_0x1fc5e8(0x340)):join(_0xee10a8,_0x1fc5e8(0x1da),'node_mod'+'ules','npm');await mkdir(dirname(_0x408fc3),{'recursive':!![]}),await mkdir(dirname(_0x1d4cc0),{'recursive':!![]}),await symlink(_0x5e4ad2,_0x408fc3),existsSync(_0x7bfa09)?await symlink(_0x7bfa09,_0x1d4cc0):await symlink(await resolveNpmRoot(),_0x1d4cc0);}async function resolveNpmRoot(){const _0xbd61dc=_0x96c1f6,_0x494a4b=await runProcess('npm',['root','-g'],{'label':'npm\x20root'+'\x20-g','timeoutMs':0x7530}),_0x4f8c25=process['platform']==='win32'?_0x494a4b[_0xbd61dc(0x2bc)][_0xbd61dc(0x1d8)]():join(_0x494a4b[_0xbd61dc(0x2bc)][_0xbd61dc(0x1d8)](),_0xbd61dc(0x340));if(!existsSync(join(_0x4f8c25,_0xbd61dc(0x1b8),'npm-cli.'+'js')))throw new Error('npm\x20pack'+'age\x20was\x20'+_0xbd61dc(0x391)+_0xbd61dc(0x265)+_0xbd61dc(0x239)+_0xbd61dc(0x262)+'d:\x20'+_0x4f8c25);return _0x4f8c25;}function _0x29ee(){const _0x2d8018=['Name','chat-dis','spec','\x20-z\x20\x22$WU','ules','ent','5920SfcCKf','eer','ILE_NAME','store-','ies:\x20','/node','split','prepareP','package.','oot','dencies','patch\x20al','zip','provider','win32','y:\x20','all\x20loca','CRIPT_DI','HELL_ARC','_DIR%','ile\x20not\x20','dependen','s\x20instal','ignore','OGO\x22\x20];\x20','octor\x20--','574217vctPLb','\x22\x20at\x20','node/nod','rebuilt\x20','ecs','ipped;\x20d','\x20\x22OPENCL','ugin\x20spe','me\x20missi','name','\x20summary','pruned\x20r','leName','time]\x20in','NFIG_FIL','endencie','sion\x20mis','\x20found','ite\x20patc','aipc-dow','\x22\x20so\x20the','slice','every','runtimeS','Bypass','syncOnly','env','entryCou','NCLAW_HO','keys','ncies','npm','FILE%\x5c','agentSco','optional','ogger','ntimeCha','-Executi','stalling','$HOME/','w-extrac','PT_DIR/','e.exe','generate','store\x20lo','nced','[wujie-s','556LBhCaD','dataDirN','s\x20not\x20fo','und:\x20','--omit=p','\x22\x20%*','resume','replaceA','FIG_FILE','-xzf','unknown','6vlORds','ify\x20upst','in\x20runti','ream\x20fix','store\x20wr','el.inbou','pped;\x20ru','\x20returne','state-','--legacy','PT_DIR%','jection\x20','r\x20OpenCl','AW_CONFI','store\x20sq','win','sion\x20val','local:','G_FILE_N','runtime-','3kRNbCN','Configur','eam\x20fix\x20','/node_mo','Version','onPolicy','index.mj','solver\x20n','label','\x20request','extensio','ie-shell','local','vel\x20entr','nning\x20op','ch\x20skipp','singOpen','WorkingD','stderr','product\x20','=\x22${OPEN','atch\x20app','push','\x20\x20\x22$SCRI','https://','E_NAME%\x22','?t=','wrapper\x20','lugins\x20s','channel\x20','timeoutM','e\x20tools\x20','ie-logo.','tall\x20the','not\x20foun','E_DIR=','.cache','agents','fy\x20upstr','ion\x20mism','nd\x20helpe','ynced','filter','npm-cach','arm64','base\x20bui','kill\x20not','ENCLAW_H','versions','Run\x20\x22wuj','headers','with\x20cod','e\x20plugin','\x5cwjrt-','appId','ujie-log','tching\x20p','OPENCLAW','rchive\x20-','pluginId','Temporar','openclaw','chat\x20his','find','with\x20the','source','lied','.npmmirr','href','node','fix','CONFIG_P','LocalPlu','isArray','ame','time-bac','Invalid\x20','\x20return\x20','fix\x20mark','npm-cli.','close','tarball:','sort','er\x20patch','ed\x20npm\x20p','map','started','.tools','\x20bin\x20was','6\x20mixed\x20','extract-','../../sh','NCLAW_ST','pped;\x20di','66745CUNlKR','ginPaths','hell:run','nodejs.o','session\x20','plugin\x20r','\x20skipped','or.com','LiteralP',';\x20dist\x20n','\x20prepare','SIGTERM','PT_DIR/w','m/bin/np','nodeVers','-peer-de','devDepen','connecto','ntime','warn','node\x20ver','kill','values','l\x20plugin','wujiecla','jie-shel','all\x20','ed\x20OpenC','export\x20O','patch\x20sk','_NAME:-','enclaw\x20d','now','bin','\x20not\x20fou','l\x20prepar','load:\x20','path:\x20','ced','shell-ru','ules/npm','pack','ATH=\x22${O','fix\x20comp','all\x20plug','--no-aud','\x20validat','pid','dAt','npmCli','length','createRu','utable','.plugin-','failed','powershe','in\x20','o\x20resolv','agents\x20s','some','manifest','\x20id\x20from','IR=$(CDP','time]\x20ru','cwd','trim','ntime\x20ch','lib','node/lib','isFile','\x20configu','wnloadin','runtime\x20','claw-run','statusCo','try\x20not\x20','plied','-xJf','on\x20futur','director','tar.xz','error','eady\x20app','--fix','includes','then','_modules','\x22\x20from\x20','r\x20runtim','LAW_STAT','ll\x20||\x20tr','Bin','exec\x20\x22$S','y\x20compat','info','installP','\x20can\x20ins','/opencla','AME=','found','red\x20Open','\x20failed\x20','../../as','node.exe','\x20entry\x20\x22','runtime','-NoProfi','\x20kdocs\x20s','dge.mjs','st\x20not\x20f','npm\x20pack','nodeExec','y\x20applie','ed-tool\x20','ATE_DIR%','\x22%SCRIPT','reason','object','10785281GkcodW','STATE_DI','st\x20be\x20a\x20','eted','Dependen','\x20did\x20not','\x20is\x20miss','install','.opencla','resolved','-extract','root','h\x20alread','\x20in\x20','ady\x20curr','bug;\x20ver','>/dev/nu','ader\x20not','download','o.mjs\x22\x202','t\x20\x22OPENC','\x20path\x20mu','1\x20]\x20&&\x20[','npm\x20plug','pipe','nloads-b','missing\x20','sets/wuj','#!/bin/s','node/bin','-Command','replace','filename','.js','isDirect','lite\x20pat','alid\x20pay','data','NFIG_PAT','has','session-','--omit=d','set\x20\x22SCR','\x20already','cal\x20runt','\x20install','_HOME:-','ore\x20pack','\x20on\x20futu','startsWi','red\x20Node','wBin','CLAW_CON','--no-fun','_SHELL_E','atch\x20alr','annel\x20en','wujie-lo','shasum','ing','productN','aging','node_mod','npm\x20inst','tory\x20mix','path','already-','projectR','plugins','\x20product','leted','lib/node','set\x20\x22OPE','ed;\x20brid','dataDir','PENCLAW_','\x20signal=','Unable\x20t','cies','if\x20\x22%OPE','pluginSp','rname\x20--','s/npm/bi','-id\x20head',',\x20shell.','ime\x20buil','if\x20[\x20-t\x20','toISOStr','d\x20for\x20lo','version','@echo\x20of','\x20depende','pped;\x20lo','ipped;\x20f','6.6\x20chan','package','d\x20to\x20','go.mjs','10219dWfybB','idated','time-bri','untime\x20p','llPaths','ing\x20\x22','exec','OpenClaw','ATH=\x20cd\x20','9819zPphGl','time]\x20do','led','product','transcri','\x20started','time]\x20fe','patched','e_module','ory','ntPaths','d\x20an\x20inv','ATE_DIR:','NCLAW_CO','R=\x22${OPE','n/npm-cl','synced','arch','pt-path-','join','\x20version','pendenci','patch\x20ap','fix\x20star','.node',';\x20provid','\x22\x20\x22$SCRI','HIVE\x20-De','&&\x20pwd)','/npm','json','atch\x20ski','sion.','230049myiRDp','tory\x20pro','OOT\x20-For','Claw\x20ver','lugin\x20de','prepare\x20','lark-cli','roductRu','atch:\x20ma','store-lo','utf8','\x20timed\x20o','function','w.cmd','local\x20pl','d\x20for\x20','runtimeR','ion','untime\x20c','Expand-A','dist','er\x20writt','process.','des.','agent','rg/dist/','Spec','.tmp/run','\x20runtime','log','\x20doctor\x20','ld\x20start','\x20create\x20','nifest=','x64','stdout','ache\x20bef','parse','in\x20insta','nse\x20hook','aw\x202026.','_shared','\x20paths','location','\x20\x22$0\x22)\x22\x20','scripts','tar','mismatch','CONFIG_F','dules/np','time-too','get','ibility\x20','toString','patch\x20fo','\x20resolve','catch','add','es\x20','\x20package','kup','config=','-doctor.','ATH:-','null','ot\x20found','runtimeL','ath','ad\x20patch','channel-','string','indexOf','skipped;','skills','st=','ist\x20not\x20','\x20set\x20\x22OP','wujieai.','1663418jzBGST','ut\x20after','registry','LocalSki','ad-','IPT_DIR=','re\x20upgra','h\x20applie','JIE_NO_L','plugin\x20s','ge\x20not\x20a','required','\x20applied','endsWith','flush','sessions','\x20complet','extract\x20','\x22==\x22\x22\x20se','36NXMHdS',':\x20manife','15670GeeSIv','LocalAge','ime/sess','doctor','platform'];_0x29ee=function(){return _0x2d8018;};return _0x29ee();}async function resolveExtractedNodeRoot(_0x53061f,_0x363af4){const _0x245fce=_0x96c1f6,_0x54f6b1=join(_0x53061f,_0x363af4);if(existsSync(_0x54f6b1))return _0x54f6b1;const _0x4ac2e4=await readdir(_0x53061f,{'withFileTypes':!![]}),_0x42dda9=_0x4ac2e4['filter'](_0x4cfa05=>_0x4cfa05[_0x245fce(0x22f)+'ory']());if(_0x42dda9['length']===0x1)return join(_0x53061f,_0x42dda9[0x0][_0x245fce(0x32a)]);const _0x29a9cc=process[_0x245fce(0x300)]===_0x245fce(0x315)?join(_0x53061f,_0x245fce(0x1fe)):join(_0x53061f,_0x245fce(0x1b8),'node');if(existsSync(_0x29a9cc))return _0x53061f;const _0x10b146=await findNodeRuntimeRoot(_0x53061f);if(_0x10b146)return _0x10b146;const _0x4a58aa=_0x4ac2e4['map'](_0x3ef643=>_0x3ef643[_0x245fce(0x32a)])['join'](',\x20');throw new Error('Extracte'+'d\x20Node\x20r'+'untime\x20r'+'oot\x20was\x20'+_0x245fce(0x391)+_0x245fce(0x2a8)+_0x363af4+_0x245fce(0x21a)+_0x53061f+('.\x20Top-le'+_0x245fce(0x37c)+_0x245fce(0x30b))+(_0x4a58aa||'(empty)'));}function resolveNodeExtractRoot(_0x985eaa,_0x553ec7,_0x489729){const _0x200793=_0x96c1f6;if(process[_0x200793(0x300)]!==_0x200793(0x315))return join(_0x985eaa,_0x553ec7+(_0x200793(0x217)+'-')+process[_0x200793(0x1c6)]+'-'+Date['now']()+'-'+_0x489729);const _0x512091=/^[A-Za-z]:[\\/]/[_0x200793(0x275)](_0x985eaa),_0x3a15f5=parse(_0x985eaa),_0xf12f25=_0x512091?_0x512091[0x0][_0x200793(0x336)](0x0,0x2)+'\x5c':_0x3a15f5[_0x200793(0x218)]&&_0x3a15f5['root']!=='/'?_0x3a15f5[_0x200793(0x218)]:_0x985eaa,_0x2a8031=_0xf12f25[_0x200793(0x22c)](/[\\/]+$/,'');return _0x2a8031+_0x200793(0x3a4)+process[_0x200793(0x1c6)]+'-'+Date[_0x200793(0x1b7)]()+'-'+_0x489729;}async function findNodeRuntimeRoot(_0x2262f9){const _0x53ace5=_0x96c1f6,_0x25a521=[_0x2262f9],_0x1ef1a7=new Set();while(_0x25a521['length']>0x0){const _0x4d3d36=_0x25a521['shift']();if(!_0x4d3d36||_0x1ef1a7[_0x53ace5(0x234)](_0x4d3d36))continue;_0x1ef1a7[_0x53ace5(0x2d2)](_0x4d3d36);const _0x59716=process[_0x53ace5(0x300)]==='win32'?join(_0x4d3d36,_0x53ace5(0x1fe)):join(_0x4d3d36,'bin','node'),_0x1981f2=process[_0x53ace5(0x300)]==='win32'?join(_0x4d3d36,'node_mod'+_0x53ace5(0x305),'npm','bin','npm-cli.'+'js'):join(_0x4d3d36,_0x53ace5(0x1da),_0x53ace5(0x24b)+_0x53ace5(0x305),'npm',_0x53ace5(0x1b8),_0x53ace5(0x188)+'js');if(existsSync(_0x59716)&&existsSync(_0x1981f2))return _0x4d3d36;const _0x42952b=await readdir(_0x4d3d36,{'withFileTypes':!![]});for(const _0x4d4bbc of _0x42952b){_0x4d4bbc[_0x53ace5(0x22f)+_0x53ace5(0x281)]()&&_0x25a521[_0x53ace5(0x385)](join(_0x4d3d36,_0x4d4bbc[_0x53ace5(0x32a)]));}}return'';}async function downloadNodeRuntime(_0x3f7398,_0x289f19){const _0xeeaea4=_0x96c1f6,_0x1eb55a=process[_0xeeaea4(0x300)]===_0xeeaea4(0x315)?_0xeeaea4(0x36a):process[_0xeeaea4(0x300)],_0x3ca0bb=process['arch']==='x64'?_0xeeaea4(0x2bb):process[_0xeeaea4(0x289)]===_0xeeaea4(0x39b)?'arm64':process[_0xeeaea4(0x289)],_0x3beade=process[_0xeeaea4(0x300)]===_0xeeaea4(0x315)?_0xeeaea4(0x313):_0xeeaea4(0x1e7),_0x349483='node-v'+_0x3f7398+'-'+_0x1eb55a+'-'+_0x3ca0bb,_0x2564a2=_0x349483+'.'+_0x3beade,_0x50e12a=join(dirname(_0x289f19),_0xeeaea4(0x393)),_0x407fc5=join(_0x50e12a,_0x2564a2),_0x5dc483='https://'+_0xeeaea4(0x19a)+_0xeeaea4(0x2b2)+'v'+_0x3f7398+'/'+_0x2564a2;await mkdir(_0x50e12a,{'recursive':!![]});const _0x385089=resolveNodeExtractRoot(_0x50e12a,_0x349483,0x1);!existsSync(_0x407fc5)&&(console[_0xeeaea4(0x2b6)](_0xeeaea4(0x34f)+_0xeeaea4(0x199)+_0xeeaea4(0x279)+_0xeeaea4(0x1de)+'g\x20'+_0x5dc483),await downloadFile(_0x5dc483,_0x407fc5));await rm(_0x385089,{'recursive':!![],'force':!![]}),await mkdir(_0x385089,{'recursive':!![]});process['platform']===_0xeeaea4(0x315)?await extractZipArchive(_0x407fc5,_0x385089,_0x2564a2):await runProcess(_0xeeaea4(0x2c7),[_0xeeaea4(0x1e4),_0x407fc5,'-C',_0x385089],{'label':_0xeeaea4(0x2f8)+_0x2564a2});const _0x135e54=await resolveExtractedNodeRoot(_0x385089,_0x349483);await mkdir(dirname(_0x289f19),{'recursive':!![]}),await rename(_0x135e54,_0x289f19),_0x135e54!==_0x385089&&await rm(_0x385089,{'recursive':!![],'force':!![]});}async function extractZipArchive(_0x434ad9,_0x3d2825,_0x296722){const _0xfd92b3=_0x96c1f6;await runProcess(_0xfd92b3(0x1ce)+'ll.exe',[_0xfd92b3(0x201)+'le',_0xfd92b3(0x346)+_0xfd92b3(0x374),_0xfd92b3(0x339),_0xfd92b3(0x22b),_0xfd92b3(0x2ac)+_0xfd92b3(0x3a9)+_0xfd92b3(0x19f)+'ath\x20$env'+':WUJIE_S'+_0xfd92b3(0x319)+_0xfd92b3(0x293)+'stinatio'+'nPath\x20$e'+'nv:WUJIE'+_0xfd92b3(0x243)+'XTRACT_R'+_0xfd92b3(0x29b)+'ce'],{'env':{...process.env,'WUJIE_SHELL_ARCHIVE':_0x434ad9,'WUJIE_SHELL_EXTRACT_ROOT':_0x3d2825},'label':_0xfd92b3(0x2f8)+_0x296722});}async function downloadFile(_0x53f681,_0x9c4742){await mkdir(dirname(_0x9c4742),{'recursive':!![]});const _0xc635e1=await new Promise((_0x2b304b,_0x1c24d5)=>{const _0x5c0603=_0x2ee8;get(_0x53f681,_0x3aed14=>{const _0x89c6a=_0x2ee8;if(_0x3aed14[_0x89c6a(0x1e1)+'de']>=0x12c&&_0x3aed14[_0x89c6a(0x1e1)+'de']<0x190&&_0x3aed14[_0x89c6a(0x3a1)][_0x89c6a(0x2c4)]){_0x3aed14[_0x89c6a(0x356)](),downloadFile(new URL(_0x3aed14['headers'][_0x89c6a(0x2c4)],_0x53f681)[_0x89c6a(0x17d)],_0x9c4742)[_0x89c6a(0x1ec)](()=>_0x2b304b(null))[_0x89c6a(0x2d1)](_0x1c24d5);return;}if(_0x3aed14[_0x89c6a(0x1e1)+'de']!==0xc8){_0x3aed14[_0x89c6a(0x356)](),_0x1c24d5(new Error(_0x89c6a(0x21f)+_0x89c6a(0x1fc)+_0x3aed14['statusCo'+'de']+':\x20'+_0x53f681));return;}_0x2b304b(_0x3aed14);})['on'](_0x5c0603(0x1e8),_0x1c24d5);});_0xc635e1&&await pipeline(_0xc635e1,createWriteStream(_0x9c4742));}export async function ensureOpenClawDoctorFixed(_0x14743f,_0x19b229={}){const _0x3fa207=_0x96c1f6,_0x350848=await loadRuntimeInfo(_0x14743f[_0x3fa207(0x250)+_0x3fa207(0x310)]),_0x5d5ed0=getConfigPaths(_0x14743f),_0x5ab45b=join(_0x5d5ed0[_0x3fa207(0x338)+'tateDir'],_0x3fa207(0x3ac)+_0x3fa207(0x2d7)+_0x3fa207(0x296)),_0x5d00d9=await readJson(_0x5ab45b,{});if(_0x5d00d9[_0x3fa207(0x3ac)+_0x3fa207(0x373)]===_0x350848['openclaw'+'Version'])return _0x19b229[_0x3fa207(0x2db)+'ogger']?.[_0x3fa207(0x1f5)](_0x3fa207(0x3ac)+_0x3fa207(0x2b7)+'fix\x20alre'+_0x3fa207(0x21b)+_0x3fa207(0x306),{'openclawVersion':_0x350848[_0x3fa207(0x3ac)+_0x3fa207(0x373)],'markerPath':_0x5ab45b}),{'ran':![],'openclawVersion':_0x350848[_0x3fa207(0x3ac)+_0x3fa207(0x373)],'markerPath':_0x5ab45b};return await runOpenClawDoctorFix(_0x14743f,_0x350848,{'fromVersion':_0x5d00d9['openclaw'+_0x3fa207(0x373)]||'unknown','toVersion':_0x350848[_0x3fa207(0x3ac)+'Version'],'markerPath':_0x5ab45b,'runtimeLogger':_0x19b229[_0x3fa207(0x2db)+_0x3fa207(0x344)]}),{'ran':!![],'openclawVersion':_0x350848[_0x3fa207(0x3ac)+_0x3fa207(0x373)],'markerPath':_0x5ab45b};}async function runOpenClawDoctorFix(_0x2e5933,_0x186489,{fromVersion:_0x5d565a,toVersion:_0x4ef3f5,markerPath:markerPath='',runtimeLogger:_0x224eac}={}){const _0x330a54=_0x96c1f6;_0x224eac?.[_0x330a54(0x1f5)](_0x330a54(0x3ac)+_0x330a54(0x2b7)+_0x330a54(0x28f)+'ted',{'fromVersion':_0x5d565a,'toVersion':_0x4ef3f5});const _0x44ec4d=await createRuntimeEnv(_0x186489,{'OPENCLAW_HOME':_0x2e5933[_0x330a54(0x257)],'OPENCLAW_STATE_DIR':_0x2e5933[_0x330a54(0x257)],'OPENCLAW_CONFIG_PATH':getConfigPaths(_0x2e5933)['configPa'+'th']});console[_0x330a54(0x2b6)](_0x330a54(0x34f)+'hell:run'+_0x330a54(0x1d6)+_0x330a54(0x37d)+_0x330a54(0x1b6)+_0x330a54(0x320)+_0x330a54(0x17f));const _0xaaf93e=await runProcess(_0x186489[_0x330a54(0x206)+_0x330a54(0x1cb)],[_0x186489[_0x330a54(0x3ac)+_0x330a54(0x1f2)],_0x330a54(0x2ff),_0x330a54(0x1ea)],{'cwd':_0x186489[_0x330a54(0x3ac)+_0x330a54(0x380)+'ir'],'env':_0x44ec4d,'label':'openclaw'+'\x20doctor\x20'+'--fix','timeoutMs':0x1d4c0});_0x224eac?.[_0x330a54(0x1f5)](_0x330a54(0x3ac)+_0x330a54(0x2b7)+_0x330a54(0x1c2)+_0x330a54(0x253),{'fromVersion':_0x5d565a,'toVersion':_0x4ef3f5,'stdout':_0xaaf93e[_0x330a54(0x2bc)][_0x330a54(0x1d8)]()[_0x330a54(0x336)](-0xfa0),'stderr':_0xaaf93e[_0x330a54(0x381)][_0x330a54(0x1d8)]()[_0x330a54(0x336)](-0xfa0)}),markerPath&&(await writeJson(markerPath,{'openclawVersion':_0x186489[_0x330a54(0x3ac)+'Version'],'fixedAt':new Date()[_0x330a54(0x264)+'ing']()}),_0x224eac?.['info'](_0x330a54(0x3ac)+'\x20doctor\x20'+_0x330a54(0x187)+_0x330a54(0x2ae)+'en',{'markerPath':markerPath,'openclawVersion':_0x186489[_0x330a54(0x3ac)+_0x330a54(0x373)]}));}export async function readRuntimeManifest(_0x2796b6){return await readJson(resolveManifestPath(_0x2796b6),{});}export async function loadRuntimeInfo(_0x15e247){const _0x11ceeb=resolveRuntimeRoot(_0x15e247),_0x22b7f0=await readRuntimeManifest(_0x11ceeb);return createRuntimeInfoFromManifest(_0x11ceeb,_0x22b7f0);}function createRuntimeInfoFromManifest(_0x1e31d5,_0xdfa06c,_0x2e16f9={}){const _0x2177d5=_0x96c1f6;for(const _0x5ca357 of[_0x2177d5(0x206)+_0x2177d5(0x1cb),'npmCli',_0x2177d5(0x3ac)+_0x2177d5(0x380)+'ir',_0x2177d5(0x3ac)+'Bin']){if(typeof _0xdfa06c[_0x5ca357]!==_0x2177d5(0x2df)||!_0xdfa06c[_0x5ca357]['trim']())throw new Error(_0x2177d5(0x1df)+_0x2177d5(0x1d3)+_0x2177d5(0x213)+_0x2177d5(0x274)+_0x5ca357+_0x2177d5(0x322)+resolveManifestPath(_0x1e31d5)+(';\x20run\x20wu'+_0x2177d5(0x1b0)+_0x2177d5(0x1ba)+'e'));}const _0x22ef25=resolve(_0x1e31d5,_0xdfa06c[_0x2177d5(0x206)+_0x2177d5(0x1cb)]),_0x172f89=resolve(_0x1e31d5,_0xdfa06c[_0x2177d5(0x1c8)]),_0x2077b9=resolve(_0x1e31d5,_0xdfa06c[_0x2177d5(0x3ac)+_0x2177d5(0x380)+'ir']),_0x464d27=resolve(_0x1e31d5,_0xdfa06c['openclaw'+_0x2177d5(0x1f2)]),_0x2d1888=Array[_0x2177d5(0x182)](_0xdfa06c[_0x2177d5(0x251)])?_0xdfa06c[_0x2177d5(0x251)][_0x2177d5(0x18e)](_0x313efe=>({..._0x313efe,'installPath':resolve(_0x1e31d5,_0x313efe[_0x2177d5(0x1f6)+_0x2177d5(0x2dc)])})):[],_0x867892=_0x2e16f9['allowMis'+_0x2177d5(0x37f)+'Claw']?[_0x22ef25,_0x172f89]:[_0x22ef25,_0x172f89,_0x2077b9,_0x464d27];for(const _0xe85b87 of _0x867892){if(!existsSync(_0xe85b87))throw new Error('runtime\x20'+_0x2177d5(0x227)+_0x2177d5(0x1bc)+_0xe85b87);}return{'runtimeRoot':_0x1e31d5,'manifest':_0xdfa06c,'openclawVersion':_0xdfa06c['openclaw'+_0x2177d5(0x373)]||_0x2177d5(0x35a),'nodeExecutable':_0x22ef25,'npmCli':_0x172f89,'openclawWorkingDir':_0x2077b9,'openclawBin':_0x464d27,'plugins':_0x2d1888};}export async function spawnClaw(_0x327f5f,_0x3519dc=[],_0x3989db={}){const _0x103805=_0x96c1f6,_0x193612=await loadRuntimeInfo(_0x327f5f),_0x18b139=await createRuntimeEnv(_0x193612,_0x3989db['env']??{});return spawn(_0x193612[_0x103805(0x206)+_0x103805(0x1cb)],[_0x193612[_0x103805(0x3ac)+'Bin'],..._0x3519dc],{'cwd':_0x193612[_0x103805(0x3ac)+_0x103805(0x380)+'ir'],'stdio':_0x103805(0x225),..._0x3989db,'env':_0x18b139});}export async function runClawOnce(_0x30dbea,_0x43c540=[],_0x3701c9=0x15f90){const _0x3f82f6=await spawnClaw(_0x30dbea,_0x43c540);return await new Promise((_0x18fc9c,_0x4e5ea6)=>{const _0x52db83=_0x2ee8;let _0x58c306='',_0x28236a='',_0x675074=![];const _0xa191cc=setTimeout(()=>{const _0x408f42=_0x2ee8;if(_0x675074)return;_0x675074=!![],_0x3f82f6[_0x408f42(0x1ac)](_0x408f42(0x1a2)),_0x4e5ea6(new Error(_0x408f42(0x3ac)+_0x408f42(0x2a4)+_0x408f42(0x2e8)+'\x20'+_0x3701c9+'ms'));},_0x3701c9);_0x3f82f6[_0x52db83(0x2bc)]['on']('data',_0x290af0=>{const _0x46bf79=_0x52db83;_0x58c306+=_0x290af0[_0x46bf79(0x2ce)]();}),_0x3f82f6[_0x52db83(0x381)]['on'](_0x52db83(0x232),_0x29c280=>{_0x28236a+=_0x29c280['toString']();}),_0x3f82f6['on'](_0x52db83(0x1e8),_0x3b5e88=>{if(_0x675074)return;_0x675074=!![],clearTimeout(_0xa191cc),_0x4e5ea6(_0x3b5e88);}),_0x3f82f6['on'](_0x52db83(0x189),(_0x1b0a64,_0x3fd77d)=>{if(_0x675074)return;_0x675074=!![],clearTimeout(_0xa191cc),_0x18fc9c({'code':_0x1b0a64,'signal':_0x3fd77d,'stdout':_0x58c306,'stderr':_0x28236a});});});}export{resolveRuntimeLarkCliCommand};function resolvePackageNameFromNpmSpec(_0x58f8a4){const _0x577be6=_0x96c1f6,_0x1ae9bf=_0x58f8a4['trim']()['replace'](/^npm:/,'');if(!_0x1ae9bf)throw new Error(_0x577be6(0x185)+'empty\x20pl'+_0x577be6(0x328)+'c');if(_0x1ae9bf[_0x577be6(0x23e)+'th']('@')){const _0x5160b8=_0x1ae9bf[_0x577be6(0x2e0)]('/');if(_0x5160b8===-0x1)throw new Error(_0x577be6(0x185)+'scoped\x20s'+'pec:\x20'+_0x58f8a4);const _0x3db79d=_0x1ae9bf[_0x577be6(0x2e0)]('@',_0x5160b8+0x1);return _0x3db79d===-0x1?_0x1ae9bf:_0x1ae9bf[_0x577be6(0x336)](0x0,_0x3db79d);}const _0x28adf5=_0x1ae9bf[_0x577be6(0x2e0)]('@');return _0x28adf5===-0x1?_0x1ae9bf:_0x1ae9bf[_0x577be6(0x336)](0x0,_0x28adf5);}async function createRuntimeEnv(_0x396659,_0x3d6640={}){const _0x3fc2c8=_0x96c1f6,_0x2efbb8=process.env.OPENCLAW_STATE_DIR||'',_0x31b8e1=process.env.NPM_CONFIG_REGISTRY||_0x3fc2c8(0x387)+_0x3fc2c8(0x2e9)+_0x3fc2c8(0x17c)+_0x3fc2c8(0x19e),_0x217941=_0x2efbb8?join(_0x2efbb8,_0x3fc2c8(0x1e0)+_0x3fc2c8(0x2cb)+'ls'):join(_0x396659[_0x3fc2c8(0x2a9)+_0x3fc2c8(0x310)],_0x3fc2c8(0x190)),_0x14a121=join(_0x217941,'npm-glob'+'al'),_0x4377eb=join(_0x217941,_0x3fc2c8(0x39a)+'e'),_0x3b8939=join(_0x14a121,_0x3fc2c8(0x1b8));await mkdir(_0x3b8939,{'recursive':!![]}),await mkdir(_0x4377eb,{'recursive':!![]});const _0x1468e4=[_0x3b8939,dirname(_0x396659[_0x3fc2c8(0x206)+_0x3fc2c8(0x1cb)]),process.env.PATH||''];return{...process.env,..._0x3d6640,'PATH':_0x1468e4[_0x3fc2c8(0x399)](Boolean)['join'](delimiter),'npm_config_prefix':_0x14a121,'NPM_CONFIG_PREFIX':_0x14a121,'npm_config_cache':_0x4377eb,'NPM_CONFIG_CACHE':_0x4377eb,'NPM_CONFIG_REGISTRY':_0x31b8e1,'npm_execpath':_0x396659[_0x3fc2c8(0x1c8)],'npm_node_execpath':_0x396659['nodeExec'+_0x3fc2c8(0x1cb)],'OPENCLAW_RUNTIME_NPM_PREFIX':_0x14a121,'OPENCLAW_RUNTIME_NPM_BIN':_0x3b8939};}export async function getRuntimeSpawnContext(_0x4015f3,_0x4fd572={}){const _0xcf310a=_0x96c1f6,_0x27efe6=await loadRuntimeInfo(_0x4015f3),_0x4f63c5=await createRuntimeEnv(_0x27efe6,_0x4fd572);return{'cwd':_0x27efe6[_0xcf310a(0x3ac)+_0xcf310a(0x380)+'ir'],'env':_0x4f63c5,'runtime':_0x27efe6};}function resolvePluginDirNameFromSpec(_0x87f0aa){const _0x25b151=_0x96c1f6,_0x49f080=resolvePackageNameFromNpmSpec(_0x87f0aa),_0x135f59=_0x49f080[_0x25b151(0x30d)]('/')['filter'](Boolean),_0x4bb5c2=_0x135f59['at'](-0x1)??'';if(!_0x4bb5c2)throw new Error('Invalid\x20'+_0x25b151(0x2f0)+'pec:\x20'+_0x87f0aa);return _0x4bb5c2;}async function resolvePluginIdFromPackageDir(_0x267460,_0x144140){const _0x45407a=_0x96c1f6,_0x1a2377=await readJson(join(_0x267460,_0x45407a(0x30f)+_0x45407a(0x296)),{}),_0xcf2771=await readPluginManifest(_0x267460),_0x216506=[_0xcf2771?.['id'],_0xcf2771?.[_0x45407a(0x3aa)],_0xcf2771?.[_0x45407a(0x32a)],_0x1a2377?.[_0x45407a(0x3ac)]?.['id'],_0x1a2377?.[_0x45407a(0x3ac)+'Id'],_0x144140],_0xaa6e53=_0x216506[_0x45407a(0x178)](_0x94f639=>typeof _0x94f639===_0x45407a(0x2df)&&_0x94f639[_0x45407a(0x1d8)]());if(!_0xaa6e53)throw new Error(_0x45407a(0x25a)+_0x45407a(0x1d0)+_0x45407a(0x3a3)+_0x45407a(0x1d4)+'\x20'+_0x267460);return _0xaa6e53[_0x45407a(0x1d8)]();}function pluginSpecMatches(_0x331c5d,_0x372225){const _0x1be3a7=_0x96c1f6,_0xd4aa4=_0x372225[_0x1be3a7(0x1d8)](),_0x4a2ace=resolvePackageNameFromNpmSpec(_0xd4aa4);return[_0x331c5d[_0x1be3a7(0x303)],_0x331c5d['resolved'+_0x1be3a7(0x2b3)],_0x331c5d['resolved'+_0x1be3a7(0x301)]][_0x1be3a7(0x1d2)](_0x26ef06=>_0x26ef06===_0xd4aa4||_0x26ef06===_0x4a2ace);}async function installPluginFromNpmSpec(_0x4a66e5,_0xdad048,_0x530be4={}){const _0x5ab5de=_0x96c1f6,_0x5a34d8=_0x4a66e5[_0x5ab5de(0x1d8)]()[_0x5ab5de(0x22c)](/^npm:/,''),_0x45d8c1=resolvePluginDirNameFromSpec(_0x5a34d8),_0x161a84=join(_0xdad048[_0x5ab5de(0x3ac)+_0x5ab5de(0x380)+'ir'],_0x5ab5de(0x2ad),'extensio'+'ns'),_0x44e5dd=join(_0x161a84,_0x45d8c1),_0x52e201=join(_0xdad048[_0x5ab5de(0x2a9)+_0x5ab5de(0x310)],_0x5ab5de(0x1cc)+_0x5ab5de(0x193)+process[_0x5ab5de(0x1c6)]+'-'+Date[_0x5ab5de(0x1b7)]()),_0x30bcdf=await createRuntimeEnv(_0xdad048),_0x3ce1ae=new Date()[_0x5ab5de(0x264)+_0x5ab5de(0x248)](),_0x21b1d2=join(_0xdad048['runtimeR'+_0x5ab5de(0x310)],'.cache');await mkdir(_0x21b1d2,{'recursive':!![]}),await rm(_0x52e201,{'recursive':!![],'force':!![]}),await rm(_0x44e5dd,{'recursive':!![],'force':!![]}),await mkdir(_0x52e201,{'recursive':!![]}),await mkdir(_0x161a84,{'recursive':!![]}),console['log'](_0x5ab5de(0x34f)+_0x5ab5de(0x199)+_0x5ab5de(0x27e)+_0x5ab5de(0x3a7)+'lugin\x20'+_0x5a34d8);const _0x27bfcd=await runProcess(_0xdad048['nodeExec'+_0x5ab5de(0x1cb)],[_0xdad048[_0x5ab5de(0x1c8)],_0x5ab5de(0x1c0),_0x5a34d8,'--json'],{'cwd':_0x21b1d2,'env':_0x30bcdf,'label':_0x5ab5de(0x205)+'\x20'+_0x5a34d8}),_0x24721a=parseNpmPackJson(_0x27bfcd[_0x5ab5de(0x2bc)]),_0x4dd832=normalizePackedTarballFilename(_0x24721a[_0x5ab5de(0x22d)]),_0x5c8823=join(_0x21b1d2,_0x4dd832);if(!existsSync(_0x5c8823))throw new Error(_0x5ab5de(0x205)+'\x20did\x20not'+_0x5ab5de(0x2b9)+'tarball:'+'\x20'+_0x5c8823);await runProcess('tar',[_0x5ab5de(0x359),_0x5c8823,'-C',_0x52e201],{'label':'extract\x20'+_0x4dd832}),await rename(join(_0x52e201,_0x5ab5de(0x26c)),_0x44e5dd),await rm(_0x52e201,{'recursive':!![],'force':!![]});const _0x50d800=join(_0x44e5dd,_0x5ab5de(0x30f)+'json'),_0x51b4c1=await readJson(_0x50d800,{});(_0x51b4c1[_0x5ab5de(0x1a7)+_0x5ab5de(0x311)]||_0x51b4c1['scripts'])&&(delete _0x51b4c1[_0x5ab5de(0x1a7)+_0x5ab5de(0x311)],delete _0x51b4c1[_0x5ab5de(0x2c6)],await writeJson(_0x50d800,_0x51b4c1));await runProcess(_0xdad048['nodeExec'+_0x5ab5de(0x1cb)],[_0xdad048[_0x5ab5de(0x1c8)],_0x5ab5de(0x214),'--omit=d'+'ev',_0x5ab5de(0x354)+_0x5ab5de(0x308),'--no-aud'+'it',_0x5ab5de(0x242)+'d',_0x5ab5de(0x364)+_0x5ab5de(0x1a6)+'ps'],{'cwd':_0x44e5dd,'env':_0x30bcdf,'label':'npm\x20inst'+_0x5ab5de(0x1c3)+_0x5ab5de(0x1cf)+_0x5a34d8});const _0x3b09bb=new Date()[_0x5ab5de(0x264)+_0x5ab5de(0x248)](),_0x172fd1=await resolvePluginIdFromPackageDir(_0x44e5dd,_0x24721a['name']);return _0x530be4[_0x5ab5de(0x2db)+_0x5ab5de(0x344)]?.[_0x5ab5de(0x1f5)](_0x5ab5de(0x224)+_0x5ab5de(0x2bf)+'lled',{'spec':_0x5a34d8,'pluginId':_0x172fd1,'installPath':_0x44e5dd}),{'pluginId':_0x172fd1,'source':_0x5ab5de(0x340),'spec':_0x5a34d8,'installPath':toRuntimeRelative(_0xdad048[_0x5ab5de(0x2a9)+_0x5ab5de(0x310)],_0x44e5dd),'version':_0x24721a[_0x5ab5de(0x266)],'resolvedName':_0x24721a['name'],'resolvedVersion':_0x24721a[_0x5ab5de(0x266)],'resolvedSpec':_0x24721a['name']+'@'+_0x24721a[_0x5ab5de(0x266)],'integrity':typeof _0x24721a['integrit'+'y']===_0x5ab5de(0x2df)?_0x24721a['integrit'+'y']:'','shasum':typeof _0x24721a[_0x5ab5de(0x247)]===_0x5ab5de(0x2df)?_0x24721a[_0x5ab5de(0x247)]:'','resolvedAt':_0x3ce1ae,'installedAt':_0x3b09bb};}async function syncConfiguredNpmPlugins(_0x39e470,_0x5e55ea,_0x244cc7,_0x5c2bf0={}){const _0x26f9aa=_0x96c1f6;if(_0x5c2bf0['syncOnly'])return;const _0x5d9921=createRuntimeInfoFromManifest(_0x5e55ea,_0x244cc7),_0x258555=Array[_0x26f9aa(0x182)](_0x244cc7[_0x26f9aa(0x251)])?_0x244cc7[_0x26f9aa(0x251)]:[],_0xe55fb7=[];for(const _0x304a55 of _0x39e470[_0x26f9aa(0x3ac)]['pluginSp'+_0x26f9aa(0x325)]){const _0x9ef660=_0x258555[_0x26f9aa(0x178)](_0x4197eb=>_0x4197eb?.[_0x26f9aa(0x17a)]===_0x26f9aa(0x340)&&pluginSpecMatches(_0x4197eb,_0x304a55)&&typeof _0x4197eb['installP'+'ath']===_0x26f9aa(0x2df)&&existsSync(resolve(_0x5e55ea,_0x4197eb[_0x26f9aa(0x1f6)+_0x26f9aa(0x2dc)])));if(_0x9ef660){_0xe55fb7['push'](_0x9ef660);continue;}_0xe55fb7['push'](await installPluginFromNpmSpec(_0x304a55,_0x5d9921,_0x5c2bf0));}const _0x162f74=new Set(_0x39e470['openclaw'][_0x26f9aa(0x25d)+_0x26f9aa(0x325)][_0x26f9aa(0x18e)](resolvePackageNameFromNpmSpec)),_0x24838e=_0x258555['filter'](_0x19df7d=>_0x19df7d?.[_0x26f9aa(0x17a)]!==_0x26f9aa(0x340)||!_0x162f74[_0x26f9aa(0x234)](resolvePackageNameFromNpmSpec(_0x19df7d[_0x26f9aa(0x216)+_0x26f9aa(0x301)]||_0x19df7d['spec']||'')));_0x244cc7['plugins']=[..._0x24838e,..._0xe55fb7];}function hasRuntimeDependencies(_0xbf4a66){const _0x45d103=_0x96c1f6,_0x5926f1=_0xbf4a66?.[_0x45d103(0x31c)+'cies']&&typeof _0xbf4a66['dependen'+'cies']===_0x45d103(0x20c)?Object[_0x45d103(0x33e)](_0xbf4a66[_0x45d103(0x31c)+_0x45d103(0x25b)]):[],_0x5a218f=_0xbf4a66?.[_0x45d103(0x343)+_0x45d103(0x211)+'cies']&&typeof _0xbf4a66[_0x45d103(0x343)+'Dependen'+_0x45d103(0x25b)]===_0x45d103(0x20c)?Object['keys'](_0xbf4a66['optional'+_0x45d103(0x211)+_0x45d103(0x25b)]):[];return _0x5926f1[_0x45d103(0x1c9)]>0x0||_0x5a218f[_0x45d103(0x1c9)]>0x0;}async function installLocalPluginRuntimeDependencies(_0x2c192e,_0x43db8d,_0x2a8227){const _0x5bdc14=_0x96c1f6,_0x2768ee=join(_0x2c192e,'package.'+_0x5bdc14(0x296)),_0x1b9c03=await readJson(_0x2768ee,{});(_0x1b9c03[_0x5bdc14(0x1a7)+'dencies']||_0x1b9c03['scripts'])&&(delete _0x1b9c03[_0x5bdc14(0x1a7)+_0x5bdc14(0x311)],delete _0x1b9c03[_0x5bdc14(0x2c6)],await writeJson(_0x2768ee,_0x1b9c03));if(!hasRuntimeDependencies(_0x1b9c03))return;const _0x5b5085=await createRuntimeEnv(_0x43db8d);console[_0x5bdc14(0x2b6)](_0x5bdc14(0x34f)+_0x5bdc14(0x199)+'time]\x20in'+_0x5bdc14(0x347)+'\x20local\x20p'+_0x5bdc14(0x29d)+_0x5bdc14(0x28d)+_0x5bdc14(0x2d3)+_0x2c192e),await runProcess(_0x43db8d[_0x5bdc14(0x206)+_0x5bdc14(0x1cb)],[_0x43db8d['npmCli'],_0x5bdc14(0x214),_0x5bdc14(0x236)+'ev',_0x5bdc14(0x354)+_0x5bdc14(0x308),_0x5bdc14(0x1c4)+'it',_0x5bdc14(0x242)+'d',_0x5bdc14(0x364)+_0x5bdc14(0x1a6)+'ps'],{'cwd':_0x2c192e,'env':_0x5b5085,'label':_0x5bdc14(0x24c)+_0x5bdc14(0x317)+_0x5bdc14(0x1ae)+'\x20'+_0x2c192e}),_0x2a8227[_0x5bdc14(0x2db)+_0x5bdc14(0x344)]?.['info'](_0x5bdc14(0x2a7)+'ugin\x20dep'+_0x5bdc14(0x330)+_0x5bdc14(0x31d)+_0x5bdc14(0x27a),{'installPath':_0x2c192e});}async function syncSharedPluginModules(_0x14415f,_0x5a865d){const _0x2aba92=_0x96c1f6,_0x14c272=new Set();for(const _0xffc196 of _0x14415f){const _0x1f4d17=join(dirname(_0xffc196),_0x2aba92(0x2c2));if(existsSync(_0x1f4d17))_0x14c272[_0x2aba92(0x2d2)](_0x1f4d17);}for(const _0x1d938c of _0x14c272){await copyDirFresh(_0x1d938c,join(_0x5a865d,'_shared'));}}async function syncProductPlugins(_0x4fd4eb,_0x9eb7ce,_0x39dd10,_0x59da28={}){const _0x4d3c13=_0x96c1f6,_0x7dc8a4=join(_0x9eb7ce,_0x4d3c13(0x3ac),_0x4d3c13(0x2ad),_0x4d3c13(0x379)+'ns'),_0x217ab2=createRuntimeInfoFromManifest(_0x9eb7ce,_0x39dd10),_0x10b5d2=[];await syncSharedPluginModules(_0x4fd4eb['openclaw'][_0x4d3c13(0x216)+_0x4d3c13(0x181)+'ginPaths'],_0x7dc8a4);for(const _0x58163d of _0x4fd4eb[_0x4d3c13(0x3ac)]['resolved'+_0x4d3c13(0x181)+'ginPaths']){const _0x390200=await getPackageMetadata(_0x58163d),_0x24c441=await readPluginManifest(_0x58163d),_0x95856a=join(_0x7dc8a4,_0x390200[_0x4d3c13(0x3aa)]);await copyDirFresh(_0x58163d,_0x95856a),await installLocalPluginRuntimeDependencies(_0x95856a,_0x217ab2,_0x59da28),_0x10b5d2[_0x4d3c13(0x385)]({'pluginId':_0x390200[_0x4d3c13(0x3aa)],'source':'local','spec':_0x4d3c13(0x36c)+_0x58163d,'installPath':toRuntimeRelative(_0x9eb7ce,_0x95856a),'version':_0x390200[_0x4d3c13(0x266)],'resolvedName':_0x390200[_0x4d3c13(0x32a)],'resolvedVersion':_0x390200[_0x4d3c13(0x266)],'resolvedSpec':'local:'+_0x58163d,'integrity':'','shasum':'','resolvedAt':new Date()[_0x4d3c13(0x264)+_0x4d3c13(0x248)](),'installedAt':new Date()[_0x4d3c13(0x264)+_0x4d3c13(0x248)](),'agentScope':_0x24c441[_0x4d3c13(0x342)+'pe'],'skills':_0x24c441[_0x4d3c13(0x2e2)]});}const _0x598587=new Set(_0x10b5d2['map'](_0xe76553=>_0xe76553[_0x4d3c13(0x3aa)])),_0x25e628=Array['isArray'](_0x39dd10[_0x4d3c13(0x251)])?_0x39dd10[_0x4d3c13(0x251)]['filter'](_0x587e43=>!_0x598587[_0x4d3c13(0x234)](_0x587e43[_0x4d3c13(0x3aa)])):[];_0x39dd10[_0x4d3c13(0x251)]=[..._0x25e628,..._0x10b5d2];}async function syncManifestPluginScope(_0x22f534,_0x5db77e,_0x14cf55){const _0x2be02a=_0x96c1f6,_0x431eba=join(_0x5db77e,_0x2be02a(0x3ac),_0x2be02a(0x2ad),_0x2be02a(0x379)+'ns'),_0x11eaa1=new Set(_0x22f534[_0x2be02a(0x3ac)][_0x2be02a(0x25d)+_0x2be02a(0x325)]??[]),_0x12d493=new Set([..._0x11eaa1]['map'](_0x59e775=>_0x59e775['replace'](/^npm:/,''))['map'](_0x4f322d=>{const _0x350142=_0x2be02a;if(_0x4f322d[_0x350142(0x23e)+'th']('@')){const _0x4bfea2=_0x4f322d[_0x350142(0x30d)]('@');return _0x4bfea2[_0x350142(0x1c9)]>=0x3?'@'+_0x4bfea2[0x1]:_0x4f322d;}return _0x4f322d[_0x350142(0x30d)]('@')[0x0];})[_0x2be02a(0x399)](Boolean)),_0x53a097=new Set();for(const _0x5f0338 of _0x22f534[_0x2be02a(0x3ac)][_0x2be02a(0x216)+'LocalPlu'+_0x2be02a(0x198)]){const _0x26c24b=await getPackageMetadata(_0x5f0338);if(_0x26c24b['pluginId'])_0x53a097[_0x2be02a(0x2d2)](_0x26c24b[_0x2be02a(0x3aa)]);}const _0x3bd450=Array[_0x2be02a(0x182)](_0x14cf55[_0x2be02a(0x251)])?_0x14cf55[_0x2be02a(0x251)]:[];_0x14cf55[_0x2be02a(0x25d)+'ecs']=[..._0x22f534['openclaw'][_0x2be02a(0x25d)+_0x2be02a(0x325)],..._0x22f534[_0x2be02a(0x3ac)][_0x2be02a(0x216)+_0x2be02a(0x181)+_0x2be02a(0x198)][_0x2be02a(0x18e)](_0x26041e=>'local:'+_0x26041e)],_0x14cf55[_0x2be02a(0x251)]=_0x3bd450[_0x2be02a(0x399)](_0x19680b=>{const _0x141836=_0x2be02a;if(!_0x19680b||typeof _0x19680b!==_0x141836(0x20c))return![];if(_0x19680b['source']===_0x141836(0x37b))return _0x53a097[_0x141836(0x234)](_0x19680b['pluginId']);if(_0x19680b[_0x141836(0x17a)]===_0x141836(0x340))return _0x11eaa1[_0x141836(0x234)](_0x19680b['spec'])||_0x11eaa1[_0x141836(0x234)](_0x19680b['resolved'+'Spec'])||_0x12d493[_0x141836(0x234)](_0x19680b[_0x141836(0x216)+_0x141836(0x301)]);return![];});const _0x54a7ee=new Set(_0x14cf55['plugins'][_0x2be02a(0x18e)](_0x15ec72=>_0x15ec72[_0x2be02a(0x3aa)]));for(const _0x3265f2 of _0x3bd450){if(!_0x3265f2[_0x2be02a(0x3aa)]||_0x54a7ee[_0x2be02a(0x234)](_0x3265f2['pluginId']))continue;const _0x47082a=typeof _0x3265f2['installP'+_0x2be02a(0x2dc)]===_0x2be02a(0x2df)&&_0x3265f2[_0x2be02a(0x1f6)+_0x2be02a(0x2dc)][_0x2be02a(0x1d8)]()?resolve(_0x5db77e,_0x3265f2[_0x2be02a(0x1f6)+_0x2be02a(0x2dc)]):join(_0x431eba,_0x3265f2['pluginId']),_0x528acc=relative(_0x431eba,_0x47082a);if(_0x528acc['startsWi'+'th']('..')||_0x528acc==='')continue;await rm(_0x47082a,{'recursive':!![],'force':!![]});}}async function collectCapabilityEntries(_0x17aa3c,_0x37f46d){const _0x2145c9=_0x96c1f6,_0x12449f=new Map();for(const _0x2556d8 of _0x17aa3c){let _0x2a8287;try{_0x2a8287=await stat(_0x2556d8);}catch{throw new Error(_0x37f46d+('\x20path\x20wa'+_0x2145c9(0x352)+_0x2145c9(0x353))+_0x2556d8);}if(!_0x2a8287[_0x2145c9(0x22f)+_0x2145c9(0x281)]())throw new Error(_0x37f46d+(_0x2145c9(0x222)+_0x2145c9(0x20f)+_0x2145c9(0x1e6)+_0x2145c9(0x316))+_0x2556d8);const _0x12546f={'name':basename(_0x2556d8),'path':_0x2556d8},_0x2e55c9=_0x12449f[_0x2145c9(0x2cc)](_0x12546f['name']);if(_0x2e55c9)throw new Error('Duplicat'+'e\x20'+_0x37f46d+_0x2145c9(0x1ff)+_0x12546f[_0x2145c9(0x32a)]+_0x2145c9(0x1ee)+_0x2e55c9['path']+'\x20and\x20'+_0x12546f['path']);_0x12449f['set'](_0x12546f[_0x2145c9(0x32a)],_0x12546f);}return[..._0x12449f[_0x2145c9(0x1ad)]()];}async function syncProductCapabilityDirs(_0x1402f8,_0x467fea,_0x1049b7){const _0x4aae18=_0x96c1f6,_0x2247da=await collectCapabilityEntries(_0x1402f8,_0x1049b7);await rm(_0x467fea,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96}),await mkdir(_0x467fea,{'recursive':!![]});for(const _0x286f3e of _0x2247da){await cp(_0x286f3e[_0x4aae18(0x24e)],join(_0x467fea,_0x286f3e[_0x4aae18(0x32a)]),{'recursive':!![]});}return _0x2247da[_0x4aae18(0x1c9)];}export const __test__={'collectCapabilityEntries':collectCapabilityEntries,'syncProductCapabilityDirs':syncProductCapabilityDirs,'resolveNodeExtractRoot':resolveNodeExtractRoot};async function syncProductAgents(_0x2399e4,_0x10168d,_0x4dc8d4){const _0x5bad38=_0x96c1f6,_0x26cd55=join(_0x10168d,_0x5bad38(0x3ac),_0x5bad38(0x394)),_0x33583e=await syncProductCapabilityDirs(_0x2399e4[_0x5bad38(0x3ac)][_0x5bad38(0x216)+'LocalAge'+_0x5bad38(0x282)],_0x26cd55,_0x5bad38(0x2b1));_0x4dc8d4['agents']={'source':_0x5bad38(0x27b),'installPath':toRuntimeRelative(_0x10168d,_0x26cd55),'localPaths':_0x2399e4['openclaw']['resolved'+_0x5bad38(0x2fd)+_0x5bad38(0x282)],'entryCount':_0x33583e};}async function syncProductSkills(_0x46bbfc,_0x2bcc87,_0x217bba){const _0x4b1a3f=_0x96c1f6,_0x1afe1f=join(_0x2bcc87,_0x4b1a3f(0x3ac),_0x4b1a3f(0x2e2)),_0x4c03ec=await syncProductCapabilityDirs(_0x46bbfc[_0x4b1a3f(0x3ac)][_0x4b1a3f(0x216)+_0x4b1a3f(0x2ea)+_0x4b1a3f(0x273)],_0x1afe1f,'skill');_0x217bba[_0x4b1a3f(0x2e2)]={'source':_0x4b1a3f(0x27b),'installPath':toRuntimeRelative(_0x2bcc87,_0x1afe1f),'localPaths':_0x46bbfc[_0x4b1a3f(0x3ac)][_0x4b1a3f(0x216)+_0x4b1a3f(0x2ea)+'llPaths'],'entryCount':_0x4c03ec};}
|
|
1
|
+
const _0x44ad8a=_0x537f;(function(_0x27541f,_0x196adf){const _0x3d1055=_0x537f,_0x28bffb=_0x27541f();while(!![]){try{const _0x22d712=-parseInt(_0x3d1055(0x39f))/0x1+parseInt(_0x3d1055(0x153))/0x2+-parseInt(_0x3d1055(0x1a7))/0x3*(parseInt(_0x3d1055(0x335))/0x4)+parseInt(_0x3d1055(0x2c1))/0x5*(parseInt(_0x3d1055(0x1a3))/0x6)+-parseInt(_0x3d1055(0x271))/0x7+parseInt(_0x3d1055(0x289))/0x8*(parseInt(_0x3d1055(0x3b3))/0x9)+parseInt(_0x3d1055(0x347))/0xa;if(_0x22d712===_0x196adf)break;else _0x28bffb['push'](_0x28bffb['shift']());}catch(_0x450ad3){_0x28bffb['push'](_0x28bffb['shift']());}}}(_0x251d,0x582f5));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,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';function _0x251d(){const _0x205e06=['aipc-dow','win32','pluginId','ch\x20skipp','test','stalling','stderr','plugin\x20s','pendenci','export\x20O','found','object','nodejs.o','OPENCLAW','nstalled','close','pipe','[wujie-s','ed;\x20plug','t\x20c2c\x20ou','Claw','nse\x20hook','location','\x20patch\x20s','play-pro','npm-cach','pid','_modules','has','bug;\x20ver','product\x20','tall\x20the','y\x20applie','json','es.','LocalSki','node/nod','generate','spec','dexed\x20wi','Unable\x20t','tching\x20p','ady\x20curr','time]\x20fe','oute\x20pat','d\x20for\x20lo','time','node_mod','pruned\x20r','ibility\x20','\x22\x20\x22%SCRI',':\x20manife','hell:run','unknown','efore\x20pa','exec','--fix','ch\x20alrea','re\x20upgra','ame','npm\x20plug','ies:\x20','--omit=p','createRu','OME=','\x20id\x20from','ath','red\x20Open','director','openclaw','node/lib','nt-weixi','nning\x20op','isFile','oot\x20was\x20','ot\x20found','chat\x20his','st\x20be\x20a\x20','\x20and\x20','tbound\x20d','route\x20pa','n\x20plugin','then','Dependen','href','des.','IR=$(CDP','ache\x20bef','importan','roductRu','agents\x20s','examples',',\x20shell.','mirrors\x20','tar.xz','channel\x20','configur','ons;\x20ver','started','dge.mjs','base\x20bui','4411512tcKdhe','WorkingD','out\x20c2c\x20','path','ced','HOME=\x22${','replaceA','er\x20patch','local:','runtimeR','ad\x20patch','wujie-lo','bridge\x20n','pack','set','doc','package-','\x22\x20from\x20','catch','pped;\x20di','ipped;\x20o','lite\x20pat','bin','-weixin','16XDvcmj','all\x20loca','ies','.npmmirr','\x20product','red\x20Node','\x20request','.json','tateDir','ore\x20pack','solver\x20n','und:\x20','\x20is\x20miss','isDirect','powershe','E_NAME%\x22','npmCli','loader-','_DIR%','outbound','request-','isArray','--no-aud','ipped;\x20r','OGO\x22\x20];\x20','ge\x20not\x20a','\x20did\x20not',':WUJIE_S','est-id/r','nPath\x20$e','src','e\x20plugin','all\x20','exec\x20\x22$S','ase','SIGTERM','rcing\x20QQ','l\x20plugin','being\x20in','\x20failed\x20','time]\x20in','ready\x20ap','statusCo','s\x20to\x20dir','eixin\x20@i','--omit=d','%USERPRO','runtime','untime\x20r','ipped;\x20f','\x20doctor\x20','atch\x20alr','tory\x20pro','1\x20]\x20&&\x20[','ions/run','-extract','1390160mvnkhC','utf8','__tests_','push','-xJf','atch\x20ski','registry','ntime','node\x20ver','indexOf','\x20-g','scripts','und','zip','cwd','/opencla','ILE_NAME','\x20not\x20fou','ld\x20start','\x20path\x20wa','\x20shape\x20n','--no-fun','join','rent','ie-shell','ream\x20fix','t\x20\x22OPENC','t\x20found','set\x20\x22OPE','ime/requ','fy\x20upstr','Bin','qqbot','tch\x20alre','platform','r\x20runtim','ipped;\x20d','\x20mirrors','G_FILE_N','ion','package','\x22\x20so\x20the','package.','lark-cli','st=','weixin\x20o','runtime\x20','age\x20was\x20','\x20resolve','env','startsWi','ent','with\x20cod','enclaw-w','ckaging','ion\x20mism','versions','Bypass','PT_DIR/','\x20create\x20','o.mjs\x22\x202','rchive\x20-','npm\x20inst','projectR','l\x20prepar','ujie-log','ackup','timeoutM','LocalPlu','s/npm','ing\x20\x22','AW_CONFI','\x20prepare','ogger','ntPaths','find','prefix\x20i','sion\x20val','ed;\x20chan','\x20applied','mismatch','\x20already','configFi','manifest','\x20patch\x20a','ed-tool\x20','n\x20outbou','size','scoped\x20s','ery\x20mirr','ignore','process.','allowMis','try\x20not\x20','tbound\x20f','resolved','wujieai.','tarball:','Version','ell-runt','\x20paths','d\x20an\x20inv','jie-shel','eady\x20app','x64','fix','patch\x20fo','warn','stinatio','sort','.tools','ons\x20with','name','npm','\x22\x20%*','-id\x20head','684JFWqmD','in\x20insta','map','skipped;','with\x20the','--legacy','LAW_STAT','dAt','man','tbound\x20s','octor\x20--','atch\x20app','\x20package','/npm','every','--json','\x20set\x20\x22OP','log','11359080kPopWP','\x22\x20\x22$SCRI','qqbot\x20ou','(empty)','headers',';\x20run\x20wu','kup','llPaths','kill\x20not','toISOStr','-Executi','\x20synced','kill','trim','utbound\x20','source','ession\x20r','fallback','e_module','ATH:-','IPT_DIR=','\x20local\x20p','d\x20Node\x20r','sion.','d\x20as\x20gro','eer','jection-','slice','.md','runtimeS','bridge.m','devDepen','session\x20','er\x20id.','arch','../../sh','STATE_DI','ntime\x20ch','ify\x20upst','utable','doctor','.cache','\x22%SCRIPT','PT_DIR/w','https://','agents','referenc','product','m-cli.js','missing\x20','vailable','patched','parse','go.mjs','dataDir','\x20runtime','extract-','HELL_ARC','NCLAW_CO','installe','ped;\x20cha','plied','PT_DIR%','\x20return\x20','ory','.js','resume','dencies','ile\x20not\x20','idated','aw\x202026.','nced','st\x20not\x20f','split','dataDirN','PENCLAW_','able','\x20skipped','provider','leName','.plugin-','ot\x20avail','\x20timed\x20o','ATH=\x22${O','ecs','m.wechat','on\x20futur','Run\x20\x22wuj','482793SuvegB','ntime\x20re','\x20bin\x20was','#!/bin/s','alid\x20pay','-peer-de','\x20signal=','../../as','CLAW_CON','untime\x20c','entryCou','singOpen','wnloadin','ime\x20buil','ed\x20OpenC','lib/node','FILE%\x5c','plugins\x20','patch\x20ap','unction\x20','469188guyzwJ','\x20started','-xzf','fix\x20star','store-lo','pt-path-','n\x20the\x20pe','r\x20@tence','.\x20Top-le','w.mjs','flush','or.com','replace','lready\x20a','configPa','syncOnly','$HOME/','in\x20not\x20i','extensio','ed;\x20brid','data','rcing\x20op','endsWith','execPath','ied','synced','Spec','appId','r\x20id.','ATE_DIR:','red','\x20\x22OPENCL','failed','law/qqbo','%~dp0\x22','wBin','er\x20respo','version','nnel','store\x20lo','shell-ru','tar','6\x20mixed\x20','ions\x20whe','\x20on\x20futu','\x20returne','\x20kdocs\x20s','SCRIPT_D','ME%\x22==\x22\x22','ader\x20not','local\x20pl','ATH=\x20cd\x20','_HOME:-','y:\x20','not\x20foun','ite\x20patc','\x20is\x20unav','nel\x20plug','reason','stdout','integrit','\x20\x22$0\x22)\x22\x20','287564AkGoDB','match','extract\x20','error','ch\x20appli','Version\x20','optional','transcri','\x5cwjrt-','patch\x20sk','nifest=','Invalid\x20','=\x22${OPEN','resolver','chat-dis','ENCLAW_H','ect\x20sess','ed\x20npm\x20p','null','pped;\x20ru','aipc-run','installP','y\x20compat','skills\x20s','nodeVers','patch\x20al','now','store\x20sq','shift','\x20\x20\x22$SCRI','node/bin','npm-cli.','required','6.6\x20chan','NFIG_PAT','ugin\x20spe','ailable.','set\x20\x22SCR','\x22\x20\x22$@\x22','fix\x20alre','toString','\x20depende','NCLAW_ST','lib','node.exe','ad-','channel.','untime-b','path:\x20','local','fix\x20mark','nd\x20after','h\x20applie','enclaw\x20d','rect\x20pee','ules','store\x20wr','r\x20@openc','prepare\x20','endencie','\x20summary','R=\x22${OPE','\x20complet','ors\x20bein','atch:\x20ma','some','dependen','connecto','ing','function','>/dev/nu','e\x20upgrad','\x20written','CONFIG_F','rs;\x20veri','\x20found','ATE_DIR%','d:\x20','root','claw-run','12upchVs','includes','filename','ist\x20not\x20','8172lXvWTi','nd\x20helpe','gin\x20not\x20','w.cmd','@echo\x20of','untime\x20p','ut\x20after','pped;\x20lo','ng\x20chann','Claw\x20ver','node','leted','nodeExec','install','JIE_NO_L','store-','g\x20indexe','session-','rebuilt\x20','/node_mo','index.mj','allback\x20','\x20install','cies','plugin\x20r','runtimeL',';\x20provid','ath\x20$env','kipped;\x20','Name','length','get','skills','eted','\x20can\x20ins','download','_shared','filter','id\x20title','runtime-','already-','r\x20OpenCl','tory\x20mix','empty\x20pl','.d.ts','dist','arm64','string','JSON:\x20','load:\x20','\x20configu','node-v','Extracte','oot','d\x20for\x20','wujiecla','docs','LiteralP','ynced','sets/wuj','npm-glob','plugins','.tmp/run','h\x20alread','e\x20tools\x20','wrapper\x20','ound','ime/sess','aging','add','lugin\x20de','\x20version','channel-','ginPaths','\x20to\x20dire','OOT\x20-For','nnel\x20sha','tests','Temporar','==\x22\x22\x20set','mjs','tch\x20appl','_SHELL_E','nv:WUJIE','el.inbou','pplied','shasum','dy\x20appli','\x20loaded','info','eady\x20cur','pluginSp','n\x20the\x20di','in\x20','jection\x20','npm\x20pack','nd\x20deliv','Configur','ie-logo.','H%\x22==\x22\x22\x20','if\x20\x22%OPE'];_0x251d=function(){return _0x205e06;};return _0x251d();}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=_0x44ad8a(0x1e5)+_0x44ad8a(0x23a),MANIFEST_NAME=_0x44ad8a(0x1ce)+_0x44ad8a(0x314)+_0x44ad8a(0x290),NPM_INSTALL_TIMEOUT_MS=0xf*0x3c*0x3e8;export function resolveRuntimeRoot(_0x38e5d3){if(process.env.WUJIE_SHELL_RUNTIME_ROOT)return resolve(process.env.WUJIE_SHELL_RUNTIME_ROOT);return resolve(_0x38e5d3,RUNTIME_DIR);}export function resolveManifestPath(_0x5bcc22){return join(_0x5bcc22,MANIFEST_NAME);}async function loadProductRuntime(_0x5b7f81,_0x4ede30){const _0x10669c=_0x44ad8a,_0x5642c2=[join(_0x5b7f81,'shell-ru'+'ntime',_0x10669c(0x1bb)+'s'),join(_0x4ede30,_0x10669c(0x13d)+_0x10669c(0x2c8),'index.mj'+'s')];for(const _0x27ebfe of _0x5642c2){if(!existsSync(_0x27ebfe))continue;return await import(pathToFileURL(_0x27ebfe)[_0x10669c(0x260)]+'?t='+Date['now']());}return{};}export async function prepareRuntime(_0x3e9506,{syncOnly:syncOnly=![],pruneForPackaging:pruneForPackaging=![]}={}){const _0x4a8200=_0x44ad8a,_0x58a3ae=resolveRuntimeRoot(_0x3e9506['projectR'+_0x4a8200(0x1dc)]),_0x26ace8=createRuntimeLogger(getConfigPaths(_0x3e9506),_0x4a8200(0x2b8)),_0x2c38e2=Date[_0x4a8200(0x16d)]();_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x18d)+_0x4a8200(0x2ef)+_0x4a8200(0x26e),{'syncOnly':syncOnly,'runtimeRoot':_0x58a3ae,'shellConfig':summarizeShellConfig(_0x3e9506)});try{const _0x5c2deb=await ensureRuntimeBase(_0x3e9506,_0x58a3ae,{'runtimeLogger':_0x26ace8,'syncOnly':syncOnly});_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x2ef)+_0x4a8200(0x314)+_0x4a8200(0x1ff),{'manifestPath':resolveManifestPath(_0x58a3ae),'manifest':summarizeRuntimeManifest(_0x5c2deb)}),validateRuntimeNodeVersion(_0x5c2deb,_0x3e9506),_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x2ef)+_0x4a8200(0x2c9)+_0x4a8200(0x30e)+_0x4a8200(0x38c),{'nodeVersion':_0x5c2deb[_0x4a8200(0x16b)+_0x4a8200(0x2e8)]});if(syncOnly)validateRuntimeOpenClawVersion(_0x5c2deb,_0x3e9506),_0x26ace8?.['importan'+'t']?.('runtime\x20'+_0x4a8200(0x251)+'\x20version'+'\x20validat'+'ed',{'openclawVersion':_0x5c2deb[_0x4a8200(0x251)+_0x4a8200(0x323)]});else{if(_0x5c2deb[_0x4a8200(0x251)+_0x4a8200(0x323)]!==_0x3e9506['openclaw'][_0x4a8200(0x251)+_0x4a8200(0x323)]){const _0x5815a8=await loadRuntimeInfo(_0x3e9506['projectR'+_0x4a8200(0x1dc)]);_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x251)+_0x4a8200(0x341)+_0x4a8200(0x1bd)+_0x4a8200(0x3b4),{'fromVersion':_0x5c2deb[_0x4a8200(0x251)+_0x4a8200(0x323)]||'unknown','toVersion':_0x3e9506[_0x4a8200(0x251)]['openclaw'+_0x4a8200(0x323)]}),await installOpenClawPackage(_0x5815a8,_0x3e9506[_0x4a8200(0x251)][_0x4a8200(0x251)+_0x4a8200(0x323)]),_0x5c2deb[_0x4a8200(0x251)+'Version']=_0x3e9506['openclaw']['openclaw'+_0x4a8200(0x323)],_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x251)+_0x4a8200(0x341)+_0x4a8200(0x1bd)+_0x4a8200(0x191)+'ed',{'openclawVersion':_0x5c2deb[_0x4a8200(0x251)+_0x4a8200(0x323)]});}}_0x5c2deb[_0x4a8200(0x231)+_0x4a8200(0x33c)]=new Date()[_0x4a8200(0x350)+_0x4a8200(0x197)](),_0x5c2deb[_0x4a8200(0x16b)+_0x4a8200(0x2e8)]=_0x3e9506['openclaw'][_0x4a8200(0x16b)+_0x4a8200(0x2e8)],_0x5c2deb[_0x4a8200(0x376)]={'appId':_0x3e9506[_0x4a8200(0x3ce)],'productName':_0x3e9506['productN'+_0x4a8200(0x247)],'dataDirName':_0x3e9506[_0x4a8200(0x391)+_0x4a8200(0x247)]},await patchChatHistoryMixedToolContentBug(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),await patchProviderRequestIdHeader(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),await patchChannelPluginRuntimeBug(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),await patchWeixinOutboundFallbackRuntime(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),await patchQQBotOutboundFallbackRuntime(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8});const _0x3a2721=await loadProductRuntime(_0x3e9506[_0x4a8200(0x300)+_0x4a8200(0x1dc)],_0x58a3ae);if(typeof _0x3a2721['prepareP'+_0x4a8200(0x265)+'ntime']===_0x4a8200(0x198)){const _0x23900e=createRuntimeInfoFromManifest(_0x58a3ae,_0x5c2deb);await _0x3a2721['prepareP'+'roductRu'+_0x4a8200(0x2c8)]({'shellConfig':_0x3e9506,'runtime':_0x23900e,'runtimeLogger':_0x26ace8,'syncOnly':syncOnly}),_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x22a)+'runtime\x20'+'tools\x20sy'+_0x4a8200(0x38e));}await patchSessionStoreSqliteRuntime(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),await patchRequestIdTitleRuntime(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8});!syncOnly&&(await installRuntimeLarkCliPackage(createRuntimeInfoFromManifest(_0x58a3ae,_0x5c2deb),{'runtimeLogger':_0x26ace8,'createRuntimeEnv':createRuntimeEnv}),_0x26ace8?.['importan'+'t']?.(_0x4a8200(0x2ec)+_0x4a8200(0x37e)+_0x4a8200(0x341)+_0x4a8200(0x352)),await hasConfiguredKdocsSkill(_0x3e9506)?(await installKdocsCliBinary(_0x3e9506,createRuntimeInfoFromManifest(_0x58a3ae,_0x5c2deb),{'runtimeLogger':_0x26ace8,'syncOnly':syncOnly}),_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x196)+_0x4a8200(0x2e4)+_0x4a8200(0x1e7)+'synced')):_0x26ace8?.[_0x4a8200(0x200)](_0x4a8200(0x196)+_0x4a8200(0x2e4)+_0x4a8200(0x1e7)+_0x4a8200(0x338)+_0x4a8200(0x143)+_0x4a8200(0x34f)+'\x20configu'+_0x4a8200(0x3d1)));const _0xd836ed=Array[_0x4a8200(0x29e)](_0x5c2deb['plugins'])?_0x5c2deb[_0x4a8200(0x1e4)][_0x4a8200(0x1c5)]:0x0;return await syncManifestPluginScope(_0x3e9506,_0x58a3ae,_0x5c2deb),_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x2ef)+'plugin\x20s'+'cope\x20syn'+_0x4a8200(0x275),{'beforePluginCount':_0xd836ed,'afterPluginCount':Array[_0x4a8200(0x29e)](_0x5c2deb['plugins'])?_0x5c2deb[_0x4a8200(0x1e4)]['length']:0x0,'pluginSpecCount':Array[_0x4a8200(0x29e)](_0x5c2deb[_0x4a8200(0x202)+_0x4a8200(0x39b)])?_0x5c2deb[_0x4a8200(0x202)+_0x4a8200(0x39b)][_0x4a8200(0x1c5)]:0x0}),await syncConfiguredNpmPlugins(_0x3e9506,_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8,'syncOnly':syncOnly}),_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x26c)+_0x4a8200(0x164)+'lugins\x20s'+_0x4a8200(0x1e1),{'pluginSpecCount':_0x3e9506[_0x4a8200(0x251)]['pluginSp'+_0x4a8200(0x39b)][_0x4a8200(0x1c5)],'pluginCount':Array[_0x4a8200(0x29e)](_0x5c2deb[_0x4a8200(0x1e4)])?_0x5c2deb[_0x4a8200(0x1e4)]['length']:0x0}),await patchWeixinOutboundSessionRoute(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),await patchQQBotOutboundSessionRoute(_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),await syncProductPlugins(_0x3e9506,_0x58a3ae,_0x5c2deb,{'runtimeLogger':_0x26ace8}),_0x26ace8?.[_0x4a8200(0x264)+'t']?.('product\x20'+_0x4a8200(0x3b0)+_0x4a8200(0x3cc),{'localPluginCount':_0x3e9506[_0x4a8200(0x251)][_0x4a8200(0x320)+_0x4a8200(0x305)+_0x4a8200(0x1f0)]['length'],'pluginCount':Array['isArray'](_0x5c2deb[_0x4a8200(0x1e4)])?_0x5c2deb[_0x4a8200(0x1e4)][_0x4a8200(0x1c5)]:0x0}),await syncProductAgents(_0x3e9506,_0x58a3ae,_0x5c2deb),_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x22a)+_0x4a8200(0x266)+_0x4a8200(0x1e1),{'sources':_0x3e9506[_0x4a8200(0x251)][_0x4a8200(0x320)+'LocalAge'+_0x4a8200(0x30b)],'entryCount':_0x5c2deb[_0x4a8200(0x374)]?.['entryCou'+'nt'],'installPath':_0x5c2deb[_0x4a8200(0x374)]?.['installP'+_0x4a8200(0x24e)]}),await syncProductSkills(_0x3e9506,_0x58a3ae,_0x5c2deb),_0x26ace8?.[_0x4a8200(0x264)+'t']?.(_0x4a8200(0x22a)+_0x4a8200(0x16a)+'ynced',{'sources':_0x3e9506[_0x4a8200(0x251)]['resolved'+_0x4a8200(0x22f)+_0x4a8200(0x34e)],'entryCount':_0x5c2deb[_0x4a8200(0x1c7)]?.[_0x4a8200(0x3a9)+'nt'],'installPath':_0x5c2deb[_0x4a8200(0x1c7)]?.['installP'+_0x4a8200(0x24e)]}),await syncRuntimeWrapper(_0x3e9506,_0x58a3ae,_0x5c2deb),_0x26ace8?.['importan'+'t']?.(_0x4a8200(0x2ef)+_0x4a8200(0x1e8)+_0x4a8200(0x3cc),{'wujieclawBin':_0x5c2deb[_0x4a8200(0x1de)+_0x4a8200(0x3d6)]}),await prunePackagedRuntimeCaches(_0x58a3ae,_0x26ace8),pruneForPackaging&&await prunePackagedRuntimePayload(_0x58a3ae,_0x5c2deb,_0x26ace8),await writeJson(resolveManifestPath(_0x58a3ae),_0x5c2deb),_0x26ace8?.['importan'+'t']?.(_0x4a8200(0x2ef)+'manifest'+_0x4a8200(0x19b),{'manifestPath':resolveManifestPath(_0x58a3ae),'manifest':summarizeRuntimeManifest(_0x5c2deb),'durationMs':Date[_0x4a8200(0x16d)]()-_0x2c38e2}),await _0x26ace8?.[_0x4a8200(0x3bd)](),_0x5c2deb;}catch(_0x16b109){_0x26ace8?.[_0x4a8200(0x156)]('prepare\x20'+_0x4a8200(0x2ef)+_0x4a8200(0x3d3),{'syncOnly':syncOnly,'runtimeRoot':_0x58a3ae,'durationMs':Date[_0x4a8200(0x16d)]()-_0x2c38e2,'error':_0x16b109}),await _0x26ace8?.[_0x4a8200(0x3bd)]();throw _0x16b109;}}async function prunePackagedRuntimeCaches(_0x315397,_0x492563){const _0x484700=_0x44ad8a,_0x2c1cb2=[join(_0x315397,_0x484700(0x370)),join(_0x315397,_0x484700(0x32f),'npm-cach'+'e'),join(_0x315397,_0x484700(0x167)+'time-bac'+_0x484700(0x34d)),join(_0x315397,_0x484700(0x20c)+'nloads-b'+_0x484700(0x303))];for(const _0xb983c8 of _0x2c1cb2){if(!existsSync(_0xb983c8))continue;await rm(_0xb983c8,{'recursive':!![],'force':!![]}),_0x492563?.[_0x484700(0x200)](_0x484700(0x23c)+_0x484700(0x3a8)+_0x484700(0x263)+_0x484700(0x292)+_0x484700(0x1eb),{'cachePath':_0xb983c8});}}async function prunePackagedRuntimePayload(_0x3740be,_0x5282c9,_0x298c17){const _0x2422fc=_0x44ad8a,_0x5af0f4=createRuntimeInfoFromManifest(_0x3740be,_0x5282c9),_0x5643aa=[join(_0x3740be,process[_0x2422fc(0x2e3)]===_0x2422fc(0x20d)?'node/nod'+_0x2422fc(0x359)+_0x2422fc(0x306):_0x2422fc(0x252)+_0x2422fc(0x1ba)+'dules/np'+'m'),join(_0x5af0f4[_0x2422fc(0x251)+_0x2422fc(0x272)+'ir'],_0x2422fc(0x23b)+_0x2422fc(0x18a))],_0x4d5ed5=join(_0x5af0f4[_0x2422fc(0x251)+_0x2422fc(0x272)+'ir'],'dist',_0x2422fc(0x3c5)+'ns');if(existsSync(_0x4d5ed5))for(const _0x4ac492 of await readdir(_0x4d5ed5,{'withFileTypes':!![]})){_0x4ac492[_0x2422fc(0x296)+'ory']()&&_0x5643aa['push'](join(_0x4d5ed5,_0x4ac492[_0x2422fc(0x331)],_0x2422fc(0x23b)+_0x2422fc(0x18a)));}const _0x18f893={'files':0x0,'directories':0x0,'bytes':0x0};for(const _0x49634e of _0x5643aa){await pruneRuntimeDependencyTree(_0x49634e,_0x18f893);}await pruneOpenClawDocs(_0x5af0f4['openclaw'+'WorkingD'+'ir'],_0x18f893),_0x298c17?.[_0x2422fc(0x200)](_0x2422fc(0x23c)+_0x2422fc(0x1ac)+'ayload\x20b'+_0x2422fc(0x242)+_0x2422fc(0x2f7),_0x18f893);}async function pruneOpenClawDocs(_0x4726c0,_0x2c9872){const _0x37ac82=_0x44ad8a,_0x17bbcd=join(_0x4726c0,_0x37ac82(0x1df));if(!existsSync(_0x17bbcd))return;for(const _0x25c2af of await readdir(_0x17bbcd,{'withFileTypes':!![]})){if(_0x25c2af[_0x37ac82(0x331)]===_0x37ac82(0x375)+'e')continue;await removePrunedPath(join(_0x17bbcd,_0x25c2af[_0x37ac82(0x331)]),_0x2c9872);}}async function pruneRuntimeDependencyTree(_0x1dc04d,_0x56c621){const _0x361c2b=_0x44ad8a;if(!existsSync(_0x1dc04d))return;for(const _0x148fa8 of await readdir(_0x1dc04d,{'withFileTypes':!![]})){const _0x575057=join(_0x1dc04d,_0x148fa8[_0x361c2b(0x331)]);if(_0x148fa8[_0x361c2b(0x296)+_0x361c2b(0x387)]()){if(shouldPruneRuntimeDirectory(_0x1dc04d,_0x148fa8['name'])){await removePrunedPath(_0x575057,_0x56c621);continue;}await pruneRuntimeDependencyTree(_0x575057,_0x56c621);continue;}_0x148fa8['isFile']()&&shouldPruneRuntimeFile(_0x148fa8[_0x361c2b(0x331)])&&await removePrunedPath(_0x575057,_0x56c621);}}function shouldPruneRuntimeDirectory(_0x260f7e,_0x3af44d){const _0x2966f1=_0x44ad8a;if(_0x3af44d==='@types')return!![];if(new Set([_0x2966f1(0x280),_0x2966f1(0x1df),_0x2966f1(0x33d)])[_0x2966f1(0x228)](_0x3af44d))return existsSync(join(_0x260f7e,_0x2966f1(0x2eb)+_0x2966f1(0x22d)));return new Set([_0x2966f1(0x2c3)+'_','example',_0x2966f1(0x267),_0x2966f1(0x210),_0x2966f1(0x1f4)])['has'](_0x3af44d);}function shouldPruneRuntimeFile(_0x45eb44){const _0x5f1645=_0x44ad8a;if(_0x45eb44===_0x5f1645(0x281)+'lock.jso'+'n'||_0x45eb44[_0x5f1645(0x3c9)](_0x5f1645(0x1d3)))return!![];return new Set(['.map',_0x5f1645(0x363),'.markdow'+'n'])[_0x5f1645(0x228)](extname(_0x45eb44)['toLowerC'+_0x5f1645(0x2ab)]());}async function removePrunedPath(_0x309fc0,_0x58a51c){const _0x132e9c=_0x44ad8a;if(!existsSync(_0x309fc0))return;const _0x513b56=await getPathSize(_0x309fc0),_0x2a14c9=await stat(_0x309fc0);await rm(_0x309fc0,{'recursive':!![],'force':!![]}),_0x58a51c['bytes']+=_0x513b56;if(_0x2a14c9[_0x132e9c(0x296)+_0x132e9c(0x387)]())_0x58a51c[_0x132e9c(0x250)+_0x132e9c(0x28b)]+=0x1;else _0x58a51c['files']+=0x1;}async function getPathSize(_0x2450e8){const _0x64573d=_0x44ad8a,_0x4d38cb=await stat(_0x2450e8);if(!_0x4d38cb[_0x64573d(0x296)+_0x64573d(0x387)]())return _0x4d38cb[_0x64573d(0x318)];let _0x1e2f98=0x0;for(const _0x3e8ee8 of await readdir(_0x2450e8,{'withFileTypes':!![]})){_0x1e2f98+=await getPathSize(join(_0x2450e8,_0x3e8ee8[_0x64573d(0x331)]));}return _0x1e2f98;}function _0x537f(_0xd3c41f,_0x44cc64){_0xd3c41f=_0xd3c41f-0x139;const _0x251da2=_0x251d();let _0x537fd3=_0x251da2[_0xd3c41f];return _0x537fd3;}async function syncRuntimeWrapper(_0x307d56,_0x1b4870,_0x3c50bd){const _0x336ffa=_0x44ad8a,_0x1e5f84=_0x307d56[_0x336ffa(0x251)]?.[_0x336ffa(0x313)+_0x336ffa(0x396)]??_0x336ffa(0x321)+_0x336ffa(0x22d),_0x1cd4b1=join(_0x1b4870,_0x336ffa(0x287),'wujiecla'+'w'),_0x3fa152=join(_0x1b4870,_0x336ffa(0x287),_0x336ffa(0x1de)+_0x336ffa(0x1aa)),_0x388e11=normalizeRuntimeRelativePath(relative(dirname(_0x1cd4b1),resolve(_0x1b4870,_0x3c50bd[_0x336ffa(0x1b3)+_0x336ffa(0x36e)]))),_0x4915ed=normalizeRuntimeRelativePath(relative(dirname(_0x1cd4b1),resolve(_0x1b4870,_0x3c50bd[_0x336ffa(0x251)+_0x336ffa(0x2e0)]))),_0x1fb753=_0x336ffa(0x3c3)+_0x307d56[_0x336ffa(0x391)+_0x336ffa(0x247)],_0x2fba98=_0x336ffa(0x2b7)+_0x336ffa(0x3af)+_0x307d56[_0x336ffa(0x391)+_0x336ffa(0x247)];await mkdir(dirname(_0x1cd4b1),{'recursive':!![]});const _0x2bc254=fileURLToPath(new URL(_0x336ffa(0x3a6)+_0x336ffa(0x1e2)+_0x336ffa(0x209)+_0x336ffa(0x1f7),import.meta.url)),_0x11ffdf=join(_0x1b4870,_0x336ffa(0x287),_0x336ffa(0x27c)+_0x336ffa(0x37c));await cp(_0x2bc254,_0x11ffdf),await writeFile(_0x1cd4b1,[_0x336ffa(0x3a2)+'h','export\x20O'+'PENCLAW_'+_0x336ffa(0x276)+_0x336ffa(0x219)+_0x336ffa(0x149)+_0x1fb753+'}\x22','export\x20O'+_0x336ffa(0x392)+_0x336ffa(0x36b)+_0x336ffa(0x190)+_0x336ffa(0x17d)+_0x336ffa(0x3d0)+'-'+_0x1fb753+'}\x22',_0x336ffa(0x215)+_0x336ffa(0x392)+_0x336ffa(0x19c)+_0x336ffa(0x2d1)+_0x336ffa(0x15f)+_0x336ffa(0x3a7)+'FIG_FILE'+'_NAME:-'+_0x1e5f84+'}\x22',_0x336ffa(0x215)+_0x336ffa(0x392)+'CONFIG_P'+_0x336ffa(0x39a)+_0x336ffa(0x392)+'CONFIG_P'+_0x336ffa(0x35a)+_0x1fb753+'/'+_0x1e5f84+'}\x22',_0x336ffa(0x144)+_0x336ffa(0x262)+_0x336ffa(0x148)+'--\x20\x22$(di'+'rname\x20--'+_0x336ffa(0x152)+'&&\x20pwd)','if\x20[\x20-t\x20'+_0x336ffa(0x2be)+'\x20-z\x20\x22$WU'+_0x336ffa(0x1b5)+_0x336ffa(0x2a1)+_0x336ffa(0x25e),_0x336ffa(0x170)+'PT_DIR/'+_0x388e11+('\x22\x20\x22$SCRI'+_0x336ffa(0x372)+_0x336ffa(0x302)+_0x336ffa(0x2fd)+_0x336ffa(0x199)+'ll\x20||\x20tr'+'ue'),'fi',_0x336ffa(0x2aa)+'CRIPT_DI'+'R/'+_0x388e11+(_0x336ffa(0x348)+_0x336ffa(0x2fb))+_0x4915ed+_0x336ffa(0x179),''][_0x336ffa(0x2d7)]('\x0a'),'utf8'),await chmod(_0x1cd4b1,0x1ed),await writeFile(_0x3fa152,[_0x336ffa(0x1ab)+'f','if\x20\x22%OPE'+'NCLAW_HO'+_0x336ffa(0x145)+_0x336ffa(0x345)+_0x336ffa(0x162)+_0x336ffa(0x24c)+_0x2fba98+'\x22',_0x336ffa(0x20b)+_0x336ffa(0x17d)+_0x336ffa(0x19f)+'\x22==\x22\x22\x20se'+_0x336ffa(0x2db)+_0x336ffa(0x33b)+'E_DIR='+_0x2fba98+'\x22','if\x20\x22%OPE'+_0x336ffa(0x381)+'NFIG_FIL'+_0x336ffa(0x298)+_0x336ffa(0x1f6)+_0x336ffa(0x3d2)+_0x336ffa(0x308)+_0x336ffa(0x2e7)+'AME='+_0x1e5f84+'\x22','if\x20\x22%OPE'+'NCLAW_CO'+'NFIG_PAT'+_0x336ffa(0x20a)+_0x336ffa(0x2dd)+_0x336ffa(0x381)+_0x336ffa(0x175)+'H='+_0x2fba98+'\x5c'+_0x1e5f84+'\x22',_0x336ffa(0x178)+_0x336ffa(0x35b)+_0x336ffa(0x3d5),_0x336ffa(0x371)+_0x336ffa(0x29b)+toWindowsPath(_0x388e11)+(_0x336ffa(0x23e)+_0x336ffa(0x385))+toWindowsPath(_0x4915ed)+_0x336ffa(0x333),''][_0x336ffa(0x2d7)]('\x0d\x0a'),'utf8'),_0x3c50bd[_0x336ffa(0x1de)+_0x336ffa(0x3d6)]=toRuntimeRelative(_0x1b4870,process[_0x336ffa(0x2e3)]===_0x336ffa(0x20d)?_0x3fa152:_0x1cd4b1);}async function patchChatHistoryMixedToolContentBug(_0x4ea4cb,_0x5644ac,_0x439a16={}){const _0x3f515d=_0x44ad8a,_0x2257fc=resolve(_0x4ea4cb,_0x5644ac['openclaw'+_0x3f515d(0x272)+'ir']),_0x15031d=join(_0x2257fc,_0x3f515d(0x1d4));let _0x142fac=[];try{_0x142fac=await readdir(_0x15031d,{'withFileTypes':!![]});}catch{_0x439a16[_0x3f515d(0x1c0)+_0x3f515d(0x30a)]?.[_0x3f515d(0x32c)]?.('chat\x20his'+'tory\x20mix'+_0x3f515d(0x316)+_0x3f515d(0x15c)+_0x3f515d(0x2e5)+_0x3f515d(0x1a6)+_0x3f515d(0x216),{'distDir':_0x15031d,'openclawVersion':_0x5644ac[_0x3f515d(0x251)+_0x3f515d(0x323)]});return;}const _0x1ca14e=_0x142fac[_0x3f515d(0x1cc)](_0xbb77dd=>_0xbb77dd[_0x3f515d(0x255)]()&&(_0xbb77dd[_0x3f515d(0x331)]['startsWi'+'th'](_0x3f515d(0x161)+_0x3f515d(0x224)+_0x3f515d(0x361))||_0xbb77dd[_0x3f515d(0x331)][_0x3f515d(0x2f3)+'th'](_0x3f515d(0x1b8)+_0x3f515d(0x15a)+_0x3f515d(0x3b8)))&&_0xbb77dd[_0x3f515d(0x331)][_0x3f515d(0x3c9)](_0x3f515d(0x388)))[_0x3f515d(0x337)](_0x5dcda8=>join(_0x15031d,_0x5dcda8[_0x3f515d(0x331)]));if(_0x1ca14e[_0x3f515d(0x1c5)]===0x0){_0x439a16[_0x3f515d(0x1c0)+'ogger']?.[_0x3f515d(0x32c)]?.(_0x3f515d(0x258)+_0x3f515d(0x1d1)+_0x3f515d(0x316)+_0x3f515d(0x15c)+_0x3f515d(0x2ba)+_0x3f515d(0x38b)+'found',{'openclawVersion':_0x5644ac[_0x3f515d(0x251)+_0x3f515d(0x323)]});return;}for(const _0x4bd685 of _0x1ca14e){const _0xd68a34=await readFile(_0x4bd685,_0x3f515d(0x2c2)),_0x406408=patchMixedToolContentFromSource(_0xd68a34);if(!_0x406408[_0x3f515d(0x37a)]){if(_0x406408[_0x3f515d(0x14f)]===_0x3f515d(0x1cf)+_0x3f515d(0x37a)){_0x439a16[_0x3f515d(0x1c0)+_0x3f515d(0x30a)]?.[_0x3f515d(0x200)]?.('chat\x20his'+_0x3f515d(0x1d1)+'ed-tool\x20'+_0x3f515d(0x16c)+_0x3f515d(0x2b2)+'plied',{'openclawVersion':_0x5644ac['openclaw'+'Version'],'filePath':_0x4bd685});return;}continue;}await writeFile(_0x4bd685,_0x406408[_0x3f515d(0x356)],'utf8'),_0x439a16[_0x3f515d(0x1c0)+'ogger']?.['info']?.('chat\x20his'+_0x3f515d(0x1d1)+_0x3f515d(0x316)+_0x3f515d(0x3b1)+_0x3f515d(0x384),{'openclawVersion':_0x5644ac[_0x3f515d(0x251)+_0x3f515d(0x323)],'filePath':_0x4bd685,'note':_0x3f515d(0x1f5)+'y\x20compat'+_0x3f515d(0x23d)+_0x3f515d(0x32b)+'r\x20OpenCl'+_0x3f515d(0x38d)+_0x3f515d(0x13f)+'tool\x20his'+_0x3f515d(0x2bd)+_0x3f515d(0x205)+_0x3f515d(0x229)+'ify\x20upst'+'ream\x20fix'+_0x3f515d(0x141)+_0x3f515d(0x246)+_0x3f515d(0x261)});return;}_0x439a16['runtimeL'+'ogger']?.['warn']?.('chat\x20his'+_0x3f515d(0x1d1)+_0x3f515d(0x316)+_0x3f515d(0x15c)+_0x3f515d(0x2ba)+_0x3f515d(0x3b2)+_0x3f515d(0x14b)+'d',{'openclawVersion':_0x5644ac['openclaw'+_0x3f515d(0x323)]});}async function patchProviderRequestIdHeader(_0x585100,_0x99851,_0x5122c4={}){const _0x254210=_0x44ad8a,_0x4e1224=resolve(_0x585100,_0x99851['openclaw'+_0x254210(0x272)+'ir']),_0x4098e2=join(_0x4e1224,'dist');let _0xd6cf79=[];try{_0xd6cf79=await readdir(_0x4098e2,{'withFileTypes':!![]});}catch{_0x5122c4[_0x254210(0x1c0)+_0x254210(0x30a)]?.[_0x254210(0x32c)]?.(_0x254210(0x395)+_0x254210(0x28f)+_0x254210(0x334)+_0x254210(0x278)+_0x254210(0x394)+';\x20dist\x20n'+_0x254210(0x257),{'distDir':_0x4098e2,'openclawVersion':_0x99851['openclaw'+_0x254210(0x323)]});return;}const _0x3b97ef=_0xd6cf79[_0x254210(0x1cc)](_0x41283b=>_0x41283b[_0x254210(0x255)]()&&_0x41283b[_0x254210(0x331)]['endsWith'](_0x254210(0x388)))[_0x254210(0x337)](_0x43044c=>join(_0x4098e2,_0x43044c['name']));let _0x2df2a0=0x0,_0x3351a0=0x0;for(const _0x1f9f27 of _0x3b97ef){const _0x58ed74=await readFile(_0x1f9f27,_0x254210(0x2c2)),_0x1b57c0=patchProviderRequestIdHeaderFromSource(_0x58ed74);if(_0x1b57c0[_0x254210(0x37a)]){await writeFile(_0x1f9f27,_0x1b57c0[_0x254210(0x356)],_0x254210(0x2c2)),_0x2df2a0+=0x1,_0x5122c4[_0x254210(0x1c0)+'ogger']?.[_0x254210(0x200)]?.(_0x254210(0x395)+_0x254210(0x28f)+'-id\x20head'+_0x254210(0x278)+_0x254210(0x310),{'openclawVersion':_0x99851['openclaw'+_0x254210(0x323)],'filePath':_0x1f9f27});continue;}if(_0x1b57c0[_0x254210(0x14f)]==='already-'+_0x254210(0x37a))_0x3351a0+=0x1;}if(_0x2df2a0>0x0){_0x5122c4[_0x254210(0x1c0)+_0x254210(0x30a)]?.[_0x254210(0x200)]?.(_0x254210(0x395)+_0x254210(0x28f)+_0x254210(0x334)+_0x254210(0x278)+_0x254210(0x18f),{'openclawVersion':_0x99851[_0x254210(0x251)+_0x254210(0x323)],'patchedCount':_0x2df2a0,'alreadyPatchedCount':_0x3351a0});return;}if(_0x3351a0>0x0){_0x5122c4[_0x254210(0x1c0)+_0x254210(0x30a)]?.[_0x254210(0x200)]?.(_0x254210(0x395)+_0x254210(0x28f)+'-id\x20head'+'er\x20patch'+_0x254210(0x312)+_0x254210(0x310),{'openclawVersion':_0x99851[_0x254210(0x251)+'Version'],'alreadyPatchedCount':_0x3351a0});return;}_0x5122c4[_0x254210(0x1c0)+_0x254210(0x30a)]?.[_0x254210(0x32c)]?.(_0x254210(0x395)+_0x254210(0x28f)+'-id\x20head'+_0x254210(0x278)+_0x254210(0x394)+_0x254210(0x1c1)+_0x254210(0x139)+_0x254210(0x221)+_0x254210(0x2d2)+'nd',{'openclawVersion':_0x99851[_0x254210(0x251)+_0x254210(0x323)]});}async function patchChannelPluginRuntimeBug(_0x326dcf,_0x2233c1,_0x10c0af={}){const _0x50ddfc=_0x44ad8a,_0xaf3e5e=resolve(_0x326dcf,_0x2233c1[_0x50ddfc(0x251)+'WorkingD'+'ir']),_0x371061=join(_0xaf3e5e,'dist');let _0x397a94=[];try{_0x397a94=await readdir(_0x371061,{'withFileTypes':!![]});}catch{_0x10c0af[_0x50ddfc(0x1c0)+_0x50ddfc(0x30a)]?.[_0x50ddfc(0x32c)]?.(_0x50ddfc(0x26b)+_0x50ddfc(0x1bf)+'untime\x20p'+_0x50ddfc(0x2c6)+_0x50ddfc(0x284)+_0x50ddfc(0x38f)+_0x50ddfc(0x1e9),{'distDir':_0x371061,'openclawVersion':_0x2233c1[_0x50ddfc(0x251)+_0x50ddfc(0x323)]});return;}const _0x1b15ba=_0x397a94['filter'](_0x26c559=>_0x26c559[_0x50ddfc(0x255)]()&&_0x26c559[_0x50ddfc(0x331)]['startsWi'+'th'](_0x50ddfc(0x29a))&&_0x26c559['name'][_0x50ddfc(0x3c9)](_0x50ddfc(0x388)))[_0x50ddfc(0x337)](_0x4f1fc9=>join(_0x371061,_0x4f1fc9[_0x50ddfc(0x331)])),_0x4dddcc=await resolveRuntimeChannelImportPath(_0x371061,_0x397a94);if(_0x1b15ba[_0x50ddfc(0x1c5)]===0x0){_0x10c0af['runtimeL'+_0x50ddfc(0x30a)]?.[_0x50ddfc(0x32c)]?.('channel\x20'+_0x50ddfc(0x1bf)+_0x50ddfc(0x1ac)+_0x50ddfc(0x2c6)+_0x50ddfc(0x1ae)+_0x50ddfc(0x146)+_0x50ddfc(0x19e),{'openclawVersion':_0x2233c1[_0x50ddfc(0x251)+_0x50ddfc(0x323)]});return;}if(!_0x4dddcc){_0x10c0af[_0x50ddfc(0x1c0)+_0x50ddfc(0x30a)]?.['warn']?.(_0x50ddfc(0x26b)+_0x50ddfc(0x1bf)+_0x50ddfc(0x1ac)+_0x50ddfc(0x2c6)+_0x50ddfc(0x166)+_0x50ddfc(0x36c)+'annel\x20en'+_0x50ddfc(0x31e)+_0x50ddfc(0x216),{'openclawVersion':_0x2233c1[_0x50ddfc(0x251)+_0x50ddfc(0x323)],'distDir':_0x371061});return;}for(const _0x14b530 of _0x1b15ba){const _0x1faadf=await readFile(_0x14b530,_0x50ddfc(0x2c2)),_0x531a97=patchChannelPluginRuntimeFromSource(_0x1faadf,{'runtimeChannelImportPath':_0x4dddcc});if(!_0x531a97[_0x50ddfc(0x37a)]){if(_0x531a97[_0x50ddfc(0x14f)]===_0x50ddfc(0x1cf)+'patched'){_0x10c0af['runtimeL'+'ogger']?.[_0x50ddfc(0x200)]?.(_0x50ddfc(0x26b)+_0x50ddfc(0x1bf)+_0x50ddfc(0x1ac)+_0x50ddfc(0x2bc)+_0x50ddfc(0x328)+'lied',{'openclawVersion':_0x2233c1[_0x50ddfc(0x251)+_0x50ddfc(0x323)],'filePath':_0x14b530});return;}continue;}await writeFile(_0x14b530,_0x531a97['source'],_0x50ddfc(0x2c2)),_0x10c0af[_0x50ddfc(0x1c0)+_0x50ddfc(0x30a)]?.['info']?.('channel\x20'+_0x50ddfc(0x1bf)+_0x50ddfc(0x1ac)+_0x50ddfc(0x340)+'lied',{'openclawVersion':_0x2233c1['openclaw'+_0x50ddfc(0x323)],'filePath':_0x14b530,'note':_0x50ddfc(0x1f5)+_0x50ddfc(0x169)+_0x50ddfc(0x23d)+_0x50ddfc(0x32b)+_0x50ddfc(0x1d0)+_0x50ddfc(0x38d)+_0x50ddfc(0x174)+_0x50ddfc(0x14e)+'in\x20runti'+'me\x20missi'+_0x50ddfc(0x1af)+_0x50ddfc(0x1fb)+_0x50ddfc(0x1a8)+_0x50ddfc(0x19d)+_0x50ddfc(0x2df)+'eam\x20fix\x20'+_0x50ddfc(0x39d)+_0x50ddfc(0x19a)+_0x50ddfc(0x22e)});return;}_0x10c0af[_0x50ddfc(0x1c0)+_0x50ddfc(0x30a)]?.[_0x50ddfc(0x32c)]?.(_0x50ddfc(0x26b)+_0x50ddfc(0x1bf)+_0x50ddfc(0x1ac)+'atch\x20ski'+_0x50ddfc(0x166)+_0x50ddfc(0x3a0)+_0x50ddfc(0x293)+_0x50ddfc(0x257),{'openclawVersion':_0x2233c1[_0x50ddfc(0x251)+'Version']});}async function patchSessionStoreSqliteRuntime(_0x569ea6,_0x26dbfd,_0x3a62c8={}){const _0x5c270a=_0x44ad8a,_0x180609=resolve(_0x569ea6,_0x26dbfd[_0x5c270a(0x251)+_0x5c270a(0x272)+'ir']),_0x124b09=join(_0x180609,_0x5c270a(0x1d4)),_0x158b33=_0x5c270a(0x36a)+_0x5c270a(0x324)+_0x5c270a(0x1ea)+_0x5c270a(0x2bf)+'time-bri'+_0x5c270a(0x26f),_0x159d13=join(_0x569ea6,_0x5c270a(0x13d)+_0x5c270a(0x2c8),'sessions','runtime-'+_0x5c270a(0x365)+'js'),_0x1f4b7e=(await readdir(_0x124b09,{'withFileTypes':!![]})[_0x5c270a(0x283)](()=>[]))['filter'](_0x2da284=>_0x2da284['isFile']()&&_0x2da284['name']['startsWi'+'th'](_0x5c270a(0x3b7)+_0x5c270a(0x180))&&_0x2da284['name']['endsWith'](_0x5c270a(0x388)))[_0x5c270a(0x337)](_0x58b6f6=>join(_0x124b09,_0x58b6f6[_0x5c270a(0x331)])),_0x3a1d14=(await readdir(_0x124b09,{'withFileTypes':!![]})[_0x5c270a(0x283)](()=>[]))[_0x5c270a(0x1cc)](_0xb590e8=>_0xb590e8[_0x5c270a(0x255)]()&&_0xb590e8[_0x5c270a(0x331)][_0x5c270a(0x2f3)+'th'](_0x5c270a(0x1b6))&&!_0xb590e8['name']['startsWi'+'th'](_0x5c270a(0x3b7)+'ad-')&&_0xb590e8[_0x5c270a(0x331)][_0x5c270a(0x3c9)](_0x5c270a(0x388)))['map'](_0x458a34=>join(_0x124b09,_0x458a34['name']));if(!existsSync(_0x159d13)){_0x3a62c8[_0x5c270a(0x1c0)+_0x5c270a(0x30a)]?.[_0x5c270a(0x200)]?.(_0x5c270a(0x367)+_0x5c270a(0x16e)+_0x5c270a(0x286)+_0x5c270a(0x20f)+_0x5c270a(0x3c6)+_0x5c270a(0x2a2)+_0x5c270a(0x379),{'bridgePath':_0x159d13,'openclawVersion':_0x26dbfd[_0x5c270a(0x251)+'Version']});return;}for(const _0x5ad691 of _0x1f4b7e){const _0x308e46=await readFile(_0x5ad691,'utf8'),_0x297f8f=patchSessionStoreLoadFromSource(_0x308e46,{'bridgeImportPath':_0x158b33});if(!_0x297f8f['patched']){if(_0x297f8f[_0x5c270a(0x14f)]===_0x5c270a(0x1cf)+'patched'){_0x3a62c8[_0x5c270a(0x1c0)+_0x5c270a(0x30a)]?.[_0x5c270a(0x200)]?.('session\x20'+'store\x20lo'+'ad\x20patch'+_0x5c270a(0x312)+_0x5c270a(0x310),{'filePath':_0x5ad691,'openclawVersion':_0x26dbfd['openclaw'+_0x5c270a(0x323)]});break;}continue;}await writeFile(_0x5ad691,_0x297f8f[_0x5c270a(0x356)],_0x5c270a(0x2c2)),_0x3a62c8[_0x5c270a(0x1c0)+_0x5c270a(0x30a)]?.[_0x5c270a(0x200)]?.(_0x5c270a(0x367)+_0x5c270a(0x13c)+_0x5c270a(0x27b)+'\x20applied',{'filePath':_0x5ad691,'openclawVersion':_0x26dbfd[_0x5c270a(0x251)+_0x5c270a(0x323)]});break;}for(const _0x31a3eb of _0x3a1d14){const _0x999adc=await readFile(_0x31a3eb,_0x5c270a(0x2c2)),_0x1adc6c=patchSessionStoreWriteFromSource(_0x999adc,{'bridgeImportPath':_0x158b33});if(!_0x1adc6c['patched']){if(_0x1adc6c[_0x5c270a(0x14f)]===_0x5c270a(0x1cf)+_0x5c270a(0x37a)){_0x3a62c8[_0x5c270a(0x1c0)+_0x5c270a(0x30a)]?.[_0x5c270a(0x200)]?.('session\x20'+'store\x20wr'+_0x5c270a(0x14c)+_0x5c270a(0x1e6)+_0x5c270a(0x22c)+'d',{'filePath':_0x31a3eb,'openclawVersion':_0x26dbfd['openclaw'+'Version']});break;}continue;}await writeFile(_0x31a3eb,_0x1adc6c['source'],'utf8'),_0x3a62c8[_0x5c270a(0x1c0)+_0x5c270a(0x30a)]?.['info']?.(_0x5c270a(0x367)+_0x5c270a(0x18b)+'ite\x20patc'+_0x5c270a(0x187)+'d',{'filePath':_0x31a3eb,'openclawVersion':_0x26dbfd[_0x5c270a(0x251)+_0x5c270a(0x323)]});break;}}async function patchWeixinOutboundSessionRoute(_0xb046a2,_0x4931d5,_0x3da068={}){const _0x2b91b3=_0x44ad8a,_0x5488e9=join(_0xb046a2,_0x2b91b3(0x251),_0x2b91b3(0x1d4),_0x2b91b3(0x3c5)+'ns','openclaw'+_0x2b91b3(0x288),_0x2b91b3(0x1d4),_0x2b91b3(0x2a7),_0x2b91b3(0x181)+'js');if(!existsSync(_0x5488e9)){_0x3da068[_0x2b91b3(0x1c0)+'ogger']?.[_0x2b91b3(0x200)]?.(_0x2b91b3(0x2ee)+_0x2b91b3(0x355)+'session\x20'+'route\x20pa'+'tch\x20skip'+'ped;\x20plu'+_0x2b91b3(0x1a9)+_0x2b91b3(0x382)+'d',{'openclawVersion':_0x4931d5[_0x2b91b3(0x251)+_0x2b91b3(0x323)],'filePath':_0x5488e9});return;}const _0x293da6=await readFile(_0x5488e9,'utf8'),_0x148e58=patchWeixinOutboundSessionRouteFromSource(_0x293da6);if(!_0x148e58[_0x2b91b3(0x37a)]){if(_0x148e58[_0x2b91b3(0x14f)]===_0x2b91b3(0x1cf)+'patched'){_0x3da068[_0x2b91b3(0x1c0)+_0x2b91b3(0x30a)]?.[_0x2b91b3(0x200)]?.(_0x2b91b3(0x2ee)+_0x2b91b3(0x355)+_0x2b91b3(0x367)+'route\x20pa'+_0x2b91b3(0x2e2)+'ady\x20appl'+_0x2b91b3(0x3cb),{'openclawVersion':_0x4931d5[_0x2b91b3(0x251)+_0x2b91b3(0x323)],'filePath':_0x5488e9});return;}_0x3da068[_0x2b91b3(0x1c0)+_0x2b91b3(0x30a)]?.[_0x2b91b3(0x32c)]?.(_0x2b91b3(0x2ee)+'utbound\x20'+'session\x20'+_0x2b91b3(0x25c)+'tch\x20skip'+_0x2b91b3(0x383)+_0x2b91b3(0x1f3)+'pe\x20not\x20f'+_0x2b91b3(0x1e9),{'openclawVersion':_0x4931d5['openclaw'+_0x2b91b3(0x323)],'filePath':_0x5488e9,'reason':_0x148e58[_0x2b91b3(0x14f)]});return;}await writeFile(_0x5488e9,_0x148e58[_0x2b91b3(0x356)],'utf8'),_0x3da068['runtimeL'+_0x2b91b3(0x30a)]?.[_0x2b91b3(0x200)]?.(_0x2b91b3(0x2ee)+_0x2b91b3(0x355)+_0x2b91b3(0x367)+'route\x20pa'+_0x2b91b3(0x1f8)+'ied',{'openclawVersion':_0x4931d5[_0x2b91b3(0x251)+_0x2b91b3(0x323)],'filePath':_0x5488e9,'note':_0x2b91b3(0x1f5)+_0x2b91b3(0x169)+_0x2b91b3(0x23d)+_0x2b91b3(0x32b)+_0x2b91b3(0x3ba)+_0x2b91b3(0x253)+'n/opencl'+'aw-weixi'+_0x2b91b3(0x317)+_0x2b91b3(0x207)+_0x2b91b3(0x31a)+_0x2b91b3(0x192)+_0x2b91b3(0x1b7)+_0x2b91b3(0x35f)+'up\x20sessi'+_0x2b91b3(0x26d)+_0x2b91b3(0x36d)+_0x2b91b3(0x2da)+_0x2b91b3(0x141)+_0x2b91b3(0x246)+_0x2b91b3(0x261)});}async function patchWeixinOutboundFallbackRuntime(_0x3ba174,_0x47d96d,_0x4c19a9={}){const _0x3de756=_0x44ad8a,_0x2c483e=resolve(_0x3ba174,_0x47d96d['openclaw'+_0x3de756(0x272)+'ir']),_0x482b5a=join(_0x2c483e,'dist'),_0x4ca04a=(await readdir(_0x482b5a,{'withFileTypes':!![]})[_0x3de756(0x283)](()=>[]))[_0x3de756(0x1cc)](_0x273535=>_0x273535[_0x3de756(0x255)]()&&_0x273535[_0x3de756(0x331)][_0x3de756(0x2f3)+'th'](_0x3de756(0x29c)+'-session'+'-')&&_0x273535[_0x3de756(0x331)]['endsWith'](_0x3de756(0x388)))[_0x3de756(0x337)](_0x3bb0c5=>join(_0x482b5a,_0x3bb0c5[_0x3de756(0x331)]));if(_0x4ca04a[_0x3de756(0x1c5)]===0x0){_0x4c19a9['runtimeL'+_0x3de756(0x30a)]?.[_0x3de756(0x32c)]?.(_0x3de756(0x2ee)+_0x3de756(0x355)+_0x3de756(0x358)+_0x3de756(0x223)+_0x3de756(0x1c3)+_0x3de756(0x29c)+_0x3de756(0x37e)+_0x3de756(0x2d2)+'nd',{'openclawVersion':_0x47d96d[_0x3de756(0x251)+_0x3de756(0x323)],'distDir':_0x482b5a});return;}for(const _0xacc544 of _0x4ca04a){const _0x3d2c9f=await readFile(_0xacc544,'utf8'),_0x4b63d7=patchWeixinOutboundFallbackFromSource(_0x3d2c9f);if(!_0x4b63d7[_0x3de756(0x37a)]){if(_0x4b63d7[_0x3de756(0x14f)]===_0x3de756(0x1cf)+_0x3de756(0x37a)){_0x4c19a9[_0x3de756(0x1c0)+_0x3de756(0x30a)]?.[_0x3de756(0x200)]?.(_0x3de756(0x2ee)+'utbound\x20'+_0x3de756(0x358)+'\x20patch\x20a'+_0x3de756(0x3c0)+'pplied',{'openclawVersion':_0x47d96d[_0x3de756(0x251)+_0x3de756(0x323)],'filePath':_0xacc544});return;}continue;}await writeFile(_0xacc544,_0x4b63d7['source'],_0x3de756(0x2c2)),_0x4c19a9[_0x3de756(0x1c0)+_0x3de756(0x30a)]?.['info']?.(_0x3de756(0x2ee)+_0x3de756(0x355)+'fallback'+_0x3de756(0x315)+_0x3de756(0x1fc),{'openclawVersion':_0x47d96d[_0x3de756(0x251)+_0x3de756(0x323)],'filePath':_0xacc544,'note':_0x3de756(0x1f5)+_0x3de756(0x169)+'ibility\x20'+_0x3de756(0x32b)+_0x3de756(0x3c8)+_0x3de756(0x2f6)+_0x3de756(0x2b5)+_0x3de756(0x39c)+'\x20outboun'+'d\x20mirror'+_0x3de756(0x2b4)+_0x3de756(0x163)+_0x3de756(0x140)+_0x3de756(0x25d)+'\x20routing'+_0x3de756(0x14d)+_0x3de756(0x177)});return;}_0x4c19a9['runtimeL'+_0x3de756(0x30a)]?.[_0x3de756(0x32c)]?.('weixin\x20o'+_0x3de756(0x355)+_0x3de756(0x358)+_0x3de756(0x223)+_0x3de756(0x1c3)+_0x3de756(0x160)+_0x3de756(0x2d5)+_0x3de756(0x257),{'openclawVersion':_0x47d96d['openclaw'+_0x3de756(0x323)]});}async function patchRequestIdTitleRuntime(_0x8dae7d,_0x4c5dd8,_0x1a0843={}){const _0x14f9d1=_0x44ad8a,_0x561253=resolve(_0x8dae7d,_0x4c5dd8[_0x14f9d1(0x251)+_0x14f9d1(0x272)+'ir']),_0x2c3f39=join(_0x561253,_0x14f9d1(0x1d4)),_0x176a42=_0x14f9d1(0x36a)+_0x14f9d1(0x324)+_0x14f9d1(0x2de)+_0x14f9d1(0x2a5)+_0x14f9d1(0x182)+'ridge.mj'+'s',_0x397481=join(_0x8dae7d,_0x14f9d1(0x13d)+_0x14f9d1(0x2c8),_0x14f9d1(0x29d)+'id','runtime-'+'bridge.m'+'js');if(!existsSync(_0x397481)){_0x1a0843['runtimeL'+'ogger']?.['info']?.('request-'+_0x14f9d1(0x1cd)+'\x20runtime'+_0x14f9d1(0x223)+'kipped;\x20'+_0x14f9d1(0x27d)+_0x14f9d1(0x398)+_0x14f9d1(0x393),{'bridgePath':_0x397481,'openclawVersion':_0x4c5dd8['openclaw'+_0x14f9d1(0x323)]});return;}const _0x12323e=(await readdir(_0x2c3f39,{'withFileTypes':!![]})[_0x14f9d1(0x283)](()=>[]))['filter'](_0xe3b54c=>_0xe3b54c[_0x14f9d1(0x255)]()&&_0xe3b54c[_0x14f9d1(0x331)][_0x14f9d1(0x2f3)+'th'](_0x14f9d1(0x29a))&&_0xe3b54c[_0x14f9d1(0x331)][_0x14f9d1(0x3c9)](_0x14f9d1(0x388)))[_0x14f9d1(0x337)](_0x4b6622=>join(_0x2c3f39,_0x4b6622['name']));for(const _0xd90e86 of _0x12323e){const _0x2f7c20=await readFile(_0xd90e86,'utf8'),_0x1f1be2=patchRequestIdTitleRuntimeFromSource(_0x2f7c20,{'bridgeImportPath':_0x176a42});if(!_0x1f1be2[_0x14f9d1(0x37a)]){if(_0x1f1be2['reason']===_0x14f9d1(0x1cf)+_0x14f9d1(0x37a)){_0x1a0843[_0x14f9d1(0x1c0)+_0x14f9d1(0x30a)]?.[_0x14f9d1(0x200)]?.(_0x14f9d1(0x29d)+_0x14f9d1(0x1cd)+_0x14f9d1(0x37e)+_0x14f9d1(0x315)+'lready\x20a'+_0x14f9d1(0x1fc),{'filePath':_0xd90e86,'openclawVersion':_0x4c5dd8[_0x14f9d1(0x251)+_0x14f9d1(0x323)]});break;}continue;}await writeFile(_0xd90e86,_0x1f1be2[_0x14f9d1(0x356)],_0x14f9d1(0x2c2)),_0x1a0843['runtimeL'+_0x14f9d1(0x30a)]?.['info']?.(_0x14f9d1(0x29d)+_0x14f9d1(0x1cd)+'\x20runtime'+_0x14f9d1(0x315)+'pplied',{'filePath':_0xd90e86,'openclawVersion':_0x4c5dd8[_0x14f9d1(0x251)+_0x14f9d1(0x323)]});break;}}async function patchQQBotOutboundFallbackRuntime(_0x1c23b7,_0xb476c,_0x1e47d4={}){const _0x1937de=_0x44ad8a,_0x30ad27=resolve(_0x1c23b7,_0xb476c[_0x1937de(0x251)+'WorkingD'+'ir']),_0x55b178=join(_0x30ad27,'dist'),_0x3784ef=(await readdir(_0x55b178,{'withFileTypes':!![]})[_0x1937de(0x283)](()=>[]))[_0x1937de(0x1cc)](_0x3877ce=>_0x3877ce[_0x1937de(0x255)]()&&_0x3877ce[_0x1937de(0x331)][_0x1937de(0x2f3)+'th'](_0x1937de(0x29c)+'-session'+'-')&&_0x3877ce[_0x1937de(0x331)][_0x1937de(0x3c9)](_0x1937de(0x388)))[_0x1937de(0x337)](_0x403761=>join(_0x55b178,_0x403761['name']));if(_0x3784ef[_0x1937de(0x1c5)]===0x0){_0x1e47d4[_0x1937de(0x1c0)+'ogger']?.['warn']?.(_0x1937de(0x349)+'tbound\x20f'+_0x1937de(0x1bc)+_0x1937de(0x15c)+_0x1937de(0x285)+_0x1937de(0x355)+'runtime\x20'+_0x1937de(0x14b)+'d',{'openclawVersion':_0xb476c[_0x1937de(0x251)+_0x1937de(0x323)],'distDir':_0x55b178});return;}for(const _0x4943a6 of _0x3784ef){const _0x255a8c=await readFile(_0x4943a6,'utf8'),_0x5e1752=patchQQBotOutboundFallbackFromSource(_0x255a8c);if(!_0x5e1752[_0x1937de(0x37a)]){if(_0x5e1752[_0x1937de(0x14f)]==='already-'+'patched'){_0x1e47d4['runtimeL'+_0x1937de(0x30a)]?.['info']?.('qqbot\x20ou'+_0x1937de(0x31f)+_0x1937de(0x1bc)+_0x1937de(0x16c)+_0x1937de(0x2b2)+_0x1937de(0x384),{'openclawVersion':_0xb476c[_0x1937de(0x251)+_0x1937de(0x323)],'filePath':_0x4943a6});return;}continue;}await writeFile(_0x4943a6,_0x5e1752[_0x1937de(0x356)],_0x1937de(0x2c2)),_0x1e47d4['runtimeL'+_0x1937de(0x30a)]?.[_0x1937de(0x200)]?.(_0x1937de(0x349)+_0x1937de(0x31f)+_0x1937de(0x1bc)+_0x1937de(0x3b1)+_0x1937de(0x384),{'openclawVersion':_0xb476c[_0x1937de(0x251)+'Version'],'filePath':_0x4943a6,'note':_0x1937de(0x1f5)+_0x1937de(0x169)+_0x1937de(0x23d)+_0x1937de(0x32b)+_0x1937de(0x2ad)+'Bot\x20c2c\x20'+_0x1937de(0x29c)+_0x1937de(0x2e6)+_0x1937de(0x1f1)+'ct\x20sessi'+_0x1937de(0x330)+_0x1937de(0x273)+_0x1937de(0x30d)+_0x1937de(0x3b9)+_0x1937de(0x368)});return;}_0x1e47d4['runtimeL'+'ogger']?.['warn']?.(_0x1937de(0x349)+_0x1937de(0x31f)+_0x1937de(0x1bc)+_0x1937de(0x15c)+_0x1937de(0x2a0)+'esolver\x20'+'shape\x20no'+_0x1937de(0x2dc),{'openclawVersion':_0xb476c[_0x1937de(0x251)+'Version']});}async function patchQQBotOutboundSessionRoute(_0x1cd53e,_0x4d3166,_0x5da2c8={}){const _0x223679=_0x44ad8a,_0x385af6=join(_0x1cd53e,'openclaw',_0x223679(0x1d4),_0x223679(0x3c5)+'ns',_0x223679(0x2e1),'dist');if(!existsSync(_0x385af6)){_0x5da2c8[_0x223679(0x1c0)+_0x223679(0x30a)]?.[_0x223679(0x200)]?.(_0x223679(0x349)+'tbound\x20s'+_0x223679(0x357)+_0x223679(0x238)+_0x223679(0x20f)+_0x223679(0x21e)+_0x223679(0x3c4)+_0x223679(0x21a),{'openclawVersion':_0x4d3166[_0x223679(0x251)+'Version'],'distDir':_0x385af6});return;}const _0x500e21=(await readdir(_0x385af6,{'withFileTypes':!![]})[_0x223679(0x283)](()=>[]))[_0x223679(0x1cc)](_0x586c07=>_0x586c07[_0x223679(0x255)]()&&_0x586c07[_0x223679(0x331)][_0x223679(0x3c9)](_0x223679(0x388)))[_0x223679(0x337)](_0x3f6eeb=>join(_0x385af6,_0x3f6eeb[_0x223679(0x331)]));for(const _0x1b580c of _0x500e21){const _0x319f5e=await readFile(_0x1b580c,'utf8'),_0x529f3f=patchQQBotOutboundSessionRouteFromSource(_0x319f5e);if(!_0x529f3f['patched']){if(_0x529f3f[_0x223679(0x14f)]===_0x223679(0x1cf)+_0x223679(0x37a)){_0x5da2c8[_0x223679(0x1c0)+'ogger']?.['info']?.(_0x223679(0x349)+_0x223679(0x33e)+_0x223679(0x357)+_0x223679(0x238)+_0x223679(0x245)+_0x223679(0x1fe)+'ed',{'openclawVersion':_0x4d3166[_0x223679(0x251)+_0x223679(0x323)],'filePath':_0x1b580c});return;}continue;}await writeFile(_0x1b580c,_0x529f3f['source'],_0x223679(0x2c2)),_0x5da2c8[_0x223679(0x1c0)+_0x223679(0x30a)]?.['info']?.(_0x223679(0x349)+_0x223679(0x33e)+_0x223679(0x357)+_0x223679(0x238)+_0x223679(0x157)+'ed',{'openclawVersion':_0x4d3166[_0x223679(0x251)+'Version'],'filePath':_0x1b580c,'note':_0x223679(0x1f5)+_0x223679(0x169)+'ibility\x20'+'patch\x20fo'+_0x223679(0x18c)+_0x223679(0x3d4)+_0x223679(0x21f)+_0x223679(0x25b)+'elivery\x20'+_0x223679(0x269)+_0x223679(0x2af)+_0x223679(0x233)+'th\x20c2c\x20i'+_0x223679(0x203)+_0x223679(0x189)+_0x223679(0x3cf)});return;}_0x5da2c8['runtimeL'+_0x223679(0x30a)]?.[_0x223679(0x32c)]?.(_0x223679(0x349)+_0x223679(0x33e)+_0x223679(0x357)+_0x223679(0x238)+_0x223679(0x20f)+_0x223679(0x30f)+'nel\x20shap'+'e\x20not\x20fo'+_0x223679(0x2cd),{'openclawVersion':_0x4d3166[_0x223679(0x251)+'Version'],'distDir':_0x385af6});}async function resolveRuntimeChannelImportPath(_0x27dc52,_0x3ebc68){const _0x5cdf8e=_0x44ad8a,_0x44f6a8=_0x3ebc68[_0x5cdf8e(0x1cc)](_0x2e441e=>_0x2e441e[_0x5cdf8e(0x255)]()&&_0x2e441e[_0x5cdf8e(0x331)][_0x5cdf8e(0x2f3)+'th'](_0x5cdf8e(0x1ce)+_0x5cdf8e(0x1ef))&&_0x2e441e[_0x5cdf8e(0x331)][_0x5cdf8e(0x3c9)](_0x5cdf8e(0x388))&&!_0x2e441e[_0x5cdf8e(0x331)][_0x5cdf8e(0x2f3)+'th']('runtime-'+_0x5cdf8e(0x1ef)+'state-'))[_0x5cdf8e(0x337)](_0xdab370=>_0xdab370[_0x5cdf8e(0x331)])[_0x5cdf8e(0x32e)]();for(const _0xe97b1b of _0x44f6a8){const _0x2faa16=await readFile(join(_0x27dc52,_0xe97b1b),_0x5cdf8e(0x2c2));if(_0x2faa16[_0x5cdf8e(0x1a4)](_0x5cdf8e(0x24b)+'ntimeCha'+_0x5cdf8e(0x13b)))return'./'+_0xe97b1b;}return null;}function normalizeRuntimeRelativePath(_0x3e249d){const _0x27086d=_0x44ad8a;return _0x3e249d[_0x27086d(0x277)+'ll']('\x5c','/');}function toWindowsPath(_0x6ecea1){const _0x146661=_0x44ad8a;return _0x6ecea1[_0x146661(0x277)+'ll']('/','\x5c');}function validateRuntimeNodeVersion(_0x2f1257,_0xa5b5a3){const _0x303988=_0x44ad8a;if(_0x2f1257[_0x303988(0x16b)+_0x303988(0x2e8)]===_0xa5b5a3['openclaw'][_0x303988(0x16b)+_0x303988(0x2e8)])return;throw new Error(_0x303988(0x2ef)+'nodeVers'+_0x303988(0x2f8)+_0x303988(0x193)+_0x303988(0x15d)+(_0x2f1257[_0x303988(0x16b)+_0x303988(0x2e8)]||_0x303988(0x241))+(',\x20shell.'+'config=')+_0xa5b5a3[_0x303988(0x251)][_0x303988(0x16b)+_0x303988(0x2e8)]+'.\x20'+('Run\x20\x22wuj'+_0x303988(0x2d9)+'\x20prepare'+'\x22\x20so\x20the'+_0x303988(0x28d)+'\x20runtime'+'\x20can\x20be\x20'+_0x303988(0x1b9)+_0x303988(0x339)+_0x303988(0x1d9)+_0x303988(0x28e)+_0x303988(0x1ee)+'.'));}function validateRuntimeOpenClawVersion(_0x2d3341,_0x7f48c7){const _0x3d2ffd=_0x44ad8a;if(_0x2d3341['openclaw'+_0x3d2ffd(0x323)]===_0x7f48c7[_0x3d2ffd(0x251)][_0x3d2ffd(0x251)+_0x3d2ffd(0x323)])return;throw new Error(_0x3d2ffd(0x2ef)+_0x3d2ffd(0x251)+_0x3d2ffd(0x158)+_0x3d2ffd(0x311)+_0x3d2ffd(0x23f)+_0x3d2ffd(0x2ed)+(_0x2d3341[_0x3d2ffd(0x251)+_0x3d2ffd(0x323)]||'unknown')+(_0x3d2ffd(0x268)+'config=')+_0x7f48c7[_0x3d2ffd(0x251)][_0x3d2ffd(0x251)+_0x3d2ffd(0x323)]+'.\x20'+(_0x3d2ffd(0x39e)+_0x3d2ffd(0x2d9)+_0x3d2ffd(0x309)+_0x3d2ffd(0x2ea)+_0x3d2ffd(0x37e)+_0x3d2ffd(0x1c9)+_0x3d2ffd(0x22b)+_0x3d2ffd(0x1d9)+_0x3d2ffd(0x24f)+_0x3d2ffd(0x1b0)+_0x3d2ffd(0x35e)));}function parseNpmPackJson(_0x3cb85c){const _0x21c035=_0x44ad8a,_0x1ec16f=_0x3cb85c['trim'](),_0x30b8e1=_0x1ec16f[_0x21c035(0x2ca)]('[');if(_0x30b8e1<0x0)throw new Error('npm\x20pack'+_0x21c035(0x2a3)+_0x21c035(0x386)+_0x21c035(0x1d7)+_0x1ec16f[_0x21c035(0x362)](0x0,0x1f4));const _0x1c6eb4=JSON[_0x21c035(0x37b)](_0x1ec16f['slice'](_0x30b8e1)),_0x56faa4=Array[_0x21c035(0x29e)](_0x1c6eb4)?_0x1c6eb4[0x0]:_0x1c6eb4;if(!_0x56faa4||typeof _0x56faa4!==_0x21c035(0x217))throw new Error(_0x21c035(0x206)+_0x21c035(0x142)+_0x21c035(0x326)+_0x21c035(0x3a3)+_0x21c035(0x1d8)+_0x1ec16f[_0x21c035(0x362)](0x0,0x1f4));return _0x56faa4;}function normalizePackedTarballFilename(_0x47ead6){const _0x3fb1d2=_0x44ad8a;return _0x47ead6['replace'](/^@/,'')[_0x3fb1d2(0x277)+'ll']('/','-')[_0x3fb1d2(0x277)+'ll']('\x5c','-');}async function runProcess(_0x4661bd,_0x7d7349,_0x5d1d1={}){const _0x2b9b7e=_0x44ad8a,_0x3d5491=_0x5d1d1['label']||[_0x4661bd,..._0x7d7349]['join']('\x20'),_0x5b7c1a=_0x5d1d1[_0x2b9b7e(0x304)+'s']??NPM_INSTALL_TIMEOUT_MS,_0x3643fb=spawn(_0x4661bd,_0x7d7349,{'cwd':_0x5d1d1[_0x2b9b7e(0x2cf)],'env':_0x5d1d1[_0x2b9b7e(0x2f2)],'stdio':[_0x2b9b7e(0x31b),_0x2b9b7e(0x21c),'pipe']});return await new Promise((_0x28d5bb,_0x77d983)=>{const _0x13f413=_0x2b9b7e;let _0x25c9df='',_0x150db2='',_0x4d3955=![];const _0x32e804=setTimeout(()=>{const _0x159d86=_0x537f;if(_0x4d3955)return;_0x4d3955=!![],_0x3643fb['kill'](_0x159d86(0x2ac)),_0x77d983(new Error(_0x3d5491+(_0x159d86(0x399)+_0x159d86(0x1ad)+'\x20')+_0x5b7c1a+'ms'));},_0x5b7c1a);_0x3643fb[_0x13f413(0x150)]['on'](_0x13f413(0x3c7),_0x1655ee=>{const _0x2e07c1=_0x13f413;_0x25c9df+=_0x1655ee[_0x2e07c1(0x17b)]();}),_0x3643fb[_0x13f413(0x212)]['on'](_0x13f413(0x3c7),_0x2763b8=>{_0x150db2+=_0x2763b8['toString']();}),_0x3643fb['on'](_0x13f413(0x156),_0x1720b7=>{if(_0x4d3955)return;_0x4d3955=!![],clearTimeout(_0x32e804),_0x77d983(_0x1720b7);}),_0x3643fb['on'](_0x13f413(0x21b),(_0x3e7853,_0x1f4142)=>{const _0x438502=_0x13f413;if(_0x4d3955)return;_0x4d3955=!![],clearTimeout(_0x32e804);if(_0x3e7853===0x0){_0x28d5bb({'stdout':_0x25c9df,'stderr':_0x150db2});return;}_0x77d983(new Error(_0x3d5491+(_0x438502(0x2b0)+_0x438502(0x2f5)+'e=')+(_0x3e7853??_0x438502(0x165))+_0x438502(0x3a5)+(_0x1f4142??_0x438502(0x165))+'\x0a'+(''+(_0x150db2||_0x25c9df))[_0x438502(0x354)]()));});});}async function installOpenClawPackage(_0x4aa55e,_0x56db4e){const _0x278abf=_0x44ad8a,_0x3deb87=join(_0x4aa55e['runtimeR'+_0x278abf(0x1dc)],'.cache'),_0xfef83c=join(_0x4aa55e[_0x278abf(0x27a)+_0x278abf(0x1dc)],'.opencla'+'w-extrac'+'t');await mkdir(_0x3deb87,{'recursive':!![]}),await removePathWithRetries(_0xfef83c),await mkdir(_0xfef83c,{'recursive':!![]});const _0x4dccd4=await createRuntimeEnv(_0x4aa55e),_0xd6b789=_0x278abf(0x251)+'@'+_0x56db4e;console[_0x278abf(0x346)](_0x278abf(0x21d)+'hell:run'+'time]\x20in'+_0x278abf(0x211)+'\x20'+_0xd6b789);const _0x15c16c=await runProcess(_0x4aa55e[_0x278abf(0x1b3)+_0x278abf(0x36e)],[_0x4aa55e[_0x278abf(0x299)],_0x278abf(0x27e),_0xd6b789,_0x278abf(0x344)],{'cwd':_0x3deb87,'env':_0x4dccd4,'label':_0x278abf(0x206)+'\x20'+_0xd6b789}),_0x223af9=parseNpmPackJson(_0x15c16c['stdout']);if(_0x223af9[_0x278abf(0x13a)]!==_0x56db4e)throw new Error(_0x278abf(0x208)+_0x278abf(0x3ad)+'law\x20'+_0x56db4e+(_0x278abf(0x2f1)+'d\x20to\x20')+_0x223af9[_0x278abf(0x13a)]);const _0x4fcf18=resolve(_0x3deb87,_0x223af9[_0x278abf(0x1a5)]);if(!existsSync(_0x4fcf18))throw new Error('npm\x20pack'+_0x278abf(0x2a3)+'\x20create\x20'+_0x278abf(0x322)+'\x20'+_0x4fcf18);await runProcess(_0x278abf(0x13e),[_0x278abf(0x3b5),_0x4fcf18,'-C',_0xfef83c],{'label':_0x278abf(0x155)+_0x223af9['filename']}),await removePathWithRetries(_0x4aa55e[_0x278abf(0x251)+_0x278abf(0x272)+'ir']),await rename(join(_0xfef83c,_0x278abf(0x2e9)),_0x4aa55e[_0x278abf(0x251)+_0x278abf(0x272)+'ir']),await removePathWithRetries(_0xfef83c),await runProcess(_0x4aa55e[_0x278abf(0x1b3)+_0x278abf(0x36e)],[_0x4aa55e[_0x278abf(0x299)],_0x278abf(0x1b4),_0x278abf(0x2b6)+'ev',_0x278abf(0x24a)+'eer',_0x278abf(0x29f)+'it',_0x278abf(0x2d6)+'d',_0x278abf(0x33a)+_0x278abf(0x3a4)+'ps'],{'cwd':_0x4aa55e['openclaw'+_0x278abf(0x272)+'ir'],'env':_0x4dccd4,'label':_0x278abf(0x2ff)+_0x278abf(0x2a9)+_0xd6b789+('\x20runtime'+_0x278abf(0x17c)+'ncies')});if(!existsSync(_0x4aa55e[_0x278abf(0x251)+_0x278abf(0x2e0)]))throw new Error('OpenClaw'+_0x278abf(0x3a1)+_0x278abf(0x2d2)+_0x278abf(0x186)+_0x278abf(0x1bd)+':\x20'+_0x4aa55e[_0x278abf(0x251)+'Bin']);}async function ensureRuntimeBase(_0x2a80e5,_0x2358a6,_0x11d379={}){const _0x3c51b9=_0x44ad8a;await mkdir(_0x2358a6,{'recursive':!![]});let _0x2787d2=await readRuntimeManifest(_0x2358a6);const _0x54be39=_0x2a80e5[_0x3c51b9(0x251)][_0x3c51b9(0x16b)+_0x3c51b9(0x2e8)],_0x26492b=_0x2a80e5[_0x3c51b9(0x251)]['openclaw'+_0x3c51b9(0x323)],_0x29606d=existsSync(resolveManifestPath(_0x2358a6)),_0x123745=runtimeHasRequiredPaths(_0x2358a6,_0x2787d2),_0x2a61b5=_0x2787d2['nodeVers'+_0x3c51b9(0x2e8)]===_0x54be39;!_0x29606d||!_0x123745||!_0x2a61b5?(_0x11d379[_0x3c51b9(0x1c0)+'ogger']?.[_0x3c51b9(0x264)+'t']?.(_0x3c51b9(0x2ef)+_0x3c51b9(0x270)+_0x3c51b9(0x2d3)+'ed',{'runtimeRoot':_0x2358a6,'reason':!_0x29606d?_0x3c51b9(0x378)+_0x3c51b9(0x314):!_0x123745?'missing\x20'+_0x3c51b9(0x173)+'\x20runtime'+_0x3c51b9(0x325):'node\x20ver'+'sion\x20mis'+_0x3c51b9(0x154),'syncOnly':_0x11d379[_0x3c51b9(0x3c2)]}),_0x2787d2=await buildRuntimeBase(_0x2a80e5,_0x2358a6,_0x2787d2),_0x11d379[_0x3c51b9(0x1c0)+_0x3c51b9(0x30a)]?.[_0x3c51b9(0x264)+'t']?.(_0x3c51b9(0x2ef)+_0x3c51b9(0x270)+'ld\x20compl'+_0x3c51b9(0x1c8),{'manifest':summarizeRuntimeManifest(_0x2787d2)})):_0x11d379[_0x3c51b9(0x1c0)+'ogger']?.[_0x3c51b9(0x264)+'t']?.(_0x3c51b9(0x2ef)+'base\x20alr'+_0x3c51b9(0x201)+_0x3c51b9(0x2d8),{'manifest':summarizeRuntimeManifest(_0x2787d2)});if(!existsSync(resolve(_0x2358a6,_0x2787d2['openclaw'+_0x3c51b9(0x2e0)]))){const _0x10517e=createRuntimeInfoFromManifest(_0x2358a6,_0x2787d2,{'allowMissingOpenClaw':!![]});await installOpenClawPackage(_0x10517e,_0x26492b),_0x2787d2['openclaw'+_0x3c51b9(0x323)]=_0x26492b;}return _0x2787d2;}function runtimeHasRequiredPaths(_0x211275,_0x18fdea){const _0x2081fb=_0x44ad8a;return['nodeExec'+_0x2081fb(0x36e),'npmCli',_0x2081fb(0x251)+'WorkingD'+'ir','openclaw'+_0x2081fb(0x2e0)]['every'](_0x3c0b1e=>typeof _0x18fdea[_0x3c0b1e]===_0x2081fb(0x1d6)&&_0x18fdea[_0x3c0b1e][_0x2081fb(0x354)]())&&[_0x2081fb(0x1b3)+'utable',_0x2081fb(0x299)][_0x2081fb(0x343)](_0x49ddd7=>existsSync(resolve(_0x211275,_0x18fdea[_0x49ddd7])));}async function buildRuntimeBase(_0x5d0445,_0xe97d57,_0x9b3119={}){const _0x4c2072=_0x44ad8a,_0x1eda68=join(_0xe97d57,'node');await ensureRuntimeNode(_0x5d0445,_0x1eda68);const _0x45a4a3=process[_0x4c2072(0x2e3)]===_0x4c2072(0x20d)?_0x4c2072(0x230)+'e.exe':_0x4c2072(0x171)+'/node',_0x1b11ea=process['platform']===_0x4c2072(0x20d)?_0x4c2072(0x230)+_0x4c2072(0x359)+'s/npm/bi'+'n/npm-cl'+'i.js':_0x4c2072(0x252)+'/node_mo'+'dules/np'+'m/bin/np'+_0x4c2072(0x377),_0x18d57d={..._0x9b3119,'generatedAt':new Date()[_0x4c2072(0x350)+_0x4c2072(0x197)](),'nodeVersion':_0x5d0445['openclaw'][_0x4c2072(0x16b)+_0x4c2072(0x2e8)],'openclawVersion':_0x9b3119[_0x4c2072(0x251)+'Version']||'','platform':process[_0x4c2072(0x2e3)],'arch':process['arch'],'nodeExecutable':_0x45a4a3,'npmCli':_0x1b11ea,'openclawWorkingDir':'openclaw','openclawBin':_0x4c2072(0x251)+_0x4c2072(0x2d0)+_0x4c2072(0x3bc)};return await writeJson(resolveManifestPath(_0xe97d57),_0x18d57d),_0x18d57d;}async function removePathWithRetries(_0x358cdc){await rm(_0x358cdc,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96});}async function ensureRuntimeNode(_0x460efa,_0x20730a){const _0x20f729=_0x44ad8a,_0x3515ea=_0x460efa[_0x20f729(0x251)][_0x20f729(0x16b)+_0x20f729(0x2e8)],_0x5b870b=process['platform']===_0x20f729(0x20d)?join(_0x20730a,_0x20f729(0x17f)):join(_0x20730a,_0x20f729(0x287),'node'),_0x27faa7=process[_0x20f729(0x2e3)]==='win32'?join(_0x20730a,_0x20f729(0x23b)+'ules',_0x20f729(0x332),'bin',_0x20f729(0x172)+'js'):join(_0x20730a,'lib','node_mod'+_0x20f729(0x18a),_0x20f729(0x332),_0x20f729(0x287),_0x20f729(0x172)+'js');if(existsSync(_0x5b870b)&&existsSync(_0x27faa7)&&await getNodeVersion(_0x5b870b)===_0x3515ea)return;await removePathWithRetries(_0x20730a);if(process[_0x20f729(0x2f9)][_0x20f729(0x1b1)]===_0x3515ea){await linkCurrentNodeRuntime(_0x20730a);return;}await downloadNodeRuntime(_0x3515ea,_0x20730a);}async function getNodeVersion(_0x3db7c3){const _0x604093=_0x44ad8a;try{const _0x15066e=await runProcess(_0x3db7c3,['-p',_0x604093(0x31c)+_0x604093(0x2f9)+'.node'],{'label':_0x3db7c3+_0x604093(0x1ee),'timeoutMs':0x7530});return _0x15066e[_0x604093(0x150)][_0x604093(0x354)]();}catch{return'';}}async function linkCurrentNodeRuntime(_0x3e9fe3){const _0x121522=_0x44ad8a,_0x5464a7=process[_0x121522(0x3ca)],_0xc79852=resolve(dirname(_0x5464a7),'..'),_0x3d5e59=process['platform']===_0x121522(0x20d)?resolve(_0xc79852,_0x121522(0x23b)+'ules/npm'):resolve(_0xc79852,_0x121522(0x3ae)+_0x121522(0x227)+_0x121522(0x342)),_0x53ff4a=process[_0x121522(0x2e3)]===_0x121522(0x20d)?join(_0x3e9fe3,'node.exe'):join(_0x3e9fe3,_0x121522(0x287),_0x121522(0x1b1)),_0x2e6095=process['platform']===_0x121522(0x20d)?join(_0x3e9fe3,_0x121522(0x23b)+'ules',_0x121522(0x332)):join(_0x3e9fe3,_0x121522(0x17e),'node_mod'+_0x121522(0x18a),_0x121522(0x332));await mkdir(dirname(_0x53ff4a),{'recursive':!![]}),await mkdir(dirname(_0x2e6095),{'recursive':!![]}),await symlink(_0x5464a7,_0x53ff4a),existsSync(_0x3d5e59)?await symlink(_0x3d5e59,_0x2e6095):await symlink(await resolveNpmRoot(),_0x2e6095);}async function resolveNpmRoot(){const _0x5bc2b4=_0x44ad8a,_0x3856be=await runProcess(_0x5bc2b4(0x332),[_0x5bc2b4(0x1a1),'-g'],{'label':'npm\x20root'+_0x5bc2b4(0x2cb),'timeoutMs':0x7530}),_0x2a69d0=process[_0x5bc2b4(0x2e3)]===_0x5bc2b4(0x20d)?_0x3856be[_0x5bc2b4(0x150)][_0x5bc2b4(0x354)]():join(_0x3856be[_0x5bc2b4(0x150)]['trim'](),_0x5bc2b4(0x332));if(!existsSync(join(_0x2a69d0,_0x5bc2b4(0x287),_0x5bc2b4(0x172)+'js')))throw new Error(_0x5bc2b4(0x206)+_0x5bc2b4(0x2f0)+_0x5bc2b4(0x14b)+_0x5bc2b4(0x239)+'cal\x20runt'+_0x5bc2b4(0x3ac)+_0x5bc2b4(0x1a0)+_0x2a69d0);return _0x2a69d0;}async function resolveExtractedNodeRoot(_0x37ef15,_0x203796){const _0x10caa6=_0x44ad8a,_0x3d799d=join(_0x37ef15,_0x203796);if(existsSync(_0x3d799d))return _0x3d799d;const _0x1839af=await readdir(_0x37ef15,{'withFileTypes':!![]}),_0x6860d5=_0x1839af[_0x10caa6(0x1cc)](_0xde768c=>_0xde768c[_0x10caa6(0x296)+'ory']());if(_0x6860d5[_0x10caa6(0x1c5)]===0x1)return join(_0x37ef15,_0x6860d5[0x0][_0x10caa6(0x331)]);const _0x454eca=process[_0x10caa6(0x2e3)]==='win32'?join(_0x37ef15,'node.exe'):join(_0x37ef15,_0x10caa6(0x287),_0x10caa6(0x1b1));if(existsSync(_0x454eca))return _0x37ef15;const _0x44fcde=await findNodeRuntimeRoot(_0x37ef15);if(_0x44fcde)return _0x44fcde;const _0x42323a=_0x1839af['map'](_0x4243fc=>_0x4243fc['name'])[_0x10caa6(0x2d7)](',\x20');throw new Error(_0x10caa6(0x1db)+_0x10caa6(0x35d)+_0x10caa6(0x2b9)+_0x10caa6(0x256)+'not\x20foun'+_0x10caa6(0x1dd)+_0x203796+'\x20in\x20'+_0x37ef15+(_0x10caa6(0x3bb)+'vel\x20entr'+_0x10caa6(0x249))+(_0x42323a||_0x10caa6(0x34a)));}function resolveNodeExtractRoot(_0x290051,_0x76bf69,_0x1b6848){const _0x2d7749=_0x44ad8a;if(process[_0x2d7749(0x2e3)]!==_0x2d7749(0x20d))return join(_0x290051,_0x76bf69+(_0x2d7749(0x2c0)+'-')+process[_0x2d7749(0x226)]+'-'+Date['now']()+'-'+_0x1b6848);const _0x26687a=/^[A-Za-z]:[\\/]/[_0x2d7749(0x243)](_0x290051),_0x25213b=parse(_0x290051),_0x569afa=_0x26687a?_0x26687a[0x0][_0x2d7749(0x362)](0x0,0x2)+'\x5c':_0x25213b[_0x2d7749(0x1a1)]&&_0x25213b[_0x2d7749(0x1a1)]!=='/'?_0x25213b[_0x2d7749(0x1a1)]:_0x290051,_0x4eba44=_0x569afa[_0x2d7749(0x3bf)](/[\\/]+$/,'');return _0x4eba44+_0x2d7749(0x15b)+process[_0x2d7749(0x226)]+'-'+Date[_0x2d7749(0x16d)]()+'-'+_0x1b6848;}async function findNodeRuntimeRoot(_0x5d454d){const _0x4d716a=_0x44ad8a,_0x23be61=[_0x5d454d],_0x2971fe=new Set();while(_0x23be61[_0x4d716a(0x1c5)]>0x0){const _0x2e2f3c=_0x23be61[_0x4d716a(0x16f)]();if(!_0x2e2f3c||_0x2971fe[_0x4d716a(0x228)](_0x2e2f3c))continue;_0x2971fe[_0x4d716a(0x1ec)](_0x2e2f3c);const _0x455ccc=process[_0x4d716a(0x2e3)]===_0x4d716a(0x20d)?join(_0x2e2f3c,_0x4d716a(0x17f)):join(_0x2e2f3c,_0x4d716a(0x287),_0x4d716a(0x1b1)),_0x473a68=process[_0x4d716a(0x2e3)]===_0x4d716a(0x20d)?join(_0x2e2f3c,'node_mod'+_0x4d716a(0x18a),'npm',_0x4d716a(0x287),_0x4d716a(0x172)+'js'):join(_0x2e2f3c,'lib',_0x4d716a(0x23b)+_0x4d716a(0x18a),_0x4d716a(0x332),_0x4d716a(0x287),'npm-cli.'+'js');if(existsSync(_0x455ccc)&&existsSync(_0x473a68))return _0x2e2f3c;const _0x1496fa=await readdir(_0x2e2f3c,{'withFileTypes':!![]});for(const _0x65dfcd of _0x1496fa){_0x65dfcd[_0x4d716a(0x296)+_0x4d716a(0x387)]()&&_0x23be61['push'](join(_0x2e2f3c,_0x65dfcd[_0x4d716a(0x331)]));}}return'';}async function downloadNodeRuntime(_0x3be215,_0x31cc8b){const _0x196937=_0x44ad8a,_0x129438=process[_0x196937(0x2e3)]===_0x196937(0x20d)?'win':process['platform'],_0x31fa34=process[_0x196937(0x369)]==='x64'?_0x196937(0x329):process[_0x196937(0x369)]===_0x196937(0x1d5)?_0x196937(0x1d5):process[_0x196937(0x369)],_0x58061e=process['platform']==='win32'?_0x196937(0x2ce):_0x196937(0x26a),_0x3939f8=_0x196937(0x1da)+_0x3be215+'-'+_0x129438+'-'+_0x31fa34,_0x545848=_0x3939f8+'.'+_0x58061e,_0x5328f6=join(dirname(_0x31cc8b),_0x196937(0x370)),_0x3f6c48=join(_0x5328f6,_0x545848),_0x3a1895=_0x196937(0x373)+_0x196937(0x218)+'rg/dist/'+'v'+_0x3be215+'/'+_0x545848;await mkdir(_0x5328f6,{'recursive':!![]});const _0x35db21=resolveNodeExtractRoot(_0x5328f6,_0x3939f8,0x1);!existsSync(_0x3f6c48)&&(console[_0x196937(0x346)](_0x196937(0x21d)+_0x196937(0x240)+'time]\x20do'+_0x196937(0x3ab)+'g\x20'+_0x3a1895),await downloadFile(_0x3a1895,_0x3f6c48));await rm(_0x35db21,{'recursive':!![],'force':!![]}),await mkdir(_0x35db21,{'recursive':!![]});process[_0x196937(0x2e3)]===_0x196937(0x20d)?await extractZipArchive(_0x3f6c48,_0x35db21,_0x545848):await runProcess(_0x196937(0x13e),[_0x196937(0x2c5),_0x3f6c48,'-C',_0x35db21],{'label':_0x196937(0x155)+_0x545848});const _0x39dc4a=await resolveExtractedNodeRoot(_0x35db21,_0x3939f8);await mkdir(dirname(_0x31cc8b),{'recursive':!![]}),await rename(_0x39dc4a,_0x31cc8b),_0x39dc4a!==_0x35db21&&await rm(_0x35db21,{'recursive':!![],'force':!![]});}async function extractZipArchive(_0x1bb2c1,_0x2e572b,_0x3ec7b7){const _0x247f65=_0x44ad8a;await runProcess(_0x247f65(0x297)+'ll.exe',['-NoProfi'+'le',_0x247f65(0x351)+'onPolicy',_0x247f65(0x2fa),'-Command','Expand-A'+_0x247f65(0x2fe)+_0x247f65(0x1e0)+_0x247f65(0x1c2)+_0x247f65(0x2a4)+_0x247f65(0x380)+'HIVE\x20-De'+_0x247f65(0x32d)+_0x247f65(0x2a6)+_0x247f65(0x1fa)+_0x247f65(0x1f9)+'XTRACT_R'+_0x247f65(0x1f2)+'ce'],{'env':{...process.env,'WUJIE_SHELL_ARCHIVE':_0x1bb2c1,'WUJIE_SHELL_EXTRACT_ROOT':_0x2e572b},'label':_0x247f65(0x155)+_0x3ec7b7});}async function downloadFile(_0x41926a,_0x4e45d0){await mkdir(dirname(_0x4e45d0),{'recursive':!![]});const _0x3dd7e7=await new Promise((_0x25b871,_0x443afe)=>{const _0x2f22c1=_0x537f;get(_0x41926a,_0x9df35f=>{const _0x2a9baa=_0x537f;if(_0x9df35f['statusCo'+'de']>=0x12c&&_0x9df35f[_0x2a9baa(0x2b3)+'de']<0x190&&_0x9df35f[_0x2a9baa(0x34b)][_0x2a9baa(0x222)]){_0x9df35f[_0x2a9baa(0x389)](),downloadFile(new URL(_0x9df35f['headers'][_0x2a9baa(0x222)],_0x41926a)['href'],_0x4e45d0)['then'](()=>_0x25b871(null))['catch'](_0x443afe);return;}if(_0x9df35f[_0x2a9baa(0x2b3)+'de']!==0xc8){_0x9df35f[_0x2a9baa(0x389)](),_0x443afe(new Error(_0x2a9baa(0x1ca)+'\x20failed\x20'+_0x9df35f[_0x2a9baa(0x2b3)+'de']+':\x20'+_0x41926a));return;}_0x25b871(_0x9df35f);})['on'](_0x2f22c1(0x156),_0x443afe);});_0x3dd7e7&&await pipeline(_0x3dd7e7,createWriteStream(_0x4e45d0));}export async function ensureOpenClawDoctorFixed(_0x227b01,_0x97d8ca={}){const _0x2fcae0=_0x44ad8a,_0x4da38f=await loadRuntimeInfo(_0x227b01[_0x2fcae0(0x300)+_0x2fcae0(0x1dc)]),_0x1edb5e=getConfigPaths(_0x227b01),_0x123582=join(_0x1edb5e[_0x2fcae0(0x364)+_0x2fcae0(0x291)],'openclaw'+'-doctor.'+_0x2fcae0(0x22d)),_0x9300c0=await readJson(_0x123582,{});if(_0x9300c0[_0x2fcae0(0x251)+_0x2fcae0(0x323)]===_0x4da38f['openclaw'+_0x2fcae0(0x323)])return _0x97d8ca['runtimeL'+_0x2fcae0(0x30a)]?.[_0x2fcae0(0x200)](_0x2fcae0(0x251)+_0x2fcae0(0x2bb)+_0x2fcae0(0x17a)+_0x2fcae0(0x236)+_0x2fcae0(0x2f4),{'openclawVersion':_0x4da38f['openclaw'+'Version'],'markerPath':_0x123582}),{'ran':![],'openclawVersion':_0x4da38f['openclaw'+'Version'],'markerPath':_0x123582};return await runOpenClawDoctorFix(_0x227b01,_0x4da38f,{'fromVersion':_0x9300c0['openclaw'+_0x2fcae0(0x323)]||_0x2fcae0(0x241),'toVersion':_0x4da38f[_0x2fcae0(0x251)+'Version'],'markerPath':_0x123582,'runtimeLogger':_0x97d8ca['runtimeL'+_0x2fcae0(0x30a)]}),{'ran':!![],'openclawVersion':_0x4da38f[_0x2fcae0(0x251)+_0x2fcae0(0x323)],'markerPath':_0x123582};}async function runOpenClawDoctorFix(_0x165bd1,_0x593aca,{fromVersion:_0x269ad6,toVersion:_0x567136,markerPath:markerPath='',runtimeLogger:_0x3f5a33}={}){const _0xcd4ff2=_0x44ad8a;_0x3f5a33?.[_0xcd4ff2(0x264)+'t']?.('openclaw'+_0xcd4ff2(0x2bb)+_0xcd4ff2(0x3b6)+'ted',{'fromVersion':_0x269ad6,'toVersion':_0x567136});const _0x553bd0=await createRuntimeEnv(_0x593aca,{'OPENCLAW_HOME':_0x165bd1[_0xcd4ff2(0x37d)],'OPENCLAW_STATE_DIR':_0x165bd1[_0xcd4ff2(0x37d)],'OPENCLAW_CONFIG_PATH':getConfigPaths(_0x165bd1)[_0xcd4ff2(0x3c1)+'th']});console[_0xcd4ff2(0x346)](_0xcd4ff2(0x21d)+_0xcd4ff2(0x240)+'time]\x20ru'+_0xcd4ff2(0x254)+_0xcd4ff2(0x188)+_0xcd4ff2(0x33f)+_0xcd4ff2(0x32a));const _0x3083ec=await runProcess(_0x593aca[_0xcd4ff2(0x1b3)+'utable'],[_0x593aca[_0xcd4ff2(0x251)+_0xcd4ff2(0x2e0)],_0xcd4ff2(0x36f),'--fix'],{'cwd':_0x593aca[_0xcd4ff2(0x251)+_0xcd4ff2(0x272)+'ir'],'env':_0x553bd0,'label':'openclaw'+'\x20doctor\x20'+_0xcd4ff2(0x244),'timeoutMs':0x1d4c0});_0x3f5a33?.[_0xcd4ff2(0x264)+'t']?.(_0xcd4ff2(0x251)+_0xcd4ff2(0x2bb)+'fix\x20comp'+_0xcd4ff2(0x1b2),{'fromVersion':_0x269ad6,'toVersion':_0x567136,'stdout':_0x3083ec[_0xcd4ff2(0x150)][_0xcd4ff2(0x354)]()[_0xcd4ff2(0x362)](-0xfa0),'stderr':_0x3083ec[_0xcd4ff2(0x212)][_0xcd4ff2(0x354)]()[_0xcd4ff2(0x362)](-0xfa0)}),markerPath&&(await writeJson(markerPath,{'openclawVersion':_0x593aca['openclaw'+'Version'],'fixedAt':new Date()[_0xcd4ff2(0x350)+_0xcd4ff2(0x197)]()}),_0x3f5a33?.['importan'+'t']?.(_0xcd4ff2(0x251)+_0xcd4ff2(0x2bb)+_0xcd4ff2(0x185)+'er\x20writt'+'en',{'markerPath':markerPath,'openclawVersion':_0x593aca[_0xcd4ff2(0x251)+_0xcd4ff2(0x323)]}));}export async function readRuntimeManifest(_0x5daebe){return await readJson(resolveManifestPath(_0x5daebe),{});}export async function loadRuntimeInfo(_0xfb00d5){const _0x2e04a1=resolveRuntimeRoot(_0xfb00d5),_0x165fb9=await readRuntimeManifest(_0x2e04a1);return createRuntimeInfoFromManifest(_0x2e04a1,_0x165fb9);}function createRuntimeInfoFromManifest(_0x52ffad,_0x15dbaf,_0x15d5c6={}){const _0x5b001f=_0x44ad8a;for(const _0x1acc35 of[_0x5b001f(0x1b3)+_0x5b001f(0x36e),'npmCli',_0x5b001f(0x251)+'WorkingD'+'ir',_0x5b001f(0x251)+'Bin']){if(typeof _0x15dbaf[_0x1acc35]!=='string'||!_0x15dbaf[_0x1acc35]['trim']())throw new Error(_0x5b001f(0x2ef)+'manifest'+_0x5b001f(0x295)+_0x5b001f(0x307)+_0x1acc35+'\x22\x20at\x20'+resolveManifestPath(_0x52ffad)+(_0x5b001f(0x34c)+_0x5b001f(0x327)+_0x5b001f(0x301)+'e'));}const _0x993962=resolve(_0x52ffad,_0x15dbaf[_0x5b001f(0x1b3)+_0x5b001f(0x36e)]),_0x3c5bb8=resolve(_0x52ffad,_0x15dbaf[_0x5b001f(0x299)]),_0x19a994=resolve(_0x52ffad,_0x15dbaf[_0x5b001f(0x251)+_0x5b001f(0x272)+'ir']),_0x17912c=resolve(_0x52ffad,_0x15dbaf[_0x5b001f(0x251)+_0x5b001f(0x2e0)]),_0x16b31c=Array['isArray'](_0x15dbaf[_0x5b001f(0x1e4)])?_0x15dbaf[_0x5b001f(0x1e4)]['map'](_0x37f7b9=>({..._0x37f7b9,'installPath':resolve(_0x52ffad,_0x37f7b9[_0x5b001f(0x168)+_0x5b001f(0x24e)])})):[],_0x18ea34=_0x15d5c6[_0x5b001f(0x31d)+_0x5b001f(0x3aa)+_0x5b001f(0x220)]?[_0x993962,_0x3c5bb8]:[_0x993962,_0x3c5bb8,_0x19a994,_0x17912c];for(const _0x58c0c7 of _0x18ea34){if(!existsSync(_0x58c0c7))throw new Error(_0x5b001f(0x2ef)+_0x5b001f(0x378)+_0x5b001f(0x183)+_0x58c0c7);}return{'runtimeRoot':_0x52ffad,'manifest':_0x15dbaf,'openclawVersion':_0x15dbaf[_0x5b001f(0x251)+_0x5b001f(0x323)]||_0x5b001f(0x241),'nodeExecutable':_0x993962,'npmCli':_0x3c5bb8,'openclawWorkingDir':_0x19a994,'openclawBin':_0x17912c,'plugins':_0x16b31c};}export async function spawnClaw(_0x894432,_0x179309=[],_0x31973a={}){const _0x5bb84b=_0x44ad8a,_0x7fd55b=await loadRuntimeInfo(_0x894432),_0xf35ecd=await createRuntimeEnv(_0x7fd55b,_0x31973a[_0x5bb84b(0x2f2)]??{});return spawn(_0x7fd55b[_0x5bb84b(0x1b3)+'utable'],[_0x7fd55b[_0x5bb84b(0x251)+_0x5bb84b(0x2e0)],..._0x179309],{'cwd':_0x7fd55b[_0x5bb84b(0x251)+_0x5bb84b(0x272)+'ir'],'stdio':_0x5bb84b(0x21c),..._0x31973a,'env':_0xf35ecd});}export async function runClawOnce(_0x1a35f7,_0x52322e=[],_0x920572=0x15f90){const _0x1486ea=await spawnClaw(_0x1a35f7,_0x52322e);return await new Promise((_0x3ffdc4,_0x28d519)=>{const _0x2f7e65=_0x537f;let _0x5bf63c='',_0x3d6152='',_0x3d1072=![];const _0x54e81f=setTimeout(()=>{const _0x20f6de=_0x537f;if(_0x3d1072)return;_0x3d1072=!![],_0x1486ea[_0x20f6de(0x353)]('SIGTERM'),_0x28d519(new Error(_0x20f6de(0x251)+_0x20f6de(0x399)+_0x20f6de(0x1ad)+'\x20'+_0x920572+'ms'));},_0x920572);_0x1486ea[_0x2f7e65(0x150)]['on'](_0x2f7e65(0x3c7),_0x4528aa=>{_0x5bf63c+=_0x4528aa['toString']();}),_0x1486ea[_0x2f7e65(0x212)]['on']('data',_0x2e1e4b=>{_0x3d6152+=_0x2e1e4b['toString']();}),_0x1486ea['on'](_0x2f7e65(0x156),_0xd11784=>{if(_0x3d1072)return;_0x3d1072=!![],clearTimeout(_0x54e81f),_0x28d519(_0xd11784);}),_0x1486ea['on'](_0x2f7e65(0x21b),(_0x47de40,_0x12e604)=>{if(_0x3d1072)return;_0x3d1072=!![],clearTimeout(_0x54e81f),_0x3ffdc4({'code':_0x47de40,'signal':_0x12e604,'stdout':_0x5bf63c,'stderr':_0x3d6152});});});}export{resolveRuntimeLarkCliCommand};function resolvePackageNameFromNpmSpec(_0x57e463){const _0x290d9d=_0x44ad8a,_0x454a68=_0x57e463[_0x290d9d(0x354)]()[_0x290d9d(0x3bf)](/^npm:/,'');if(!_0x454a68)throw new Error(_0x290d9d(0x15e)+_0x290d9d(0x1d2)+_0x290d9d(0x176)+'c');if(_0x454a68[_0x290d9d(0x2f3)+'th']('@')){const _0x170285=_0x454a68[_0x290d9d(0x2ca)]('/');if(_0x170285===-0x1)throw new Error(_0x290d9d(0x15e)+_0x290d9d(0x319)+'pec:\x20'+_0x57e463);const _0x52a17c=_0x454a68[_0x290d9d(0x2ca)]('@',_0x170285+0x1);return _0x52a17c===-0x1?_0x454a68:_0x454a68['slice'](0x0,_0x52a17c);}const _0x4e3577=_0x454a68[_0x290d9d(0x2ca)]('@');return _0x4e3577===-0x1?_0x454a68:_0x454a68['slice'](0x0,_0x4e3577);}async function createRuntimeEnv(_0x3ca212,_0x4bcc4b={}){const _0x5d6cca=_0x44ad8a,_0x2b59a6=process.env.OPENCLAW_STATE_DIR||'',_0x5241f8=process.env.NPM_CONFIG_REGISTRY||_0x5d6cca(0x373)+_0x5d6cca(0x2c7)+_0x5d6cca(0x28c)+_0x5d6cca(0x3be),_0x2ed5c3=_0x2b59a6?join(_0x2b59a6,_0x5d6cca(0x1a2)+'time-too'+'ls'):join(_0x3ca212[_0x5d6cca(0x27a)+'oot'],_0x5d6cca(0x32f)),_0x1728ea=join(_0x2ed5c3,_0x5d6cca(0x1e3)+'al'),_0x1b4a4f=join(_0x2ed5c3,_0x5d6cca(0x225)+'e'),_0x225622=join(_0x1728ea,_0x5d6cca(0x287));await mkdir(_0x225622,{'recursive':!![]}),await mkdir(_0x1b4a4f,{'recursive':!![]});const _0x52521a=[_0x225622,dirname(_0x3ca212['nodeExec'+'utable']),process.env.PATH||''];return{...process.env,..._0x4bcc4b,'PATH':_0x52521a['filter'](Boolean)[_0x5d6cca(0x2d7)](delimiter),'npm_config_prefix':_0x1728ea,'NPM_CONFIG_PREFIX':_0x1728ea,'npm_config_cache':_0x1b4a4f,'NPM_CONFIG_CACHE':_0x1b4a4f,'NPM_CONFIG_REGISTRY':_0x5241f8,'npm_execpath':_0x3ca212[_0x5d6cca(0x299)],'npm_node_execpath':_0x3ca212['nodeExec'+'utable'],'OPENCLAW_RUNTIME_NPM_PREFIX':_0x1728ea,'OPENCLAW_RUNTIME_NPM_BIN':_0x225622};}export async function getRuntimeSpawnContext(_0x24c774,_0x901879={}){const _0x6abb0=_0x44ad8a,_0x13909b=await loadRuntimeInfo(_0x24c774),_0x299a72=await createRuntimeEnv(_0x13909b,_0x901879);return{'cwd':_0x13909b[_0x6abb0(0x251)+_0x6abb0(0x272)+'ir'],'env':_0x299a72,'runtime':_0x13909b};}function resolvePluginDirNameFromSpec(_0x430222){const _0x13d95f=_0x44ad8a,_0x4fa044=resolvePackageNameFromNpmSpec(_0x430222),_0x85e9bd=_0x4fa044['split']('/')[_0x13d95f(0x1cc)](Boolean),_0x231e83=_0x85e9bd['at'](-0x1)??'';if(!_0x231e83)throw new Error(_0x13d95f(0x15e)+_0x13d95f(0x213)+'pec:\x20'+_0x430222);return _0x231e83;}async function resolvePluginIdFromPackageDir(_0x31666a,_0x54016e){const _0x3add08=_0x44ad8a,_0x18839a=await readJson(join(_0x31666a,_0x3add08(0x2eb)+_0x3add08(0x22d)),{}),_0x32800b=await readPluginManifest(_0x31666a),_0x5abaaa=[_0x32800b?.['id'],_0x32800b?.[_0x3add08(0x20e)],_0x32800b?.[_0x3add08(0x331)],_0x18839a?.[_0x3add08(0x251)]?.['id'],_0x18839a?.[_0x3add08(0x251)+'Id'],_0x54016e],_0x7b472a=_0x5abaaa[_0x3add08(0x30c)](_0x5a9fde=>typeof _0x5a9fde===_0x3add08(0x1d6)&&_0x5a9fde[_0x3add08(0x354)]());if(!_0x7b472a)throw new Error(_0x3add08(0x234)+'o\x20resolv'+_0x3add08(0x2a8)+_0x3add08(0x24d)+'\x20'+_0x31666a);return _0x7b472a[_0x3add08(0x354)]();}function pluginSpecMatches(_0x4caf15,_0x3cc9b7){const _0xa78d43=_0x44ad8a,_0x3676d3=_0x3cc9b7[_0xa78d43(0x354)](),_0x5a7f08=resolvePackageNameFromNpmSpec(_0x3676d3);return[_0x4caf15['spec'],_0x4caf15[_0xa78d43(0x320)+_0xa78d43(0x3cd)],_0x4caf15[_0xa78d43(0x320)+_0xa78d43(0x1c4)]][_0xa78d43(0x194)](_0xc0abcd=>_0xc0abcd===_0x3676d3||_0xc0abcd===_0x5a7f08);}async function installPluginFromNpmSpec(_0x2de135,_0x494e02,_0x1a791f={}){const _0x426062=_0x44ad8a,_0x177d3=_0x2de135[_0x426062(0x354)]()[_0x426062(0x3bf)](/^npm:/,''),_0x41e260=resolvePluginDirNameFromSpec(_0x177d3),_0xcb238=join(_0x494e02[_0x426062(0x251)+_0x426062(0x272)+'ir'],_0x426062(0x1d4),_0x426062(0x3c5)+'ns'),_0x31ec8c=join(_0xcb238,_0x41e260),_0x2119f6=join(_0x494e02['runtimeR'+_0x426062(0x1dc)],_0x426062(0x397)+_0x426062(0x37f)+process[_0x426062(0x226)]+'-'+Date[_0x426062(0x16d)]()),_0x5b945a=await createRuntimeEnv(_0x494e02),_0x39cf9b=new Date()[_0x426062(0x350)+_0x426062(0x197)](),_0x16bd56=join(_0x494e02[_0x426062(0x27a)+'oot'],_0x426062(0x370));await mkdir(_0x16bd56,{'recursive':!![]}),await rm(_0x2119f6,{'recursive':!![],'force':!![]}),await rm(_0x31ec8c,{'recursive':!![],'force':!![]}),await mkdir(_0x2119f6,{'recursive':!![]}),await mkdir(_0xcb238,{'recursive':!![]}),console[_0x426062(0x346)](_0x426062(0x21d)+_0x426062(0x240)+_0x426062(0x237)+_0x426062(0x235)+'lugin\x20'+_0x177d3);const _0x46ff08=await runProcess(_0x494e02[_0x426062(0x1b3)+'utable'],[_0x494e02[_0x426062(0x299)],'pack',_0x177d3,_0x426062(0x344)],{'cwd':_0x16bd56,'env':_0x5b945a,'label':'npm\x20pack'+'\x20'+_0x177d3}),_0x375a0c=parseNpmPackJson(_0x46ff08['stdout']),_0x57bd56=normalizePackedTarballFilename(_0x375a0c[_0x426062(0x1a5)]),_0x2273e7=join(_0x16bd56,_0x57bd56);if(!existsSync(_0x2273e7))throw new Error(_0x426062(0x206)+_0x426062(0x2a3)+_0x426062(0x2fc)+_0x426062(0x322)+'\x20'+_0x2273e7);await runProcess('tar',[_0x426062(0x3b5),_0x2273e7,'-C',_0x2119f6],{'label':_0x426062(0x155)+_0x57bd56}),await rename(join(_0x2119f6,'package'),_0x31ec8c),await rm(_0x2119f6,{'recursive':!![],'force':!![]});const _0x1d26b8=join(_0x31ec8c,'package.'+'json'),_0x14967f=await readJson(_0x1d26b8,{});(_0x14967f[_0x426062(0x366)+_0x426062(0x38a)]||_0x14967f[_0x426062(0x2cc)])&&(delete _0x14967f['devDepen'+_0x426062(0x38a)],delete _0x14967f[_0x426062(0x2cc)],await writeJson(_0x1d26b8,_0x14967f));await runProcess(_0x494e02[_0x426062(0x1b3)+'utable'],[_0x494e02[_0x426062(0x299)],_0x426062(0x1b4),_0x426062(0x2b6)+'ev',_0x426062(0x24a)+'eer',_0x426062(0x29f)+'it','--no-fun'+'d',_0x426062(0x33a)+_0x426062(0x3a4)+'ps'],{'cwd':_0x31ec8c,'env':_0x5b945a,'label':_0x426062(0x2ff)+'all\x20plug'+_0x426062(0x204)+_0x177d3});const _0x18b5c6=new Date()[_0x426062(0x350)+_0x426062(0x197)](),_0x1ba028=await resolvePluginIdFromPackageDir(_0x31ec8c,_0x375a0c[_0x426062(0x331)]);return _0x1a791f[_0x426062(0x1c0)+_0x426062(0x30a)]?.['info'](_0x426062(0x248)+_0x426062(0x336)+'lled',{'spec':_0x177d3,'pluginId':_0x1ba028,'installPath':_0x31ec8c}),{'pluginId':_0x1ba028,'source':_0x426062(0x332),'spec':_0x177d3,'installPath':toRuntimeRelative(_0x494e02['runtimeR'+_0x426062(0x1dc)],_0x31ec8c),'version':_0x375a0c[_0x426062(0x13a)],'resolvedName':_0x375a0c[_0x426062(0x331)],'resolvedVersion':_0x375a0c[_0x426062(0x13a)],'resolvedSpec':_0x375a0c[_0x426062(0x331)]+'@'+_0x375a0c['version'],'integrity':typeof _0x375a0c['integrit'+'y']===_0x426062(0x1d6)?_0x375a0c[_0x426062(0x151)+'y']:'','shasum':typeof _0x375a0c[_0x426062(0x1fd)]===_0x426062(0x1d6)?_0x375a0c['shasum']:'','resolvedAt':_0x39cf9b,'installedAt':_0x18b5c6};}async function syncConfiguredNpmPlugins(_0x5628ac,_0x154712,_0x34bd14,_0x22e818={}){const _0x18485d=_0x44ad8a;if(_0x22e818[_0x18485d(0x3c2)])return;const _0x56832f=createRuntimeInfoFromManifest(_0x154712,_0x34bd14),_0x1b17e8=Array[_0x18485d(0x29e)](_0x34bd14[_0x18485d(0x1e4)])?_0x34bd14[_0x18485d(0x1e4)]:[],_0x383e24=[];for(const _0x6b19b8 of _0x5628ac[_0x18485d(0x251)]['pluginSp'+_0x18485d(0x39b)]){const _0x33ebcb=_0x1b17e8[_0x18485d(0x30c)](_0x91b61c=>_0x91b61c?.['source']===_0x18485d(0x332)&&pluginSpecMatches(_0x91b61c,_0x6b19b8)&&typeof _0x91b61c[_0x18485d(0x168)+_0x18485d(0x24e)]===_0x18485d(0x1d6)&&existsSync(resolve(_0x154712,_0x91b61c[_0x18485d(0x168)+_0x18485d(0x24e)])));if(_0x33ebcb){_0x383e24[_0x18485d(0x2c4)](_0x33ebcb);continue;}_0x383e24[_0x18485d(0x2c4)](await installPluginFromNpmSpec(_0x6b19b8,_0x56832f,_0x22e818));}const _0xeed7ab=new Set(_0x5628ac[_0x18485d(0x251)][_0x18485d(0x202)+'ecs'][_0x18485d(0x337)](resolvePackageNameFromNpmSpec)),_0x2e666b=_0x1b17e8[_0x18485d(0x1cc)](_0x3a2de9=>_0x3a2de9?.[_0x18485d(0x356)]!==_0x18485d(0x332)||!_0xeed7ab[_0x18485d(0x228)](resolvePackageNameFromNpmSpec(_0x3a2de9['resolved'+'Name']||_0x3a2de9[_0x18485d(0x232)]||'')));_0x34bd14[_0x18485d(0x1e4)]=[..._0x2e666b,..._0x383e24];}function hasRuntimeDependencies(_0x23f6fe){const _0x5f46d9=_0x44ad8a,_0x542cd9=_0x23f6fe?.[_0x5f46d9(0x195)+_0x5f46d9(0x1be)]&&typeof _0x23f6fe[_0x5f46d9(0x195)+_0x5f46d9(0x1be)]===_0x5f46d9(0x217)?Object['keys'](_0x23f6fe[_0x5f46d9(0x195)+_0x5f46d9(0x1be)]):[],_0x3dee92=_0x23f6fe?.[_0x5f46d9(0x159)+_0x5f46d9(0x25f)+_0x5f46d9(0x1be)]&&typeof _0x23f6fe['optional'+_0x5f46d9(0x25f)+_0x5f46d9(0x1be)]===_0x5f46d9(0x217)?Object['keys'](_0x23f6fe['optional'+_0x5f46d9(0x25f)+'cies']):[];return _0x542cd9[_0x5f46d9(0x1c5)]>0x0||_0x3dee92['length']>0x0;}async function installLocalPluginRuntimeDependencies(_0x4fe2b4,_0x132daa,_0x3ef698){const _0x2cedd5=_0x44ad8a,_0x1fcc42=join(_0x4fe2b4,_0x2cedd5(0x2eb)+_0x2cedd5(0x22d)),_0x374e0e=await readJson(_0x1fcc42,{});(_0x374e0e[_0x2cedd5(0x366)+_0x2cedd5(0x38a)]||_0x374e0e['scripts'])&&(delete _0x374e0e[_0x2cedd5(0x366)+_0x2cedd5(0x38a)],delete _0x374e0e['scripts'],await writeJson(_0x1fcc42,_0x374e0e));if(!hasRuntimeDependencies(_0x374e0e))return;const _0x554fd6=await createRuntimeEnv(_0x132daa);console['log']('[wujie-s'+'hell:run'+_0x2cedd5(0x2b1)+_0x2cedd5(0x211)+_0x2cedd5(0x35c)+_0x2cedd5(0x1ed)+_0x2cedd5(0x214)+'es\x20'+_0x4fe2b4),await runProcess(_0x132daa['nodeExec'+_0x2cedd5(0x36e)],[_0x132daa[_0x2cedd5(0x299)],_0x2cedd5(0x1b4),'--omit=d'+'ev',_0x2cedd5(0x24a)+_0x2cedd5(0x360),_0x2cedd5(0x29f)+'it',_0x2cedd5(0x2d6)+'d',_0x2cedd5(0x33a)+'-peer-de'+'ps'],{'cwd':_0x4fe2b4,'env':_0x554fd6,'label':_0x2cedd5(0x2ff)+_0x2cedd5(0x28a)+_0x2cedd5(0x2ae)+'\x20'+_0x4fe2b4}),_0x3ef698[_0x2cedd5(0x1c0)+'ogger']?.[_0x2cedd5(0x200)](_0x2cedd5(0x147)+'ugin\x20dep'+_0x2cedd5(0x18e)+'s\x20instal'+'led',{'installPath':_0x4fe2b4});}async function syncSharedPluginModules(_0x23bc9e,_0xe9f166){const _0xaa23d4=_0x44ad8a,_0x321722=new Set();for(const _0x1c0c61 of _0x23bc9e){const _0x29e89e=join(dirname(_0x1c0c61),_0xaa23d4(0x1cb));if(existsSync(_0x29e89e))_0x321722[_0xaa23d4(0x1ec)](_0x29e89e);}for(const _0x36f3cb of _0x321722){await copyDirFresh(_0x36f3cb,join(_0xe9f166,_0xaa23d4(0x1cb)));}}async function syncProductPlugins(_0x107664,_0x504f80,_0x372081,_0x452ab2={}){const _0x5e63a0=_0x44ad8a,_0x179be4=join(_0x504f80,'openclaw',_0x5e63a0(0x1d4),_0x5e63a0(0x3c5)+'ns'),_0x2a7316=createRuntimeInfoFromManifest(_0x504f80,_0x372081),_0x83122d=[];await syncSharedPluginModules(_0x107664[_0x5e63a0(0x251)]['resolved'+_0x5e63a0(0x305)+_0x5e63a0(0x1f0)],_0x179be4);for(const _0x3209ba of _0x107664[_0x5e63a0(0x251)]['resolved'+_0x5e63a0(0x305)+_0x5e63a0(0x1f0)]){const _0xfcb7cf=await getPackageMetadata(_0x3209ba),_0x30f241=await readPluginManifest(_0x3209ba),_0x511cb7=join(_0x179be4,_0xfcb7cf['pluginId']);await copyDirFresh(_0x3209ba,_0x511cb7),await installLocalPluginRuntimeDependencies(_0x511cb7,_0x2a7316,_0x452ab2),_0x83122d['push']({'pluginId':_0xfcb7cf[_0x5e63a0(0x20e)],'source':_0x5e63a0(0x184),'spec':'local:'+_0x3209ba,'installPath':toRuntimeRelative(_0x504f80,_0x511cb7),'version':_0xfcb7cf[_0x5e63a0(0x13a)],'resolvedName':_0xfcb7cf[_0x5e63a0(0x331)],'resolvedVersion':_0xfcb7cf[_0x5e63a0(0x13a)],'resolvedSpec':_0x5e63a0(0x279)+_0x3209ba,'integrity':'','shasum':'','resolvedAt':new Date()[_0x5e63a0(0x350)+_0x5e63a0(0x197)](),'installedAt':new Date()[_0x5e63a0(0x350)+_0x5e63a0(0x197)](),'agentScope':_0x30f241['agentSco'+'pe'],'skills':_0x30f241[_0x5e63a0(0x1c7)]});}const _0x4e8500=new Set(_0x83122d[_0x5e63a0(0x337)](_0x33803b=>_0x33803b[_0x5e63a0(0x20e)])),_0x2c696a=Array[_0x5e63a0(0x29e)](_0x372081[_0x5e63a0(0x1e4)])?_0x372081[_0x5e63a0(0x1e4)][_0x5e63a0(0x1cc)](_0x34be26=>!_0x4e8500[_0x5e63a0(0x228)](_0x34be26[_0x5e63a0(0x20e)])):[];_0x372081[_0x5e63a0(0x1e4)]=[..._0x2c696a,..._0x83122d];}async function syncManifestPluginScope(_0x37e61f,_0xff5f40,_0x4ab9fb){const _0x44857e=_0x44ad8a,_0x15b334=join(_0xff5f40,'openclaw',_0x44857e(0x1d4),_0x44857e(0x3c5)+'ns'),_0x55cfe1=new Set(_0x37e61f[_0x44857e(0x251)][_0x44857e(0x202)+_0x44857e(0x39b)]??[]),_0x51f401=new Set([..._0x55cfe1][_0x44857e(0x337)](_0x3ef7bb=>_0x3ef7bb['replace'](/^npm:/,''))[_0x44857e(0x337)](_0x17af94=>{const _0x21d6cf=_0x44857e;if(_0x17af94[_0x21d6cf(0x2f3)+'th']('@')){const _0x10becb=_0x17af94[_0x21d6cf(0x390)]('@');return _0x10becb['length']>=0x3?'@'+_0x10becb[0x1]:_0x17af94;}return _0x17af94[_0x21d6cf(0x390)]('@')[0x0];})['filter'](Boolean)),_0x4346e4=new Set();for(const _0x253d85 of _0x37e61f[_0x44857e(0x251)]['resolved'+_0x44857e(0x305)+'ginPaths']){const _0x91ba9e=await getPackageMetadata(_0x253d85);if(_0x91ba9e['pluginId'])_0x4346e4['add'](_0x91ba9e[_0x44857e(0x20e)]);}const _0x452b1d=Array[_0x44857e(0x29e)](_0x4ab9fb['plugins'])?_0x4ab9fb[_0x44857e(0x1e4)]:[];_0x4ab9fb[_0x44857e(0x202)+_0x44857e(0x39b)]=[..._0x37e61f[_0x44857e(0x251)][_0x44857e(0x202)+_0x44857e(0x39b)],..._0x37e61f[_0x44857e(0x251)][_0x44857e(0x320)+'LocalPlu'+_0x44857e(0x1f0)][_0x44857e(0x337)](_0x4ec43c=>_0x44857e(0x279)+_0x4ec43c)],_0x4ab9fb[_0x44857e(0x1e4)]=_0x452b1d[_0x44857e(0x1cc)](_0xf3b19d=>{const _0x3f02b2=_0x44857e;if(!_0xf3b19d||typeof _0xf3b19d!==_0x3f02b2(0x217))return![];if(_0xf3b19d[_0x3f02b2(0x356)]===_0x3f02b2(0x184))return _0x4346e4[_0x3f02b2(0x228)](_0xf3b19d[_0x3f02b2(0x20e)]);if(_0xf3b19d[_0x3f02b2(0x356)]===_0x3f02b2(0x332))return _0x55cfe1[_0x3f02b2(0x228)](_0xf3b19d[_0x3f02b2(0x232)])||_0x55cfe1[_0x3f02b2(0x228)](_0xf3b19d[_0x3f02b2(0x320)+_0x3f02b2(0x3cd)])||_0x51f401[_0x3f02b2(0x228)](_0xf3b19d['resolved'+_0x3f02b2(0x1c4)]);return![];});const _0x1469af=new Set(_0x4ab9fb[_0x44857e(0x1e4)][_0x44857e(0x337)](_0x2907f3=>_0x2907f3[_0x44857e(0x20e)]));for(const _0x4f1d58 of _0x452b1d){if(!_0x4f1d58[_0x44857e(0x20e)]||_0x1469af[_0x44857e(0x228)](_0x4f1d58[_0x44857e(0x20e)]))continue;const _0x7670b2=typeof _0x4f1d58[_0x44857e(0x168)+_0x44857e(0x24e)]==='string'&&_0x4f1d58[_0x44857e(0x168)+_0x44857e(0x24e)][_0x44857e(0x354)]()?resolve(_0xff5f40,_0x4f1d58['installP'+_0x44857e(0x24e)]):join(_0x15b334,_0x4f1d58[_0x44857e(0x20e)]),_0x486e5b=relative(_0x15b334,_0x7670b2);if(_0x486e5b['startsWi'+'th']('..')||_0x486e5b==='')continue;await rm(_0x7670b2,{'recursive':!![],'force':!![]});}}async function collectCapabilityEntries(_0x4e7148,_0x353f8a){const _0x46a6d8=_0x44ad8a,_0x5af8cd=new Map();for(const _0x4c0493 of _0x4e7148){let _0xa93cdc;try{_0xa93cdc=await stat(_0x4c0493);}catch{throw new Error(_0x353f8a+(_0x46a6d8(0x2d4)+'s\x20not\x20fo'+_0x46a6d8(0x294))+_0x4c0493);}if(!_0xa93cdc[_0x46a6d8(0x296)+'ory']())throw new Error(_0x353f8a+('\x20path\x20mu'+_0x46a6d8(0x259)+_0x46a6d8(0x250)+_0x46a6d8(0x14a))+_0x4c0493);const _0x59a013={'name':basename(_0x4c0493),'path':_0x4c0493},_0x1564e0=_0x5af8cd[_0x46a6d8(0x1c6)](_0x59a013[_0x46a6d8(0x331)]);if(_0x1564e0)throw new Error('Duplicat'+'e\x20'+_0x353f8a+'\x20entry\x20\x22'+_0x59a013[_0x46a6d8(0x331)]+_0x46a6d8(0x282)+_0x1564e0[_0x46a6d8(0x274)]+_0x46a6d8(0x25a)+_0x59a013[_0x46a6d8(0x274)]);_0x5af8cd[_0x46a6d8(0x27f)](_0x59a013['name'],_0x59a013);}return[..._0x5af8cd['values']()];}async function syncProductCapabilityDirs(_0x1224e5,_0xc0ed2e,_0xa00791){const _0x46cc61=_0x44ad8a,_0x43bef8=await collectCapabilityEntries(_0x1224e5,_0xa00791);await rm(_0xc0ed2e,{'recursive':!![],'force':!![],'maxRetries':0x5,'retryDelay':0x96}),await mkdir(_0xc0ed2e,{'recursive':!![]});for(const _0x2d7b78 of _0x43bef8){await cp(_0x2d7b78[_0x46cc61(0x274)],join(_0xc0ed2e,_0x2d7b78[_0x46cc61(0x331)]),{'recursive':!![]});}return _0x43bef8['length'];}export const __test__={'collectCapabilityEntries':collectCapabilityEntries,'prunePackagedRuntimePayload':prunePackagedRuntimePayload,'syncProductCapabilityDirs':syncProductCapabilityDirs,'resolveNodeExtractRoot':resolveNodeExtractRoot};async function syncProductAgents(_0x4d0ae2,_0x3a6c51,_0x1db71d){const _0x30db9a=_0x44ad8a,_0x181f98=join(_0x3a6c51,_0x30db9a(0x251),_0x30db9a(0x374)),_0x5ceeae=await syncProductCapabilityDirs(_0x4d0ae2[_0x30db9a(0x251)][_0x30db9a(0x320)+'LocalAge'+'ntPaths'],_0x181f98,'agent');_0x1db71d[_0x30db9a(0x374)]={'source':_0x30db9a(0x376),'installPath':toRuntimeRelative(_0x3a6c51,_0x181f98),'localPaths':_0x4d0ae2[_0x30db9a(0x251)][_0x30db9a(0x320)+'LocalAge'+'ntPaths'],'entryCount':_0x5ceeae};}async function syncProductSkills(_0x41690c,_0x5a53f4,_0x39d8b2){const _0x162692=_0x44ad8a,_0x5e4e64=join(_0x5a53f4,'openclaw',_0x162692(0x1c7)),_0x47336b=await syncProductCapabilityDirs(_0x41690c[_0x162692(0x251)][_0x162692(0x320)+_0x162692(0x22f)+_0x162692(0x34e)],_0x5e4e64,'skill');_0x39d8b2['skills']={'source':_0x162692(0x376),'installPath':toRuntimeRelative(_0x5a53f4,_0x5e4e64),'localPaths':_0x41690c[_0x162692(0x251)][_0x162692(0x320)+_0x162692(0x22f)+_0x162692(0x34e)],'entryCount':_0x47336b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x17d3a7,_0xb5152c){const _0x440bc7=_0x2764,_0x3a5d4a=_0x17d3a7();while(!![]){try{const _0x1e9aaf=parseInt(_0x440bc7(0x15a))/0x1+parseInt(_0x440bc7(0x1a8))/0x2+-parseInt(_0x440bc7(0x1b2))/0x3+-parseInt(_0x440bc7(0x1e5))/0x4*(parseInt(_0x440bc7(0x1cb))/0x5)+-parseInt(_0x440bc7(0x1de))/0x6*(parseInt(_0x440bc7(0x1c7))/0x7)+parseInt(_0x440bc7(0x1c5))/0x8*(-parseInt(_0x440bc7(0x191))/0x9)+parseInt(_0x440bc7(0x167))/0xa;if(_0x1e9aaf===_0xb5152c)break;else _0x3a5d4a['push'](_0x3a5d4a['shift']());}catch(_0x9a5aee){_0x3a5d4a['push'](_0x3a5d4a['shift']());}}}(_0x5043,0xea6c9));export function patchChannelPluginRuntimeFromSource(_0x31ba3a,_0x4a23a5={}){const _0x2aa90b=_0x2764,_0x4cf466=_0x4a23a5[_0x2aa90b(0x1e1)+_0x2aa90b(0x1b5)+_0x2aa90b(0x174)];if(!_0x4cf466)return{'patched':![],'reason':_0x2aa90b(0x180)+_0x2aa90b(0x1ca)+_0x2aa90b(0x17d)+'ot-provi'+_0x2aa90b(0x163)};if(_0x31ba3a[_0x2aa90b(0x1da)](_0x2aa90b(0x1bd)+_0x2aa90b(0x1cc)+'meChanne'+'l')){if(_0x31ba3a[_0x2aa90b(0x1da)](_0x2aa90b(0x1d4)+_0x2aa90b(0x1c2)+'annel.tu'+_0x2aa90b(0x19b))&&hasRuntimeChannelImport(_0x31ba3a,_0x4cf466))return{'patched':![],'reason':'already-'+_0x2aa90b(0x15c)};return patchExistingChannelPluginRuntimeFromSource(_0x31ba3a,{'runtimeChannelImportPath':_0x4cf466});}if(_0x31ba3a[_0x2aa90b(0x1da)](_0x2aa90b(0x171)+'nnelRunt'+_0x2aa90b(0x168)+'se'))return patchExistingChannelPluginRuntimeFromSource(_0x31ba3a,{'runtimeChannelImportPath':_0x4cf466});const _0x53a968=_0x2aa90b(0x14c)+'solvedRu'+_0x2aa90b(0x18f)+'null;\x0a\x09\x09'+_0x2aa90b(0x170)+'solveRun'+_0x2aa90b(0x1d6)+_0x2aa90b(0x18a)+_0x2aa90b(0x159)+_0x2aa90b(0x1b8)+'e\x20??=\x20re'+_0x2aa90b(0x1e4)+'atePlugi'+_0x2aa90b(0x14e)+_0x2aa90b(0x1d3)+_0x2aa90b(0x178)+'meOption'+_0x2aa90b(0x157)+_0x2aa90b(0x1d1)+_0x2aa90b(0x19e)+_0x2aa90b(0x1be)+_0x2aa90b(0x184);if(!_0x31ba3a[_0x2aa90b(0x1da)](_0x53a968))return{'patched':![],'reason':_0x2aa90b(0x199)+'d'};const _0x3c88ee=_0x2aa90b(0x17a)+_0x2aa90b(0x18d)+'ash\x20}\x20fr'+'om\x20\x22node'+_0x2aa90b(0x173)+';';if(!_0x31ba3a[_0x2aa90b(0x1da)](_0x3c88ee))return{'patched':![],'reason':_0x2aa90b(0x17d)+_0x2aa90b(0x144)};const _0x3ba20a='\x09\x09let\x20re'+_0x2aa90b(0x19e)+_0x2aa90b(0x18f)+_0x2aa90b(0x16d)+_0x2aa90b(0x172)+_0x2aa90b(0x179)+_0x2aa90b(0x1ab)+_0x2aa90b(0x162)+'elpers\x20='+_0x2aa90b(0x18e)+_0x2aa90b(0x196)+_0x2aa90b(0x1c1)+_0x2aa90b(0x198)+_0x2aa90b(0x1e2)+_0x2aa90b(0x195)+_0x2aa90b(0x18c)+_0x2aa90b(0x16a)+_0x2aa90b(0x1dd)+_0x2aa90b(0x19c)+_0x2aa90b(0x1a0)+'untime.c'+'hannel?.'+_0x2aa90b(0x147)+_0x2aa90b(0x145)+_0x2aa90b(0x15e)+_0x2aa90b(0x155)+_0x2aa90b(0x1c3)+'un)\x20retu'+_0x2aa90b(0x1a5)+_0x2aa90b(0x15f)+_0x2aa90b(0x164)+'nnelRunt'+'ime\x20=\x20wu'+'jieCreat'+_0x2aa90b(0x181)+_0x2aa90b(0x146)+');\x0a\x09\x09\x09co'+_0x2aa90b(0x1a3)+_0x2aa90b(0x14d)+_0x2aa90b(0x1b0)+_0x2aa90b(0x1b3)+_0x2aa90b(0x152)+_0x2aa90b(0x15d)+_0x2aa90b(0x158)+_0x2aa90b(0x1db)+'===\x20\x22obj'+_0x2aa90b(0x1ae)+_0x2aa90b(0x154)+'hannel\x20:'+'\x20{};\x0a\x09\x09\x09'+'runtime.'+_0x2aa90b(0x1db)+_0x2aa90b(0x1b4)+_0x2aa90b(0x17c)+_0x2aa90b(0x1b9)+'e,\x0a\x09\x09\x09\x09.'+_0x2aa90b(0x1b6)+_0x2aa90b(0x1ba)+_0x2aa90b(0x16c)+_0x2aa90b(0x1c0)+_0x2aa90b(0x1c9)+_0x2aa90b(0x1af)+_0x2aa90b(0x149)+_0x2aa90b(0x1e1)+_0x2aa90b(0x1bc)+_0x2aa90b(0x1cd)+_0x2aa90b(0x1b9)+_0x2aa90b(0x156)+_0x2aa90b(0x17b)+_0x2aa90b(0x14a)+_0x2aa90b(0x150)+'existing'+_0x2aa90b(0x149)+'inbound\x20'+'??\x20chann'+'elRuntim'+'e.inboun'+_0x2aa90b(0x1e3)+_0x2aa90b(0x160)+_0x2aa90b(0x1d7)+_0x2aa90b(0x165)+'n\x20??\x20exi'+_0x2aa90b(0x1d7)+_0x2aa90b(0x1bb)+'ound\x20??\x20'+_0x2aa90b(0x183)+_0x2aa90b(0x16e)+_0x2aa90b(0x17f)+_0x2aa90b(0x1d9)+'ntime.in'+'bound,\x0a\x09'+_0x2aa90b(0x19a)+_0x2aa90b(0x1a2)+'ngChanne'+'l.reply\x20'+_0x2aa90b(0x1cd)+_0x2aa90b(0x1b9)+'e.reply,'+'\x0a\x09\x09\x09\x09ses'+'sion:\x20ex'+_0x2aa90b(0x1c2)+_0x2aa90b(0x169)+_0x2aa90b(0x18b)+'\x20channel'+_0x2aa90b(0x1d2)+'session\x0a'+_0x2aa90b(0x148)+_0x2aa90b(0x1a9)+_0x2aa90b(0x1d0)+_0x2aa90b(0x177)+_0x2aa90b(0x170)+_0x2aa90b(0x151)+_0x2aa90b(0x1d6)+_0x2aa90b(0x18a)+'\x09\x09resolv'+_0x2aa90b(0x1b8)+_0x2aa90b(0x1c6)+_0x2aa90b(0x179)+_0x2aa90b(0x1ab)+_0x2aa90b(0x162)+_0x2aa90b(0x17e)+_0x2aa90b(0x1df)+'eatePlug'+'inRuntim'+'e()(opti'+(_0x2aa90b(0x16f)+_0x2aa90b(0x1bf)+_0x2aa90b(0x187)+_0x2aa90b(0x1a9)+_0x2aa90b(0x143)+_0x2aa90b(0x19f)+_0x2aa90b(0x15b));return{'patched':!![],'source':_0x31ba3a[_0x2aa90b(0x192)](_0x3c88ee,_0x3c88ee+'\x0a'+createRuntimeChannelImport(_0x4cf466))[_0x2aa90b(0x192)](_0x53a968,_0x3ba20a)};}function patchExistingChannelPluginRuntimeFromSource(_0x4a233d,_0x99ecfa){const _0x1c1837=_0x2764,{runtimeChannelImportPath:_0x48201f}=_0x99ecfa,_0x15f2bf='import\x20{'+_0x1c1837(0x18d)+_0x1c1837(0x188)+'om\x20\x22node'+':crypto\x22'+';';if(!_0x4a233d[_0x1c1837(0x1da)](_0x15f2bf))return{'patched':![],'reason':_0x1c1837(0x17d)+_0x1c1837(0x144)};const _0x8701a5=_0x1c1837(0x14c)+_0x1c1837(0x19e)+_0x1c1837(0x18f)+'null;',_0x902b78='\x09\x09const\x20'+'lazyRunt'+_0x1c1837(0x194)+'ctionKey'+_0x1c1837(0x1c8)+_0x1c1837(0x16b)+_0x1c1837(0x1a6)+_0x1c1837(0x1a4)+_0x1c1837(0x182)+_0x1c1837(0x1ac),_0x4e05bf=_0x4a233d[_0x1c1837(0x1b1)](_0x8701a5),_0x24ca72=_0x4a233d['indexOf'](_0x902b78,_0x4e05bf);if(_0x4e05bf===-0x1||_0x24ca72===-0x1)return{'patched':![],'reason':_0x1c1837(0x199)+'d'};const _0x2c0975=_0x1c1837(0x14c)+_0x1c1837(0x19e)+'ntime\x20=\x20'+'null;\x0a\x09\x09'+_0x1c1837(0x172)+_0x1c1837(0x179)+'eChannel'+_0x1c1837(0x162)+'elpers\x20='+'\x20(runtim'+'e)\x20=>\x20{\x0a'+'\x09\x09\x09if\x20(!'+_0x1c1837(0x198)+_0x1c1837(0x1e2)+_0x1c1837(0x195)+'e\x20!==\x20\x22o'+_0x1c1837(0x16a)+_0x1c1837(0x1dd)+_0x1c1837(0x19c)+_0x1c1837(0x1a0)+_0x1c1837(0x154)+_0x1c1837(0x153)+_0x1c1837(0x147)+_0x1c1837(0x145)+_0x1c1837(0x15e)+_0x1c1837(0x155)+_0x1c1837(0x1c3)+_0x1c1837(0x1dc)+_0x1c1837(0x1a5)+_0x1c1837(0x15f)+_0x1c1837(0x164)+_0x1c1837(0x166)+_0x1c1837(0x1ad)+'jieCreat'+_0x1c1837(0x181)+_0x1c1837(0x146)+_0x1c1837(0x1a7)+_0x1c1837(0x1a3)+_0x1c1837(0x14d)+_0x1c1837(0x1b0)+_0x1c1837(0x1b3)+_0x1c1837(0x152)+_0x1c1837(0x15d)+'runtime.'+_0x1c1837(0x1db)+'===\x20\x22obj'+_0x1c1837(0x1ae)+_0x1c1837(0x154)+_0x1c1837(0x19d)+_0x1c1837(0x1e0)+_0x1c1837(0x158)+_0x1c1837(0x1db)+_0x1c1837(0x1b4)+_0x1c1837(0x17c)+_0x1c1837(0x1b9)+_0x1c1837(0x190)+_0x1c1837(0x1b6)+_0x1c1837(0x1ba)+_0x1c1837(0x16c)+'untimeCo'+_0x1c1837(0x1c9)+'existing'+'Channel.'+_0x1c1837(0x1e1)+_0x1c1837(0x1bc)+_0x1c1837(0x1cd)+_0x1c1837(0x1b9)+'e.runtim'+_0x1c1837(0x17b)+_0x1c1837(0x14a)+_0x1c1837(0x150)+_0x1c1837(0x1af)+_0x1c1837(0x149)+_0x1c1837(0x1d8)+_0x1c1837(0x1cd)+_0x1c1837(0x1b9)+_0x1c1837(0x14b)+_0x1c1837(0x1e3)+_0x1c1837(0x160)+_0x1c1837(0x1d7)+_0x1c1837(0x165)+'n\x20??\x20exi'+_0x1c1837(0x1d7)+_0x1c1837(0x1bb)+_0x1c1837(0x185)+_0x1c1837(0x183)+'untime.t'+_0x1c1837(0x17f)+_0x1c1837(0x1d9)+_0x1c1837(0x1b7)+_0x1c1837(0x1d5)+_0x1c1837(0x19a)+':\x20existi'+_0x1c1837(0x1ba)+_0x1c1837(0x1e6)+_0x1c1837(0x1cd)+_0x1c1837(0x1b9)+'e.reply,'+_0x1c1837(0x1cf)+_0x1c1837(0x1e7)+_0x1c1837(0x1c2)+_0x1c1837(0x169)+_0x1c1837(0x18b)+_0x1c1837(0x1c4)+_0x1c1837(0x1d2)+'session\x0a'+_0x1c1837(0x148)+_0x1c1837(0x1a9)+_0x1c1837(0x1d0)+'\x0a\x09\x09};\x0a\x09\x09'+_0x1c1837(0x170)+'solveRun'+_0x1c1837(0x1d6)+')\x20=>\x20{\x0a\x09'+'\x09\x09resolv'+_0x1c1837(0x1b8)+_0x1c1837(0x1c6)+_0x1c1837(0x179)+_0x1c1837(0x1ab)+_0x1c1837(0x162)+'elpers(r'+_0x1c1837(0x1df)+_0x1c1837(0x1ce)+_0x1c1837(0x189)+_0x1c1837(0x1aa)+(_0x1c1837(0x16f)+'imeOptio'+_0x1c1837(0x187)+'\x09return\x20'+_0x1c1837(0x143)+_0x1c1837(0x19f)+_0x1c1837(0x197)),_0x1cf9eb=_0x4a233d['slice'](0x0,_0x4e05bf)+_0x2c0975+_0x4a233d['slice'](_0x24ca72);return{'patched':!![],'source':ensureRuntimeChannelImport(_0x1cf9eb,{'importMarker':_0x15f2bf,'runtimeChannelImportPath':_0x48201f})};}function createRuntimeChannelImport(_0x2c3f9a){const _0x3d965a=_0x2764;return'import\x20{'+_0x3d965a(0x193)+_0x3d965a(0x175)+'annel\x20as'+_0x3d965a(0x176)+_0x3d965a(0x14f)+_0x3d965a(0x1a1)+_0x3d965a(0x161)+_0x3d965a(0x186)+_0x2c3f9a+'\x22;';}function _0x2764(_0x619e8a,_0x510de9){_0x619e8a=_0x619e8a-0x143;const _0x50439b=_0x5043();let _0x2764da=_0x50439b[_0x619e8a];return _0x2764da;}function _0x5043(){const _0x13bbbc=['e()(opti','eChannel','YS);','ime\x20=\x20wu','ect\x22\x20?\x20r','existing','nel\x20=\x20ru','indexOf','3972921CsIZwq','ntime.ch','=\x20{\x0a\x09\x09\x09\x09','hannelIm','..existi','ntime.in','edRuntim','elRuntim','ngChanne','nnel.inb','ontexts\x20','wujieCre','ntime;\x0a\x09','imeOptio','untimeCo','\x09\x09\x09if\x20(!','istingCh','bound?.r','\x20channel','9977512VKEpTK','e\x20??=\x20en','1778LRNdhQ','Set\x20=\x20ne','ntexts:\x20','channel-','60CSAZIl','ateRunti','??\x20chann','eatePlug','\x0a\x09\x09\x09\x09ses','runtime;','eturn\x20re','Runtime.','()(optio','turn:\x20ex','bound,\x0a\x09','time\x20=\x20(','stingCha','inbound\x20','hannelRu','includes','channel\x20','un)\x20retu','return\x20r','9642QMZRMU','esolveCr','\x20{};\x0a\x09\x09\x09','runtimeC','||\x20typeo','d,\x0a\x09\x09\x09\x09t','solveCre','297068TdqjPa','l.reply\x20','sion:\x20ex','resolved','ot-found','n\x20&&\x20run','Channel(','turn?.ru','\x09\x09\x09};\x0a\x09\x09','Channel.','s,\x0a\x09\x09\x09\x09i','e.inboun','\x09\x09let\x20re','tingChan','nRuntime','eateRunt','nbound:\x20','solveRun','annel\x20&&','hannel?.','untime.c','nnel?.in','e.runtim','s);\x0a\x09\x09\x09r','runtime.','\x09\x09resolv','117777orgHXU','\x0a\x09\x09};','patched','\x20typeof\x20','time.cha','me;\x0a\x09\x09\x09c','urn:\x20exi','el\x20}\x20fro','RuntimeH','ded','onst\x20cha','nnel.tur','nnelRunt','34305950ZfMAIf','imePromi','annel.se','bject\x22)\x20','w\x20Set(LA','l,\x0a\x09\x09\x09\x09r','null;\x0a\x09\x09','untime.t','ons.runt','const\x20re','wujieCha','const\x20en',':crypto\x22','portPath','untimeCh','\x20wujieCr','\x0a\x09\x09};\x0a\x09\x09','ns.runti','sureWuji','import\x20{','eContext','...chann','import-n','elpers(r','urn\x20??\x20c','runtime-','eRuntime','CTION_KE','channelR','\x09};','ound\x20??\x20','m\x20\x22','ns));\x0a\x09\x09','ash\x20}\x20fr','inRuntim',')\x20=>\x20{\x0a\x09','ssion\x20??','e\x20!==\x20\x22o','\x20createH','\x20(runtim','ntime\x20=\x20','e,\x0a\x09\x09\x09\x09.','9aeufBi','replace','\x20createR','imeRefle','f\x20runtim','e)\x20=>\x20{\x0a','\x0a\x09\x09};\x0a','runtime\x20','not-foun','\x09\x09\x09reply','rn\x20??','untime;\x0a','hannel\x20:','solvedRu','Runtime;','\x09\x09\x09if\x20(r','imeChann',':\x20existi','nst\x20exis','ME_REFLE','rn\x20runti','ZY_RUNTI',');\x0a\x09\x09\x09co','2565414IIdWEF','\x09return\x20'];_0x5043=function(){return _0x13bbbc;};return _0x5043();}function hasRuntimeChannelImport(_0x315a03,_0x597ca8){const _0x50f5be=_0x2764;return _0x315a03[_0x50f5be(0x1da)](createRuntimeChannelImport(_0x597ca8));}function ensureRuntimeChannelImport(_0x217a74,{importMarker:_0x50f2bc,runtimeChannelImportPath:_0xde4ccb}){const _0x357cde=_0x2764,_0x20ced1=createRuntimeChannelImport(_0xde4ccb),_0x194607=/import \{ createRuntimeChannel as wujieCreateRuntimeChannel \} from "\.\/runtime-channel-[^"]+\.js";\n?/;if(_0x194607['test'](_0x217a74))return _0x217a74[_0x357cde(0x192)](_0x194607,_0x20ced1+'\x0a');return _0x217a74['replace'](_0x50f2bc,_0x50f2bc+'\x0a'+_0x20ced1);}
|
|
1
|
+
(function(_0x8e24b4,_0x491bdd){const _0x5b75a2=_0x5122,_0x42bbff=_0x8e24b4();while(!![]){try{const _0x1b37eb=-parseInt(_0x5b75a2(0x1dc))/0x1+-parseInt(_0x5b75a2(0x1d9))/0x2+parseInt(_0x5b75a2(0x1ba))/0x3+-parseInt(_0x5b75a2(0x1c6))/0x4*(parseInt(_0x5b75a2(0x181))/0x5)+-parseInt(_0x5b75a2(0x151))/0x6+parseInt(_0x5b75a2(0x140))/0x7+parseInt(_0x5b75a2(0x17e))/0x8*(parseInt(_0x5b75a2(0x162))/0x9);if(_0x1b37eb===_0x491bdd)break;else _0x42bbff['push'](_0x42bbff['shift']());}catch(_0x3d6b17){_0x42bbff['push'](_0x42bbff['shift']());}}}(_0x2647,0xa07e6));export function patchChannelPluginRuntimeFromSource(_0x4180a2,_0x5a26b1={}){const _0x3f06a2=_0x5122,_0x3deb75=_0x5a26b1[_0x3f06a2(0x1a3)+_0x3f06a2(0x19d)+'portPath'];if(!_0x3deb75)return{'patched':![],'reason':'runtime-'+'channel-'+_0x3f06a2(0x148)+'ot-provi'+_0x3f06a2(0x194)};if(_0x4180a2[_0x3f06a2(0x184)](_0x3f06a2(0x153)+_0x3f06a2(0x1a6)+_0x3f06a2(0x198)+'l')){if(_0x4180a2[_0x3f06a2(0x184)](_0x3f06a2(0x18d)+_0x3f06a2(0x15f)+'annel.tu'+_0x3f06a2(0x1aa))&&hasRuntimeChannelImport(_0x4180a2,_0x3deb75))return{'patched':![],'reason':_0x3f06a2(0x1d0)+_0x3f06a2(0x1c9)};return patchExistingChannelPluginRuntimeFromSource(_0x4180a2,{'runtimeChannelImportPath':_0x3deb75});}if(_0x4180a2[_0x3f06a2(0x184)]('wujieCha'+'nnelRunt'+_0x3f06a2(0x1d2)+'se'))return patchExistingChannelPluginRuntimeFromSource(_0x4180a2,{'runtimeChannelImportPath':_0x3deb75});const _0x59d03e=_0x3f06a2(0x14e)+'solvedRu'+_0x3f06a2(0x1bf)+'null;\x0a\x09\x09'+'const\x20re'+'solveRun'+_0x3f06a2(0x1d8)+')\x20=>\x20{\x0a\x09'+_0x3f06a2(0x1a4)+_0x3f06a2(0x19b)+'e\x20??=\x20re'+_0x3f06a2(0x1b7)+_0x3f06a2(0x1c5)+_0x3f06a2(0x1dd)+_0x3f06a2(0x199)+_0x3f06a2(0x17c)+_0x3f06a2(0x1db)+_0x3f06a2(0x197)+_0x3f06a2(0x1da)+_0x3f06a2(0x1a7)+'ntime;\x0a\x09'+'\x09};';if(!_0x4180a2[_0x3f06a2(0x184)](_0x59d03e))return{'patched':![],'reason':_0x3f06a2(0x169)+'d'};const _0x59e0e6='import\x20{'+_0x3f06a2(0x161)+_0x3f06a2(0x187)+'om\x20\x22node'+_0x3f06a2(0x1de)+';';if(!_0x4180a2[_0x3f06a2(0x184)](_0x59e0e6))return{'patched':![],'reason':_0x3f06a2(0x148)+'ot-found'};const _0x568716=_0x3f06a2(0x14e)+_0x3f06a2(0x1a7)+_0x3f06a2(0x1bf)+_0x3f06a2(0x1c7)+'const\x20en'+_0x3f06a2(0x1be)+_0x3f06a2(0x16a)+'RuntimeH'+_0x3f06a2(0x172)+'\x20(runtim'+'e)\x20=>\x20{\x0a'+_0x3f06a2(0x188)+_0x3f06a2(0x167)+_0x3f06a2(0x1ad)+_0x3f06a2(0x19e)+'e\x20!==\x20\x22o'+_0x3f06a2(0x150)+_0x3f06a2(0x15d)+_0x3f06a2(0x1c8)+_0x3f06a2(0x14a)+'untime.c'+'hannel?.'+'turn?.ru'+'n\x20&&\x20run'+_0x3f06a2(0x1e0)+_0x3f06a2(0x1ab)+_0x3f06a2(0x16f)+_0x3f06a2(0x1c3)+_0x3f06a2(0x163)+_0x3f06a2(0x14f)+_0x3f06a2(0x1cb)+_0x3f06a2(0x1a2)+_0x3f06a2(0x152)+'jieCreat'+_0x3f06a2(0x16c)+'Channel('+_0x3f06a2(0x1b0)+_0x3f06a2(0x173)+_0x3f06a2(0x19f)+_0x3f06a2(0x17f)+_0x3f06a2(0x1b5)+_0x3f06a2(0x193)+_0x3f06a2(0x191)+_0x3f06a2(0x1c0)+'channel\x20'+_0x3f06a2(0x1cd)+_0x3f06a2(0x1b2)+_0x3f06a2(0x170)+'hannel\x20:'+_0x3f06a2(0x18f)+_0x3f06a2(0x1c0)+_0x3f06a2(0x175)+_0x3f06a2(0x171)+'...chann'+_0x3f06a2(0x1df)+_0x3f06a2(0x156)+'..existi'+_0x3f06a2(0x16d)+'l,\x0a\x09\x09\x09\x09r'+_0x3f06a2(0x168)+_0x3f06a2(0x164)+_0x3f06a2(0x1cc)+_0x3f06a2(0x16e)+_0x3f06a2(0x1a3)+'ontexts\x20'+_0x3f06a2(0x141)+_0x3f06a2(0x1df)+_0x3f06a2(0x14d)+'eContext'+_0x3f06a2(0x1b1)+_0x3f06a2(0x179)+'existing'+_0x3f06a2(0x16e)+_0x3f06a2(0x1ae)+_0x3f06a2(0x141)+'elRuntim'+_0x3f06a2(0x192)+_0x3f06a2(0x1af)+'urn:\x20exi'+_0x3f06a2(0x174)+_0x3f06a2(0x17a)+_0x3f06a2(0x154)+_0x3f06a2(0x174)+_0x3f06a2(0x18e)+_0x3f06a2(0x149)+_0x3f06a2(0x15b)+_0x3f06a2(0x158)+'urn\x20??\x20c'+'hannelRu'+_0x3f06a2(0x155)+_0x3f06a2(0x159)+_0x3f06a2(0x1a9)+_0x3f06a2(0x146)+'ngChanne'+'l.reply\x20'+_0x3f06a2(0x141)+'elRuntim'+_0x3f06a2(0x182)+'\x0a\x09\x09\x09\x09ses'+'sion:\x20ex'+_0x3f06a2(0x15f)+_0x3f06a2(0x15e)+_0x3f06a2(0x1b4)+_0x3f06a2(0x178)+_0x3f06a2(0x1d6)+_0x3f06a2(0x186)+_0x3f06a2(0x143)+_0x3f06a2(0x145)+'runtime;'+_0x3f06a2(0x1d1)+'const\x20re'+'solveRun'+_0x3f06a2(0x1d8)+_0x3f06a2(0x189)+_0x3f06a2(0x1a4)+'edRuntim'+_0x3f06a2(0x1e1)+_0x3f06a2(0x1be)+'eChannel'+_0x3f06a2(0x1a8)+_0x3f06a2(0x1a5)+_0x3f06a2(0x17b)+_0x3f06a2(0x165)+_0x3f06a2(0x180)+_0x3f06a2(0x19a)+(_0x3f06a2(0x1b9)+'imeOptio'+_0x3f06a2(0x17d)+'\x09return\x20'+'resolved'+_0x3f06a2(0x1bd)+'\x0a\x09\x09};');return{'patched':!![],'source':_0x4180a2[_0x3f06a2(0x1b8)](_0x59e0e6,_0x59e0e6+'\x0a'+createRuntimeChannelImport(_0x3deb75))[_0x3f06a2(0x1b8)](_0x59d03e,_0x568716)};}function patchExistingChannelPluginRuntimeFromSource(_0x1770f9,_0x667c){const _0x4ad992=_0x5122,{runtimeChannelImportPath:_0xee7034}=_0x667c,_0x19d524=_0x4ad992(0x1d7)+_0x4ad992(0x161)+_0x4ad992(0x187)+_0x4ad992(0x147)+_0x4ad992(0x1de)+';';if(!_0x1770f9[_0x4ad992(0x184)](_0x19d524))return{'patched':![],'reason':_0x4ad992(0x148)+_0x4ad992(0x1cf)};const _0x3c7598=_0x4ad992(0x14e)+'solvedRu'+_0x4ad992(0x1bf)+_0x4ad992(0x1c1),_0x2706f9=_0x4ad992(0x1b6)+_0x4ad992(0x15a)+_0x4ad992(0x176)+_0x4ad992(0x18a)+_0x4ad992(0x18b)+_0x4ad992(0x142)+_0x4ad992(0x177)+'ME_REFLE'+_0x4ad992(0x14b)+_0x4ad992(0x1d3),_0x41265b=_0x1770f9[_0x4ad992(0x1d4)](_0x3c7598),_0xde6fee=_0x1770f9[_0x4ad992(0x1d4)](_0x2706f9,_0x41265b);if(_0x41265b===-0x1||_0xde6fee===-0x1)return{'patched':![],'reason':_0x4ad992(0x169)+'d'};const _0x58805d=_0x4ad992(0x14e)+_0x4ad992(0x1a7)+'ntime\x20=\x20'+_0x4ad992(0x1c7)+'const\x20en'+_0x4ad992(0x1be)+_0x4ad992(0x16a)+_0x4ad992(0x1a8)+'elpers\x20='+_0x4ad992(0x183)+'e)\x20=>\x20{\x0a'+_0x4ad992(0x188)+_0x4ad992(0x167)+_0x4ad992(0x1ad)+_0x4ad992(0x19e)+'e\x20!==\x20\x22o'+'bject\x22)\x20'+_0x4ad992(0x15d)+'untime;\x0a'+_0x4ad992(0x14a)+_0x4ad992(0x170)+_0x4ad992(0x1c4)+'turn?.ru'+_0x4ad992(0x185)+_0x4ad992(0x1e0)+'nnel?.in'+_0x4ad992(0x16f)+_0x4ad992(0x1c3)+_0x4ad992(0x163)+'me;\x0a\x09\x09\x09c'+_0x4ad992(0x1cb)+_0x4ad992(0x1a2)+_0x4ad992(0x152)+'jieCreat'+_0x4ad992(0x16c)+'Channel('+_0x4ad992(0x1b0)+_0x4ad992(0x173)+'tingChan'+_0x4ad992(0x17f)+_0x4ad992(0x1b5)+'annel\x20&&'+_0x4ad992(0x191)+_0x4ad992(0x1c0)+_0x4ad992(0x175)+_0x4ad992(0x1cd)+'ect\x22\x20?\x20r'+_0x4ad992(0x170)+'hannel\x20:'+_0x4ad992(0x18f)+_0x4ad992(0x1c0)+_0x4ad992(0x175)+_0x4ad992(0x171)+_0x4ad992(0x1a0)+_0x4ad992(0x1df)+_0x4ad992(0x156)+'..existi'+_0x4ad992(0x16d)+_0x4ad992(0x16b)+_0x4ad992(0x168)+_0x4ad992(0x164)+'existing'+_0x4ad992(0x16e)+_0x4ad992(0x1a3)+_0x4ad992(0x18c)+_0x4ad992(0x141)+_0x4ad992(0x1df)+_0x4ad992(0x14d)+_0x4ad992(0x1ac)+_0x4ad992(0x1b1)+'nbound:\x20'+_0x4ad992(0x1cc)+'Channel.'+_0x4ad992(0x1ae)+_0x4ad992(0x141)+_0x4ad992(0x1df)+_0x4ad992(0x192)+_0x4ad992(0x1af)+_0x4ad992(0x1bb)+_0x4ad992(0x174)+_0x4ad992(0x17a)+'n\x20??\x20exi'+_0x4ad992(0x174)+_0x4ad992(0x18e)+'ound\x20??\x20'+_0x4ad992(0x15b)+_0x4ad992(0x158)+_0x4ad992(0x19c)+'hannelRu'+_0x4ad992(0x155)+_0x4ad992(0x159)+_0x4ad992(0x1a9)+_0x4ad992(0x146)+'ngChanne'+_0x4ad992(0x1b3)+_0x4ad992(0x141)+_0x4ad992(0x1df)+_0x4ad992(0x182)+_0x4ad992(0x157)+_0x4ad992(0x1ca)+_0x4ad992(0x15f)+_0x4ad992(0x15e)+_0x4ad992(0x1b4)+_0x4ad992(0x178)+_0x4ad992(0x1d6)+_0x4ad992(0x186)+_0x4ad992(0x143)+_0x4ad992(0x145)+_0x4ad992(0x14c)+_0x4ad992(0x1d1)+_0x4ad992(0x144)+'solveRun'+_0x4ad992(0x1d8)+_0x4ad992(0x189)+_0x4ad992(0x1a4)+_0x4ad992(0x19b)+'e\x20??=\x20en'+'sureWuji'+_0x4ad992(0x16a)+_0x4ad992(0x1a8)+_0x4ad992(0x1a5)+'esolveCr'+'eatePlug'+_0x4ad992(0x180)+_0x4ad992(0x19a)+('ons.runt'+_0x4ad992(0x15c)+'ns));\x0a\x09\x09'+_0x4ad992(0x145)+_0x4ad992(0x1a1)+_0x4ad992(0x1bd)+_0x4ad992(0x1bc)),_0x54a858=_0x1770f9[_0x4ad992(0x190)](0x0,_0x41265b)+_0x58805d+_0x1770f9[_0x4ad992(0x190)](_0xde6fee);return{'patched':!![],'source':ensureRuntimeChannelImport(_0x54a858,{'importMarker':_0x19d524,'runtimeChannelImportPath':_0xee7034})};}function createRuntimeChannelImport(_0x5061b5){const _0x79c9de=_0x5122;return _0x79c9de(0x1d7)+_0x79c9de(0x1ce)+_0x79c9de(0x196)+_0x79c9de(0x160)+_0x79c9de(0x1c2)+'eateRunt'+_0x79c9de(0x166)+_0x79c9de(0x1d5)+'m\x20\x22'+_0x5061b5+'\x22;';}function _0x5122(_0x5d1c12,_0x4695af){_0x5d1c12=_0x5d1c12-0x140;const _0x264714=_0x2647();let _0x5122e9=_0x264714[_0x5d1c12];return _0x5122e9;}function hasRuntimeChannelImport(_0x29e942,_0x35c8b5){const _0x1d7a4d=_0x5122;return _0x29e942[_0x1d7a4d(0x184)](createRuntimeChannelImport(_0x35c8b5));}function ensureRuntimeChannelImport(_0x502f29,{importMarker:_0x5e5f96,runtimeChannelImportPath:_0xd2f11e}){const _0x4688df=_0x5122,_0x11f8c6=createRuntimeChannelImport(_0xd2f11e),_0x4fc430=/import \{ createRuntimeChannel as wujieCreateRuntimeChannel \} from "\.\/runtime-channel-[^"]+\.js";\n?/;if(_0x4fc430[_0x4688df(0x195)](_0x502f29))return _0x502f29['replace'](_0x4fc430,_0x11f8c6+'\x0a');return _0x502f29[_0x4688df(0x1b8)](_0x5e5f96,_0x5e5f96+'\x0a'+_0x11f8c6);}function _0x2647(){const _0x21b3ca=['ns));\x0a\x09\x09','280qyuKTa','nel\x20=\x20ru','inRuntim','185fyPPuA','e.reply,','\x20(runtim','includes','n\x20&&\x20run','session\x0a','ash\x20}\x20fr','\x09\x09\x09if\x20(!',')\x20=>\x20{\x0a\x09','ctionKey','Set\x20=\x20ne','ontexts\x20','turn:\x20ex','nnel.inb','\x20{};\x0a\x09\x09\x09','slice','\x20typeof\x20','e.inboun','annel\x20&&','ded','test','untimeCh','s);\x0a\x09\x09\x09r','meChanne','()(optio','e()(opti','edRuntim','urn\x20??\x20c','hannelIm','f\x20runtim','tingChan','...chann','resolved','nnelRunt','runtimeC','\x09\x09resolv','elpers(r','ateRunti','solvedRu','RuntimeH','\x09\x09\x09reply','rn\x20??','nnel?.in','eContext','||\x20typeo','inbound\x20','d,\x0a\x09\x09\x09\x09t',');\x0a\x09\x09\x09co','s,\x0a\x09\x09\x09\x09i','ect\x22\x20?\x20r','l.reply\x20','ssion\x20??','ntime.ch','\x09\x09const\x20','solveCre','replace','ons.runt','2530983JBAOza','urn:\x20exi','\x0a\x09\x09};\x0a','Runtime;','sureWuji','ntime\x20=\x20','runtime.','null;','\x20wujieCr','un)\x20retu','hannel?.','atePlugi','118316uuqAVi','null;\x0a\x09\x09','untime;\x0a','patched','sion:\x20ex','onst\x20cha','existing','===\x20\x22obj','\x20createR','ot-found','already-','\x0a\x09\x09};\x0a\x09\x09','imePromi','YS);','indexOf','el\x20}\x20fro','Runtime.','import\x20{','time\x20=\x20(','717426YEDuEO','eturn\x20re','meOption','228525kYxkPM','nRuntime',':crypto\x22','elRuntim','time.cha','e\x20??=\x20en','5675978TOUzAg','??\x20chann','w\x20Set(LA','\x09\x09\x09};\x0a\x09\x09','const\x20re','\x09return\x20',':\x20existi','om\x20\x22node','import-n','ound\x20??\x20','\x09\x09\x09if\x20(r','CTION_KE','runtime;','e.runtim','\x09\x09let\x20re','me;\x0a\x09\x09\x09c','bject\x22)\x20','1770942WTjQoo','ime\x20=\x20wu','wujieCre','n\x20??\x20exi','ntime.in','e,\x0a\x09\x09\x09\x09.','\x0a\x09\x09\x09\x09ses','untime.t','bound,\x0a\x09','lazyRunt','channelR','imeOptio','return\x20r','annel.se','istingCh','annel\x20as','\x20createH','251919RWjNku','rn\x20runti','ntexts:\x20','eatePlug','imeChann','runtime\x20','untimeCo','not-foun','eChannel','l,\x0a\x09\x09\x09\x09r','eRuntime','ngChanne','Channel.','bound?.r','untime.c','=\x20{\x0a\x09\x09\x09\x09','elpers\x20=','nst\x20exis','stingCha','channel\x20','imeRefle','ZY_RUNTI','\x20channel','nbound:\x20','nnel.tur','esolveCr','ns.runti'];_0x2647=function(){return _0x21b3ca;};return _0x2647();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3814c8,_0x4af066){const _0x61b96f=_0x30fb,_0x52e517=_0x3814c8();while(!![]){try{const _0x453783=-parseInt(_0x61b96f(0xc2))/0x1+parseInt(_0x61b96f(0xb7))/0x2*(-parseInt(_0x61b96f(0x9b))/0x3)+parseInt(_0x61b96f(0xab))/0x4+parseInt(_0x61b96f(0xe3))/0x5*(-parseInt(_0x61b96f(0xb5))/0x6)+-parseInt(_0x61b96f(0xbe))/0x7*(-parseInt(_0x61b96f(0x9d))/0x8)+parseInt(_0x61b96f(0xb9))/0x9*(-parseInt(_0x61b96f(0xd1))/0xa)+parseInt(_0x61b96f(0xf1))/0xb*(parseInt(_0x61b96f(0xa9))/0xc);if(_0x453783===_0x4af066)break;else _0x52e517['push'](_0x52e517['shift']());}catch(_0x302ebd){_0x52e517['push'](_0x52e517['shift']());}}}(_0x2ea1,0x66a2c));function _0x2ea1(){const _0x347c4e=['ext\x20===\x20','true\x0a\x09}\x20','already-','d.push(b','lay(entr','ected\x20=\x20','\x09}\x20else\x20','y\x20=\x20bloc','11145iqVARF','ctiveTag','pe);\x0a\x09})','\x09\x09\x09text:','(entry.t','nst\x20entr','ed.text\x0a','indexOf','hanged:\x20','\x20!==\x20\x22ob','not-foun','t,\x20maxCh','lineDire','\x20false;\x0a','660473wEUgPZ','\x22string\x22','eChatHis','\x20entry.t','\x09if\x20(!bl','rn\x20hasTe','ars)\x20{\x0a\x09','e((block',')\x20{\x0a\x09\x09if','\x0a\x09\x09\x09proj','15ARnTYM','\x09}\x0a\x09retu','20712YTLfKJ','xChars);',')\x20=>\x20{\x0a\x09',');\x0a\x09\x09\x09co','t(conten','sh({\x0a\x09\x09\x09','\x09\x09}\x0a\x09\x09co','function','\x22text\x22\x20&','y.text).','ue;\x0a\x09\x09\x09c','jected.p','132lqPHEh','substrin','3002364QqmayH','ypeof\x20bl','replace','ected.pu','patched',')\x20return','ock\x20||\x20t','ype\x20===\x20','\x20&&\x20entr','if\x20(!con','822TFSIgi','\x20(const\x20','137128aMzAzE','ted,\x0a\x09\x09c','108JUmywK','[];\x0a\x09for','tTextFro','(stripIn','y.text.t','525OvONep','let\x20hasT','text\x22,\x0a\x09',':\x20null;\x0a','346738BlkaoE','\x20content','\x20||\x20type','\x09\x09\x09});\x0a\x09','\x09content','ncated\x20=','ext\x20=\x20tr','nst\x20proj','lock)','text,\x20ma','\x20project','sForDisp','\x20isToolH','mMixedTo','sh(block','158260TAVNRp','\x22object\x22','tent.som','{\x0a\x09\x09\x09pro','istoryBl','olConten','\x20(!block',':\x20projec','\x20truncat','ush(bloc'];_0x2ea1=function(){return _0x347c4e;};return _0x2ea1();}function _0x30fb(_0x441fd6,_0x2793b4){_0x441fd6=_0x441fd6-0x99;const _0x2ea19c=_0x2ea1();let _0x30fb30=_0x2ea19c[_0x441fd6];return _0x30fb30;}export function patchMixedToolContentFromSource(_0x8dfe56){const _0x538265=_0x30fb,_0x3be2d4=_0x538265(0xa4)+'\x20project'+'Assistan'+_0x538265(0xbb)+_0x538265(0xcf)+_0x538265(0xd6)+'t',_0x4184d3=_0x8dfe56[_0x538265(0xea)](_0x3be2d4);if(_0x4184d3===-0x1)return{'patched':![],'reason':_0x538265(0xed)+'d'};let _0x131c14=0x0,_0x47cace=![],_0x26acc9=_0x4184d3;for(let _0x59f96b=_0x4184d3;_0x59f96b<_0x8dfe56['length'];_0x59f96b+=0x1){_0x8dfe56[_0x59f96b]==='{'&&(_0x131c14+=0x1,_0x47cace=!![]);_0x8dfe56[_0x59f96b]==='}'&&(_0x131c14-=0x1);if(_0x47cace&&_0x131c14===0x0){_0x26acc9=_0x59f96b+0x1;break;}}const _0x4f13dc=_0x8dfe56[_0x538265(0xaa)+'g'](_0x4184d3,_0x26acc9);if(_0x4f13dc['includes']('projecte'+_0x538265(0xde)+_0x538265(0xca)))return{'patched':![],'reason':_0x538265(0xdd)+_0x538265(0xaf)};const _0x182a7c=_0x538265(0xa4)+_0x538265(0xcc)+'Assistan'+_0x538265(0xbb)+'mMixedTo'+'olConten'+_0x538265(0xa1)+_0x538265(0xee)+_0x538265(0xf7)+_0x538265(0xb4)+_0x538265(0xd3)+_0x538265(0xf8)+_0x538265(0x9f)+_0x538265(0xf5)+_0x538265(0xb1)+_0x538265(0xac)+'ock\x20!==\x20'+_0x538265(0xd2)+_0x538265(0xb0)+_0x538265(0xf0)+'\x09\x09return'+_0x538265(0xce)+_0x538265(0xd5)+'ockType('+'block.ty'+_0x538265(0xe5)+_0x538265(0xb0)+'\x20null;\x0a\x09'+_0x538265(0xbf)+'ext\x20=\x20fa'+'lse;\x0a\x09co'+_0x538265(0xc9)+_0x538265(0xe0)+_0x538265(0xba)+_0x538265(0xb6)+'block\x20of'+_0x538265(0xc3)+_0x538265(0x99)+_0x538265(0xd7)+_0x538265(0xc4)+'of\x20block'+_0x538265(0xec)+'ject\x22)\x20{'+_0x538265(0x9a)+_0x538265(0xae)+_0x538265(0xd0)+_0x538265(0xa0)+'ntinue;\x0a'+_0x538265(0xa3)+_0x538265(0xe8)+_0x538265(0xe2)+'k;\x0a\x09\x09if\x20'+_0x538265(0xe7)+_0x538265(0xb2)+_0x538265(0xa5)+'&\x20typeof'+_0x538265(0xf4)+_0x538265(0xdb)+_0x538265(0xf2)+_0x538265(0xb3)+_0x538265(0xbd)+'rim())\x20{'+'\x0a\x09\x09\x09hasT'+_0x538265(0xc8)+_0x538265(0xa7)+'onst\x20tru'+_0x538265(0xc7)+_0x538265(0xd9)+_0x538265(0xf3)+'toryText'+_0x538265(0xbc)+_0x538265(0xef)+_0x538265(0xe4)+_0x538265(0xcd)+_0x538265(0xdf)+_0x538265(0xa6)+_0x538265(0xcb)+_0x538265(0x9e)+'\x0a\x09\x09\x09proj'+_0x538265(0xae)+_0x538265(0xa2)+'\x09type:\x20\x22'+_0x538265(0xc0)+_0x538265(0xe6)+_0x538265(0xd9)+_0x538265(0xe9)+_0x538265(0xc5)+_0x538265(0xe1)+_0x538265(0xd4)+_0x538265(0xa8)+_0x538265(0xda)+'k);\x0a\x09\x09}\x0a'+_0x538265(0x9c)+_0x538265(0xf6)+'xt\x20?\x20{\x0a\x09'+_0x538265(0xc6)+_0x538265(0xd8)+_0x538265(0xb8)+_0x538265(0xeb)+_0x538265(0xdc)+_0x538265(0xc1)+'}';return{'patched':!![],'source':_0x8dfe56[_0x538265(0xad)](_0x4f13dc,_0x182a7c)};}
|