apt-mcp-agent-setup 3.5.12 → 3.5.14
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/bin/cli.js +1 -1
- package/build-input.json +1306 -0
- package/bundle/NOTICES.md +0 -0
- package/bundle/core.enc +0 -0
- package/bundle/mcp-rules.enc +0 -0
- package/bundle/skills-aso.enc +0 -0
- package/bundle/skills-ba.enc +0 -0
- package/bundle/skills-base.enc +0 -0
- package/bundle/skills-be.enc +0 -0
- package/bundle/skills-design.enc +0 -0
- package/bundle/skills-fe.enc +0 -0
- package/bundle/skills-marketing.enc +0 -0
- package/bundle/skills-mobile.enc +0 -0
- package/bundle/skills-pm.enc +0 -0
- package/docs/technical-sources.md +6 -0
- package/integrity-manifest.json +141 -127
- package/package.json +1 -1
- package/release-check.js +15 -6
- package/src/backends/browser-tools.js +1 -1
- package/src/backends/index-cache-authority.js +1 -0
- package/src/backends/index-command.js +1 -1
- package/src/backends/index-maintenance.js +1 -0
- package/src/backends/index-store.js +1 -1
- package/src/backends/profiles.js +1 -1
- package/src/core/admission-fence.js +1 -1
- package/src/core/aso-import.js +1 -1
- package/src/core/backend-lease-recovery.js +1 -0
- package/src/core/caller-context.js +1 -1
- package/src/core/catalog.js +1 -1
- package/src/core/claude-caller-authority.js +1 -1
- package/src/core/claude-invocation.js +1 -1
- package/src/core/claude-native.js +1 -1
- package/src/core/claude-plan.js +1 -1
- package/src/core/claude-transcript-scan.js +1 -0
- package/src/core/claude-worker-transcript.js +1 -1
- package/src/core/codex-host-metadata.js +1 -1
- package/src/core/codex-transcript-receipt.js +1 -1
- package/src/core/connection-inspector.js +1 -0
- package/src/core/context-metrics.js +1 -1
- package/src/core/doctor.js +1 -1
- package/src/core/draining-completion.js +1 -1
- package/src/core/execution.js +1 -1
- package/src/core/git-context.js +1 -1
- package/src/core/hook-bridge.js +1 -1
- package/src/core/host-adapters.js +1 -1
- package/src/core/interrupted-operation-audit.js +1 -0
- package/src/core/ipc-envelope.js +1 -1
- package/src/core/legacy-retirement-proof.js +1 -0
- package/src/core/memory-scope.js +1 -1
- package/src/core/memory-store.js +1 -1
- package/src/core/model-inventory.js +1 -1
- package/src/core/model-routing.js +1 -1
- package/src/core/native-dispatch.js +1 -1
- package/src/core/native-receipt.js +1 -0
- package/src/core/node-version.js +1 -1
- package/src/core/npm-cli.js +1 -1
- package/src/core/owned-command-child.js +1 -1
- package/src/core/owned-command.js +1 -1
- package/src/core/owned-lock.js +1 -1
- package/src/core/owned-process.js +1 -1
- package/src/core/pipeline-journal.js +1 -0
- package/src/core/presentations.js +1 -1
- package/src/core/quality-artifacts.js +1 -1
- package/src/core/quality.js +1 -1
- package/src/core/read-command.js +1 -1
- package/src/core/readonly-skill.js +1 -1
- package/src/core/recovery-archive.js +1 -0
- package/src/core/resource-transaction.js +1 -1
- package/src/core/run-checkpoint.js +1 -1
- package/src/core/run-compatibility.js +1 -1
- package/src/core/runtime-authority.js +1 -1
- package/src/core/runtime-info.js +1 -1
- package/src/core/runtime-ownership.js +1 -1
- package/src/core/session.js +1 -1
- package/src/core/skill-companions.js +1 -1
- package/src/core/skill-names.js +1 -1
- package/src/core/storage-retry.js +1 -1
- package/src/core/tool-contracts.js +1 -1
- package/src/core/update-control.js +1 -1
- package/src/core/upgrade-runs.js +1 -1
- package/src/core/upgrade-stop.js +1 -1
- package/src/core/windows-job.js +1 -1
- package/src/core/windows-legacy-query.ps1 +277 -0
- package/src/core/workspace-generation.js +1 -1
- package/src/core/workspace-path.js +1 -1
- package/src/installer/bounded-command.js +1 -1
- package/src/installer/candidate-preflight.js +1 -1
- package/src/installer/connection-activation.js +1 -1
- package/src/installer/connection-supervisor.js +1 -1
- package/src/installer/deployment-draft.js +1 -1
- package/src/installer/gateway-context.js +1 -1
- package/src/installer/gateway-migration.js +1 -1
- package/src/installer/gateway-runtime.js +1 -1
- package/src/installer/global-setup.js +1 -1
- package/src/installer/hook-context-client.js +1 -1
- package/src/installer/host-hooks.js +1 -1
- package/src/installer/index-recovery.js +1 -1
- package/src/installer/interrupted-operation-recovery.js +1 -0
- package/src/installer/legacy-registration.js +1 -1
- package/src/installer/managed-config.js +1 -1
- package/src/installer/migration-scope.js +1 -1
- package/src/installer/platform-config.js +1 -1
- package/src/installer/prerequisites.js +1 -1
- package/src/installer/presentations.js +1 -1
- package/src/installer/project-outcome.js +1 -1
- package/src/installer/project-setup.js +1 -1
- package/src/installer/registration-closure.js +1 -1
- package/src/installer/registration-plan.js +1 -1
- package/src/installer/registration-receipt.js +1 -1
- package/src/installer/registrations.js +1 -1
- package/src/installer/runtime-activation.js +1 -1
- package/src/installer/runtime-child.js +1 -1
- package/src/installer/runtime-cleanup.js +1 -1
- package/src/installer/runtime-lock.js +1 -1
- package/src/installer/runtime-store.js +1 -1
- package/src/installer/runtime-supervisor.js +1 -1
- package/src/installer/setup-wizard.js +1 -1
- package/src/installer/update-addons.js +1 -1
- package/src/installer/update-cleanup.js +1 -1
- package/src/installer/update-executor.js +1 -1
- package/src/installer/update-history.js +1 -0
- package/src/installer/update-registration.js +1 -1
- package/src/installer/update-request.js +1 -1
- package/src/installer/update-scope.js +1 -1
- package/src/installer/workspace-registry.js +1 -1
- package/src/installer/workspace-transaction.js +1 -1
- package/src/installer/workspace-update.js +1 -1
- package/src/license/crypto.js +1 -1
- package/src/license/fingerprint.js +1 -1
- package/src/license/terms.js +1 -1
- package/src/license/verify.js +1 -1
- package/src/presets/index.js +1 -1
- package/src/proxy/backends.js +1 -1
- package/src/proxy/browser-sessions.js +1 -1
- package/src/proxy/core-tools.js +1 -1
- package/src/proxy/pipeline.js +1 -1
- package/src/proxy/public-catalog.js +1 -1
- package/src/proxy/router.config.js +1 -1
- package/src/proxy/router.js +1 -1
- package/src/proxy/server.js +1 -1
- package/src/proxy/workspace-gateway.js +1 -1
package/src/core/upgrade-runs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x555405=_0x17bc;function _0x1cbf(){const _0x1d8143=['oduXnda4wKjxwKTQ','mZi2AK9uBe1r','lI93B3jRC3bHy2uTCgf0Aa','y29TCgXLDgvK','ota0nte2mLfxver5tG','zxbVy2G','lI4VChjVEhKVCgLWzwXPBMu','y29Kzq','uLvox1DpuKTtuefdrv9vtLzfuKLgsuve','y2fUy2vSrM9YvxbNCMfKzq','y2fUy2vSBgvK','DgfYz2v0vMvYC2LVBG','zMXHDe1HCa','C3vJy2vZCW','zNjVEMvU','DgfYz2v0','C25HChnOB3rvCgDYywrLuNvUCW','mteXotm2n2TesKLktG','odq0nJqXowvpwg5ltG','BM9KztPWyxrO','lI9Hzg1PC3nPB24TzMvUy2u','ofLYvurtDG','ntCWyNf1zM5I','zgLNzxn0','mtm3mZffyuHzC2O','CNvUswq','DhjHBNnHy3rPB25jza','mZK2mZu2mg5xCuDgAa','DgfZAW','zxHWB3j0CW','Cgf0Aa','ndu2mtHwsffLtM0','Aw5JBhvKzxm','BwfW','ChvZAa','C3rHDgvsB290','D29YA3nWywnL','C29Tzq','qurnsvntsu9ox0nptKzmsunu'];_0x1cbf=function(){return _0x1d8143;};return _0x1cbf();}(function(_0x440ee4,_0x512a71){const _0x399896=_0x17bc,_0x393223=_0x440ee4();while(!![]){try{const _0xe8e0cf=parseInt(_0x399896(0x1f8))/0x1+-parseInt(_0x399896(0x1e8))/0x2*(-parseInt(_0x399896(0x1ff))/0x3)+-parseInt(_0x399896(0x1e7))/0x4+-parseInt(_0x399896(0x1fd))/0x5*(-parseInt(_0x399896(0x206))/0x6)+-parseInt(_0x399896(0x1eb))/0x7+parseInt(_0x399896(0x1fc))/0x8*(-parseInt(_0x399896(0x1f9))/0x9)+parseInt(_0x399896(0x202))/0xa;if(_0xe8e0cf===_0x512a71)break;else _0x393223['push'](_0x393223['shift']());}catch(_0x4ebb42){_0x393223['push'](_0x393223['shift']());}}}(_0x1cbf,0xa73cf));const fs=require('node:fs'),path=require(_0x555405(0x1fa)),{readFence}=require(_0x555405(0x1fb)),{workspaceRunRoots,readWorkspaceRuns}=require('./run-compatibility'),{sameWorkspace}=require(_0x555405(0x1e9)),fail=_0x53cfd1=>{throw Object['assign'](new Error(_0x53cfd1),{'code':_0x53cfd1});},terminal=_0x389edc=>[_0x555405(0x1ea),_0x555405(0x1f1)][_0x555405(0x207)](_0x389edc['status']);function _0x17bc(_0x464f11,_0x32d545){_0x464f11=_0x464f11-0x1e2;const _0x1cbf10=_0x1cbf();let _0x17bc65=_0x1cbf10[_0x464f11];if(_0x17bc['SWUreI']===undefined){var _0xd34c92=function(_0x38dee9){const _0x5da8ea='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3d86df='',_0x3b7c9a='';for(let _0x252cdf=0x0,_0x23d1a6,_0x8a0df5,_0x3dfd32=0x0;_0x8a0df5=_0x38dee9['charAt'](_0x3dfd32++);~_0x8a0df5&&(_0x23d1a6=_0x252cdf%0x4?_0x23d1a6*0x40+_0x8a0df5:_0x8a0df5,_0x252cdf++%0x4)?_0x3d86df+=String['fromCharCode'](0xff&_0x23d1a6>>(-0x2*_0x252cdf&0x6)):0x0){_0x8a0df5=_0x5da8ea['indexOf'](_0x8a0df5);}for(let _0x53cfd1=0x0,_0x389edc=_0x3d86df['length'];_0x53cfd1<_0x389edc;_0x53cfd1++){_0x3b7c9a+='%'+('00'+_0x3d86df['charCodeAt'](_0x53cfd1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3b7c9a);};_0x17bc['uVnnEv']=_0xd34c92,_0x17bc['bJMKJa']={},_0x17bc['SWUreI']=!![];}const _0x2d8502=_0x1cbf10[0x0],_0x3ba03d=_0x464f11+_0x2d8502,_0x552aee=_0x17bc['bJMKJa'][_0x3ba03d];return!_0x552aee?(_0x17bc65=_0x17bc['uVnnEv'](_0x17bc65),_0x17bc['bJMKJa'][_0x3ba03d]=_0x17bc65):_0x17bc65=_0x552aee,_0x17bc65;}function snapshotUpgradeRuns(_0x15a288,_0x355677={}){const _0x1b831b=_0x555405;return workspaceRunRoots(_0x15a288)[_0x1b831b(0x1f3)](_0x675a59=>readWorkspaceRuns(_0x15a288,[_0x675a59],_0x355677)['filter'](_0x5a855c=>!terminal(_0x5a855c))[_0x1b831b(0x208)](_0x408366=>{const _0x154dbb=_0x1b831b;if(!_0x408366[_0x154dbb(0x1e4)]?.['path']||!sameWorkspace(_0x408366[_0x154dbb(0x1e4)][_0x154dbb(0x205)],_0x15a288))fail(_0x154dbb(0x1ef));const _0x3a4c71={};return _0x3a4c71[_0x154dbb(0x203)]=_0x408366['task'],_0x3a4c71[_0x154dbb(0x200)]=_0x408366[_0x154dbb(0x200)],_0x3a4c71['stateRoot']=_0x675a59,_0x3a4c71;}));}function cancelUpgradeRuns(_0x130ab8,_0x22436b){const _0x50e84d=_0x555405,_0x27ec29=readFence(_0x130ab8);if(_0x27ec29['state']!==_0x50e84d(0x1f5)||_0x27ec29['transactionId']!==_0x22436b['transactionId']||_0x27ec29['epoch']!==_0x22436b['epoch']||_0x27ec29[_0x50e84d(0x1f2)]!==_0x22436b[_0x50e84d(0x1f6)]['version']||_0x27ec29['targetDigest']!==_0x22436b['target'][_0x50e84d(0x1fe)])fail(_0x50e84d(0x1e6));const _0x120260=workspaceRunRoots(_0x130ab8),{PipelineManager:_0x4bc394}=require(_0x50e84d(0x1ed)),_0x258946={};_0x258946['migrate']=![];const _0x3eeb02=new _0x4bc394(_0x130ab8,_0x258946),_0x2aeecf=[];for(const _0x19203a of _0x22436b['runs']){if(!_0x120260[_0x50e84d(0x1e5)](_0x396a51=>sameWorkspace(_0x396a51,_0x19203a[_0x50e84d(0x1e3)])))fail(_0x50e84d(0x1ef));_0x3eeb02[_0x50e84d(0x1e3)]=_0x19203a[_0x50e84d(0x1e3)];const _0x3df0f6={..._0x19203a};_0x3df0f6[_0x50e84d(0x201)]=_0x22436b[_0x50e84d(0x201)],_0x3df0f6[_0x50e84d(0x1ec)]=_0x22436b['epoch'],_0x3df0f6[_0x50e84d(0x1f6)]=_0x22436b[_0x50e84d(0x1f6)];const _0x141ad2=_0x3eeb02[_0x50e84d(0x1f0)](_0x3df0f6);if(!_0x141ad2[_0x50e84d(0x1f4)])fail(_0x141ad2[_0x50e84d(0x1ee)]);const _0x21c987={};_0x21c987[_0x50e84d(0x203)]=_0x19203a[_0x50e84d(0x203)],_0x21c987[_0x50e84d(0x200)]=_0x19203a[_0x50e84d(0x200)];if(_0x141ad2['cancellation']?.['transactionId']===_0x22436b[_0x50e84d(0x201)])_0x2aeecf[_0x50e84d(0x1e2)](_0x21c987);}const _0x3d99f1={};return _0x3d99f1[_0x50e84d(0x1f1)]=_0x2aeecf,_0x3d99f1;}const _0x3dfd32={};_0x3dfd32[_0x555405(0x1f7)]=snapshotUpgradeRuns,_0x3dfd32['cancelUpgradeRuns']=cancelUpgradeRuns,module[_0x555405(0x204)]=_0x3dfd32;
|
|
1
|
+
'use strict';const _0x2ee29b=_0x4369;function _0x3fa1(){const _0x5509d6=['lI9YDw4Ty2HLy2TWB2LUDa','yxnZAwDU','zMLSDgvY','BM9KztPWyxrO','CNvUCW','D29YA2vYu3rHDhvZ','Ag9ZDfDVCMTLCKLK','DMvYAwzPy2f0Aw9Usw5gBgLNAhq','zgLNzxn0','DgfYz2v0rgLNzxn0','BgvNywn5uMvXDwvZDejVDw5K','x2v4zwn1DgLVBG','y29TCgXLDgvK','CgfYzw50u2vZC2LVBKLK','CgfYC2u','t1rirvjFt1DorvjtseLqx1vovKvssuzjruq','Dg9ju09tDhjPBMC','C29Tzq','y2fUy2vSBgvK','zxHWB3j0CW','mJiXnJG1Dg9zsgTb','DxbNCMfKzvn0B3bZ','AM9PBG','uLvox09xtKvsu0Hjuf9vtLzfuKLgsuve','lI9UyxrPDMuTCMvJzwLWDa','CgvUzgLUzW','q09puKrjtKfut1jFu1rpuf9nqvjlrvjFvu5wrvjjrKLfra','y29VCMrPBMf0B3i','lMPZB24','C3rYAw5N','BwvTyMvYCW','lI9ZzxnZAw9U','y29Kzq','BgvUz3rO','C2vW','y29UzMLYBwvK','zxHLy3v0Aw9U','BwfW','mtuYndb6zhvNwNq','D29YA3nWywnL','uLvox1DpuKTtuefdrv9vtLzfuKLgsuve','AxntywzLsw50zwDLCG','DgfYz2v0','C2L6zq','DMvYAwzPzwqTBgvNywn5lwnVB3jKAw5HDg9YlwnOzwnRCg9PBNq','C3rHDgvsB290','zMXHDe1HCa','CMvSzwfZzwq','yxr0zw1WDeLK','odKWmtLktuz3wgK','ChvZAa','CM9VDhm','DMfSDwvZ','y2fUy2vSrM9YvxbNCMfKzq','odC5nvv1sxvyuW','z2vUzxjHDgLVBG','D3jPDgvtDgf0zq','q09puKrjtKfut1jFsurftLrjvfLFvu5wrvjjrKLfra','zxHLy3v0Aw9Uu3rHDhvZ','CNvUsw5ZCgvJDgLVBK9WDgLVBNm','C3rHDgu','DgfZAW','zNvUy3rPB24','q09otKvdveLptL9jrevoveLuwv9vtLzfuKLgsuve','oti3otyWEuDYzKXO','q09puKrjtKfut1jFuLvox05pvf9gt1vora','yxv0AgvUDgLJyxrLzc1SAxzLlxbYB2nLC3m','BMf0AxzLu2vZC2LVBKLK','Agv4','ugLWzwXPBMvnyw5Hz2vY','zxzLBNrZlMPZB25S','yMXVy2TLCNm','CMvSzwfZzu5HDgL2zvDVCMTLCKzVCLvWz3jHzgu','C2HHmJu2','mtG5n2rTBuznzW','CMvHzezPBgvtEw5J','y3jLyxrLsgfZAa','C2fMzs1IB3vUzgfYEq','D2L0AefKBwLZC2LVBKXVy2S','y29UBMvJDgLVBKLK','lI9Hzg1PC3nPB24TzMvUy2u','zxbVy2G','A2LUza','q09puKrjtKfut1jFu1rbvevFq0HbtKDfra','ywn0AxzL','y2fUy2vSvxbNCMfKzvj1BNm','C25HChnOB3rvCgDYywrLuNvUCW','v09ss0vsx1nut1bFvu5dt05gsvjnruq','yxr0zw1WDhm','C3rYAw5NAwz5','C2nOzw1HvMvYC2LVBG','q09puKrjtKfut1jFufjpt0zFvu5bvvriru5usunbveve','y2HPBgrqAwq','CMvSzwfZzuv4ywn0','AgfZ','CMvJzwLWDe9IC2vYDMf0Aw9UCW','vvbhuKferv9btKnit1jFuKvrvuLsruq','lI93B3jRC3bHy2uTCgf0Aa','DgvZDa','Aw5JBhvKzxm','A2v5CW','C3vJy2vZCW','zxzPzgvUy2u','DhjHBNnHy3rPB25jza','y2fUy2vSBgf0Aw9U','CMvJzwLWDfnOyti1nG','Cgf0Aa','BwvZC2fNzq','DxbKyxrL','qurnsvntsu9ox0nptKzmsunu','D29YA2vY','nJa0mtrhuLHzrxu','y29KzxHiB21L','zNjVEMvU','B3DUzxjZAgLWq2HLy2S','t1bfuKfusu9ox09xtKvsu0Hjuf9jtL9gteLhsfq','DMvYAwzPzwq','BwvTyMvYu2HHmJu2','y29UBMvJDgLVBNm','DMvYC2LVBG','mtu5nLjjsezsrq','q09otKvdveLptL9trvrFq0HbtKDfra','C2vZC2LVBG','q09puKrjtKfut1jFufjpt0zFqu1csuDvt1vt','ntq0mdu2nNnIu25WCW','q09puKrjtKfut1jFu1rbvevFqu1csuDvt1vt','BM9KztPMCW','DgfYz2v0vMvYC2LVBG','BM9KztPJCNLWDg8','C3rHDhvZ','CMvZB3vYy2veAwDLC3q','q09otKvdveLptL9jrevoveLuwv9dsefor0ve','CMvSzwfZzuLKBgvdB29YzgLUyxrVCKzVCLvWz3jHzgu','ChjLDMLLDW','lI4VChjVEhKVCgLWzwXPBMu','CMvJB25JAwXLvxbNCMfKzvDVCMTLCNm','Dw5YzxnVBhzLza','AxnbCNjHEq','CMvHBhbHDgHtEw5J','C3vWzxj2AxnVCLbPza','C2vZC2LVBKLK','zNjLC2G','t1DorvjtseLqx1jfq0Hfq0TFrKfjteve','CMvZB2X2zq','zMLUza','AwrLBNrPDhLqCM9VzNm','q29VCMrPBMf0B3iGC3rVCcbLDMLKzw5JzsbJAgfUz2vK','BwLNCMf0zq','y2f0ywXVz0HHC2G','C3rVChbLza','C3vWzxj2AxnVCLbYB2nLC3ntDgfYDa','Aw5PDgLHBgL6Aw5N','y2HPBgrqCM9JzxnZu3rHCNq','ndbgugzkyxK','q09puKrjtKfut1jFufjpt0zFq09orKXjq1q','CNvUswq','zhjHAw5PBMC','zgLZCgf0y2HtzxnZAw9Uswq','ywn0B3jjza'];_0x3fa1=function(){return _0x5509d6;};return _0x3fa1();}(function(_0x26e916,_0x19da27){const _0x18fc7d=_0x4369,_0x4f5367=_0x26e916();while(!![]){try{const _0x36396c=parseInt(_0x18fc7d(0x16e))/0x1*(parseInt(_0x18fc7d(0x198))/0x2)+parseInt(_0x18fc7d(0x1b2))/0x3+-parseInt(_0x18fc7d(0x177))/0x4*(-parseInt(_0x18fc7d(0x1d4))/0x5)+-parseInt(_0x18fc7d(0x17b))/0x6+parseInt(_0x18fc7d(0x1e8))/0x7*(-parseInt(_0x18fc7d(0x1c4))/0x8)+-parseInt(_0x18fc7d(0x1cf))/0x9+parseInt(_0x18fc7d(0x1de))/0xa;if(_0x36396c===_0x19da27)break;else _0x4f5367['push'](_0x4f5367['shift']());}catch(_0x42b8c1){_0x4f5367['push'](_0x4f5367['shift']());}}}(_0x3fa1,0x9d341));const fs=require(_0x2ee29b(0x17d)),path=require(_0x2ee29b(0x1a1)),crypto=require(_0x2ee29b(0x17f)),{readFence}=require(_0x2ee29b(0x1ee)),{workspaceRunRoots,readWorkspaceRuns}=require('./run-compatibility'),{sameWorkspace}=require(_0x2ee29b(0x1ff)),fail=_0x42803c=>{const _0x4808f7=_0x2ee29b;throw Object[_0x4808f7(0x19f)](new Error(_0x42803c),{'code':_0x42803c});},terminal=_0x15d8f2=>[_0x2ee29b(0x1aa),_0x2ee29b(0x1b0)][_0x2ee29b(0x201)](_0x15d8f2[_0x2ee29b(0x180)]);function snapshotUpgradeRuns(_0xb8c042,_0x2e8be3={}){const _0x5f429c=_0x2ee29b;return workspaceRunRoots(_0xb8c042)[_0x5f429c(0x1cc)](_0x2faccb=>readWorkspaceRuns(_0xb8c042,[_0x2faccb],_0x2e8be3)[_0x5f429c(0x1a0)](_0x1a859c=>!terminal(_0x1a859c))['map'](_0x2074cf=>{const _0x276988=_0x5f429c;if(!_0x2074cf[_0x276988(0x1c5)]?.['path']||!sameWorkspace(_0x2074cf[_0x276988(0x1c5)]['path'],_0xb8c042))fail(_0x276988(0x1c6));const _0x46e3a0={};return _0x46e3a0['task']=_0x2074cf[_0x276988(0x1db)],_0x46e3a0['runId']=_0x2074cf[_0x276988(0x19a)],_0x46e3a0[_0x276988(0x1cb)]=_0x2faccb,_0x46e3a0;}));}function _0x4369(_0x523202,_0x3fd931){_0x523202=_0x523202-0x16d;const _0x3fa1e9=_0x3fa1();let _0x4369f5=_0x3fa1e9[_0x523202];if(_0x4369['XeCrGF']===undefined){var _0x5a8c1f=function(_0x15a40f){const _0x27d1c3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x36ed9f='',_0x664262='';for(let _0x3a3a23=0x0,_0x1760e4,_0x1640ba,_0xabe080=0x0;_0x1640ba=_0x15a40f['charAt'](_0xabe080++);~_0x1640ba&&(_0x1760e4=_0x3a3a23%0x4?_0x1760e4*0x40+_0x1640ba:_0x1640ba,_0x3a3a23++%0x4)?_0x36ed9f+=String['fromCharCode'](0xff&_0x1760e4>>(-0x2*_0x3a3a23&0x6)):0x0){_0x1640ba=_0x27d1c3['indexOf'](_0x1640ba);}for(let _0x2e2e42=0x0,_0x4a0a44=_0x36ed9f['length'];_0x2e2e42<_0x4a0a44;_0x2e2e42++){_0x664262+='%'+('00'+_0x36ed9f['charCodeAt'](_0x2e2e42)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x664262);};_0x4369['vSaJsj']=_0x5a8c1f,_0x4369['VoRwpK']={},_0x4369['XeCrGF']=!![];}const _0x232bfd=_0x3fa1e9[0x0],_0x733f9e=_0x523202+_0x232bfd,_0x2ddf76=_0x4369['VoRwpK'][_0x733f9e];return!_0x2ddf76?(_0x4369f5=_0x4369['vSaJsj'](_0x4369f5),_0x4369['VoRwpK'][_0x733f9e]=_0x4369f5):_0x4369f5=_0x2ddf76,_0x4369f5;}function cancelUpgradeRuns(_0x81ed29,_0x3caa15){const _0x40f101=_0x2ee29b,_0x3a01dd=readFence(_0x81ed29);if(_0x3a01dd[_0x40f101(0x1da)]!==_0x40f101(0x170)||_0x3a01dd['transactionId']!==_0x3caa15['transactionId']||_0x3a01dd[_0x40f101(0x1ef)]!==_0x3caa15[_0x40f101(0x1ef)]||_0x3a01dd[_0x40f101(0x17e)]!==_0x3caa15[_0x40f101(0x1c8)][_0x40f101(0x176)]||_0x3a01dd[_0x40f101(0x1a7)]!==_0x3caa15[_0x40f101(0x1c8)]['digest'])fail(_0x40f101(0x20b));const _0xd73c4b=workspaceRunRoots(_0x81ed29),{PipelineManager:_0x109c78}=require(_0x40f101(0x185)),_0x10aec3={};_0x10aec3[_0x40f101(0x192)]=![];const _0x1b2186=new _0x109c78(_0x81ed29,_0x10aec3),_0x50f6e4=[];for(const _0x1ddc6c of _0x3caa15['runs']){if(!_0xd73c4b[_0x40f101(0x1af)](_0xdebfea=>sameWorkspace(_0xdebfea,_0x1ddc6c['stateRoot'])))fail(_0x40f101(0x1c6));_0x1b2186[_0x40f101(0x1cb)]=_0x1ddc6c[_0x40f101(0x1cb)];const _0xabe76a={..._0x1ddc6c};_0xabe76a[_0x40f101(0x205)]=_0x3caa15[_0x40f101(0x205)],_0xabe76a[_0x40f101(0x1ef)]=_0x3caa15['epoch'],_0xabe76a[_0x40f101(0x1c8)]=_0x3caa15['target'];const _0x52cda6=_0x1b2186[_0x40f101(0x1d3)](_0xabe76a);if(!_0x52cda6[_0x40f101(0x203)])fail(_0x52cda6[_0x40f101(0x1be)]);const _0x22e4bb={};_0x22e4bb[_0x40f101(0x1db)]=_0x1ddc6c[_0x40f101(0x1db)],_0x22e4bb[_0x40f101(0x19a)]=_0x1ddc6c[_0x40f101(0x19a)];if(_0x52cda6[_0x40f101(0x206)]?.[_0x40f101(0x205)]===_0x3caa15[_0x40f101(0x205)])_0x50f6e4[_0x40f101(0x1d0)](_0x22e4bb);}const _0x2762a5={};return _0x2762a5[_0x40f101(0x1b0)]=_0x50f6e4,_0x2762a5;}async function reconcileUpgradeWorkers(_0x351ad0,_0x248205={}){const _0xb0bc83=_0x2ee29b,{PipelineManager:_0x599a9b}=require(_0xb0bc83(0x185)),{SessionRuntime:_0x2c5355}=require(_0xb0bc83(0x1bd)),{resolveNativeReceipt:_0x155a3e}=require(_0xb0bc83(0x1b6)),_0xe32fdb={};_0xe32fdb[_0xb0bc83(0x192)]=![];const _0x3cef3d=new _0x599a9b(_0x351ad0,_0xe32fdb),_0x1fa029=new _0x2c5355(_0x351ad0),_0x1ddf76={};_0x1ddf76['observations']=[],_0x1ddf76[_0xb0bc83(0x1cd)]=[],_0x1ddf76[_0xb0bc83(0x187)]=[];const _0x132d20=_0x1ddf76;for(const _0x1f2fb6 of workspaceRunRoots(_0x351ad0)){_0x3cef3d[_0xb0bc83(0x1cb)]=_0x1f2fb6;for(const _0x23de21 of readWorkspaceRuns(_0x351ad0,[_0x1f2fb6],_0x248205)['filter'](_0x307c81=>!terminal(_0x307c81))){if(_0x23de21['schemaVersion']!==0x3)continue;for(const _0x185b28 of _0x23de21[_0xb0bc83(0x1c2)]?.[_0xb0bc83(0x1f2)]||[]){if(_0x185b28['actorId']===_0xb0bc83(0x1b9))continue;const _0x38739d={};_0x38739d[_0xb0bc83(0x1db)]=_0x23de21[_0xb0bc83(0x1db)],_0x38739d[_0xb0bc83(0x19a)]=_0x23de21[_0xb0bc83(0x19a)],_0x38739d['sessionId']=_0x23de21['coordinator'],_0x38739d['actorId']=_0x185b28[_0xb0bc83(0x19d)],_0x38739d[_0xb0bc83(0x1ce)]=_0x185b28[_0xb0bc83(0x1ce)];const _0xbb097d=_0x38739d,_0x162113={..._0xbb097d};_0x162113[_0xb0bc83(0x1cb)]=_0x1f2fb6,_0x162113[_0xb0bc83(0x19c)]=_0x185b28[_0xb0bc83(0x18b)]||null;const _0x5c53c7=_0x162113;let _0x20c240;try{const _0x500d4e={};_0x500d4e['manager']=_0x3cef3d,_0x500d4e[_0xb0bc83(0x179)]=_0x1fa029,_0x500d4e['args']=_0xbb097d,_0x500d4e['codexHome']=_0x248205[_0xb0bc83(0x16f)],_0x500d4e['preview']=_0x248205['preview']===!![],_0x500d4e[_0xb0bc83(0x18c)]=!![],_0x20c240=await _0x155a3e(_0x500d4e);}catch(_0x33ea7a){const _0x2ac0fb={};_0x2ac0fb[_0xb0bc83(0x180)]=_0xb0bc83(0x1b7),_0x2ac0fb[_0xb0bc83(0x1be)]=_0x33ea7a[_0xb0bc83(0x1be)]||'NATIVE_BINDING_PENDING',_0x2ac0fb['detail']=_0x33ea7a[_0xb0bc83(0x209)],_0x20c240=_0x2ac0fb;}const _0xeb3797={..._0x5c53c7};_0xeb3797['status']=_0x20c240[_0xb0bc83(0x180)],_0xeb3797[_0xb0bc83(0x1be)]=_0x20c240[_0xb0bc83(0x1be)]||null,_0xeb3797[_0xb0bc83(0x1e1)]=_0x20c240[_0xb0bc83(0x1ab)]||null,_0xeb3797['hostWorkerId']=_0x20c240[_0xb0bc83(0x1a4)]||null,_0x132d20['observations'][_0xb0bc83(0x1d0)](_0xeb3797);if(_0x20c240[_0xb0bc83(0x180)]!==_0xb0bc83(0x173)){const _0x4e441d={..._0x5c53c7};_0x4e441d[_0xb0bc83(0x1be)]=_0x20c240[_0xb0bc83(0x1be)]||_0xb0bc83(0x1f5),_0x132d20[_0xb0bc83(0x187)]['push'](_0x4e441d);continue;}if(_0x248205[_0xb0bc83(0x184)]===!![])continue;const _0x27e15d=_0x3cef3d[_0xb0bc83(0x1e6)](_0xbb097d,_0x20c240),_0x19165c={..._0x5c53c7};_0x19165c['nativeSessionId']=_0x20c240[_0xb0bc83(0x1ab)],_0x19165c[_0xb0bc83(0x1a4)]=_0x20c240[_0xb0bc83(0x1a4)];if(_0x27e15d[_0xb0bc83(0x203)])_0x132d20['released'][_0xb0bc83(0x1d0)](_0x19165c);else _0x132d20[_0xb0bc83(0x187)][_0xb0bc83(0x1d0)]({..._0x5c53c7,'code':_0x27e15d[_0xb0bc83(0x1be)]});}}}return _0x132d20;}function releaseIdleCoordinatorForUpgrade(_0xbb5dcc,_0xc7962f,_0x4ff719,_0x1c295a={}){const _0x1cbb97=_0x2ee29b,_0x454967={};_0x454967['success']=![],_0x454967[_0x1cbb97(0x1be)]=_0x1cbb97(0x1fe);if(!_0xc7962f?.[_0x1cbb97(0x205)]||!Number[_0x1cbb97(0x1c7)](_0xc7962f['epoch'])||!_0xc7962f[_0x1cbb97(0x176)]||!_0xc7962f['digest'])return _0x454967;const _0x440891=require(_0x1cbb97(0x1ee)),_0x4e6981=_0x1c295a[_0x1cbb97(0x1d1)]||workspaceRunRoots(_0xbb5dcc),_0x4892a1=Array[_0x1cbb97(0x188)](_0x4ff719)?_0x4ff719:[],_0x2bb87c={};_0x2bb87c['success']=![],_0x2bb87c[_0x1cbb97(0x1be)]='COORDINATOR_PROOF_MISSING';if(!_0x4892a1[_0x1cbb97(0x1bf)])return _0x2bb87c;const _0x1500e4=_0x4892a1[_0x1cbb97(0x1c3)](_0x80a3c5=>Array[_0x1cbb97(0x188)](_0x80a3c5?.[_0x1cbb97(0x1e5)])?_0x80a3c5['blockers']:[]),_0x12a86b=_0x1c295a['resumeOnly']===!![];let _0x1e2126=_0x1500e4['flatMap'](_0x35b6f1=>_0x35b6f1[_0x1cbb97(0x1a0)](_0x4ca0cc=>_0x4ca0cc&&_0x4ca0cc[_0x1cbb97(0x1f0)]===_0x1cbb97(0x16d)));if(_0x12a86b){const _0x2fee7a={};_0x2fee7a['success']=![],_0x2fee7a[_0x1cbb97(0x1be)]=_0x1cbb97(0x17a);if(_0x4892a1[_0x1cbb97(0x1af)](_0x3bf0c9=>_0x3bf0c9[_0x1cbb97(0x180)]!==_0x1cbb97(0x1eb)||!Array[_0x1cbb97(0x188)](_0x3bf0c9[_0x1cbb97(0x1e5)])||_0x3bf0c9['blockers'][_0x1cbb97(0x1bf)]))return _0x2fee7a;let _0x4f05ab;try{_0x4f05ab=readWorkspaceRuns(_0xbb5dcc,_0x4e6981,_0x1c295a[_0x1cbb97(0x1d9)]||{})[_0x1cbb97(0x1cc)](_0x34f76f=>Object['entries'](_0x34f76f[_0x1cbb97(0x1c2)]?.[_0x1cbb97(0x1b3)]||{})[_0x1cbb97(0x1a0)](([,_0x46244f])=>_0x46244f[_0x1cbb97(0x205)]===_0xc7962f[_0x1cbb97(0x205)]&&_0x46244f['epoch']===_0xc7962f[_0x1cbb97(0x1ef)]&&_0x46244f[_0x1cbb97(0x17e)]===_0xc7962f['version']&&_0x46244f[_0x1cbb97(0x1a7)]===_0xc7962f[_0x1cbb97(0x1a6)]&&JSON[_0x1cbb97(0x1f7)](_0x46244f[_0x1cbb97(0x190)])===JSON[_0x1cbb97(0x1f7)](_0x1c295a['identityProofs']))[_0x1cbb97(0x1c3)](([_0x3cf367])=>({'kind':_0x1cbb97(0x16d),'task':_0x34f76f['task'],'runId':_0x34f76f[_0x1cbb97(0x19a)],'attemptId':_0x3cf367})));}catch(_0x29e804){const _0x330cf8={};return _0x330cf8[_0x1cbb97(0x203)]=![],_0x330cf8[_0x1cbb97(0x1be)]=_0x29e804['code']||'RUN_OWNERSHIP_UNVERIFIED',_0x330cf8;}const _0x1c622f={};_0x1c622f[_0x1cbb97(0x203)]=![],_0x1c622f[_0x1cbb97(0x1be)]=_0x1cbb97(0x1b8);if(_0x4f05ab[_0x1cbb97(0x1bf)]!==0x1)return _0x1c622f;_0x1e2126=_0x4892a1[_0x1cbb97(0x1c3)](()=>_0x4f05ab[0x0]);}const _0x31453b={};_0x31453b['success']=![],_0x31453b[_0x1cbb97(0x1be)]=_0x1cbb97(0x17a);if(_0x1e2126[_0x1cbb97(0x1bf)]!==_0x4892a1[_0x1cbb97(0x1bf)]||_0x1e2126[_0x1cbb97(0x1af)](_0x4346fc=>!_0x4346fc['task']||!_0x4346fc[_0x1cbb97(0x19a)]||!_0x4346fc[_0x1cbb97(0x1ce)]||Object[_0x1cbb97(0x202)](_0x4346fc)['some'](_0x96afa9=>![_0x1cbb97(0x1f0),_0x1cbb97(0x1db),_0x1cbb97(0x19a),_0x1cbb97(0x1ce)][_0x1cbb97(0x201)](_0x96afa9))))return _0x31453b;const _0x159962=_0x1e2126[0x0],_0x12a68a={};_0x12a68a[_0x1cbb97(0x203)]=![],_0x12a68a['code']=_0x1cbb97(0x199);if(_0x1e2126[_0x1cbb97(0x1af)](_0x38bb75=>_0x38bb75[_0x1cbb97(0x1db)]!==_0x159962['task']||_0x38bb75[_0x1cbb97(0x19a)]!==_0x159962[_0x1cbb97(0x19a)]||_0x38bb75['attemptId']!==_0x159962[_0x1cbb97(0x1ce)]))return _0x12a68a;const _0x1b4d2c={};_0x1b4d2c['success']=![],_0x1b4d2c[_0x1cbb97(0x1be)]=_0x1cbb97(0x1f9);if(_0x4ff719[_0x1cbb97(0x1af)](_0x596434=>_0x596434[_0x1cbb97(0x204)]!==_0x1cbb97(0x1e0)||!Number[_0x1cbb97(0x1c7)](_0x596434[_0x1cbb97(0x18a)])||!Number[_0x1cbb97(0x1c7)](_0x596434[_0x1cbb97(0x1fa)])||!(_0x596434[_0x1cbb97(0x205)]===_0xc7962f[_0x1cbb97(0x205)]&&_0x596434['epoch']===_0xc7962f[_0x1cbb97(0x1ef)]&&_0x596434[_0x1cbb97(0x17e)]===_0xc7962f[_0x1cbb97(0x176)]&&_0x596434[_0x1cbb97(0x1a7)]===_0xc7962f[_0x1cbb97(0x1a6)]||_0x596434[_0x1cbb97(0x1a8)]===!![])))return _0x1b4d2c;const _0x329409=_0x1c295a[_0x1cbb97(0x190)]||[],_0x32450f={};_0x32450f[_0x1cbb97(0x203)]=![],_0x32450f[_0x1cbb97(0x1be)]=_0x1cbb97(0x1d7);if(_0x329409[_0x1cbb97(0x1bf)]!==_0x4892a1[_0x1cbb97(0x1bf)]||_0x329409['some'](_0x1507bb=>!_0x1507bb?.[_0x1cbb97(0x1ed)]||!Number[_0x1cbb97(0x1c7)](_0x1507bb[_0x1cbb97(0x18a)])||!Number[_0x1cbb97(0x1c7)](_0x1507bb[_0x1cbb97(0x1fa)])||typeof _0x1507bb[_0x1cbb97(0x195)]!==_0x1cbb97(0x1bb)||!_0x1507bb['supervisorProcessStart']||typeof _0x1507bb['childProcessStart']!==_0x1cbb97(0x1bb)||!_0x1507bb['childProcessStart']||!/^[a-f0-9]{64}$/['test'](_0x1507bb[_0x1cbb97(0x207)]||'')||!/^[a-f0-9]{64}$/[_0x1cbb97(0x200)](_0x1507bb['memberSha256']||'')))return _0x32450f;const _0x110e92=new Set(_0x329409[_0x1cbb97(0x1c3)](_0x554744=>_0x554744[_0x1cbb97(0x1ed)])),_0x1a2ed6=new Set(_0x4892a1[_0x1cbb97(0x1c3)](_0x19b341=>_0x19b341['connectionId'])),_0x5dc737={};_0x5dc737[_0x1cbb97(0x203)]=![],_0x5dc737['code']=_0x1cbb97(0x1d7);if(_0x110e92[_0x1cbb97(0x1c9)]!==_0x4892a1[_0x1cbb97(0x1bf)]||[..._0x110e92]['some'](_0x28f401=>!_0x1a2ed6[_0x1cbb97(0x1fc)](_0x28f401)))return _0x5dc737;const _0xa302fe={};_0xa302fe['success']=![],_0xa302fe[_0x1cbb97(0x1be)]='OTHER_OWNERSHIP_UNVERIFIED';if(_0x1c295a['localOwnership']?.[_0x1cbb97(0x1af)](_0x447c92=>_0x447c92[_0x1cbb97(0x1f0)]!=='worker'))return _0xa302fe;let _0x27b3bd;try{_0x27b3bd=readWorkspaceRuns(_0xbb5dcc,_0x4e6981,_0x1c295a[_0x1cbb97(0x1d9)]||{});}catch(_0x3fecd0){const _0x3d7d40={};return _0x3d7d40['success']=![],_0x3d7d40[_0x1cbb97(0x1be)]=_0x3fecd0[_0x1cbb97(0x1be)]||_0x1cbb97(0x1b5),_0x3d7d40;}const _0x385b79=_0x27b3bd[_0x1cbb97(0x1cc)](_0x2847c3=>[_0x1cbb97(0x1f2),'paused',_0x1cbb97(0x196)][_0x1cbb97(0x201)](_0x2847c3?.[_0x1cbb97(0x180)])?[{'state':_0x2847c3,'attempts':_0x2847c3[_0x1cbb97(0x1c2)]?.['active']||[]}]:[]),_0x503ded=_0x385b79[_0x1cbb97(0x1cc)](_0xe54891=>_0xe54891[_0x1cbb97(0x1f6)][_0x1cbb97(0x1a0)](_0x3dc81a=>_0x3dc81a[_0x1cbb97(0x1ce)]===_0x159962[_0x1cbb97(0x1ce)])[_0x1cbb97(0x1c3)](_0x108540=>({'attempt':_0x108540,'state':_0xe54891[_0x1cbb97(0x1da)]}))),_0x235f44=_0x12a86b&&_0x385b79['filter'](_0x5495e4=>_0x5495e4[_0x1cbb97(0x1da)]['task']===_0x159962['task']&&_0x5495e4[_0x1cbb97(0x1da)][_0x1cbb97(0x19a)]===_0x159962[_0x1cbb97(0x19a)]),_0x1ab114={};_0x1ab114[_0x1cbb97(0x203)]=![],_0x1ab114[_0x1cbb97(0x1be)]=_0x1cbb97(0x17c);if(!_0x12a86b&&(_0x503ded['length']!==0x1||_0x503ded[0x0][_0x1cbb97(0x1da)][_0x1cbb97(0x1db)]!==_0x159962[_0x1cbb97(0x1db)]||_0x503ded[0x0][_0x1cbb97(0x1da)][_0x1cbb97(0x19a)]!==_0x159962['runId'])||_0x12a86b&&(_0x235f44['length']!==0x1||_0x385b79['some'](_0x1d8525=>_0x1d8525[_0x1cbb97(0x1f6)][_0x1cbb97(0x1bf)]))||_0x385b79[_0x1cbb97(0x1af)](_0x4e0272=>_0x4e0272[_0x1cbb97(0x1f6)][_0x1cbb97(0x1af)](_0x2e9154=>_0x2e9154[_0x1cbb97(0x1ce)]!==_0x159962['attemptId'])))return _0x1ab114;const {readCheckpoint:_0x3cf2dd}=require(_0x1cbb97(0x19e)),_0x5278f7=_0x4e6981[_0x1cbb97(0x1a0)](_0x312ea4=>{const _0x5f4199=_0x1cbb97;try{const _0x2e4d12=path[_0x5f4199(0x1b4)](_0x312ea4,_0x159962['task'],_0x5f4199(0x1a2),_0x159962[_0x5f4199(0x19a)],_0x5f4199(0x1e4)),_0x14b905={};_0x14b905[_0x5f4199(0x1db)]=_0x159962['task'],_0x14b905[_0x5f4199(0x19a)]=_0x159962[_0x5f4199(0x19a)];const _0x3c4262=_0x3cf2dd(_0x2e4d12,_0x14b905);return _0x3c4262?.['task']===_0x159962['task']&&_0x3c4262?.[_0x5f4199(0x19a)]===_0x159962[_0x5f4199(0x19a)];}catch{return![];}});if(_0x5278f7[_0x1cbb97(0x1bf)]!==0x1)return{'success':![],'code':_0x5278f7[_0x1cbb97(0x1bf)]?_0x1cbb97(0x17c):'RUN_CHECKPOINT_REQUIRED'};const _0x4bfeaf=_0x5278f7[0x0],_0x331639={};_0x331639[_0x1cbb97(0x192)]=![];const _0x1564ac=new(require(_0x1cbb97(0x185)))[(_0x1cbb97(0x1e3))](_0xbb5dcc,_0x331639),_0x203f46=_0x440891[_0x1cbb97(0x1ec)](_0xbb5dcc,_0x27208e=>{const _0x4f2c38=_0x1cbb97,_0x226052={};_0x226052[_0x4f2c38(0x203)]=![],_0x226052['code']=_0x4f2c38(0x20b);if(_0x27208e[_0x4f2c38(0x1da)]!==_0x4f2c38(0x19b)||!_0x27208e['stopRequested']||_0x27208e[_0x4f2c38(0x205)]!==_0xc7962f[_0x4f2c38(0x205)]||_0x27208e[_0x4f2c38(0x1ef)]!==_0xc7962f[_0x4f2c38(0x1ef)]||_0x27208e[_0x4f2c38(0x17e)]!==_0xc7962f['version']||_0x27208e[_0x4f2c38(0x1a7)]!==_0xc7962f[_0x4f2c38(0x1a6)])return _0x226052;const _0x53355d={};_0x53355d['success']=![],_0x53355d[_0x4f2c38(0x1be)]=_0x4f2c38(0x172);if(Object[_0x4f2c38(0x1d2)](_0x27208e['tickets']||{})[_0x4f2c38(0x1af)](_0x41acf1=>_0x41acf1[_0x4f2c38(0x180)]===_0x4f2c38(0x1f2)))return _0x53355d;if(typeof _0x1c295a[_0x4f2c38(0x171)]===_0x4f2c38(0x1dc)){let _0x54c3fe;try{_0x54c3fe=_0x1c295a[_0x4f2c38(0x171)]();}catch{const _0x278850={};return _0x278850['success']=![],_0x278850[_0x4f2c38(0x1be)]=_0x4f2c38(0x18d),_0x278850;}const _0x4f39aa={};_0x4f39aa[_0x4f2c38(0x203)]=![],_0x4f39aa['code']=_0x4f2c38(0x1ad);if(_0x54c3fe['some'](_0x3b7cfe=>_0x3b7cfe[_0x4f2c38(0x1f0)]!==_0x4f2c38(0x16d)||_0x3b7cfe[_0x4f2c38(0x1db)]!==_0x159962[_0x4f2c38(0x1db)]||_0x3b7cfe[_0x4f2c38(0x19a)]!==_0x159962['runId']||_0x3b7cfe[_0x4f2c38(0x1ce)]!==_0x159962['attemptId']))return _0x4f39aa;}const _0x3c7485=Object[_0x4f2c38(0x1d2)](_0x27208e[_0x4f2c38(0x1bc)]||{})[_0x4f2c38(0x1a0)](_0x3f45c7=>_0x3f45c7[_0x4f2c38(0x1da)]!=='closed'),_0x44fa36={};_0x44fa36['success']=![],_0x44fa36[_0x4f2c38(0x1be)]=_0x4f2c38(0x178);if(_0x3c7485['length']!==_0x4892a1[_0x4f2c38(0x1bf)]||_0x3c7485['some'](_0xc7e7e4=>!_0x4892a1['some'](_0x201caf=>_0x201caf[_0x4f2c38(0x1ed)]===_0xc7e7e4[_0x4f2c38(0x1ed)])))return _0x44fa36;const _0x4b4dc6=path[_0x4f2c38(0x1b4)](fs[_0x4f2c38(0x189)](_0xbb5dcc),'.agents','runtime',_0x4f2c38(0x175)),_0x3c2df9=_0x54fbfa=>crypto[_0x4f2c38(0x1ea)](_0x4f2c38(0x1e7))[_0x4f2c38(0x20a)](JSON[_0x4f2c38(0x1f7)]({'connectionId':_0x54fbfa?.[_0x4f2c38(0x1ed)]||null,'workspace':_0x54fbfa?.[_0x4f2c38(0x1c5)]||null,'supervisorPid':_0x54fbfa?.[_0x4f2c38(0x18a)]||null,'supervisorProcessStart':_0x54fbfa?.[_0x4f2c38(0x195)]||null,'childPid':_0x54fbfa?.[_0x4f2c38(0x1fa)]||null,'childProcessStart':_0x54fbfa?.[_0x4f2c38(0x197)]||null,'generation':_0x54fbfa?.[_0x4f2c38(0x1d5)]||null,'version':_0x54fbfa?.[_0x4f2c38(0x176)]||null,'digest':_0x54fbfa?.[_0x4f2c38(0x1a6)]||null,'resourceDigest':_0x54fbfa?.[_0x4f2c38(0x181)]||null,'catalogHash':_0x54fbfa?.[_0x4f2c38(0x193)]||null}))[_0x4f2c38(0x1a6)](_0x4f2c38(0x1e2));for(const _0xa6d499 of _0x329409){const _0x41610d={};_0x41610d[_0x4f2c38(0x203)]=![],_0x41610d['code']=_0x4f2c38(0x1dd);if(!/^[a-zA-Z0-9._-]{4,128}$/[_0x4f2c38(0x200)](_0xa6d499[_0x4f2c38(0x1ed)]))return _0x41610d;const _0x26238c=_0x27208e[_0x4f2c38(0x1bc)]?.[_0xa6d499[_0x4f2c38(0x1ed)]],_0x3243af=_0x4892a1[_0x4f2c38(0x18f)](_0x47ffc4=>_0x47ffc4[_0x4f2c38(0x1ed)]===_0xa6d499[_0x4f2c38(0x1ed)]),_0x4e04e3=crypto[_0x4f2c38(0x1ea)]('sha256')['update'](JSON[_0x4f2c38(0x1f7)](_0x26238c||null))[_0x4f2c38(0x1a6)](_0x4f2c38(0x1e2)),_0x22d4da=path[_0x4f2c38(0x1b4)](_0x4b4dc6,_0xa6d499[_0x4f2c38(0x1ed)]+_0x4f2c38(0x1ba)),_0x397f1c={};_0x397f1c['success']=![],_0x397f1c[_0x4f2c38(0x1be)]=_0x4f2c38(0x1dd);if(!path['resolve'](_0x22d4da)['startsWith'](path[_0x4f2c38(0x18e)](_0x4b4dc6)+path[_0x4f2c38(0x1c0)]))return _0x397f1c;let _0x4a7b1c;try{_0x4a7b1c=fs[_0x4f2c38(0x1e9)](_0x22d4da);}catch{const _0x2e47d5={};return _0x2e47d5[_0x4f2c38(0x203)]=![],_0x2e47d5['code']=_0x4f2c38(0x1dd),_0x2e47d5;}let _0x21c5e9;try{_0x21c5e9=JSON[_0x4f2c38(0x1ac)](_0x4a7b1c);}catch{const _0x30aefc={};return _0x30aefc[_0x4f2c38(0x203)]=![],_0x30aefc[_0x4f2c38(0x1be)]='CONNECTION_IDENTITY_UNVERIFIED',_0x30aefc;}const _0x548591=_0x3c2df9(_0x21c5e9);let _0x902858=![],_0x2f01fb=!![];try{_0x902858=sameWorkspace(_0x21c5e9[_0x4f2c38(0x1c5)],_0xbb5dcc);if(_0x26238c?.[_0x4f2c38(0x1c5)])_0x2f01fb=sameWorkspace(_0x26238c[_0x4f2c38(0x1c5)],_0xbb5dcc);}catch{_0x902858=![],_0x2f01fb=![];}const _0x549e36={};_0x549e36['success']=![],_0x549e36[_0x4f2c38(0x1be)]=_0x4f2c38(0x182);if(_0x548591!==_0xa6d499['receiptSha256']||_0x4e04e3!==_0xa6d499[_0x4f2c38(0x174)]||_0x26238c?.[_0x4f2c38(0x1ed)]!==_0xa6d499[_0x4f2c38(0x1ed)]||_0x26238c[_0x4f2c38(0x18a)]!==_0xa6d499['supervisorPid']||!_0x2f01fb||!_0x902858||String(_0x26238c['supervisorProcessStart']||'')!==_0xa6d499['supervisorProcessStart']||_0x21c5e9[_0x4f2c38(0x1ed)]!==_0xa6d499[_0x4f2c38(0x1ed)]||_0x21c5e9['supervisorPid']!==_0xa6d499[_0x4f2c38(0x18a)]||String(_0x21c5e9['supervisorProcessStart']||'')!==_0xa6d499[_0x4f2c38(0x195)]||_0x21c5e9[_0x4f2c38(0x1fa)]!==_0xa6d499[_0x4f2c38(0x1fa)]||String(_0x21c5e9['childProcessStart']||'')!==_0xa6d499[_0x4f2c38(0x197)]||_0x3243af?.[_0x4f2c38(0x18a)]!==_0xa6d499[_0x4f2c38(0x18a)]||_0x3243af?.[_0x4f2c38(0x1fa)]!==_0xa6d499[_0x4f2c38(0x1fa)])return _0x549e36;}let _0x201421=![],_0x5d5374=_0x4bfeaf;_0x1564ac[_0x4f2c38(0x1cb)]=_0x4bfeaf;const _0x2f0107=_0x3cf2dd(path[_0x4f2c38(0x1b4)](_0x4bfeaf,_0x159962[_0x4f2c38(0x1db)],'runs',_0x159962[_0x4f2c38(0x19a)],_0x4f2c38(0x1e4)),{'task':_0x159962[_0x4f2c38(0x1db)],'runId':_0x159962[_0x4f2c38(0x19a)]}),_0x18abd6={};_0x18abd6[_0x4f2c38(0x203)]=![],_0x18abd6[_0x4f2c38(0x1be)]=_0x4f2c38(0x1c6);if(!_0x2f0107||_0x2f0107['schemaVersion']!==0x3||!sameWorkspace(_0x2f0107[_0x4f2c38(0x1c5)]?.[_0x4f2c38(0x208)]||'',_0xbb5dcc))return _0x18abd6;_0x1564ac['withLock'](_0x4f2c38(0x1a9),()=>_0x1564ac['withLock'](_0x159962['task'],()=>{const _0x564a96=_0x4f2c38,_0x1ad6a2=_0x3cf2dd(path[_0x564a96(0x1b4)](_0x4bfeaf,_0x159962[_0x564a96(0x1db)],_0x564a96(0x1a2),_0x159962[_0x564a96(0x19a)],_0x564a96(0x1e4)),{'task':_0x159962['task'],'runId':_0x159962[_0x564a96(0x19a)]}),_0x58cebd=_0x1ad6a2?.[_0x564a96(0x1c2)]?.[_0x564a96(0x1f2)]?.['find'](_0x557d53=>_0x557d53[_0x564a96(0x1ce)]===_0x159962[_0x564a96(0x1ce)]),_0x342a6b={};_0x342a6b[_0x564a96(0x1be)]=_0x564a96(0x1f1);if(!_0x1ad6a2||_0x1ad6a2[_0x564a96(0x1f8)]!==0x3||!sameWorkspace(_0x1ad6a2['workspace']?.[_0x564a96(0x208)]||'',_0xbb5dcc)||(_0x12a86b?_0x1ad6a2[_0x564a96(0x1c2)][_0x564a96(0x1f2)][_0x564a96(0x1bf)]!==0x0:!_0x58cebd||_0x1ad6a2[_0x564a96(0x1c2)][_0x564a96(0x1f2)][_0x564a96(0x1bf)]!==0x1||_0x58cebd[_0x564a96(0x19d)]!==_0x564a96(0x1b9)||_0x58cebd[_0x564a96(0x18b)]!==_0x1ad6a2['coordinator']||_0x58cebd[_0x564a96(0x1a5)])||(_0x1ad6a2[_0x564a96(0x1c2)][_0x564a96(0x1fd)]||[])[_0x564a96(0x1af)](_0x15a691=>_0x15a691[_0x564a96(0x1a3)]===_0x564a96(0x1c1)&&_0x15a691[_0x564a96(0x1d8)]!==_0x564a96(0x194))||Object[_0x564a96(0x1d2)](_0x1ad6a2['execution']['tickets']||{})[_0x564a96(0x1af)](_0x511b78=>_0x511b78[_0x564a96(0x180)]===_0x564a96(0x1f2)))throw Object[_0x564a96(0x19f)](new Error('Coordinator\x20state\x20changed'),_0x342a6b);_0x1ad6a2[_0x564a96(0x1c2)][_0x564a96(0x1b3)]||={};const _0x21ffa7=_0x1ad6a2['execution'][_0x564a96(0x1b3)][_0x159962[_0x564a96(0x1ce)]],_0x3588d9={};_0x3588d9[_0x564a96(0x1be)]=_0x564a96(0x1b8);if(_0x12a86b&&(!_0x21ffa7||_0x21ffa7['targetVersion']!==_0xc7962f[_0x564a96(0x176)]||_0x21ffa7[_0x564a96(0x1a7)]!==_0xc7962f[_0x564a96(0x1a6)]||JSON[_0x564a96(0x1f7)](_0x21ffa7['identityProofs'])!==JSON[_0x564a96(0x1f7)](_0x329409)))throw Object[_0x564a96(0x19f)](new Error(_0x564a96(0x191)),_0x3588d9);const _0x334ef1={};_0x334ef1[_0x564a96(0x1be)]=_0x564a96(0x1f1);if(_0x21ffa7&&(_0x21ffa7['transactionId']!==_0xc7962f['transactionId']||_0x21ffa7['epoch']!==_0xc7962f[_0x564a96(0x1ef)]))throw Object[_0x564a96(0x19f)](new Error('Coordinator\x20stop\x20marker\x20changed'),_0x334ef1);!_0x21ffa7&&(_0x1564ac[_0x564a96(0x1c2)][_0x564a96(0x1fb)](_0x1ad6a2,_0x58cebd),_0x1ad6a2[_0x564a96(0x1c2)][_0x564a96(0x1b3)][_0x159962[_0x564a96(0x1ce)]]={'transactionId':_0xc7962f[_0x564a96(0x205)],'epoch':_0xc7962f[_0x564a96(0x1ef)],'targetVersion':_0xc7962f[_0x564a96(0x176)],'targetDigest':_0xc7962f[_0x564a96(0x1a6)],'identityProofs':_0x329409,'source':_0x564a96(0x1ca),'task':_0x159962[_0x564a96(0x1db)],'runId':_0x159962[_0x564a96(0x19a)],'attemptId':_0x159962[_0x564a96(0x1ce)],'releasedAt':new Date()[_0x564a96(0x1ae)]()},_0x1564ac[_0x564a96(0x1d6)](_0x1ad6a2)),_0x201421=!![],_0x5d5374=_0x4bfeaf;}));const _0x2d279f={..._0x159962};_0x2d279f[_0x4f2c38(0x1cb)]=_0x5d5374;const _0x56aa1f={};_0x56aa1f['success']=!![],_0x56aa1f[_0x4f2c38(0x1cd)]=_0x2d279f;const _0x57c059={};return _0x57c059['success']=![],_0x57c059['code']=_0x4f2c38(0x1df),_0x201421?_0x56aa1f:_0x57c059;});return _0x203f46;}const _0x4f9583={};_0x4f9583[_0x2ee29b(0x1f4)]=snapshotUpgradeRuns,_0x4f9583[_0x2ee29b(0x1f3)]=cancelUpgradeRuns,_0x4f9583[_0x2ee29b(0x186)]=reconcileUpgradeWorkers,_0x4f9583[_0x2ee29b(0x183)]=releaseIdleCoordinatorForUpgrade,module[_0x2ee29b(0x1b1)]=_0x4f9583;
|
package/src/core/upgrade-stop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x589bb9=_0x4286;function _0x4286(_0xafea7,_0x3601ce){_0xafea7=_0xafea7-0xb7;const _0x517de7=_0x517d();let _0x428637=_0x517de7[_0xafea7];if(_0x4286['RWrpLy']===undefined){var _0x4ba2e7=function(_0x4c809d){const _0x46063a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x29853c='',_0x30c505='';for(let _0x536479=0x0,_0x19122c,_0x2c2b7b,_0x16f981=0x0;_0x2c2b7b=_0x4c809d['charAt'](_0x16f981++);~_0x2c2b7b&&(_0x19122c=_0x536479%0x4?_0x19122c*0x40+_0x2c2b7b:_0x2c2b7b,_0x536479++%0x4)?_0x29853c+=String['fromCharCode'](0xff&_0x19122c>>(-0x2*_0x536479&0x6)):0x0){_0x2c2b7b=_0x46063a['indexOf'](_0x2c2b7b);}for(let _0x144ded=0x0,_0x4571b9=_0x29853c['length'];_0x144ded<_0x4571b9;_0x144ded++){_0x30c505+='%'+('00'+_0x29853c['charCodeAt'](_0x144ded)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x30c505);};_0x4286['csEsev']=_0x4ba2e7,_0x4286['PAmXhU']={},_0x4286['RWrpLy']=!![];}const _0x33ee8e=_0x517de7[0x0],_0x557bdd=_0xafea7+_0x33ee8e,_0x3a8132=_0x4286['PAmXhU'][_0x557bdd];return!_0x3a8132?(_0x428637=_0x4286['csEsev'](_0x428637),_0x4286['PAmXhU'][_0x557bdd]=_0x428637):_0x428637=_0x3a8132,_0x428637;}(function(_0x5c7874,_0x1cafa9){const _0x5afafa=_0x4286,_0x4bf902=_0x5c7874();while(!![]){try{const _0xfb6fe4=parseInt(_0x5afafa(0xb9))/0x1*(-parseInt(_0x5afafa(0xdd))/0x2)+-parseInt(_0x5afafa(0xbe))/0x3+parseInt(_0x5afafa(0xc2))/0x4+-parseInt(_0x5afafa(0xb8))/0x5+-parseInt(_0x5afafa(0xe9))/0x6*(-parseInt(_0x5afafa(0xe8))/0x7)+parseInt(_0x5afafa(0xda))/0x8*(parseInt(_0x5afafa(0x10e))/0x9)+parseInt(_0x5afafa(0xe6))/0xa;if(_0xfb6fe4===_0x1cafa9)break;else _0x4bf902['push'](_0x4bf902['shift']());}catch(_0x863cab){_0x4bf902['push'](_0x4bf902['shift']());}}}(_0x517d,0xbc51b));function _0x517d(){const _0x30f13c=['qLjpv1nfuL9tve9qx1voq09orKLstuve','mtzvr0njDKC','y2fUy2vSvMvYAwzPy2f0Aw9UCW','CMvSzwfZzwq','Ag9ZDc1SB2nHBc10DxjUlwnVBNrLEhq','zhjHAw5PBMC','CNvUswq','C291CMnL','zxHLy3v0Aw9Uu3rHDhvZ','zxHLy3v0Aw9U','otGZndG0mevts09ntq','C3rVCc1JB25MAxjTzwq','mty5mtLnBufgr2S','mtC3mfPKCLrsrq','DgfYz2v0rgLNzxn0','u3rVCcbMzw5JzsbJAgfUz2vK','zxHWB3j0CW','CMvJB3zLCMLUzW','y29TCgXLDgvK','ywn0B3jjza','lI9ZzxnZAw9U','Ag9ZDc1OB29R','lI4VChjVEhKVCgLWzwXPBMu','CMvXDwvZDhnqzw5KAw5N','yMfJA2vUzhm','Ag9ZDfDVCMTLCNm','D29YA2vYu3rHDhvZ','BgvUz3rO','DxbNCMfKzvn0B3bZ','CNvUDgLTzu93BMvYC2HPCa','CgLWzwXPBMvnyw5Hz2vY','CgvUzgLUz1jLCxvLC3rZ','lI9YDw50Aw1Llw93BMvYC2HPCa','C2L6zq','y2HPBgq','yMXVy2TLCNm','DMfSDwvZ','DhjHBNnHy3rPB25jza','y29VCMrPBMf0B3i','y29UzMLYBwvK','lI9YDw4Ty29TCgf0AwjPBgL0Eq','DMvYAwzPy2f0Aw9Usw5gBgLNAhq','C3rVChbLza','DMvYAwzPy2f0Aw9UCW','C2vZC2LVBKLK','C3rHDgu','ChjVAMvJDfbHDgG','qurnsvntsu9ox0nptKzmsunu','A2LUza','ywn0AxzL','ou96BLfbta','zw50CMLLCW','otG5nta1r0fqAu1b','odG5otnorhH1zfa','lI9Hzg1PC3nPB24TzMvUy2u','ChvZAa','yxnZAwDU','C3rVCefUzfDHAxq','mtK1otqYmfvwEKfowa','C3rVCfjLCxvLC3rLza','u3rVCcbYzxf1zxn0igrVzxmGBM90ig1HDgnOihrOzsb1CgrHDguGzMvUy2u','C3rHDgvsB290','mZyWnti4txb2shnP','DgLJA2v0CW','x2v4zwn1DgLVBG','ChjVyMvszxf1zxn0','Ag9ZDfDVCMTLCKLK','zgLNzxn0','C2vZC2LVBLj1BNrPBwu','D29YA3nWywnLlwfKBwLZC2LVBI1YzxzVA2vK','y2XVC2LUz0nOAwXKCMvU','CMvSzwfZzq','yxr0zw1WDeLK','C2vZC2LVBNm','C3rHDhvZ','C3rVChbLzfDVCMTLCG','yNjVD3nLCG','zxbVy2G','BwLNCMf0zq','qKfds0vorf9tve9qx1voq09orKLstuve','zMLSDgvY','Aw5JBhvKzxm','yMfJA2vUza','C29Tzq','DgfZAW','CgvUzgLUzY1ZywzLlwjVDw5Kyxj5','ndm4mty3mMzgyNfmtG','y29Kzq'];_0x517d=function(){return _0x30f13c;};return _0x517d();}const {readFence,withAdmissionLock}=require(_0x589bb9(0xba)),{workspaceRunRoots,readWorkspaceRuns}=require(_0x589bb9(0x104));function stoppedWorker(_0x477779,_0x5330ef,_0x565253){const _0x53ad4c=_0x589bb9,_0x211bbc=_0x477779[_0x53ad4c(0xc8)]||new(require(_0x53ad4c(0xf0)))['SessionRuntime'](_0x477779['projectPath']),_0x4a4f8b=_0x211bbc['peek'](_0x565253[_0x53ad4c(0x108)]||_0x5330ef['coordinator']),_0x1a5d46=Object['values'](_0x4a4f8b?.[_0x53ad4c(0xf5)]||{})[_0x53ad4c(0xd4)](_0x39ac5a=>_0x39ac5a[_0x53ad4c(0xcc)]===_0x565253[_0x53ad4c(0xcc)]&&_0x39ac5a[_0x53ad4c(0xef)]===_0x565253[_0x53ad4c(0xef)]);if(_0x1a5d46['length']!==0x1||_0x1a5d46[0x0][_0x53ad4c(0xce)]!==_0x53ad4c(0x106)||!_0x1a5d46[0x0][_0x53ad4c(0xc6)]||![_0x53ad4c(0xf1),'host-local-worker-identity',_0x53ad4c(0xe0)][_0x53ad4c(0xd5)](_0x1a5d46[0x0]['source']))return null;return _0x1a5d46[0x0];}async function requestUpgradeStop(_0x24a8e9,_0x7883af){const _0x4b704c=_0x589bb9,_0x5601f7=_0x24a8e9[_0x4b704c(0x10a)],_0x19cd58=readFence(_0x5601f7),_0x45ebc8={};_0x45ebc8['code']=_0x4b704c(0x10b);if(_0x19cd58[_0x4b704c(0x109)]!==_0x4b704c(0xe1)||!_0x19cd58[_0x4b704c(0xbf)]||_0x19cd58[_0x4b704c(0x101)]!==_0x7883af['transactionId']||_0x19cd58[_0x4b704c(0xd1)]!==_0x7883af[_0x4b704c(0xd1)]||_0x19cd58['targetVersion']!==_0x7883af['version']||_0x19cd58[_0x4b704c(0xea)]!==_0x7883af[_0x4b704c(0xc7)])throw Object[_0x4b704c(0xbc)](new Error(_0x4b704c(0xc0)),_0x45ebc8);await _0x24a8e9[_0x4b704c(0xfa)][_0x4b704c(0xe5)][_0x4b704c(0xde)]();const _0xbade07=[];if(_0x24a8e9['browserSessions']?.[_0x4b704c(0xcd)]?.[_0x4b704c(0xfd)]){const _0x3a176a=[..._0x24a8e9['browserSessions'][_0x4b704c(0xcd)]['values']()]['some'](_0x4e5d55=>_0x4e5d55[_0x4b704c(0xd6)]?.[_0x4b704c(0xfb)]?.[_0x4b704c(0xfd)]);if(!_0x3a176a)try{await _0x24a8e9['browserSessions'][_0x4b704c(0xbd)]();}catch(_0xfe68e2){const _0x3bb4db={};_0x3bb4db[_0x4b704c(0x10c)]=_0x4b704c(0xd0),_0x3bb4db[_0x4b704c(0xdb)]=_0xfe68e2[_0x4b704c(0xdb)]||_0x4b704c(0xdc),_0xbade07[_0x4b704c(0xbb)](_0x3bb4db);}}for(const [_0x3059c4,_0x4ffba4]of Object[_0x4b704c(0xb7)](_0x24a8e9[_0x4b704c(0xf4)]||{})){if(_0x4ffba4[_0x4b704c(0xfb)]?.[_0x4b704c(0xfd)]||_0x4ffba4[_0x4b704c(0xed)]||_0x4ffba4[_0x4b704c(0xc5)]||_0x4ffba4['initialization'])continue;if(_0x4ffba4[_0x4b704c(0xfe)]||_0x4ffba4[_0x4b704c(0xca)]?.[_0x4b704c(0xfd)])try{await _0x4ffba4['stopAndWait']();}catch(_0x1c3c15){const _0x10c166={};_0x10c166[_0x4b704c(0x10c)]=_0x4b704c(0xd6),_0x10c166['name']=_0x3059c4,_0x10c166['code']=_0x1c3c15[_0x4b704c(0xdb)]||_0x4b704c(0xd3),_0xbade07['push'](_0x10c166);}}const _0x472af8=[];for(const _0x3fd9ba of workspaceRunRoots(_0x5601f7)){const _0x3e89b4={};_0x3e89b4[_0x4b704c(0xd2)]=![];const _0x26bd8c=new(require(_0x4b704c(0xf2)))['PipelineManager'](_0x5601f7,_0x3e89b4);_0x26bd8c[_0x4b704c(0xc1)]=_0x3fd9ba;for(const _0x431bd3 of readWorkspaceRuns(_0x5601f7,[_0x3fd9ba])){if([_0x4b704c(0xee),'cancelled'][_0x4b704c(0xd5)](_0x431bd3[_0x4b704c(0xce)]))continue;withAdmissionLock(_0x5601f7,_0x2ca056=>{const _0x1cea5b=_0x4b704c,_0x1408b5={};_0x1408b5[_0x1cea5b(0xdb)]='ADMISSION_CONFLICT';if(_0x2ca056[_0x1cea5b(0x101)]!==_0x7883af['transactionId']||_0x2ca056[_0x1cea5b(0xd1)]!==_0x7883af[_0x1cea5b(0xd1)]||_0x2ca056[_0x1cea5b(0x109)]!==_0x1cea5b(0xe1))throw Object[_0x1cea5b(0xbc)](new Error(_0x1cea5b(0xeb)),_0x1408b5);_0x26bd8c['withLock'](_0x1cea5b(0xc4),()=>_0x26bd8c['withLock'](_0x431bd3[_0x1cea5b(0xd8)],()=>{const _0x5c7a81=_0x1cea5b,_0x1cca6b=_0x26bd8c['readRun'](_0x431bd3[_0x5c7a81(0xd8)],_0x431bd3[_0x5c7a81(0xe2)]);if(!_0x1cca6b?.[_0x5c7a81(0xe5)])return;for(const _0x3af160 of[..._0x1cca6b[_0x5c7a81(0xe5)][_0x5c7a81(0x10d)]]){if(_0x7883af[_0x5c7a81(0xf3)]||_0x3af160[_0x5c7a81(0x105)]||_0x24a8e9[_0x5c7a81(0xfa)][_0x5c7a81(0xe5)][_0x5c7a81(0x107)]['size']||_0xbade07[_0x5c7a81(0xf7)]||Object[_0x5c7a81(0x100)](_0x2ca056[_0x5c7a81(0xc3)]||{})[_0x5c7a81(0xd7)](_0x1a3639=>_0x1a3639['status']===_0x5c7a81(0x10d)&&(!_0x1a3639['attemptId']||_0x1a3639[_0x5c7a81(0xcc)]===_0x3af160[_0x5c7a81(0xcc)])))continue;const _0x191aa7=stoppedWorker(_0x24a8e9,_0x1cca6b,_0x3af160),_0x4ac5b2=(_0x1cca6b[_0x5c7a81(0xe5)]['receiptObservations']||[])[_0x5c7a81(0xd4)](_0x50eb72=>_0x50eb72['attemptId']===_0x3af160['attemptId']);if(!_0x191aa7&&(_0x3af160[_0x5c7a81(0xef)]!==_0x5c7a81(0x102)||_0x4ac5b2[_0x5c7a81(0xd7)](_0x86c74c=>_0x86c74c[_0x5c7a81(0xf6)]===_0x5c7a81(0x103)&&_0x86c74c[_0x5c7a81(0xe4)]!==_0x5c7a81(0x106))))continue;_0x26bd8c['execution'][_0x5c7a81(0xcb)](_0x1cca6b,_0x3af160),_0x1cca6b[_0x5c7a81(0xe5)][_0x5c7a81(0xf8)]||={};const _0x2166a3={};_0x2166a3[_0x5c7a81(0x101)]=_0x7883af[_0x5c7a81(0x101)],_0x2166a3[_0x5c7a81(0xe3)]=_0x191aa7?_0x191aa7[_0x5c7a81(0xe3)]:_0x5c7a81(0xc9),_0x2166a3['hostWorkerId']=_0x191aa7?.[_0x5c7a81(0xc6)]||null,_0x1cca6b['execution'][_0x5c7a81(0xf8)][_0x3af160[_0x5c7a81(0xcc)]]=_0x2166a3;for(const _0xfb6276 of _0x4ac5b2)if(_0x191aa7&&_0xfb6276['hostWorkerId']===_0x191aa7[_0x5c7a81(0xc6)])_0xfb6276[_0x5c7a81(0xe4)]=_0x5c7a81(0x106);_0x26bd8c['writeState'](_0x1cca6b),_0x472af8[_0x5c7a81(0xbb)](_0x3af160[_0x5c7a81(0xcc)]);}}));});}}const _0x4b8de4=[...require(_0x4b704c(0xfc))[_0x4b704c(0xf9)](_0x24a8e9,readFence(_0x5601f7)),..._0xbade07],_0x1cc424={};return _0x1cc424[_0x4b704c(0xce)]=_0x4b8de4[_0x4b704c(0xf7)]?_0x4b704c(0xd9):_0x4b704c(0xe7),_0x1cc424[_0x4b704c(0xdf)]=_0x472af8,_0x1cc424[_0x4b704c(0xff)]=_0x4b8de4,_0x1cc424;}const _0x4571b9={};_0x4571b9['requestUpgradeStop']=requestUpgradeStop,_0x4571b9[_0x589bb9(0xcf)]=stoppedWorker,module[_0x589bb9(0xec)]=_0x4571b9;
|
package/src/core/windows-job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x26f7a3=_0x5db4;(function(_0x5682ed,_0x796d92){const _0x51b54f=_0x5db4,_0x5f15c1=_0x5682ed();while(!![]){try{const _0x2fbdf6=parseInt(_0x51b54f(0x1cb))/0x1*(parseInt(_0x51b54f(0x1d1))/0x2)+-parseInt(_0x51b54f(0x1e2))/0x3+-parseInt(_0x51b54f(0x1c8))/0x4*(parseInt(_0x51b54f(0x1fa))/0x5)+parseInt(_0x51b54f(0x1fe))/0x6+parseInt(_0x51b54f(0x1ee))/0x7+-parseInt(_0x51b54f(0x1fc))/0x8+-parseInt(_0x51b54f(0x1ff))/0x9*(-parseInt(_0x51b54f(0x1f8))/0xa);if(_0x2fbdf6===_0x796d92)break;else _0x5f15c1['push'](_0x5f15c1['shift']());}catch(_0x4ccf8b){_0x5f15c1['push'](_0x5f15c1['shift']());}}}(_0x77d8,0x1bfd4));function _0x77d8(){const _0x2e2073=['C3rKAw4','ntKZotbeEfrzAwS','ufjpq0vtu19uuKvfx1nut1bFvu5dt05gsvjnruq','nuDwCMfmwG','zMLUAxnOzwq','mtC3nJi4og1pv0rXCG','ywn0AxzL','otm4mJe0q3vUBuPr','mZzUtLDwy1K','lu5VBKLUDgvYywn0AxzL','AgfZ','sK9cx0ftu0LhtK1ftLrFvu5dt05gsvjnruq','CMvZB2X2zq','y2XLyxi','CgfYC2u','sK9cx0nptLrst0XFveLnru9vva','DMfSDwvZ','zMLUywXSEq','zgvSzxrL','sK9cx0jst0TfuL9tve9qx1voq09orKLstuve','BM9KztPJAgLSzf9WCM9JzxnZ','Aw5KzxHpzG','BM9KztPJCNLWDg8','qZPCv2LUzg93CW','C3rHDhvZ','zw5K','mtm4nde2qxPTvwnv','y2XVC2vK','y29UzMLYBwvK','mtr4s1bvq2e','DxrMoa','CMfJzq','C3rKzxjY','Dg9Rzw4','y2f0y2G','mZi5nenRqvHptq','B25Jzq','sK9cx0nptLrst0XFqLvtwq','C2L6zq','AxntywzLsw50zwDLCG','BM9KztPWyxrO','BM9KztPMCW','zMLUAxnO','CgLK','CMvXDwvZDa','yxnZAwDU','CMfUzg9Tvvvjra','sK9cx0nptLrst0XFsu5wquXjra','C3rKB3v0','sK9cx0nptLrst0XFq0Xpu0ve','C3rYAw5NAwz5','z2v0','mZmWnJLQrwruBg4','C2v0','CMvHzezPBgvtEw5J','CMvQzwn0','C3rHCNq','BgvUz3rO','CMvHzhK','D3jPDgu','lunVBw1HBMq','Agv4','C2XPy2u','zxjYB3i','mti1mZG2off1Axjduq','D3jPDgfIBgvfBMrLza','DhLWzq','zxHWB3j0CW','zgf0yq','zgvZDhjVEwvK','AM9PBG','CgLWzq','sK9cx0nptLrst0XFvu5bvKfjtefcteu'];_0x77d8=function(){return _0x2e2073;};return _0x77d8();}const path=require(_0x26f7a3(0x1d6)),crypto=require(_0x26f7a3(0x20d)),cp=require(_0x26f7a3(0x20b)),fs=require(_0x26f7a3(0x1d7)),jobs=new WeakMap(),fail=_0x26b568=>Object[_0x26f7a3(0x1db)](new Error(_0x26b568),{'code':_0x26b568});function _0x5db4(_0x5b744c,_0x1f215c){_0x5b744c=_0x5b744c-0x1c5;const _0x77d844=_0x77d8();let _0x5db498=_0x77d844[_0x5b744c];if(_0x5db4['aGCOBd']===undefined){var _0x1a302e=function(_0x1c0618){const _0x2b6876='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x45f77a='',_0x26b568='';for(let _0x264c5d=0x0,_0x588c61,_0x2e6641,_0x5123d8=0x0;_0x2e6641=_0x1c0618['charAt'](_0x5123d8++);~_0x2e6641&&(_0x588c61=_0x264c5d%0x4?_0x588c61*0x40+_0x2e6641:_0x2e6641,_0x264c5d++%0x4)?_0x45f77a+=String['fromCharCode'](0xff&_0x588c61>>(-0x2*_0x264c5d&0x6)):0x0){_0x2e6641=_0x2b6876['indexOf'](_0x2e6641);}for(let _0x2d2d3e=0x0,_0x2218ff=_0x45f77a['length'];_0x2d2d3e<_0x2218ff;_0x2d2d3e++){_0x26b568+='%'+('00'+_0x45f77a['charCodeAt'](_0x2d2d3e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26b568);};_0x5db4['RWHkZe']=_0x1a302e,_0x5db4['MuqXKc']={},_0x5db4['aGCOBd']=!![];}const _0x148e08=_0x77d844[0x0],_0x3c516d=_0x5b744c+_0x148e08,_0x314ae8=_0x5db4['MuqXKc'][_0x3c516d];return!_0x314ae8?(_0x5db498=_0x5db4['RWHkZe'](_0x5db498),_0x5db4['MuqXKc'][_0x3c516d]=_0x5db498):_0x5db498=_0x314ae8,_0x5db498;}function attachWindowsJob(_0x264c5d,_0x588c61){const _0x1193fa=_0x26f7a3;if(jobs['has'](_0x264c5d))return jobs[_0x1193fa(0x1e1)](_0x264c5d);const _0x2e6641=crypto['randomBytes'](0x20)['toString'](_0x1193fa(0x1eb)),_0x5123d8=cp['spawn'](path[_0x1193fa(0x1f4)](process.env.SystemRoot||_0x1193fa(0x1c5),'System32/WindowsPowerShell/v1.0/powershell.exe'),['-NoProfile',_0x1193fa(0x200),_0x1193fa(0x1ea),fs[_0x1193fa(0x1e4)](path[_0x1193fa(0x1f4)](__dirname,'windows-job.ps1'),_0x1193fa(0x1cc))],{'windowsHide':!![],'env':{...process.env,'APT_JOB_PID':String(_0x588c61[_0x1193fa(0x1d9)]),'APT_JOB_START':_0x588c61[_0x1193fa(0x1e6)],'APT_JOB_TOKEN':_0x2e6641},'stdio':['pipe','pipe',_0x1193fa(0x1f5)]}),_0x2d2d3e=new Map();let _0x2218ff,_0x1904ca,_0x5b325b,_0x58491a='';const _0x1e1599={'broker':_0x5123d8,'active':null,'confirmed':![],'ready':new Promise((_0x1a6801,_0x109e1a)=>{_0x2218ff=_0x1a6801,_0x1904ca=_0x109e1a;})};jobs[_0x1193fa(0x1e3)](_0x264c5d,_0x1e1599);const _0x4f10b3=_0x2ea46a=>{const _0x32d7a9=_0x1193fa;_0x5b325b||=fail(_0x2ea46a),_0x1904ca(_0x5b325b);for(const _0x24153d of _0x2d2d3e[_0x32d7a9(0x207)]())_0x24153d[_0x32d7a9(0x1e5)](_0x5b325b);_0x2d2d3e[_0x32d7a9(0x204)]();if(!_0x5123d8[_0x32d7a9(0x1f7)][_0x32d7a9(0x1f3)]&&!_0x5123d8['stdin'][_0x32d7a9(0x1ef)])_0x5123d8[_0x32d7a9(0x1f7)][_0x32d7a9(0x1c7)]();},_0x50622f=setTimeout(()=>_0x4f10b3(_0x1193fa(0x202)),0x3a98);_0x1e1599[_0x1193fa(0x1e8)][_0x1193fa(0x208)](()=>clearTimeout(_0x50622f))[_0x1193fa(0x1d0)](()=>{}),_0x1e1599['ready'][_0x1193fa(0x1d0)](()=>{}),_0x5123d8['on'](_0x1193fa(0x1ed),()=>_0x4f10b3(_0x1193fa(0x1f6))),_0x5123d8[_0x1193fa(0x1f7)]['on']('error',()=>_0x4f10b3(_0x1193fa(0x1f6))),_0x5123d8[_0x1193fa(0x1ce)]['on'](_0x1193fa(0x1f2),()=>_0x4f10b3(_0x1193fa(0x202))),_0x5123d8[_0x1193fa(0x1de)]['on'](_0x1193fa(0x1f2),_0x189c7e=>{const _0xad3707=_0x1193fa;_0x58491a+=_0x189c7e;if(_0x58491a[_0xad3707(0x1e7)]>0x10000)return _0x4f10b3(_0xad3707(0x1dd));let _0x1b50c3;while((_0x1b50c3=_0x58491a[_0xad3707(0x20c)]('\x0a'))>=0x0){const _0x169f4a=_0x58491a[_0xad3707(0x1ec)](0x0,_0x1b50c3);_0x58491a=_0x58491a[_0xad3707(0x1ec)](_0x1b50c3+0x1);try{const _0x34e9a3=JSON[_0xad3707(0x205)](_0x169f4a);if(_0x34e9a3[_0xad3707(0x1cf)]!==_0x2e6641)return _0x4f10b3(_0xad3707(0x1dd));if(_0x34e9a3[_0xad3707(0x1f0)]===_0xad3707(0x1e8)&&!_0x1e1599[_0xad3707(0x1ca)]&&_0x34e9a3[_0xad3707(0x1d9)]===_0x588c61['pid'])_0x1e1599['confirmed']=!![],_0x2218ff();else{if(_0x34e9a3['type']===_0xad3707(0x1c6)&&_0x1e1599[_0xad3707(0x1ca)]&&_0x2d2d3e[_0xad3707(0x201)](_0x34e9a3['id'])&&Number[_0xad3707(0x1d5)](_0x34e9a3[_0xad3707(0x1fd)])&&_0x34e9a3[_0xad3707(0x1fd)]>=0x0){_0x1e1599[_0xad3707(0x1fd)]=_0x34e9a3[_0xad3707(0x1fd)];const _0x3d81f1=_0x2d2d3e['get'](_0x34e9a3['id']);_0x2d2d3e[_0xad3707(0x209)](_0x34e9a3['id']),_0x3d81f1?.[_0xad3707(0x203)](_0x34e9a3[_0xad3707(0x1fd)]);}else _0x4f10b3(_0xad3707(0x1dd));}}catch{_0x4f10b3(_0xad3707(0x1dd));}}});let _0x442dfc;return _0x1e1599['closed']=new Promise(_0xa6b5b2=>{_0x442dfc=_0xa6b5b2;}),_0x5123d8[_0x1193fa(0x1d2)]('close',_0x21ec41=>{const _0x18bc36=_0x1193fa;_0x442dfc();if(!_0x1e1599[_0x18bc36(0x1fb)]||_0x21ec41!==0x0)_0x4f10b3(_0x18bc36(0x1df));}),_0x1e1599[_0x1193fa(0x1da)]=async _0x3be83f=>{const _0x37729f=_0x1193fa;await _0x1e1599[_0x37729f(0x1e8)];if(_0x5b325b)throw _0x5b325b;if(_0x2d2d3e[_0x37729f(0x1d4)]>=0x80)throw fail(_0x37729f(0x1d3));const _0x2a489f=crypto[_0x37729f(0x1dc)]();return new Promise((_0x758a4f,_0x32ec11)=>{const _0xf20f22=_0x37729f,_0x17d407=setTimeout(()=>{const _0x4ff1c8=_0x5db4;_0x2d2d3e['delete'](_0x2a489f),_0x32ec11(fail(_0x4ff1c8(0x206)));},0x1388);_0x2d2d3e['set'](_0x2a489f,{'resolve':_0x36b2f8=>{clearTimeout(_0x17d407),_0x758a4f(_0x36b2f8);},'reject':_0x39d06c=>{clearTimeout(_0x17d407),_0x32ec11(_0x39d06c);}});const _0x514e8d={};_0x514e8d['id']=_0x2a489f,_0x514e8d[_0xf20f22(0x1f0)]=_0x3be83f,_0x514e8d[_0xf20f22(0x1cf)]=_0x2e6641,_0x5123d8[_0xf20f22(0x1f7)][_0xf20f22(0x1e9)](JSON[_0xf20f22(0x1e0)](_0x514e8d)+'\x0a',_0x938e6e=>{const _0x273e3f=_0xf20f22;if(_0x938e6e)_0x4f10b3(_0x273e3f(0x1f6));});});},_0x1e1599[_0x1193fa(0x1d8)]=async()=>{const _0x18f566=_0x1193fa;if(await _0x1e1599[_0x18f566(0x1da)](_0x18f566(0x1c6))!==0x0)throw fail(_0x18f566(0x1f9));_0x1e1599[_0x18f566(0x1fb)]=!![],_0x5123d8[_0x18f566(0x1f7)]['end']();let _0x9af03;try{await Promise[_0x18f566(0x1cd)]([_0x1e1599[_0x18f566(0x1c9)],new Promise((_0x56515a,_0x2a89c7)=>{const _0x4534fa=_0x18f566;_0x9af03=setTimeout(()=>_0x2a89c7(fail(_0x4534fa(0x20a))),0x1388);})]);}finally{clearTimeout(_0x9af03);}if(_0x5b325b)throw _0x5b325b;},_0x1e1599;}module[_0x26f7a3(0x1f1)]={'attachWindowsJob':attachWindowsJob,'jobFor':_0xf520a3=>jobs[_0x26f7a3(0x1e1)](_0xf520a3)};
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
param($Request)
|
|
2
|
+
$ErrorActionPreference = 'Stop'
|
|
3
|
+
$ProgressPreference = 'SilentlyContinue'
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
# This script receives only the pinned bootstrap's request, never executable arguments.
|
|
7
|
+
$fields = @('workspace', 'connectionId', 'receiptHash', 'nonce', 'pid', 'start', 'imageHash', 'elevated', 'helper', 'helperHash')
|
|
8
|
+
if ($null -eq $Request -or $Request -isnot [pscustomobject]) { exit 46 }
|
|
9
|
+
$actualFields = @($Request.PSObject.Properties.Name)
|
|
10
|
+
$precision = 'native-filetime'
|
|
11
|
+
if ($actualFields -ccontains 'startPrecision') {
|
|
12
|
+
$fields += 'startPrecision'
|
|
13
|
+
if ($Request.startPrecision -isnot [string] -or $Request.startPrecision -cne 'cim-microsecond') { exit 46 }
|
|
14
|
+
$precision = $Request.startPrecision
|
|
15
|
+
}
|
|
16
|
+
$backendLease = $actualFields -ccontains 'backendLease'
|
|
17
|
+
if ($backendLease) {
|
|
18
|
+
$fields += @('backendLease', 'service')
|
|
19
|
+
if ($Request.backendLease -isnot [string] -or @('codegraph', 'code-review-graph') -cnotcontains $Request.backendLease -or
|
|
20
|
+
$Request.service -isnot [string] -or $Request.service -cne 'PolicyAgent' -or
|
|
21
|
+
$Request.connectionId -cnotmatch '^lease-[a-f0-9]{20}$') { exit 46 }
|
|
22
|
+
} elseif ($Request.connectionId -cnotmatch '^conn-[a-f0-9]{20}$') { exit 46 }
|
|
23
|
+
if ($actualFields.Count -ne $fields.Count) { exit 46 }
|
|
24
|
+
foreach ($field in $actualFields) { if ($fields -cnotcontains $field) { exit 46 } }
|
|
25
|
+
foreach ($field in @('workspace', 'connectionId', 'receiptHash', 'nonce', 'start', 'imageHash', 'helper', 'helperHash')) {
|
|
26
|
+
if ($Request.$field -isnot [string]) { exit 46 }
|
|
27
|
+
}
|
|
28
|
+
if ($Request.nonce -cnotmatch '^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$' -or
|
|
29
|
+
$Request.elevated -isnot [bool] -or
|
|
30
|
+
($Request.pid -isnot [int] -and $Request.pid -isnot [long]) -or
|
|
31
|
+
$Request.pid -le 0 -or $Request.pid -gt 2147483647) { exit 46 }
|
|
32
|
+
foreach ($field in @('receiptHash', 'imageHash', 'helperHash')) {
|
|
33
|
+
if ($Request.$field -cnotmatch '^[a-f0-9]{64}$') { exit 46 }
|
|
34
|
+
}
|
|
35
|
+
[long]$start = 0
|
|
36
|
+
if ($Request.start -cnotmatch '^[1-9][0-9]{15,18}$' -or
|
|
37
|
+
-not [long]::TryParse($Request.start, [ref]$start) -or $start -gt 2650467743999999999) { exit 46 }
|
|
38
|
+
if ($precision -ceq 'cim-microsecond' -and $start % 10 -ne 0) { exit 46 }
|
|
39
|
+
foreach ($field in @('workspace', 'helper')) {
|
|
40
|
+
$value = $Request.$field
|
|
41
|
+
if ($value.Length -gt 1024 -or $value -notmatch '^[a-zA-Z]:[\\/]' -or
|
|
42
|
+
$value -match '[\x00-\x1f\x7f]' -or
|
|
43
|
+
[IO.Path]::GetFullPath($value).Replace('/', '\') -ine $value.Replace('/', '\')) { exit 46 }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# Resolve trusted OS locations before loading the compiler or a PowerShell module.
|
|
47
|
+
$windowsRoot = [Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)
|
|
48
|
+
if ($windowsRoot -ine 'C:\Windows' -or -not [Environment]::Is64BitOperatingSystem -or
|
|
49
|
+
-not [Environment]::Is64BitProcess) { exit 46 }
|
|
50
|
+
$systemDirectory = [IO.Path]::Combine($windowsRoot, 'System32')
|
|
51
|
+
$moduleRoot = [IO.Path]::Combine($systemDirectory, 'WindowsPowerShell\v1.0\Modules')
|
|
52
|
+
$utilityModule = [IO.Path]::Combine($moduleRoot, 'Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1')
|
|
53
|
+
$securityModule = [IO.Path]::Combine($moduleRoot, 'Microsoft.PowerShell.Security\Microsoft.PowerShell.Security.psd1')
|
|
54
|
+
$powershellPath = [IO.Path]::Combine($systemDirectory, 'WindowsPowerShell\v1.0\powershell.exe')
|
|
55
|
+
$tempRoot = [IO.Path]::Combine([Environment]::GetFolderPath([Environment+SpecialFolder]::LocalApplicationData), 'Temp')
|
|
56
|
+
$tempRoot = [IO.Path]::GetFullPath($tempRoot)
|
|
57
|
+
$workspace = [IO.Path]::GetFullPath($Request.workspace).Replace('/', '\').TrimEnd('\')
|
|
58
|
+
if (-not [IO.Directory]::Exists($tempRoot) -or $tempRoot -ieq $workspace -or
|
|
59
|
+
$tempRoot.StartsWith($workspace + '\', [StringComparison]::OrdinalIgnoreCase)) { exit 46 }
|
|
60
|
+
foreach ($trustedPath in @($windowsRoot, $systemDirectory, $moduleRoot, $utilityModule, $securityModule, $powershellPath, $tempRoot)) {
|
|
61
|
+
$item = $trustedPath
|
|
62
|
+
while ($null -ne $item) {
|
|
63
|
+
if (([IO.File]::GetAttributes($item) -band [IO.FileAttributes]::ReparsePoint) -ne 0) { exit 46 }
|
|
64
|
+
$item = [IO.Path]::GetDirectoryName($item)
|
|
65
|
+
if ($item -eq '') { $item = $null }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
$env:PSModulePath = $moduleRoot
|
|
69
|
+
$env:TEMP = $tempRoot
|
|
70
|
+
$env:TMP = $tempRoot
|
|
71
|
+
[Environment]::CurrentDirectory = $systemDirectory
|
|
72
|
+
Import-Module -Name $utilityModule -ErrorAction Stop
|
|
73
|
+
Microsoft.PowerShell.Utility\Add-Type -TypeDefinition @'
|
|
74
|
+
using System;
|
|
75
|
+
using System.IO;
|
|
76
|
+
using System.Text;
|
|
77
|
+
using System.Threading;
|
|
78
|
+
using System.Runtime.InteropServices;
|
|
79
|
+
using System.Security.Cryptography.X509Certificates;
|
|
80
|
+
|
|
81
|
+
public static class AptLegacyQuery {
|
|
82
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern IntPtr OpenProcess(uint access, bool inherit, int pid);
|
|
83
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern bool GetProcessTimes(IntPtr process, out long created, out long exited, out long kernel, out long user);
|
|
84
|
+
[DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)] static extern bool QueryFullProcessImageName(IntPtr process, uint flags, StringBuilder image, ref uint size);
|
|
85
|
+
[DllImport("kernel32.dll", CharSet=CharSet.Unicode)] static extern uint GetSystemWindowsDirectory(StringBuilder directory, uint size);
|
|
86
|
+
[DllImport("kernel32.dll", CharSet=CharSet.Unicode)] static extern uint GetSystemDirectory(StringBuilder directory, uint size);
|
|
87
|
+
[DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)] static extern uint GetFinalPathNameByHandle(IntPtr file, StringBuilder path, uint size, uint flags);
|
|
88
|
+
[DllImport("kernel32.dll")] public static extern bool CloseHandle(IntPtr handle);
|
|
89
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern uint WaitForSingleObject(IntPtr handle, uint timeout);
|
|
90
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern bool GetExitCodeProcess(IntPtr process, out uint code);
|
|
91
|
+
|
|
92
|
+
[StructLayout(LayoutKind.Sequential)] struct ServiceStatus {
|
|
93
|
+
public uint dwServiceType, dwCurrentState, dwControlsAccepted, dwWin32ExitCode,
|
|
94
|
+
dwServiceSpecificExitCode, dwCheckPoint, dwWaitHint, dwProcessId, dwServiceFlags;
|
|
95
|
+
}
|
|
96
|
+
[DllImport("advapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)] static extern IntPtr OpenSCManager(string machine, string database, uint access);
|
|
97
|
+
[DllImport("advapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)] static extern IntPtr OpenService(IntPtr manager, string name, uint access);
|
|
98
|
+
[DllImport("advapi32.dll", SetLastError=true)] static extern bool QueryServiceStatusEx(IntPtr service, int level, out ServiceStatus status, uint size, out uint needed);
|
|
99
|
+
[DllImport("advapi32.dll")] static extern bool CloseServiceHandle(IntPtr handle);
|
|
100
|
+
|
|
101
|
+
[StructLayout(LayoutKind.Sequential)] struct Usage { public uint count; public IntPtr identifiers; }
|
|
102
|
+
[StructLayout(LayoutKind.Sequential)] struct UsageMatch { public uint type; public Usage usage; }
|
|
103
|
+
[StructLayout(LayoutKind.Sequential)] struct ChainParameters {
|
|
104
|
+
public uint cbSize; public UsageMatch requestedUsage, requestedIssuancePolicy;
|
|
105
|
+
public uint urlRetrievalTimeout; public int checkRevocationFreshness;
|
|
106
|
+
public uint revocationFreshness; public IntPtr cacheResync, strongSign; public uint strongSignFlags;
|
|
107
|
+
}
|
|
108
|
+
[StructLayout(LayoutKind.Sequential)] struct PolicyParameters { public uint cbSize, flags; public IntPtr extra; }
|
|
109
|
+
[StructLayout(LayoutKind.Sequential)] struct PolicyStatus { public uint cbSize, dwError; public int chainIndex, elementIndex; public IntPtr extra; }
|
|
110
|
+
[DllImport("crypt32.dll", SetLastError=true)] static extern bool CertGetCertificateChain(IntPtr engine, IntPtr certificate, IntPtr time, IntPtr store, ref ChainParameters parameters, uint flags, IntPtr reserved, out IntPtr chain);
|
|
111
|
+
[DllImport("crypt32.dll", SetLastError=true)] static extern bool CertVerifyCertificateChainPolicy(IntPtr policy, IntPtr chain, ref PolicyParameters parameters, ref PolicyStatus status);
|
|
112
|
+
[DllImport("crypt32.dll")] static extern void CertFreeCertificateChain(IntPtr chain);
|
|
113
|
+
|
|
114
|
+
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)] struct ShellInfo {
|
|
115
|
+
public uint cbSize, fMask; public IntPtr hwnd;
|
|
116
|
+
public string lpVerb, lpFile, lpParameters, lpDirectory; public int nShow;
|
|
117
|
+
public IntPtr hInstApp, lpIDList; public string lpClass; public IntPtr hkeyClass;
|
|
118
|
+
public uint dwHotKey; public IntPtr hIcon, hProcess;
|
|
119
|
+
}
|
|
120
|
+
[DllImport("shell32.dll", CharSet=CharSet.Unicode, SetLastError=true)] static extern bool ShellExecuteEx(ref ShellInfo info);
|
|
121
|
+
|
|
122
|
+
public static bool TrustedDirectories(string windows, string system) {
|
|
123
|
+
var root = new StringBuilder(32768); var dir = new StringBuilder(32768);
|
|
124
|
+
uint rootSize = GetSystemWindowsDirectory(root, (uint)root.Capacity);
|
|
125
|
+
uint dirSize = GetSystemDirectory(dir, (uint)dir.Capacity);
|
|
126
|
+
return rootSize > 0 && rootSize < root.Capacity && dirSize > 0 && dirSize < dir.Capacity &&
|
|
127
|
+
String.Equals(root.ToString(), windows, StringComparison.OrdinalIgnoreCase) &&
|
|
128
|
+
String.Equals(dir.ToString(), system, StringComparison.OrdinalIgnoreCase);
|
|
129
|
+
}
|
|
130
|
+
public static int OpenQuery(int pid, out IntPtr process) {
|
|
131
|
+
process = OpenProcess(0x1000, false, pid);
|
|
132
|
+
if (process != IntPtr.Zero) return 0;
|
|
133
|
+
return Marshal.GetLastWin32Error() == 5 ? 43 : 46;
|
|
134
|
+
}
|
|
135
|
+
public static int CheckProcess(IntPtr process, long start, string expectedImage) {
|
|
136
|
+
long created, exited, kernel, user;
|
|
137
|
+
if (!GetProcessTimes(process, out created, out exited, out kernel, out user))
|
|
138
|
+
return Marshal.GetLastWin32Error() == 5 ? 43 : 46;
|
|
139
|
+
var image = new StringBuilder(32768); uint size = (uint)image.Capacity;
|
|
140
|
+
if (!QueryFullProcessImageName(process, 0, image, ref size))
|
|
141
|
+
return Marshal.GetLastWin32Error() == 5 ? 43 : 46;
|
|
142
|
+
uint exitCode;
|
|
143
|
+
if (!GetExitCodeProcess(process, out exitCode)) return 46;
|
|
144
|
+
return created == start && exitCode == 259 && String.Equals(image.ToString(), expectedImage, StringComparison.OrdinalIgnoreCase) ? 0 : 46;
|
|
145
|
+
}
|
|
146
|
+
public static int BindObservedStart(IntPtr process, long observed, string precision, out long exact) {
|
|
147
|
+
exact = 0;
|
|
148
|
+
long created, exited, kernel, user;
|
|
149
|
+
if (!GetProcessTimes(process, out created, out exited, out kernel, out user))
|
|
150
|
+
return Marshal.GetLastWin32Error() == 5 ? 43 : 46;
|
|
151
|
+
// CIM serializes microseconds. It is a typed anchor, not the native
|
|
152
|
+
// identity used for subsequent checks against this held process handle.
|
|
153
|
+
bool matches = observed > 0 && (precision == "native-filetime" ? created == observed :
|
|
154
|
+
precision == "cim-microsecond" && observed % 10 == 0 && created / 10 * 10 == observed);
|
|
155
|
+
if (!matches) return 46;
|
|
156
|
+
exact = created;
|
|
157
|
+
return 0;
|
|
158
|
+
}
|
|
159
|
+
public static bool FileIdentity(FileStream file, string expected) {
|
|
160
|
+
string item = expected;
|
|
161
|
+
while (!String.IsNullOrEmpty(item)) {
|
|
162
|
+
if ((File.GetAttributes(item) & FileAttributes.ReparsePoint) != 0) return false;
|
|
163
|
+
item = Path.GetDirectoryName(item);
|
|
164
|
+
}
|
|
165
|
+
var final = new StringBuilder(32768);
|
|
166
|
+
uint count = GetFinalPathNameByHandle(file.SafeFileHandle.DangerousGetHandle(), final, (uint)final.Capacity, 0);
|
|
167
|
+
if (count == 0 || count >= final.Capacity) return false;
|
|
168
|
+
string actual = final.ToString();
|
|
169
|
+
if (actual.StartsWith(@"\\?\", StringComparison.Ordinal)) actual = actual.Substring(4);
|
|
170
|
+
return String.Equals(actual, expected, StringComparison.OrdinalIgnoreCase);
|
|
171
|
+
}
|
|
172
|
+
public static FileStream OpenImage(string image) {
|
|
173
|
+
return new FileStream(image, FileMode.Open, FileAccess.Read, FileShare.Read);
|
|
174
|
+
}
|
|
175
|
+
public static bool MicrosoftRoot(X509Certificate2 certificate) {
|
|
176
|
+
IntPtr chain = IntPtr.Zero;
|
|
177
|
+
var parameters = new ChainParameters(); parameters.cbSize = (uint)Marshal.SizeOf(parameters);
|
|
178
|
+
parameters.urlRetrievalTimeout = 15000;
|
|
179
|
+
if (!CertGetCertificateChain(IntPtr.Zero, certificate.Handle, IntPtr.Zero, IntPtr.Zero, ref parameters, 0, IntPtr.Zero, out chain)) return false;
|
|
180
|
+
try {
|
|
181
|
+
var policy = new PolicyParameters(); policy.cbSize = (uint)Marshal.SizeOf(policy);
|
|
182
|
+
var policyStatus = new PolicyStatus(); policyStatus.cbSize = (uint)Marshal.SizeOf(policyStatus);
|
|
183
|
+
return CertVerifyCertificateChainPolicy(new IntPtr(7), chain, ref policy, ref policyStatus) && policyStatus.dwError == 0;
|
|
184
|
+
} finally { CertFreeCertificateChain(chain); }
|
|
185
|
+
}
|
|
186
|
+
static bool RunningService(int pid, bool backendLease) {
|
|
187
|
+
IntPtr manager = OpenSCManager(null, null, 0x0001);
|
|
188
|
+
if (manager == IntPtr.Zero) return false;
|
|
189
|
+
try {
|
|
190
|
+
IntPtr service = backendLease ? OpenService(manager, "PolicyAgent", 0x0004) : OpenService(manager, "HvHost", 0x0004);
|
|
191
|
+
if (service == IntPtr.Zero) return false;
|
|
192
|
+
try {
|
|
193
|
+
ServiceStatus state; uint needed;
|
|
194
|
+
return QueryServiceStatusEx(service, 0, out state, (uint)Marshal.SizeOf(typeof(ServiceStatus)), out needed) &&
|
|
195
|
+
state.dwCurrentState == 4 && state.dwProcessId == (uint)pid;
|
|
196
|
+
} finally { CloseServiceHandle(service); }
|
|
197
|
+
} finally { CloseServiceHandle(manager); }
|
|
198
|
+
}
|
|
199
|
+
public static bool RunningService(int pid) { return RunningService(pid, false); }
|
|
200
|
+
public static bool RunningBackendService(int pid) { return RunningService(pid, true); }
|
|
201
|
+
public static void StartProbeDeadline() {
|
|
202
|
+
// A stuck trust provider must not leave the elevated child running indefinitely.
|
|
203
|
+
var deadline = new Thread(delegate() { Thread.Sleep(80000); Environment.Exit(46); });
|
|
204
|
+
deadline.IsBackground = true; deadline.Start();
|
|
205
|
+
}
|
|
206
|
+
public static int Elevate(string executable, string encoded, string system) {
|
|
207
|
+
var info = new ShellInfo(); info.cbSize = (uint)Marshal.SizeOf(info);
|
|
208
|
+
info.fMask = 0x00000040 | 0x00000100; // Retain the process handle; synchronous ShellExecute launch.
|
|
209
|
+
info.lpVerb = "runas"; info.lpFile = executable;
|
|
210
|
+
info.lpParameters = "-NoProfile -NonInteractive -STA -EncodedCommand " + encoded;
|
|
211
|
+
info.lpDirectory = system; info.nShow = 0;
|
|
212
|
+
if (!ShellExecuteEx(ref info)) {
|
|
213
|
+
int error = Marshal.GetLastWin32Error(); return error == 1223 ? 44 : 46;
|
|
214
|
+
}
|
|
215
|
+
if (info.hProcess == IntPtr.Zero) return 46;
|
|
216
|
+
try {
|
|
217
|
+
uint wait = WaitForSingleObject(info.hProcess, 90000);
|
|
218
|
+
if (wait == 258) return 45;
|
|
219
|
+
if (wait != 0) return 46;
|
|
220
|
+
uint code; if (!GetExitCodeProcess(info.hProcess, out code)) return 46;
|
|
221
|
+
return code == 42 ? 42 : 46;
|
|
222
|
+
} finally { CloseHandle(info.hProcess); }
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
'@ -ErrorAction Stop
|
|
226
|
+
if (-not [AptLegacyQuery]::TrustedDirectories($windowsRoot, $systemDirectory)) { exit 46 }
|
|
227
|
+
|
|
228
|
+
if ($Request.elevated) {
|
|
229
|
+
# The child reads exactly the pinned helper bytes and cannot recurse into elevation.
|
|
230
|
+
$childRequest = [ordered]@{}
|
|
231
|
+
foreach ($field in $fields) { $childRequest[$field] = $Request.$field }
|
|
232
|
+
$childRequest.elevated = $false
|
|
233
|
+
$payload = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(($childRequest | ConvertTo-Json -Compress)))
|
|
234
|
+
$bootstrap = '$ErrorActionPreference=''Stop'';try{$r=[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String(''' + $payload + '''))|ConvertFrom-Json;$b=[IO.File]::ReadAllBytes($r.helper);$h=[BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($b)).Replace(''-'','''').ToLowerInvariant();if($h-ne$r.helperHash){exit 46};$s=[Text.Encoding]::UTF8.GetString($b);&([ScriptBlock]::Create($s)) $r}catch{exit 46}'
|
|
235
|
+
$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($bootstrap))
|
|
236
|
+
exit ([AptLegacyQuery]::Elevate($powershellPath, $encoded, $systemDirectory))
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
[AptLegacyQuery]::StartProbeDeadline()
|
|
240
|
+
[IntPtr]$processHandle = [IntPtr]::Zero
|
|
241
|
+
$image = $null
|
|
242
|
+
try {
|
|
243
|
+
$code = [AptLegacyQuery]::OpenQuery([int]$Request.pid, [ref]$processHandle)
|
|
244
|
+
if ($code -ne 0) { exit $code }
|
|
245
|
+
[long]$nativeStart = 0
|
|
246
|
+
$code = [AptLegacyQuery]::BindObservedStart($processHandle, $start, $precision, [ref]$nativeStart)
|
|
247
|
+
if ($code -ne 0) { exit $code }
|
|
248
|
+
$imagePath = [IO.Path]::Combine($systemDirectory, 'svchost.exe')
|
|
249
|
+
$code = [AptLegacyQuery]::CheckProcess($processHandle, $nativeStart, $imagePath)
|
|
250
|
+
if ($code -ne 0) { exit $code }
|
|
251
|
+
$image = [AptLegacyQuery]::OpenImage($imagePath)
|
|
252
|
+
if (-not [AptLegacyQuery]::FileIdentity($image, $imagePath)) { exit 46 }
|
|
253
|
+
$hasher = [Security.Cryptography.SHA256]::Create()
|
|
254
|
+
try { $hash = [BitConverter]::ToString($hasher.ComputeHash($image)).Replace('-', '').ToLowerInvariant() }
|
|
255
|
+
finally { $hasher.Dispose() }
|
|
256
|
+
if ($hash -cne $Request.imageHash) { exit 46 }
|
|
257
|
+
Import-Module -Name $securityModule -ErrorAction Stop
|
|
258
|
+
# Authenticode resolves embedded or catalog signatures. The held file denies writes
|
|
259
|
+
# and replacement during its path-based lookup; final handle identity is rechecked.
|
|
260
|
+
$signature = Microsoft.PowerShell.Security\Get-AuthenticodeSignature -LiteralPath $imagePath -ErrorAction Stop
|
|
261
|
+
if ($signature.Status -ne [System.Management.Automation.SignatureStatus]::Valid -or
|
|
262
|
+
$null -eq $signature.SignerCertificate -or
|
|
263
|
+
$signature.SignerCertificate.GetNameInfo([Security.Cryptography.X509Certificates.X509NameType]::SimpleName, $false) -cne 'Microsoft Windows' -or
|
|
264
|
+
-not [AptLegacyQuery]::MicrosoftRoot($signature.SignerCertificate)) { exit 46 }
|
|
265
|
+
if (-not [AptLegacyQuery]::FileIdentity($image, $imagePath)) { exit 46 }
|
|
266
|
+
if ($backendLease) {
|
|
267
|
+
if (-not [AptLegacyQuery]::RunningBackendService([int]$Request.pid)) { exit 46 }
|
|
268
|
+
} elseif (-not [AptLegacyQuery]::RunningService([int]$Request.pid)) { exit 46 }
|
|
269
|
+
$code = [AptLegacyQuery]::CheckProcess($processHandle, $nativeStart, $imagePath)
|
|
270
|
+
if ($code -ne 0) { exit $code }
|
|
271
|
+
if (-not [AptLegacyQuery]::FileIdentity($image, $imagePath)) { exit 46 }
|
|
272
|
+
exit 42
|
|
273
|
+
} finally {
|
|
274
|
+
if ($null -ne $image) { $image.Dispose() }
|
|
275
|
+
if ($processHandle -ne [IntPtr]::Zero) { [void][AptLegacyQuery]::CloseHandle($processHandle) }
|
|
276
|
+
}
|
|
277
|
+
} catch { exit 46 }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0xbb8b41=_0x371a;(function(_0xfb168c,_0x5d094c){const _0x12cb42=_0x371a,_0xc92075=_0xfb168c();while(!![]){try{const _0x44c1fe=-parseInt(_0x12cb42(0x140))/0x1*(parseInt(_0x12cb42(0x14b))/0x2)+-parseInt(_0x12cb42(0x117))/0x3*(-parseInt(_0x12cb42(0x15a))/0x4)+parseInt(_0x12cb42(0x155))/0x5+parseInt(_0x12cb42(0x134))/0x6*(parseInt(_0x12cb42(0x135))/0x7)+-parseInt(_0x12cb42(0x160))/0x8*(-parseInt(_0x12cb42(0x101))/0x9)+parseInt(_0x12cb42(0x133))/0xa*(-parseInt(_0x12cb42(0x120))/0xb)+-parseInt(_0x12cb42(0x11e))/0xc;if(_0x44c1fe===_0x5d094c)break;else _0xc92075['push'](_0xc92075['shift']());}catch(_0x3d18ec){_0xc92075['push'](_0xc92075['shift']());}}}(_0x3a1e,0x34ef7));const fs=require(_0xbb8b41(0x10c)),path=require(_0xbb8b41(0x10e)),crypto=require(_0xbb8b41(0x12d)),{withAdmissionLock,fileFor}=require(_0xbb8b41(0x12c)),{sameWorkspace}=require(_0xbb8b41(0x15e)),fail=_0x16b4ec=>{const _0x29f985=_0xbb8b41;throw Object[_0x29f985(0x100)](new Error(_0x16b4ec),{'code':_0x16b4ec});};function durable(_0x5f15c1,_0xc653db){const _0x3bed3e=_0xbb8b41,_0x4749dc={};_0x4749dc[_0x3bed3e(0x129)]=!![],fs[_0x3bed3e(0x125)](path[_0x3bed3e(0x13a)](_0x5f15c1),_0x4749dc);const _0x18a254=_0x5f15c1+'.'+crypto[_0x3bed3e(0x12a)]()+_0x3bed3e(0x159),_0x4fcc58=fs[_0x3bed3e(0x130)](_0x18a254,'wx',0x180);try{fs[_0x3bed3e(0x103)](_0x4fcc58,JSON[_0x3bed3e(0x152)](_0xc653db)),fs[_0x3bed3e(0x139)](_0x4fcc58);}finally{fs[_0x3bed3e(0x146)](_0x4fcc58);}fs[_0x3bed3e(0x150)](_0x18a254,_0x5f15c1);}function _0x3a1e(){const _0x32977a=['Bhn0yxrtEw5J','uLvoveLnrv9tvefurv9twu1msu5l','BwTKAxjtEw5J','lI4VAw5ZDgfSBgvYl3vWzgf0zs1Yzxf1zxn0','Aw5JBhvKzxm','B3bLBKnVBw1PDhrLzeDLBMvYyxrPB24','CMvJDxjZAxzL','CMfUzg9Tvvvjra','ywnRBM93BgvKz2vKr2vUzxjHDgLVBG','lI9Hzg1PC3nPB24TzMvUy2u','BM9KztPJCNLWDg8','CMvZB3vYy2veAwDLC3q','y2XVC2vKqxq','B3bLBLn5BMm','AxntywzLsw50zwDLCG','AxntEw1IB2XPy0XPBMS','ndu1mgfptejeDG','odaXnMncBerRtq','mty5nfP0AhPMtq','y3jLyxrLsgfZAa','D2fPDgLUzW','ywrTAxnZAw9UrxbVy2G','zNn5BMntEw5J','zgLYBMfTzq','ywn0Aw9U','q09otKvdveLptL9jrevoveLuwv9srvfvsvjfra','C29Tzq','q09otKvdveLptL9ot1rFufjfuefsruq','q0foreLeqvrfx1rvueXfx01ju01bveni','mtCZqMDKs2D2','CMvNAxn0zxjnzw1Izxi','ChjVAMvJDeDLBMvYyxrPB24','z2vUzxjHDgLVBG','y29Kzq','qurnsvntsu9ox0nptKzmsunu','y2XVC2vtEw5J','y2f0ywXVz0HHC2G','z2vUzxjHDgLVBI5QC29U','zgLNzxn0','q09otKvdveLptL9tve9qx1voq09orKLstuve','mJKWnhjuuxnrvW','DxrMoa','DMvYC2LVBG','zgvMzxjYzwrhzw5LCMf0Aw9U','zxbVy2G','CMvUyw1Lu3LUyW','C2nOzw1HltiTyw5Kltm','C3rYAw5NAwz5','C3rHDgu','Dg9mB3DLCKnHC2u','odu1mZa1wxH2sKL1','D2LUmZi','ru5pru5u','Dg9ju09tDhjPBMC','lNrTCa','ngntwu1rsW','zMLSDgvY','y2fUzgLKyxrL','y29TBwL0v29YA3nWywnLr2vUzxjHDgLVBG','lI93B3jRC3bHy2uTCgf0Aa','CgfYC2u','oej0Ag9JAG','r0vorvjbveLptL9bq0TFuevoreLorW','D29YA3nWywnL','y2XVC2vK','CMvHzezPBgvtEw5J','DgfYz2v0vMvYC2LVBG','r0vorvjbveLptL9dt01nsvrFq09orKXjq1q','B3bLBG','BwfW','yxnZAwDU','mZCZmJKWm1bfD2f0CW','vvbeqvrfx1nvu1bftKrfra','D3jPDgvgAwXLu3LUyW','DxbKyxrL','vvbeqvrfx0nbtKnfteXfra','y2HPBgrqAwq','ywnRBM93BgvKz2vhzw5LCMf0Aw9U','u0vsvKLor19hru5fuKfusu9ox01ju01bveni','CMvHzeDLBMvYyxrPB24','zNjVEMvU','BwvTyMvYCW','BM9KztPMCW','CMvJB3jKq2fUzgLKyxrL','BM9KztPWyxrO','CMvHBhbHDgHtEw5J','DMfSDwvZ','C2vYDMLUzW','lMPZB24','ChjLCgfYzwq','DgfYz2v0rgLNzxn0','qvbux1vqrefurv9qru5esu5h','AM9PBG','mtm4mZiXwxPstNrw','C3vWzxj2AxnVCLbPza','CNvUDgLTzq','y29UBMvJDgLVBKLK','lI91CgrHDguTy29UDhjVBa','DhjHBNnHy3rPB25jza','y29UBMvJDgLVBNm','nde5mJm1nK9YtwLPDq','zxHWB3j0CW','mZmZm3r1vgLrDG','Agv4','q09otKvdveLptL9jrevoveLuwv9dt05gteLdva'];_0x3a1e=function(){return _0x32977a;};return _0x3a1e();}function generationFile(_0x599188){const _0x6ead49=_0xbb8b41;return path[_0x6ead49(0x116)](fs[_0x6ead49(0x10f)](_0x599188),'.agents',_0x6ead49(0x119),_0x6ead49(0x148));}function readGeneration(_0xdb3305){const _0x3443a9=_0xbb8b41;try{const _0x81570=generationFile(_0xdb3305);if(fs[_0x3443a9(0x123)](_0x81570)[_0x3443a9(0x132)]())fail(_0x3443a9(0x124));return JSON[_0x3443a9(0x15f)](fs[_0x3443a9(0xfb)](_0x81570,_0x3443a9(0x14c)));}catch(_0x296f91){if(_0x296f91[_0x3443a9(0x144)]===_0x3443a9(0x157))return null;throw _0x296f91;}}function joinServingGeneration(_0x52bd93,_0x412ecf){return withAdmissionLock(_0x52bd93,_0x20fbd9=>{const _0x5ca472=_0x371a;require(_0x5ca472(0x126))['assertStartupReady'](_0x52bd93);if(_0x20fbd9[_0x5ca472(0x153)]!==_0x5ca472(0xfe))fail(_0x5ca472(0x115));const _0x3b467f=readGeneration(_0x52bd93);if(_0x3b467f&&[_0x5ca472(0x14d),_0x5ca472(0x149),_0x5ca472(0x12e)][_0x5ca472(0x13d)](_0x3eba49=>_0x3b467f[_0x3eba49]!==_0x412ecf[_0x3eba49]))fail(_0x5ca472(0x108));const _0x309bec=_0x20fbd9[_0x5ca472(0x10b)]?.[_0x412ecf[_0x5ca472(0x11a)]];if(!_0x309bec||_0x309bec['state']===_0x5ca472(0xfa)||_0x309bec[_0x5ca472(0x118)]!==_0x412ecf[_0x5ca472(0x118)]||!Number[_0x5ca472(0x131)](_0x412ecf['childPid']))fail('CONNECTION_IDENTITY_CONFLICT');const _0x5d95d7=_0x3b467f||{'workspace':fs[_0x5ca472(0x10f)](_0x52bd93),'version':_0x412ecf['version'],'digest':_0x412ecf[_0x5ca472(0x149)],'resourceDigest':_0x412ecf[_0x5ca472(0x12e)],'generation':0x1,'transactionId':null,'connections':[],'committedAt':new Date()['toISOString']()};return _0x5d95d7['connections']=[...new Set([..._0x5d95d7['connections']||[],_0x412ecf['connectionId']])],_0x309bec['state']=_0x5ca472(0x111),_0x309bec[_0x5ca472(0x12b)]=_0x5d95d7[_0x5ca472(0x143)],durable(generationFile(_0x52bd93),_0x5d95d7),durable(fileFor(_0x52bd93),_0x20fbd9),_0x5d95d7;});}function _0x371a(_0x41273e,_0x3880db){_0x41273e=_0x41273e-0xfa;const _0x3a1ee6=_0x3a1e();let _0x371a0a=_0x3a1ee6[_0x41273e];if(_0x371a['IetAMO']===undefined){var _0x4495d9=function(_0x3c046e){const _0x6fb3e1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x131b23='',_0x4bf9db='';for(let _0x545701=0x0,_0x5c2cbf,_0x4ce4d8,_0x16b4ec=0x0;_0x4ce4d8=_0x3c046e['charAt'](_0x16b4ec++);~_0x4ce4d8&&(_0x5c2cbf=_0x545701%0x4?_0x5c2cbf*0x40+_0x4ce4d8:_0x4ce4d8,_0x545701++%0x4)?_0x131b23+=String['fromCharCode'](0xff&_0x5c2cbf>>(-0x2*_0x545701&0x6)):0x0){_0x4ce4d8=_0x6fb3e1['indexOf'](_0x4ce4d8);}for(let _0x5f15c1=0x0,_0xc653db=_0x131b23['length'];_0x5f15c1<_0xc653db;_0x5f15c1++){_0x4bf9db+='%'+('00'+_0x131b23['charCodeAt'](_0x5f15c1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4bf9db);};_0x371a['aZHcgH']=_0x4495d9,_0x371a['ptjNnv']={},_0x371a['IetAMO']=!![];}const _0x46490b=_0x3a1ee6[0x0],_0x14ea4b=_0x41273e+_0x46490b,_0x625b35=_0x371a['ptjNnv'][_0x14ea4b];return!_0x625b35?(_0x371a0a=_0x371a['aZHcgH'](_0x371a0a),_0x371a['ptjNnv'][_0x14ea4b]=_0x371a0a):_0x371a0a=_0x625b35,_0x371a0a;}function projectGeneration(_0x59a3c7,_0x56fa30,_0x3479d9){const _0x5dcca5=_0xbb8b41,_0x9d50d7=readGeneration(_0x56fa30);if(!_0x9d50d7||[_0x5dcca5(0x11c),_0x5dcca5(0x143),'version',_0x5dcca5(0x149),_0x5dcca5(0x12e)][_0x5dcca5(0x13d)](_0x44b743=>_0x9d50d7[_0x44b743]!==_0x3479d9[_0x44b743]))fail('GENERATION_PROJECTION_CONFLICT');let _0x4bb3fb=fs[_0x5dcca5(0x10f)](_0x56fa30);if(process['platform']===_0x5dcca5(0x156))_0x4bb3fb=_0x4bb3fb[_0x5dcca5(0x154)]();durable(path[_0x5dcca5(0x116)](fs[_0x5dcca5(0x10f)](_0x59a3c7),'workspaces',crypto[_0x5dcca5(0x136)]('sha256')[_0x5dcca5(0x104)](_0x4bb3fb)[_0x5dcca5(0x149)](_0x5dcca5(0x121))+_0x5dcca5(0x112)),{'workspace':_0x4bb3fb,'version':_0x3479d9[_0x5dcca5(0x14d)],'digest':_0x3479d9[_0x5dcca5(0x149)],'generation':_0x3479d9[_0x5dcca5(0x143)],'resourceDigest':_0x3479d9[_0x5dcca5(0x12e)],'transactionId':_0x3479d9[_0x5dcca5(0x11c)],'policyCompatibility':_0x5dcca5(0x151)});}function registerMember(_0x114377,_0xe8efd0){const _0x2e0a65=_0xbb8b41;if(!_0xe8efd0[_0x2e0a65(0x11a)]||!Number[_0x2e0a65(0x131)](_0xe8efd0['supervisorPid']))fail(_0x2e0a65(0x13c));return withAdmissionLock(_0x114377,_0x4bf407=>{const _0x38fe0f=_0x2e0a65;_0x4bf407[_0x38fe0f(0x10b)]||={};const _0x2ec8d9=_0x4bf407['members'][_0xe8efd0[_0x38fe0f(0x11a)]];if(_0x2ec8d9&&_0x2ec8d9[_0x38fe0f(0x118)]!==_0xe8efd0['supervisorPid'])fail('CONNECTION_IDENTITY_CONFLICT');const _0x3aa698=readGeneration(_0x114377),_0x138392=_0x4bf407['state']!==_0x38fe0f(0xfe)&&_0x3aa698?.['transactionId']===_0x4bf407['transactionId']&&!_0x3aa698[_0x38fe0f(0x11d)]['includes'](_0xe8efd0[_0x38fe0f(0x11a)]),_0x5dcb84={..._0x2ec8d9,..._0xe8efd0};_0x5dcb84[_0x38fe0f(0x153)]=_0x4bf407[_0x38fe0f(0x153)]==='open'?'joined':_0x38fe0f(0x137),_0x5dcb84[_0x38fe0f(0x138)]=_0x4bf407[_0x38fe0f(0x14f)],_0x5dcb84[_0x38fe0f(0x11c)]=_0x4bf407[_0x38fe0f(0x153)]===_0x38fe0f(0xfe)?null:_0x4bf407[_0x38fe0f(0x11c)],_0x5dcb84[_0x38fe0f(0x14e)]=_0x138392?_0x3aa698['generation']:null;const _0x540179=_0x5dcb84;return _0x4bf407[_0x38fe0f(0x10b)][_0xe8efd0[_0x38fe0f(0x11a)]]=_0x540179,durable(fileFor(_0x114377),_0x4bf407),_0x540179;});}function closeMember(_0x51f11e,_0x41787,_0x223843,_0x1988ee){const _0x4fdeb3=_0xbb8b41;if(_0x1988ee!==!![])fail(_0x4fdeb3(0x14a));return withAdmissionLock(_0x51f11e,_0xd7944c=>{const _0x288bfc=_0x4fdeb3,_0x1f5ec6=_0xd7944c[_0x288bfc(0x10b)]?.[_0x41787];if(!_0x1f5ec6||_0x1f5ec6['supervisorPid']!==_0x223843)fail(_0x288bfc(0x122));_0x1f5ec6[_0x288bfc(0x153)]=_0x288bfc(0xfa),_0x1f5ec6[_0x288bfc(0x12f)]=new Date()['toISOString'](),durable(fileFor(_0x51f11e),_0xd7944c);});}function recordCandidate(_0x1dd62e,_0xccfcf9,_0x274899,_0xee44e0){return withAdmissionLock(_0x1dd62e,_0x10136c=>{const _0x206c09=_0x371a;if(_0x10136c[_0x206c09(0x153)]!==_0x206c09(0x10a)||_0x10136c[_0x206c09(0x11c)]!==_0xccfcf9||_0x10136c[_0x206c09(0x14f)]!==_0x274899)fail(_0x206c09(0x145));const _0x8a7825=_0x10136c[_0x206c09(0x10b)]?.[_0xee44e0['connectionId']];if(!_0x8a7825||_0x8a7825[_0x206c09(0x153)]===_0x206c09(0xfa)||_0x8a7825[_0x206c09(0x118)]!==_0xee44e0[_0x206c09(0x118)]||!sameWorkspace(_0xee44e0[_0x206c09(0x162)],_0x1dd62e)||!Number['isSafeInteger'](_0xee44e0[_0x206c09(0x106)])||!Number[_0x206c09(0x131)](_0xee44e0[_0x206c09(0x143)])||!_0xee44e0[_0x206c09(0x12e)]||!_0xee44e0[_0x206c09(0x147)]||_0xee44e0[_0x206c09(0x14d)]!==_0x10136c[_0x206c09(0xfc)]||_0xee44e0[_0x206c09(0x149)]!==_0x10136c[_0x206c09(0x114)])fail(_0x206c09(0x13f));const _0x599799={..._0xee44e0};return _0x599799[_0x206c09(0x11c)]=_0xccfcf9,_0x599799[_0x206c09(0x14f)]=_0x274899,_0x8a7825['candidate']=_0x599799,_0x8a7825[_0x206c09(0x153)]=_0x206c09(0x113),durable(fileFor(_0x1dd62e),_0x10136c),_0x8a7825[_0x206c09(0x15c)];});}function commitWorkspaceGeneration(_0x53e92f,_0x50a7ce,_0x45008b,_0x565d6e){return withAdmissionLock(_0x53e92f,_0x435c9b=>{const _0x40663a=_0x371a;if(_0x435c9b[_0x40663a(0x153)]!==_0x40663a(0x10a)||_0x435c9b[_0x40663a(0x11c)]!==_0x50a7ce||_0x435c9b['epoch']!==_0x45008b)fail(_0x40663a(0x145));const _0x22e1e1=readGeneration(_0x53e92f);if(_0x22e1e1?.['transactionId']===_0x50a7ce){if(['version','digest',_0x40663a(0x12e),'catalogHash',_0x40663a(0x143)]['some'](_0x1e1311=>_0x22e1e1[_0x1e1311]!==_0x565d6e[_0x1e1311]))fail(_0x40663a(0xfd));return _0x22e1e1;}const _0x304136=require(_0x40663a(0x11b))['readControl'](_0x53e92f,_0x50a7ce);if(_0x304136?.[_0x40663a(0x13b)]==='cancel')fail(_0x40663a(0x105));if(_0x304136?.[_0x40663a(0x13b)]==='suspend')fail(_0x40663a(0x102));if(!Number['isSafeInteger'](_0x565d6e[_0x40663a(0x143)])||_0x565d6e[_0x40663a(0x143)]<=(_0x22e1e1?.[_0x40663a(0x143)]||0x0)||_0x565d6e[_0x40663a(0x14d)]!==_0x435c9b[_0x40663a(0xfc)]||_0x565d6e[_0x40663a(0x149)]!==_0x435c9b['targetDigest'])fail('GENERATION_COMMIT_CONFLICT');const _0x3a858f=Object[_0x40663a(0x110)](_0x435c9b[_0x40663a(0x10b)]||{})[_0x40663a(0x15b)](_0x44fc68=>_0x44fc68[_0x40663a(0x153)]!==_0x40663a(0xfa));for(const _0xc45bb of _0x3a858f){if(_0xc45bb[_0x40663a(0x153)]!==_0x40663a(0x113)||!_0xc45bb[_0x40663a(0x15c)]||_0xc45bb[_0x40663a(0x15c)][_0x40663a(0x11c)]!==_0x50a7ce||_0xc45bb[_0x40663a(0x15c)][_0x40663a(0x14f)]!==_0x45008b||[_0x40663a(0x14d),_0x40663a(0x149),_0x40663a(0x12e),_0x40663a(0x147),_0x40663a(0x143)][_0x40663a(0x13d)](_0x1236e8=>_0xc45bb[_0x40663a(0x15c)][_0x1236e8]!==_0x565d6e[_0x1236e8]))fail(_0x40663a(0x13e));}const _0xca97c6={..._0x565d6e,'workspace':fs[_0x40663a(0x10f)](_0x53e92f),'transactionId':_0x50a7ce,'connections':_0x3a858f[_0x40663a(0xff)](_0x3ce585=>_0x3ce585[_0x40663a(0x11a)]),'committedAt':new Date()[_0x40663a(0x158)]()};return durable(generationFile(_0x53e92f),_0xca97c6),_0xca97c6;});}function acknowledgeGeneration(_0x3a8467,_0x17ae03,_0x1c31e0,_0x185a3e){return withAdmissionLock(_0x3a8467,_0x124e86=>{const _0x8c2cab=_0x371a,_0x547d05=readGeneration(_0x3a8467),_0x1a1c10=_0x124e86[_0x8c2cab(0x10b)]?.[_0x17ae03];if(!_0x547d05||_0x547d05[_0x8c2cab(0x11c)]!==_0x1c31e0||!_0x1a1c10||_0x1a1c10['state']===_0x8c2cab(0xfa)||!_0x547d05['connections'][_0x8c2cab(0x127)](_0x17ae03)||['version',_0x8c2cab(0x149),_0x8c2cab(0x12e),_0x8c2cab(0x147),'generation'][_0x8c2cab(0x13d)](_0x1a010a=>_0x185a3e[_0x1a010a]!==_0x547d05[_0x1a010a])||_0x185a3e[_0x8c2cab(0x106)]!==_0x1a1c10['candidate']?.[_0x8c2cab(0x106)]||_0x185a3e[_0x8c2cab(0x118)]!==_0x1a1c10[_0x8c2cab(0x118)])fail('GENERATION_ACK_MISMATCH');return _0x1a1c10[_0x8c2cab(0x12b)]=_0x547d05[_0x8c2cab(0x143)],_0x1a1c10[_0x8c2cab(0x153)]=_0x8c2cab(0x111),durable(fileFor(_0x3a8467),_0x124e86),_0x547d05;});}function openCommittedGeneration(_0x5d2328,_0x39e13f){return withAdmissionLock(_0x5d2328,_0x130cbb=>{const _0x279a58=_0x371a,_0x2dd7df=readGeneration(_0x5d2328);if(_0x130cbb[_0x279a58(0x153)]!==_0x279a58(0x10a)||_0x130cbb[_0x279a58(0x11c)]!==_0x39e13f||_0x2dd7df?.[_0x279a58(0x11c)]!==_0x39e13f)fail(_0x279a58(0x145));const _0x582e71=_0x2dd7df[_0x279a58(0x11d)][_0x279a58(0xff)](_0x534e6a=>_0x130cbb[_0x279a58(0x10b)]?.[_0x534e6a]);if(_0x582e71['some'](_0x5b7df0=>!_0x5b7df0||_0x5b7df0[_0x279a58(0x153)]!==_0x279a58(0xfa)&&(_0x5b7df0['state']!==_0x279a58(0x111)||_0x5b7df0[_0x279a58(0x12b)]!==_0x2dd7df[_0x279a58(0x143)])))fail(_0x279a58(0x161));const _0x122901={..._0x130cbb};_0x122901['state']='open',_0x122901[_0x279a58(0x14f)]=_0x130cbb[_0x279a58(0x14f)]+0x1,_0x122901['generation']=_0x2dd7df[_0x279a58(0x143)];const _0x511e03=_0x122901;return durable(fileFor(_0x5d2328),_0x511e03),_0x511e03;});}const _0x4ce4d8={};_0x4ce4d8[_0xbb8b41(0x109)]=readGeneration,_0x4ce4d8[_0xbb8b41(0x142)]=projectGeneration,_0x4ce4d8[_0xbb8b41(0x141)]=registerMember,_0x4ce4d8['closeMember']=closeMember,_0x4ce4d8[_0xbb8b41(0x10d)]=recordCandidate,_0x4ce4d8[_0xbb8b41(0x15d)]=commitWorkspaceGeneration,_0x4ce4d8[_0xbb8b41(0x107)]=acknowledgeGeneration,_0x4ce4d8[_0xbb8b41(0x128)]=openCommittedGeneration,_0x4ce4d8['joinServingGeneration']=joinServingGeneration,module[_0xbb8b41(0x11f)]=_0x4ce4d8;
|
|
1
|
+
'use strict';const _0x167999=_0x3974;(function(_0x9d1b53,_0x5d6cf2){const _0xd1611d=_0x3974,_0x38bad9=_0x9d1b53();while(!![]){try{const _0x28ec5d=parseInt(_0xd1611d(0xcc))/0x1*(parseInt(_0xd1611d(0xc5))/0x2)+parseInt(_0xd1611d(0xa1))/0x3+-parseInt(_0xd1611d(0xb1))/0x4+parseInt(_0xd1611d(0xad))/0x5*(-parseInt(_0xd1611d(0xcf))/0x6)+-parseInt(_0xd1611d(0xc3))/0x7+-parseInt(_0xd1611d(0xce))/0x8*(-parseInt(_0xd1611d(0xcb))/0x9)+-parseInt(_0xd1611d(0x82))/0xa;if(_0x28ec5d===_0x5d6cf2)break;else _0x38bad9['push'](_0x38bad9['shift']());}catch(_0x2a5288){_0x38bad9['push'](_0x38bad9['shift']());}}}(_0x22bc,0xb9c8b));const fs=require(_0x167999(0xa8)),path=require('node:path'),crypto=require(_0x167999(0x77)),{withAdmissionLock,fileFor}=require(_0x167999(0xbc)),{sameWorkspace}=require('./workspace-path'),fail=_0x7be04d=>{const _0x4d295c=_0x167999;throw Object[_0x4d295c(0xaf)](new Error(_0x7be04d),{'code':_0x7be04d});};function _0x3974(_0x3013f3,_0x79ffab){_0x3013f3=_0x3013f3-0x76;const _0x22bc7e=_0x22bc();let _0x3974be=_0x22bc7e[_0x3013f3];if(_0x3974['LLpwob']===undefined){var _0x4968a4=function(_0x53ea15){const _0x24cc67='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e8846='',_0x294832='';for(let _0x539403=0x0,_0x18fc08,_0x30cc29,_0x7be04d=0x0;_0x30cc29=_0x53ea15['charAt'](_0x7be04d++);~_0x30cc29&&(_0x18fc08=_0x539403%0x4?_0x18fc08*0x40+_0x30cc29:_0x30cc29,_0x539403++%0x4)?_0x5e8846+=String['fromCharCode'](0xff&_0x18fc08>>(-0x2*_0x539403&0x6)):0x0){_0x30cc29=_0x24cc67['indexOf'](_0x30cc29);}for(let _0x530bbe=0x0,_0x18da00=_0x5e8846['length'];_0x530bbe<_0x18da00;_0x530bbe++){_0x294832+='%'+('00'+_0x5e8846['charCodeAt'](_0x530bbe)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x294832);};_0x3974['zKaYLC']=_0x4968a4,_0x3974['JUAAKi']={},_0x3974['LLpwob']=!![];}const _0x4d7f62=_0x22bc7e[0x0],_0x2e5b5f=_0x3013f3+_0x4d7f62,_0x2b9e34=_0x3974['JUAAKi'][_0x2e5b5f];return!_0x2b9e34?(_0x3974be=_0x3974['zKaYLC'](_0x3974be),_0x3974['JUAAKi'][_0x2e5b5f]=_0x3974be):_0x3974be=_0x2b9e34,_0x3974be;}function durable(_0x530bbe,_0x18da00){const _0x1ff997=_0x167999,_0x3621b8={};_0x3621b8['recursive']=!![],fs[_0x1ff997(0x96)](path[_0x1ff997(0xd9)](_0x530bbe),_0x3621b8);const _0x1d082d=_0x530bbe+'.'+crypto['randomUUID']()+_0x1ff997(0xc8),_0x2d9726=fs[_0x1ff997(0xb3)](_0x1d082d,'wx',0x180);try{fs[_0x1ff997(0xbd)](_0x2d9726,JSON[_0x1ff997(0x89)](_0x18da00)),fs[_0x1ff997(0xa4)](_0x2d9726);}finally{fs[_0x1ff997(0xb7)](_0x2d9726);}fs['renameSync'](_0x1d082d,_0x530bbe);}function generationFile(_0x30c65b){const _0x35dbfb=_0x167999;return path['join'](fs[_0x35dbfb(0xd2)](_0x30c65b),_0x35dbfb(0x93),_0x35dbfb(0x78),_0x35dbfb(0xd1));}function readGeneration(_0x577ee8){const _0x2c3ecf=_0x167999;try{const _0x17326b=generationFile(_0x577ee8);if(fs['lstatSync'](_0x17326b)['isSymbolicLink']())fail(_0x2c3ecf(0xa7));return JSON[_0x2c3ecf(0x88)](fs[_0x2c3ecf(0x80)](_0x17326b,_0x2c3ecf(0xb2)));}catch(_0x578647){if(_0x578647[_0x2c3ecf(0xa0)]===_0x2c3ecf(0xc9))return null;throw _0x578647;}}function joinServingGeneration(_0x108b71,_0x32c978){return withAdmissionLock(_0x108b71,_0x4888b1=>{const _0x4ceb38=_0x3974;require(_0x4ceb38(0xb5))[_0x4ceb38(0x8d)](_0x108b71);if(_0x4888b1[_0x4ceb38(0xda)]!==_0x4ceb38(0xb8))fail('APT_UPDATE_PENDING');const _0x5c19fc=readGeneration(_0x108b71);if(_0x5c19fc&&[_0x4ceb38(0x90),_0x4ceb38(0x91),'resourceDigest','catalogHash'][_0x4ceb38(0x99)](_0x4188ae=>_0x5c19fc[_0x4188ae]!==_0x32c978[_0x4188ae]))fail(_0x4ceb38(0x7b));const _0x70de85=_0x4888b1['members']?.[_0x32c978[_0x4ceb38(0x7c)]];if(!_0x70de85||_0x70de85[_0x4ceb38(0xda)]==='closed'||_0x70de85[_0x4ceb38(0x8e)]!==_0x32c978[_0x4ceb38(0x8e)]||!Number[_0x4ceb38(0x8a)](_0x32c978[_0x4ceb38(0xd8)]))fail(_0x4ceb38(0xc4));const _0x424c89=_0x5c19fc||{'workspace':fs[_0x4ceb38(0xd2)](_0x108b71),'version':_0x32c978[_0x4ceb38(0x90)],'digest':_0x32c978[_0x4ceb38(0x91)],'resourceDigest':_0x32c978[_0x4ceb38(0xd5)],'catalogHash':_0x32c978[_0x4ceb38(0x98)],'generation':0x1,'transactionId':null,'connections':[],'committedAt':new Date()[_0x4ceb38(0xd3)]()};return _0x424c89[_0x4ceb38(0x85)]=[...new Set([..._0x424c89[_0x4ceb38(0x85)]||[],_0x32c978[_0x4ceb38(0x7c)]])],_0x70de85[_0x4ceb38(0xda)]='serving',_0x70de85['acknowledgedGeneration']=_0x424c89[_0x4ceb38(0xc1)],durable(generationFile(_0x108b71),_0x424c89),durable(fileFor(_0x108b71),_0x4888b1),_0x424c89;});}function projectGeneration(_0x4ef498,_0x3ccaae,_0x534eca){const _0x73728b=_0x167999,_0x283539=readGeneration(_0x3ccaae);if(!_0x283539||[_0x73728b(0xac),'generation',_0x73728b(0x90),_0x73728b(0x91),'resourceDigest','catalogHash'][_0x73728b(0x99)](_0x16c0d2=>_0x283539[_0x16c0d2]!==_0x534eca[_0x16c0d2]))fail('GENERATION_PROJECTION_CONFLICT');let _0x3331a1=fs['realpathSync'](_0x3ccaae);if(process[_0x73728b(0x8f)]===_0x73728b(0x9e))_0x3331a1=_0x3331a1[_0x73728b(0xd7)]();durable(path[_0x73728b(0x86)](fs[_0x73728b(0xd2)](_0x4ef498),_0x73728b(0xb0),crypto['createHash'](_0x73728b(0x81))[_0x73728b(0x79)](_0x3331a1)[_0x73728b(0x91)](_0x73728b(0x8c))+_0x73728b(0xa5)),{'workspace':_0x3331a1,'version':_0x534eca[_0x73728b(0x90)],'digest':_0x534eca[_0x73728b(0x91)],'generation':_0x534eca[_0x73728b(0xc1)],'resourceDigest':_0x534eca['resourceDigest'],'catalogHash':_0x534eca['catalogHash'],'transactionId':_0x534eca[_0x73728b(0xac)],'policyCompatibility':_0x73728b(0xae)});}function registerMember(_0x35c976,_0x2ff374){const _0x6891ab=_0x167999;if(!_0x2ff374[_0x6891ab(0x7c)]||!Number[_0x6891ab(0x8a)](_0x2ff374[_0x6891ab(0x8e)]))fail(_0x6891ab(0x83));return withAdmissionLock(_0x35c976,_0x5b316a=>{const _0x4e6fc7=_0x6891ab;_0x5b316a['members']||={};const _0x450b98=_0x5b316a[_0x4e6fc7(0x7f)][_0x2ff374[_0x4e6fc7(0x7c)]];if(_0x450b98&&_0x450b98[_0x4e6fc7(0x8e)]!==_0x2ff374[_0x4e6fc7(0x8e)])fail(_0x4e6fc7(0xc4));const _0x3d6a7a=readGeneration(_0x35c976),_0x2f9001=_0x5b316a['state']!==_0x4e6fc7(0xb8)&&_0x3d6a7a?.[_0x4e6fc7(0xac)]===_0x5b316a['transactionId']&&!_0x3d6a7a[_0x4e6fc7(0x85)][_0x4e6fc7(0x7d)](_0x2ff374['connectionId']),_0x42e049={..._0x450b98,..._0x2ff374};_0x42e049[_0x4e6fc7(0xda)]=_0x5b316a[_0x4e6fc7(0xda)]===_0x4e6fc7(0xb8)?_0x4e6fc7(0xa6):_0x4e6fc7(0xc2),_0x42e049[_0x4e6fc7(0xc0)]=_0x5b316a[_0x4e6fc7(0x9f)],_0x42e049['transactionId']=_0x5b316a['state']===_0x4e6fc7(0xb8)?null:_0x5b316a[_0x4e6fc7(0xac)],_0x42e049['deferredGeneration']=_0x2f9001?_0x3d6a7a[_0x4e6fc7(0xc1)]:null;const _0x2dcdcd=_0x42e049;return _0x5b316a[_0x4e6fc7(0x7f)][_0x2ff374['connectionId']]=_0x2dcdcd,durable(fileFor(_0x35c976),_0x5b316a),_0x2dcdcd;});}function closeMember(_0x442bb5,_0x4df715,_0xb427c8,_0x541a86,_0x4804d7){if(_0x541a86!==!![])fail('CONNECTION_STOP_UNCONFIRMED');return withAdmissionLock(_0x442bb5,_0x126ad3=>{const _0x153240=_0x3974,_0x2a3664=_0x126ad3[_0x153240(0x7f)]?.[_0x4df715];if(!_0x2a3664||_0x2a3664[_0x153240(0x8e)]!==_0xb427c8||_0x4804d7!==undefined&&String(_0x2a3664[_0x153240(0xab)]||'')!==String(_0x4804d7||''))fail(_0x153240(0xc4));_0x2a3664[_0x153240(0xda)]=_0x153240(0xb4),_0x2a3664[_0x153240(0xb9)]=new Date()[_0x153240(0xd3)](),durable(fileFor(_0x442bb5),_0x126ad3);});}function recordCandidate(_0x230d4b,_0xce1d9a,_0x480d4f,_0x488ec9){return withAdmissionLock(_0x230d4b,_0x392ad5=>{const _0x4b79c9=_0x3974;if(_0x392ad5[_0x4b79c9(0xda)]!==_0x4b79c9(0xaa)||_0x392ad5[_0x4b79c9(0xac)]!==_0xce1d9a||_0x392ad5[_0x4b79c9(0x9f)]!==_0x480d4f)fail(_0x4b79c9(0xa2));const _0x428830=_0x392ad5[_0x4b79c9(0x7f)]?.[_0x488ec9[_0x4b79c9(0x7c)]];if(!_0x428830||_0x428830[_0x4b79c9(0xda)]===_0x4b79c9(0xb4)||_0x428830[_0x4b79c9(0x8e)]!==_0x488ec9[_0x4b79c9(0x8e)]||!sameWorkspace(_0x488ec9['workspace'],_0x230d4b)||!Number[_0x4b79c9(0x8a)](_0x488ec9['childPid'])||!Number[_0x4b79c9(0x8a)](_0x488ec9[_0x4b79c9(0xc1)])||!_0x488ec9[_0x4b79c9(0xd5)]||!_0x488ec9[_0x4b79c9(0x98)]||_0x488ec9[_0x4b79c9(0x90)]!==_0x392ad5[_0x4b79c9(0x9c)]||_0x488ec9[_0x4b79c9(0x91)]!==_0x392ad5['targetDigest'])fail(_0x4b79c9(0xca));const _0x1df481={..._0x488ec9};return _0x1df481['transactionId']=_0xce1d9a,_0x1df481[_0x4b79c9(0x9f)]=_0x480d4f,_0x428830[_0x4b79c9(0xd0)]=_0x1df481,_0x428830[_0x4b79c9(0xda)]='prepared',durable(fileFor(_0x230d4b),_0x392ad5),_0x428830[_0x4b79c9(0xd0)];});}function commitWorkspaceGeneration(_0x58ef18,_0x236c12,_0xeaf3fa,_0x115c79,{guard:_0x411c1a}={}){return withAdmissionLock(_0x58ef18,_0x3dfbbb=>{const _0x27b570=_0x3974;if(_0x3dfbbb[_0x27b570(0xda)]!==_0x27b570(0xaa)||_0x3dfbbb[_0x27b570(0xac)]!==_0x236c12||_0x3dfbbb[_0x27b570(0x9f)]!==_0xeaf3fa)fail(_0x27b570(0xa2));const _0x2ccd77=readGeneration(_0x58ef18);if(_0x2ccd77?.[_0x27b570(0xac)]===_0x236c12){if([_0x27b570(0x90),_0x27b570(0x91),'resourceDigest',_0x27b570(0x98),_0x27b570(0xc1)]['some'](_0x127897=>_0x2ccd77[_0x127897]!==_0x115c79[_0x127897]))fail(_0x27b570(0x76));return _0x2ccd77;}const _0x247e4b=require('./update-control')[_0x27b570(0x97)](_0x58ef18,_0x236c12);if(_0x247e4b?.[_0x27b570(0x9d)]===_0x27b570(0xcd))fail('UPDATE_CANCELLED');if(_0x247e4b?.[_0x27b570(0x9d)]===_0x27b570(0x9a))fail(_0x27b570(0x7e));if(!Number[_0x27b570(0x8a)](_0x115c79[_0x27b570(0xc1)])||_0x115c79[_0x27b570(0xc1)]<=(_0x2ccd77?.[_0x27b570(0xc1)]||0x0)||_0x115c79['version']!==_0x3dfbbb['targetVersion']||_0x115c79[_0x27b570(0x91)]!==_0x3dfbbb[_0x27b570(0xbf)])fail('GENERATION_COMMIT_CONFLICT');const _0x4e2402=Object[_0x27b570(0xa9)](_0x3dfbbb[_0x27b570(0x7f)]||{})[_0x27b570(0x87)](_0xf58fcd=>_0xf58fcd['state']!=='closed');for(const _0x404102 of _0x4e2402){if(_0x404102[_0x27b570(0xda)]!==_0x27b570(0x8b)||!_0x404102[_0x27b570(0xd0)]||_0x404102[_0x27b570(0xd0)][_0x27b570(0xac)]!==_0x236c12||_0x404102[_0x27b570(0xd0)][_0x27b570(0x9f)]!==_0xeaf3fa||[_0x27b570(0x90),_0x27b570(0x91),_0x27b570(0xd5),'catalogHash',_0x27b570(0xc1)][_0x27b570(0x99)](_0xd17006=>_0x404102[_0x27b570(0xd0)][_0xd17006]!==_0x115c79[_0xd17006]))fail(_0x27b570(0x94));}if(_0x411c1a&&(typeof _0x411c1a!==_0x27b570(0x9b)||_0x411c1a()!==!![]))fail(_0x27b570(0x76));const _0x5e5f62={..._0x115c79,'workspace':fs[_0x27b570(0xd2)](_0x58ef18),'transactionId':_0x236c12,'connections':_0x4e2402[_0x27b570(0x95)](_0x595c45=>_0x595c45[_0x27b570(0x7c)]),'committedAt':new Date()[_0x27b570(0xd3)]()};return durable(generationFile(_0x58ef18),_0x5e5f62),_0x5e5f62;});}function _0x22bc(){const _0x538583=['BwTKAxjtEw5J','CMvHzenVBNrYB2W','y2f0ywXVz0HHC2G','C29Tzq','C3vZCgvUza','zNvUy3rPB24','DgfYz2v0vMvYC2LVBG','ywn0Aw9U','D2LUmZi','zxbVy2G','y29Kzq','mZa3mdyYm2fSwenUEG','qurnsvntsu9ox0nptKzmsunu','r0vorvjbveLptL9bq0TFtuLttufuq0G','zNn5BMntEw5J','lMPZB24','AM9PBMvK','uLvoveLnrv9tvefurv9twu1msu5l','BM9KztPMCW','DMfSDwvZ','zNjVEMvU','C3vWzxj2AxnVCLbYB2nLC3ntDgfYDa','DhjHBNnHy3rPB25jza','mZu0mtG1u0nOEgrt','C2nOzw1HltiTyw5Kltm','yxnZAwDU','D29YA3nWywnLCW','mZuWnZy2ofb3u3fvta','DxrMoa','B3bLBLn5BMm','y2XVC2vK','lI4VAw5ZDgfSBgvYl3vWzgf0zs1Yzxf1zxn0','y2XVC2vnzw1Izxi','y2XVC2vtEw5J','B3bLBG','y2XVC2vKqxq','B3bLBKnVBw1PDhrLzeDLBMvYyxrPB24','ChjVAMvJDeDLBMvYyxrPB24','lI9Hzg1PC3nPB24TzMvUy2u','D3jPDgvgAwXLu3LUyW','CMvHzeDLBMvYyxrPB24','DgfYz2v0rgLNzxn0','ywrTAxnZAw9UrxbVy2G','z2vUzxjHDgLVBG','D2fPDgLUzW','nJGWmdG5oxHIz09xEG','q09otKvdveLptL9jrevoveLuwv9dt05gteLdva','mtjluKHmsNG','CMvJB3jKq2fUzgLKyxrL','ywnRBM93BgvKz2vKr2vUzxjHDgLVBG','lNrTCa','ru5pru5u','q0foreLeqvrfx1rvueXfx01ju01bveni','ndv2CfPju2y','mJi1mty1EKD6EeDx','y2fUy2vS','mtK1nde0nfnotgnZsG','nK5cvg53Cq','y2fUzgLKyxrL','z2vUzxjHDgLVBI5QC29U','CMvHBhbHDgHtEw5J','Dg9ju09tDhjPBMC','CMvNAxn0zxjnzw1Izxi','CMvZB3vYy2veAwDLC3q','AM9PBLnLCNzPBMDhzw5LCMf0Aw9U','Dg9mB3DLCKnHC2u','y2HPBgrqAwq','zgLYBMfTzq','C3rHDgu','r0vorvjbveLptL9dt01nsvrFq09orKXjq1q','BM9KztPJCNLWDg8','CNvUDgLTzq','DxbKyxrL','y29TBwL0v29YA3nWywnLr2vUzxjHDgLVBG','u0vsvKLor19hru5fuKfusu9ox01ju01bveni','y29UBMvJDgLVBKLK','Aw5JBhvKzxm','vvbeqvrfx1nvu1bftKrfra','BwvTyMvYCW','CMvHzezPBgvtEw5J','C2HHmJu2','ote1ntG5mfn2rvfYvW','q09otKvdveLptL9jrevoveLuwv9srvfvsvjfra','zxHWB3j0CW','y29UBMvJDgLVBNm','AM9PBG','zMLSDgvY','CgfYC2u','C3rYAw5NAwz5','AxntywzLsw50zwDLCG','ChjLCgfYzwq','Agv4','yxnZzxj0u3rHCNr1CfjLywr5','C3vWzxj2AxnVCLbPza','CgXHDgzVCM0','DMvYC2LVBG','zgLNzxn0','ywnRBM93BgvKz2vhzw5LCMf0Aw9U','lMfNzw50CW','q09otKvdveLptL9ot1rFufjfuefsruq','BwfW'];_0x22bc=function(){return _0x538583;};return _0x22bc();}function acknowledgeGeneration(_0x309e22,_0x313763,_0x38a0f5,_0xd10f50){return withAdmissionLock(_0x309e22,_0x3006d2=>{const _0x423db7=_0x3974,_0x480deb=readGeneration(_0x309e22),_0x3de2c2=_0x3006d2[_0x423db7(0x7f)]?.[_0x313763];if(!_0x480deb||_0x480deb[_0x423db7(0xac)]!==_0x38a0f5||!_0x3de2c2||_0x3de2c2['state']===_0x423db7(0xb4)||!_0x480deb[_0x423db7(0x85)][_0x423db7(0x7d)](_0x313763)||['version',_0x423db7(0x91),_0x423db7(0xd5),_0x423db7(0x98),_0x423db7(0xc1)]['some'](_0x3fe33c=>_0xd10f50[_0x3fe33c]!==_0x480deb[_0x3fe33c])||_0xd10f50[_0x423db7(0xd8)]!==_0x3de2c2[_0x423db7(0xd0)]?.[_0x423db7(0xd8)]||_0xd10f50[_0x423db7(0x8e)]!==_0x3de2c2[_0x423db7(0x8e)])fail(_0x423db7(0xa3));return _0x3de2c2[_0x423db7(0xc7)]=_0x480deb[_0x423db7(0xc1)],_0x3de2c2[_0x423db7(0xda)]='serving',durable(fileFor(_0x309e22),_0x3006d2),_0x480deb;});}function openCommittedGeneration(_0x13de52,_0x32dd34){return withAdmissionLock(_0x13de52,_0x24a79c=>{const _0x34179c=_0x3974,_0x41384e=readGeneration(_0x13de52);if(_0x24a79c['state']!==_0x34179c(0xaa)||_0x24a79c[_0x34179c(0xac)]!==_0x32dd34||_0x41384e?.[_0x34179c(0xac)]!==_0x32dd34)fail(_0x34179c(0xa2));const _0x249935=_0x41384e[_0x34179c(0x85)][_0x34179c(0x95)](_0x3baeb0=>_0x24a79c[_0x34179c(0x7f)]?.[_0x3baeb0]);if(_0x249935[_0x34179c(0x99)](_0x2f18ea=>!_0x2f18ea||_0x2f18ea[_0x34179c(0xda)]!=='closed'&&(_0x2f18ea['state']!=='serving'||_0x2f18ea['acknowledgedGeneration']!==_0x41384e[_0x34179c(0xc1)])))fail('GENERATION_ACK_PENDING');const _0x2047f7={..._0x24a79c};_0x2047f7[_0x34179c(0xda)]=_0x34179c(0xb8),_0x2047f7['epoch']=_0x24a79c[_0x34179c(0x9f)]+0x1,_0x2047f7[_0x34179c(0xc1)]=_0x41384e['generation'];const _0x3f71f9=_0x2047f7;return durable(fileFor(_0x13de52),_0x3f71f9),_0x3f71f9;});}const _0x30cc29={};_0x30cc29[_0x167999(0xbe)]=readGeneration,_0x30cc29[_0x167999(0xbb)]=projectGeneration,_0x30cc29[_0x167999(0xd4)]=registerMember,_0x30cc29[_0x167999(0xb6)]=closeMember,_0x30cc29[_0x167999(0xc6)]=recordCandidate,_0x30cc29[_0x167999(0x7a)]=commitWorkspaceGeneration,_0x30cc29[_0x167999(0x92)]=acknowledgeGeneration,_0x30cc29[_0x167999(0xba)]=openCommittedGeneration,_0x30cc29[_0x167999(0xd6)]=joinServingGeneration,module[_0x167999(0x84)]=_0x30cc29;
|