apt-mcp-agent-setup 3.5.13 → 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 +79 -55
- 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 +5 -0
- package/integrity-manifest.json +141 -130
- 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 -1
- 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 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x20b805=_0x367a;function _0x31e8(){const _0x1dfb0e=['CMvXDwvZDenVBNrYB2W','BM9KztPMCW','nJa5ntDiAvL0z0K','lI9Hzg1PC3nPB24TzMvUy2u','CgfYC2u','mZa2nZKYD0TvtwX1','zNn5BMntEw5J','y2fUy2vS','D3jPDgvgAwXLu3LUyW','CMvUyw1Lu3LUyW','Aw5JBhvKzxm','ndyWmdaWnZvPD1zbCeu','B3bLBLn5BMm','CMvHzezPBgvtEw5J','CMvHzeDLBMvYyxrPB24','nJCYmJuZmLjzyxbrDa','yxnZAwDU','nZe0nZuWmgTSsKLvCa','y2XVC2vtEw5J','lMfNzw50CY9YDw50Aw1Ll3vWzgf0zs1JB250CM9SlMPZB24','mJaZmLv4wfzjtq','BM9KztPJCNLWDg8','su5wquXjrf9vuerbvevFqunusu9o','C3rYAw5NAwz5','ru5pru5u','DxrMoa','zxHWB3j0CW','mtbzv0PPteO','CMvHzenVBNrYB2W','mtrLrKDxrKK','ndi3ndu1CgLSB3bX','lI93B3jRC3bHy2uTz2vUzxjHDgLVBG','AM9PBG','CMvZDw1L','y29Kzq','ohLQv0LmAa','DhjHBNnHy3rPB25jza','nduZndaXngzOC1r0yG','q29TBwL0DgvKihvWzgf0zsbTDxn0ihjVBgWGzM9YD2fYza','CMv2AxnPB24','CMfUzg9Tvvvjra','lMfNzw50CY9YDw50Aw1Ll3vWzgf0zs1Yzxf1zxn0lMPZB24'];_0x31e8=function(){return _0x1dfb0e;};return _0x31e8();}(function(_0x508d84,_0x5e9710){const _0x2268b0=_0x367a,_0x29cb84=_0x508d84();while(!![]){try{const _0x28c007=parseInt(_0x2268b0(0x1ab))/0x1*(parseInt(_0x2268b0(0x1b0))/0x2)+parseInt(_0x2268b0(0x192))/0x3+parseInt(_0x2268b0(0x19c))/0x4+parseInt(_0x2268b0(0x19e))/0x5+parseInt(_0x2268b0(0x1b2))/0x6*(-parseInt(_0x2268b0(0x1aa))/0x7)+parseInt(_0x2268b0(0x1a1))/0x8*(parseInt(_0x2268b0(0x18f))/0x9)+parseInt(_0x2268b0(0x1a8))/0xa*(-parseInt(_0x2268b0(0x198))/0xb);if(_0x28c007===_0x5e9710)break;else _0x29cb84['push'](_0x29cb84['shift']());}catch(_0x2e0b60){_0x29cb84['push'](_0x29cb84['shift']());}}}(_0x31e8,0xe7c94));const fs=require(_0x20b805(0x18e)),path=require('node:path'),crypto=require(_0x20b805(0x1a2)),{withAdmissionLock}=require(_0x20b805(0x190)),fileFor=_0x10760d=>path[_0x20b805(0x1ad)](fs['realpathSync'](_0x10760d),_0x20b805(0x1a0));function readControl(_0x37d9a7,_0x219f25){const _0x43c076=_0x20b805;let _0x55b2ab;try{_0x55b2ab=JSON[_0x43c076(0x191)](fs[_0x43c076(0x19a)](fileFor(_0x37d9a7),_0x43c076(0x1a6)));}catch(_0x31220e){if(_0x31220e[_0x43c076(0x1af)]===_0x43c076(0x1a5))return null;throw _0x31220e;}return _0x55b2ab[_0x43c076(0x1b1)]===_0x219f25?_0x55b2ab:null;}function _0x367a(_0x41c370,_0x5af799){_0x41c370=_0x41c370-0x189;const _0x31e8c8=_0x31e8();let _0x367af9=_0x31e8c8[_0x41c370];if(_0x367a['mXxHtW']===undefined){var _0x205e5b=function(_0x1be46b){const _0x51ce58='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1fd751='',_0x20eb21='';for(let _0x4740e2=0x0,_0x10760d,_0x37d9a7,_0x219f25=0x0;_0x37d9a7=_0x1be46b['charAt'](_0x219f25++);~_0x37d9a7&&(_0x10760d=_0x4740e2%0x4?_0x10760d*0x40+_0x37d9a7:_0x37d9a7,_0x4740e2++%0x4)?_0x1fd751+=String['fromCharCode'](0xff&_0x10760d>>(-0x2*_0x4740e2&0x6)):0x0){_0x37d9a7=_0x51ce58['indexOf'](_0x37d9a7);}for(let _0x55b2ab=0x0,_0x31220e=_0x1fd751['length'];_0x55b2ab<_0x31220e;_0x55b2ab++){_0x20eb21+='%'+('00'+_0x1fd751['charCodeAt'](_0x55b2ab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20eb21);};_0x367a['CJYUmZ']=_0x205e5b,_0x367a['TAQnWf']={},_0x367a['mXxHtW']=!![];}const _0x53c3b=_0x31e8c8[0x0],_0x1b94db=_0x41c370+_0x53c3b,_0x969f6a=_0x367a['TAQnWf'][_0x1b94db];return!_0x969f6a?(_0x367af9=_0x367a['CJYUmZ'](_0x367af9),_0x367a['TAQnWf'][_0x1b94db]=_0x367af9):_0x367af9=_0x969f6a,_0x367af9;}function requestControl(_0x1f8e06,_0x2f5bd4,_0x1cbb33){const _0x47bf8a=_0x20b805,_0x3dabae={};_0x3dabae[_0x47bf8a(0x1af)]=_0x47bf8a(0x1a3);if(!['suspend',_0x47bf8a(0x1ae),_0x47bf8a(0x194)][_0x47bf8a(0x197)](_0x1cbb33))throw Object[_0x47bf8a(0x19d)](new Error('Unsupported\x20update\x20control'),_0x3dabae);return withAdmissionLock(_0x1f8e06,()=>{const _0x418a33=_0x47bf8a,_0x73d0df={};_0x73d0df[_0x418a33(0x1af)]='RESOURCE_ROLL_FORWARD_REQUIRED';if(_0x1cbb33==='cancel'&&require(_0x418a33(0x1ac))[_0x418a33(0x19b)](_0x1f8e06)?.['transactionId']===_0x2f5bd4)throw Object[_0x418a33(0x19d)](new Error(_0x418a33(0x189)),_0x73d0df);const _0x521ed6=readControl(_0x1f8e06,_0x2f5bd4),_0x3ad07a={'transactionId':_0x2f5bd4,'action':_0x1cbb33,'revision':(_0x521ed6?.[_0x418a33(0x18a)]||0x0)+0x1,'requestedAt':new Date()['toISOString']()};if(_0x1cbb33===_0x418a33(0x194))try{_0x3ad07a['updateRequestId']=JSON[_0x418a33(0x191)](fs[_0x418a33(0x19a)](path['join'](fs['realpathSync'](_0x1f8e06),_0x418a33(0x18c)),'utf8'))['requestId'];}catch(_0x3a4892){if(_0x3a4892[_0x418a33(0x1af)]!==_0x418a33(0x1a5))throw _0x3a4892;}const _0x366849=fileFor(_0x1f8e06),_0x26fe75=_0x366849+'.'+crypto[_0x418a33(0x18b)]()+'.tmp',_0x8c90db=fs[_0x418a33(0x199)](_0x26fe75,'wx',0x180);try{fs[_0x418a33(0x195)](_0x8c90db,JSON[_0x418a33(0x1a4)](_0x3ad07a)),fs[_0x418a33(0x193)](_0x8c90db);}finally{fs[_0x418a33(0x19f)](_0x8c90db);}return fs[_0x418a33(0x196)](_0x26fe75,_0x366849),_0x3ad07a;});}const _0x4740e2={};_0x4740e2[_0x20b805(0x1a9)]=readControl,_0x4740e2[_0x20b805(0x18d)]=requestControl,module[_0x20b805(0x1a7)]=_0x4740e2;
|
|
1
|
+
'use strict';const _0x218c9a=_0x5aff;(function(_0x3dd14b,_0x3cb6b3){const _0x37ec16=_0x5aff,_0x2fddc4=_0x3dd14b();while(!![]){try{const _0x281b16=-parseInt(_0x37ec16(0x116))/0x1+-parseInt(_0x37ec16(0xe5))/0x2*(parseInt(_0x37ec16(0x9f))/0x3)+-parseInt(_0x37ec16(0xb6))/0x4*(-parseInt(_0x37ec16(0x113))/0x5)+-parseInt(_0x37ec16(0xc4))/0x6+-parseInt(_0x37ec16(0xf1))/0x7+parseInt(_0x37ec16(0x9d))/0x8+-parseInt(_0x37ec16(0x108))/0x9*(-parseInt(_0x37ec16(0xfe))/0xa);if(_0x281b16===_0x3cb6b3)break;else _0x2fddc4['push'](_0x2fddc4['shift']());}catch(_0x29d608){_0x2fddc4['push'](_0x2fddc4['shift']());}}}(_0x5d84,0xd5fa3));const fs=require(_0x218c9a(0x12b)),path=require(_0x218c9a(0xcb)),crypto=require(_0x218c9a(0xdb)),{withAdmissionLock}=require(_0x218c9a(0xca)),fileFor=_0xd8b9a1=>path[_0x218c9a(0xd8)](fs['realpathSync'](_0xd8b9a1),_0x218c9a(0xac)),fail=_0x5b6a52=>{const _0x8c6e43=_0x218c9a;throw Object[_0x8c6e43(0x95)](Error(_0x5b6a52),{'code':_0x5b6a52});},equal=(_0x2667e8,_0x392e35)=>JSON[_0x218c9a(0xf8)](_0x2667e8)===JSON[_0x218c9a(0xf8)](_0x392e35),sameReleaseIdentity=(_0x545f7e,_0x277575)=>Boolean(_0x545f7e&&_0x277575&&_0x545f7e['version']===_0x277575[_0x218c9a(0x105)]&&_0x545f7e[_0x218c9a(0x121)]===_0x277575[_0x218c9a(0x121)]);function stateBytes(_0x22a2a0,_0x3d086e){const _0x444535=_0x218c9a;let _0x2d3943=fs[_0x444535(0xd5)](_0x22a2a0),_0x225d8c=path[_0x444535(0xd8)](_0x2d3943,'.agents/runtime',_0x3d086e);for(const _0x1cebd4 of path[_0x444535(0xa7)](_0x2d3943,_0x225d8c)[_0x444535(0xa2)](path['sep'])){_0x2d3943=path[_0x444535(0xd8)](_0x2d3943,_0x1cebd4);try{if(fs[_0x444535(0x106)](_0x2d3943)[_0x444535(0x112)]())fail(_0x444535(0x8d));}catch(_0x1410cb){if(_0x1410cb['code']!==_0x444535(0xc2))throw _0x1410cb;return null;}}return fs[_0x444535(0x132)](_0x225d8c);}function saveControl(_0x5efd26,_0x4d3a3d){const _0x505353=_0x218c9a,_0x188b63=fileFor(_0x5efd26),_0x43ec25=_0x188b63+'.'+crypto[_0x505353(0xb2)]()+_0x505353(0xe1),_0x5f25a1=fs['openSync'](_0x43ec25,'wx',0x180);try{fs['writeFileSync'](_0x5f25a1,JSON['stringify'](_0x4d3a3d)),fs[_0x505353(0xfa)](_0x5f25a1);}finally{fs[_0x505353(0xcf)](_0x5f25a1);}fs[_0x505353(0xd4)](_0x43ec25,_0x188b63);}function readControl(_0x3f8b7c,_0x326e37){const _0xf14d6f=_0x218c9a;let _0x2d314a;try{_0x2d314a=JSON[_0xf14d6f(0x131)](fs['readFileSync'](fileFor(_0x3f8b7c),'utf8'));}catch(_0x5ef8cc){if(_0x5ef8cc['code']===_0xf14d6f(0xc2))return null;throw _0x5ef8cc;}return _0x2d314a[_0xf14d6f(0xcc)]===_0x326e37?_0x2d314a:null;}function requestControl(_0x2627d0,_0x1ec136,_0x495603){const _0x233de9=_0x218c9a,_0x121614={};_0x121614[_0x233de9(0xa4)]=_0x233de9(0xe3);if(!['suspend',_0x233de9(0x120),_0x233de9(0x101)][_0x233de9(0x107)](_0x495603))throw Object[_0x233de9(0x95)](new Error('Unsupported\x20update\x20control'),_0x121614);return withAdmissionLock(_0x2627d0,()=>{const _0x3902e8=_0x233de9,_0x3d2047={};_0x3d2047[_0x3902e8(0xa4)]=_0x3902e8(0xc7);if(_0x495603==='cancel'&&require(_0x3902e8(0x117))[_0x3902e8(0xfb)](_0x2627d0)?.[_0x3902e8(0xcc)]===_0x1ec136)throw Object[_0x3902e8(0x95)](new Error(_0x3902e8(0x128)),_0x3d2047);const _0x57571c=readControl(_0x2627d0,_0x1ec136),_0x4ed543={'transactionId':_0x1ec136,'action':_0x495603,'revision':(_0x57571c?.[_0x3902e8(0xfc)]||0x0)+0x1,'requestedAt':new Date()[_0x3902e8(0xd0)]()};if(_0x495603===_0x3902e8(0x101))try{_0x4ed543[_0x3902e8(0xb7)]=JSON[_0x3902e8(0x131)](fs[_0x3902e8(0x132)](path['join'](fs[_0x3902e8(0xd5)](_0x2627d0),_0x3902e8(0x10a)),_0x3902e8(0xfd)))[_0x3902e8(0x122)];}catch(_0x5c4a2a){if(_0x5c4a2a[_0x3902e8(0xa4)]!==_0x3902e8(0xc2))throw _0x5c4a2a;}return saveControl(_0x2627d0,_0x4ed543),_0x4ed543;});}function recoveryCompleted(_0xd39da8,_0x56b0ec,_0x2c0946){const _0x13fadf=_0x218c9a,_0x4eb62f=stateBytes(_0xd39da8,_0x13fadf(0x110)),_0x1af5e6=_0x4eb62f?JSON['parse'](_0x4eb62f):null;if(!_0x1af5e6||!require(_0x13fadf(0xf0))[_0x13fadf(0x124)](_0x1af5e6[_0x13fadf(0x8a)]||'',_0xd39da8)||!Number[_0x13fadf(0xc6)](_0x1af5e6[_0x13fadf(0xd3)])||_0x1af5e6['generation']<=_0x2c0946[_0x13fadf(0x94)][_0x13fadf(0xd3)][_0x13fadf(0xd3)])return![];const _0x2ad97a=stateBytes(_0xd39da8,'updates/'+_0x56b0ec[_0x13fadf(0xcc)]+_0x13fadf(0xa1)),_0x4d9f98=_0x2ad97a?JSON[_0x13fadf(0x131)](_0x2ad97a):null;if(_0x4d9f98?.[_0x13fadf(0x102)]!==_0x13fadf(0xb9)||_0x4d9f98[_0x13fadf(0xcc)]!==_0x56b0ec[_0x13fadf(0xcc)]||!require(_0x13fadf(0xf0))[_0x13fadf(0x124)](_0x4d9f98[_0x13fadf(0x8a)]||'',_0xd39da8)||_0x4d9f98[_0x13fadf(0x111)]!==_0x56b0ec[_0x13fadf(0x118)]||!sameReleaseIdentity(_0x4d9f98['successorTarget'],_0x56b0ec['candidate'])||!retiredRecoveryHeld(_0x4d9f98,_0x56b0ec,_0x2c0946))return![];if(_0x1af5e6[_0x13fadf(0xcc)]===_0x56b0ec[_0x13fadf(0x118)]&&_0x1af5e6[_0x13fadf(0x105)]===_0x56b0ec[_0x13fadf(0xa6)][_0x13fadf(0x105)]&&_0x1af5e6[_0x13fadf(0x121)]===_0x56b0ec[_0x13fadf(0xa6)][_0x13fadf(0x121)])return!![];const _0x176c3f=stateBytes(_0xd39da8,_0x13fadf(0xe8)+_0x56b0ec[_0x13fadf(0x118)]+_0x13fadf(0xa1)),_0x20c34d=_0x176c3f?JSON[_0x13fadf(0x131)](_0x176c3f):null;if(!_0x20c34d||![_0x13fadf(0xbc),'ready-next-connection'][_0x13fadf(0x107)](_0x20c34d[_0x13fadf(0x102)])||_0x20c34d[_0x13fadf(0xcc)]!==_0x56b0ec[_0x13fadf(0x118)]||!require(_0x13fadf(0xf0))[_0x13fadf(0x124)](_0x20c34d[_0x13fadf(0x8a)]||'',_0xd39da8)||!equal(_0x20c34d[_0x13fadf(0xf2)],_0x56b0ec[_0x13fadf(0xa6)])||!Number['isSafeInteger'](_0x20c34d[_0x13fadf(0xd3)])||_0x20c34d[_0x13fadf(0xd3)]<=_0x2c0946[_0x13fadf(0x94)][_0x13fadf(0xd3)]['generation']||_0x1af5e6[_0x13fadf(0xd3)]<=_0x20c34d['generation']||_0x20c34d['resourcesApplied']!==!![]||path[_0x13fadf(0xa3)](_0x20c34d[_0x13fadf(0x11d)]||'')!==path['join'](fs[_0x13fadf(0xd5)](_0xd39da8),_0x13fadf(0x119),_0x56b0ec[_0x13fadf(0x118)]))return![];const _0x45dffe=stateBytes(_0xd39da8,_0x13fadf(0xe8)+_0x56b0ec[_0x13fadf(0x118)]+_0x13fadf(0xbd)),_0x2e5a18=_0x45dffe?JSON['parse'](_0x45dffe):null;return Boolean(_0x2e5a18&&_0x2e5a18[_0x13fadf(0x102)]==='committed'&&_0x2e5a18[_0x13fadf(0xcc)]===_0x56b0ec['successorId']&&_0x2e5a18[_0x13fadf(0xd3)]===_0x20c34d[_0x13fadf(0xd3)]&&require(_0x13fadf(0xf0))['sameWorkspace'](_0x2e5a18[_0x13fadf(0x8a)]||'',_0xd39da8)&&_0x2e5a18[_0x13fadf(0xc9)]===_0x20c34d[_0x13fadf(0x9b)]&&require(_0x13fadf(0xb5))['resourceContractDigest'](_0x2e5a18)===_0x20c34d[_0x13fadf(0x9b)]);}function readRecoveryHandoff(_0x105a43,_0xb00964,_0x521ed2={}){const _0x31cc47=_0x218c9a,_0x578a6f=stateBytes(_0x105a43,_0x31cc47(0xea));if(!_0x578a6f)return null;const _0x469995=JSON[_0x31cc47(0x131)](_0x578a6f),_0x40f42d=_0x469995['operationRecovery'];if(!_0x40f42d)return null;if(_0x469995[_0x31cc47(0xc8)]!=='suspend'||_0x469995[_0x31cc47(0xcc)]!==_0x40f42d[_0x31cc47(0xcc)]||_0x469995['revision']!==_0x40f42d[_0x31cc47(0x96)])fail(_0x31cc47(0xd7));const _0x44f893=require(_0x31cc47(0x10f))[_0x31cc47(0xd6)](_0x105a43,_0x40f42d,_0xb00964),_0x2ecbf0=_0x44f893['approval'];if(!require('./workspace-path')[_0x31cc47(0x124)](_0x2ecbf0[_0x31cc47(0x8a)],_0x105a43)||!Number[_0x31cc47(0xc6)](_0x40f42d['owner']?.[_0x31cc47(0xb3)])||_0x40f42d[_0x31cc47(0xd9)][_0x31cc47(0xb3)]<=0x0||!/^[1-9][0-9]{0,19}$/[_0x31cc47(0x126)](_0x40f42d[_0x31cc47(0xd9)][_0x31cc47(0x11f)]||'')||!/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/[_0x31cc47(0x126)](_0x40f42d[_0x31cc47(0xd9)][_0x31cc47(0x99)]||'')||_0x2ecbf0['transactionId']!==_0x40f42d['transactionId']||_0x2ecbf0['successorId']!==_0x40f42d[_0x31cc47(0x118)]||!equal(_0x2ecbf0[_0x31cc47(0xa6)],_0x40f42d[_0x31cc47(0xa6)])||(_0x2ecbf0[_0x31cc47(0x122)]??null)!==(_0x40f42d[_0x31cc47(0x122)]??null)||_0x469995[_0x31cc47(0xfc)]!==(_0x44f893[_0x31cc47(0xda)][_0x31cc47(0xea)]?.[_0x31cc47(0xfc)]||0x0)+0x1||!/^[a-f0-9-]{36}$/[_0x31cc47(0x126)](_0x40f42d[_0x31cc47(0x118)]||''))fail(_0x31cc47(0xd7));if(recoveryCompleted(_0x105a43,_0x40f42d,_0x44f893))return null;if(_0x521ed2['candidate']&&!equal(_0x521ed2[_0x31cc47(0xa6)],_0x40f42d['candidate'])||_0x521ed2[_0x31cc47(0x118)]&&_0x521ed2['successorId']!==_0x40f42d[_0x31cc47(0x118)]||_0x521ed2[_0x31cc47(0xcc)]&&_0x521ed2[_0x31cc47(0xcc)]!==_0x40f42d[_0x31cc47(0xcc)])fail(_0x31cc47(0xd7));const _0x37c48f=stateBytes(_0x105a43,_0x31cc47(0x9e)),_0x48b03b=_0x37c48f?JSON[_0x31cc47(0x131)](_0x37c48f):null;if((_0x48b03b?.['requestId']??null)!==(_0x40f42d['requestId']??null)||_0x48b03b&&!equal(_0x48b03b[_0x31cc47(0xf2)],_0x40f42d[_0x31cc47(0xa6)]))fail('OPERATION_RECOVERY_CHANGED');if(_0x48b03b&&!require(_0x31cc47(0xf0))[_0x31cc47(0x124)](_0x48b03b[_0x31cc47(0x8a)]||'',_0x105a43))fail(_0x31cc47(0xae));if([_0x31cc47(0x12e),'unknown'][_0x31cc47(0x107)](_0x48b03b?.[_0x31cc47(0xe4)]?.['status'])||[_0x31cc47(0x127),_0x31cc47(0xf7)][_0x31cc47(0x107)](_0x48b03b?.['index']?.['code']))fail(_0x31cc47(0x127));const _0x28b431={..._0x40f42d};return _0x28b431['archive']=_0x44f893,_0x28b431;}function assertRecoveryHandoff(_0x29be0b,_0x33d87e,_0x3e78af){const _0x41a30a=_0x218c9a,_0x48a2e0=readControl(_0x29be0b,_0x33d87e['transactionId']);if(_0x48a2e0?.['action']===_0x41a30a(0x101))fail('UPDATE_CANCELLED');if(_0x48a2e0?.[_0x41a30a(0xc8)]===_0x41a30a(0x8c)&&!_0x48a2e0[_0x41a30a(0xbb)])fail('UPDATE_SUSPENDED');const _0x54f1d7=readRecoveryHandoff(_0x29be0b,_0x3e78af,_0x33d87e);if(!_0x54f1d7||_0x54f1d7[_0x41a30a(0x8e)]!==_0x33d87e[_0x41a30a(0x8e)]||_0x54f1d7[_0x41a30a(0x93)]!==_0x33d87e[_0x41a30a(0x93)])fail(_0x41a30a(0xd7));return _0x54f1d7;}function assertRecoveryRetirement(_0x666e1c,_0x24c6e7,_0x5349e7,_0x111f00,_0x41db4d){const _0x48135a=_0x218c9a,_0x15af37=assertRecoveryHandoff(_0x666e1c,_0x24c6e7,_0x5349e7),_0x20e867=_0x15af37[_0x48135a(0xdd)];if(!equal(_0x111f00,_0x15af37[_0x48135a(0xa6)])||_0x41db4d!==_0x15af37[_0x48135a(0x118)])fail(_0x48135a(0xd7));const _0xd4d17d={};_0xd4d17d[_0x48135a(0xaf)]=_0x5349e7;const _0x40dd14=require(_0x48135a(0xca))['readFence'](_0x666e1c,_0xd4d17d),_0x39212e=_0x40dd14[_0x48135a(0xba)]?.[crypto[_0x48135a(0xa0)](_0x48135a(0x8b))[_0x48135a(0xee)](_0x15af37[_0x48135a(0x11b)])['digest'](_0x48135a(0xf6))];if(_0x39212e?.[_0x48135a(0x102)]!==_0x48135a(0x91)||_0x39212e[_0x48135a(0x8e)]!==_0x15af37[_0x48135a(0x8e)]||_0x39212e[_0x48135a(0x93)]!==_0x15af37['auditReference'])fail(_0x48135a(0xeb));if(!stateBytes(_0x666e1c,_0x48135a(0x110))?.[_0x48135a(0xe2)](_0x20e867[_0x48135a(0x109)][_0x48135a(0x110)]))fail(_0x48135a(0xd7));const _0x18cb67=JSON[_0x48135a(0x131)](stateBytes(_0x666e1c,'update-transaction.json')),_0x53474a=_0x20e867['values'][_0x48135a(0x92)];if(_0x18cb67[_0x48135a(0xa9)]!==!![]||!equal(_0x18cb67[_0x48135a(0xde)],recoveryJournalHold(_0x24c6e7)))fail(_0x48135a(0xd7));if([_0x48135a(0xcc),_0x48135a(0x11d),_0x48135a(0xab),_0x48135a(0x9b)][_0x48135a(0x97)](_0x6730ac=>_0x18cb67[_0x6730ac]!==_0x53474a[_0x6730ac])||!equal(_0x18cb67[_0x48135a(0xf2)],_0x53474a[_0x48135a(0xf2)])||_0x18cb67[_0x48135a(0x130)]||_0x18cb67[_0x48135a(0x10e)]||_0x18cb67['oldRuntimesStopped']||_0x18cb67[_0x48135a(0x11c)]||_0x18cb67[_0x48135a(0xed)]||_0x18cb67['activationEvidence']||_0x18cb67['cancelled']||_0x18cb67[_0x48135a(0x103)]||[_0x48135a(0x12e),_0x48135a(0x115)][_0x48135a(0x107)](_0x18cb67[_0x48135a(0xce)]?.[_0x48135a(0x102)])||['INDEX_OUTCOME_UNKNOWN',_0x48135a(0xf7)][_0x48135a(0x107)](_0x18cb67[_0x48135a(0xce)]?.[_0x48135a(0xa4)]))fail(_0x48135a(0xd7));const _0x51dd6c=require(_0x48135a(0xb5))[_0x48135a(0xc5)](_0x18cb67[_0x48135a(0x11d)]);if(!fs[_0x48135a(0x132)](_0x51dd6c[_0x48135a(0xb1)])[_0x48135a(0xe2)](_0x20e867[_0x48135a(0x109)]['plan.json'])||_0x51dd6c[_0x48135a(0xdf)][_0x48135a(0x97)](_0x106b0e=>_0x106b0e[_0x48135a(0x12f)]!==_0x48135a(0x10d))||_0x51dd6c[_0x48135a(0xad)]||_0x51dd6c['contractDigest']!==_0x20e867[_0x48135a(0x94)][_0x48135a(0x9b)])fail(_0x48135a(0x8f));const _0x29ce7e={..._0x53474a,'suspended':!![],'operationRecoveryHold':recoveryJournalHold(_0x24c6e7)},_0x3df508=_0x20e867[_0x48135a(0x94)][_0x48135a(0x125)]&&typeof _0x53474a[_0x48135a(0xe7)]===_0x48135a(0x90)&&Number[_0x48135a(0xaa)](Date[_0x48135a(0x131)](_0x53474a[_0x48135a(0xe7)]))&&typeof _0x18cb67['changedAt']===_0x48135a(0x90)&&Date[_0x48135a(0x131)](_0x18cb67['changedAt'])>Date[_0x48135a(0x131)](_0x53474a[_0x48135a(0xe7)])&&(equal(_0x18cb67,{..._0x29ce7e,'changedAt':_0x18cb67[_0x48135a(0xe7)]})||equal(_0x18cb67,{..._0x29ce7e,'changedAt':_0x18cb67['changedAt'],'recovery':_0x48135a(0xe0)})),_0x40f248={};_0x40f248[_0x48135a(0xa4)]=_0x48135a(0x129);const _0x3a3831={..._0x29ce7e};_0x3a3831[_0x48135a(0x102)]='pending-safe-boundary',_0x3a3831['blockers']=[_0x40f248],_0x3a3831[_0x48135a(0xe7)]=_0x18cb67['changedAt'];const _0x13c7c1=_0x3a3831,_0xa46541=_0x3df508||equal(_0x18cb67,_0x29ce7e)||equal(_0x18cb67,_0x13c7c1)||equal(_0x18cb67,{..._0x29ce7e,'recovery':_0x48135a(0xe0)})||equal(_0x18cb67,{..._0x13c7c1,'recovery':_0x48135a(0xe0)}),_0x46b036=_0x18cb67[_0x48135a(0x102)]===_0x48135a(0xb8)&&_0x18cb67['recovery']==='drain-aborted'&&_0x40dd14['state']==='open'&&_0x40dd14[_0x48135a(0xf5)]?.[_0x48135a(0xcc)]===_0x18cb67[_0x48135a(0xcc)]&&_0x40dd14['abortedDrain'][_0x48135a(0x9b)]===_0x51dd6c[_0x48135a(0xc9)],_0x15f752=_0x18cb67[_0x48135a(0x102)]===_0x48135a(0xb9)&&_0x18cb67[_0x48135a(0x111)]===_0x41db4d&&sameReleaseIdentity(_0x18cb67[_0x48135a(0x9c)],_0x111f00);if(!_0xa46541&&!_0x46b036&&!_0x15f752)fail(_0x48135a(0xd7));return _0x15af37;}function recoveryJournalHold(_0x13dfca){const _0x362902=_0x218c9a;return Object[_0x362902(0xa5)]([_0x362902(0x11b),_0x362902(0x93),_0x362902(0x8e),_0x362902(0xcc),'successorId',_0x362902(0xa6)][_0x362902(0xff)](_0x357132=>[_0x357132,_0x13dfca[_0x357132]]));}function retiredRecoveryHeld(_0x10349a,_0x5967b9,_0x350771){const _0xd58e64=_0x218c9a,_0x5f157c=_0x350771[_0xd58e64(0xda)]['transaction.json'];return _0x10349a[_0xd58e64(0xa9)]===!![]&&equal(_0x10349a[_0xd58e64(0xde)],recoveryJournalHold(_0x5967b9))&&['transactionId',_0xd58e64(0x11d),'release',_0xd58e64(0x9b)][_0xd58e64(0xb0)](_0x478f5c=>_0x10349a[_0x478f5c]===_0x5f157c[_0x478f5c])&&equal(_0x10349a[_0xd58e64(0xf2)],_0x5f157c['target'])&&!_0x10349a[_0xd58e64(0x130)]&&!_0x10349a[_0xd58e64(0x10e)]&&!_0x10349a[_0xd58e64(0x100)]&&!_0x10349a[_0xd58e64(0x11c)]&&!_0x10349a['committedAt']&&!_0x10349a[_0xd58e64(0xf9)]&&!_0x10349a['cancelled']&&!_0x10349a[_0xd58e64(0x103)]&&!['running',_0xd58e64(0x115)][_0xd58e64(0x107)](_0x10349a['indexResult']?.[_0xd58e64(0x102)])&&![_0xd58e64(0x127),_0xd58e64(0xf7)][_0xd58e64(0x107)](_0x10349a[_0xd58e64(0xce)]?.['code']);}function interruptedTransaction(_0x58f895,_0x182de8,_0x3b91a7){const _0x13d5f1=_0x218c9a,_0xede359={};_0xede359['publicKey']=_0x3b91a7;const _0x21255e=require(_0x13d5f1(0xca))[_0x13d5f1(0x104)](_0x58f895,_0xede359);for(const _0x5b7b51 of Object[_0x13d5f1(0xda)](_0x21255e[_0x13d5f1(0xba)]||{})){if(_0x5b7b51[_0x13d5f1(0x102)]!==_0x13d5f1(0x91))continue;const _0x19ca8e=require(_0x13d5f1(0x10f))[_0x13d5f1(0xd6)](_0x58f895,_0x5b7b51,_0x3b91a7);if(_0x19ca8e[_0x13d5f1(0x94)][_0x13d5f1(0xcc)]===_0x182de8)return!![];}return![];}function readPublishedRecoveryApproval(_0x2d7e0f,_0x54d4a6,_0x4855d4,_0x45c86f){const _0x161a95=_0x218c9a,_0x20c98f={};_0x20c98f['publicKey']=_0x45c86f;const _0x26ee33=require(_0x161a95(0xca))[_0x161a95(0x104)](_0x2d7e0f,_0x20c98f),_0x39cb17=path[_0x161a95(0xd8)](fs[_0x161a95(0xd5)](_0x2d7e0f),_0x161a95(0xc1));let _0x3b98e8;try{if(fs[_0x161a95(0x106)](_0x39cb17)['isSymbolicLink']())fail(_0x161a95(0x8d));_0x3b98e8=fs['readdirSync'](_0x39cb17);}catch(_0x162760){if(_0x162760[_0x161a95(0xa4)]===_0x161a95(0xc2))return null;throw _0x162760;}for(const _0xe1be54 of Object[_0x161a95(0xda)](_0x26ee33[_0x161a95(0xba)]||{})){if(_0xe1be54['status']!=='active')continue;const _0x7a2d42=crypto['createHash']('sha256')[_0x161a95(0xee)](_0xe1be54[_0x161a95(0x11b)])[_0x161a95(0x121)](_0x161a95(0xf6));for(const _0x12d55b of _0x3b98e8['filter'](_0x5bc9dc=>new RegExp(_0x161a95(0x9a)+_0x7a2d42+_0x161a95(0x11e))['test'](_0x5bc9dc))){const _0xb328fc=path[_0x161a95(0xd8)](_0x39cb17,_0x12d55b,_0x161a95(0x12a));if(fs[_0x161a95(0x106)](path['dirname'](_0xb328fc))['isSymbolicLink']()||fs[_0x161a95(0x106)](_0xb328fc)[_0x161a95(0x112)]())fail('RECOVERY_PATH_SYMLINK');const _0x27e4b0={};_0x27e4b0[_0x161a95(0x12d)]=!![];const _0x2db275=require(_0x161a95(0x10f))['readInterruptedOperationApproval'](_0x2d7e0f,{'invocationId':_0xe1be54[_0x161a95(0x11b)],'auditReference':'.agents/recovery-backups/'+_0x12d55b,'auditSha256':crypto[_0x161a95(0xa0)](_0x161a95(0x8b))['update'](fs[_0x161a95(0x132)](_0xb328fc))[_0x161a95(0x121)](_0x161a95(0xf6))},_0x45c86f,_0x27e4b0);if(equal(_0x2db275[_0x161a95(0x94)][_0x161a95(0xa6)],_0x54d4a6)&&_0x2db275[_0x161a95(0x94)][_0x161a95(0x122)]===_0x4855d4)return _0x2db275;}}return null;}function _0x5aff(_0x1efab2,_0x56ee85){_0x1efab2=_0x1efab2-0x8a;const _0x5d846b=_0x5d84();let _0x5affd9=_0x5d846b[_0x1efab2];if(_0x5aff['xMopuG']===undefined){var _0x2d5117=function(_0x459d75){const _0x38db0d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2736a7='',_0x5d5671='';for(let _0x1d5a86=0x0,_0x2f44dd,_0x1d3754,_0x258ee0=0x0;_0x1d3754=_0x459d75['charAt'](_0x258ee0++);~_0x1d3754&&(_0x2f44dd=_0x1d5a86%0x4?_0x2f44dd*0x40+_0x1d3754:_0x1d3754,_0x1d5a86++%0x4)?_0x2736a7+=String['fromCharCode'](0xff&_0x2f44dd>>(-0x2*_0x1d5a86&0x6)):0x0){_0x1d3754=_0x38db0d['indexOf'](_0x1d3754);}for(let _0x514fe3=0x0,_0x54f4f9=_0x2736a7['length'];_0x514fe3<_0x54f4f9;_0x514fe3++){_0x5d5671+='%'+('00'+_0x2736a7['charCodeAt'](_0x514fe3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5d5671);};_0x5aff['WIrpls']=_0x2d5117,_0x5aff['IytgAd']={},_0x5aff['xMopuG']=!![];}const _0x10b6a0=_0x5d846b[0x0],_0x193c98=_0x1efab2+_0x10b6a0,_0x3fd731=_0x5aff['IytgAd'][_0x193c98];return!_0x3fd731?(_0x5affd9=_0x5aff['WIrpls'](_0x5affd9),_0x5aff['IytgAd'][_0x193c98]=_0x5affd9):_0x5affd9=_0x3fd731,_0x5affd9;}function _0x5d84(){const _0x488527=['CMvHzfb1yMXPC2HLzfjLy292zxj5qxbWCM92ywW','ywjVCNrLzerYywLU','Agv4','su5ervHFu1rpuf9vtKnptKzjuK1fra','C3rYAw5NAwz5','ywn0AxzHDgLVBKv2AwrLBMnL','zNn5BMntEw5J','CMvHzeDLBMvYyxrPB24','CMv2AxnPB24','DxrMoa','oduZndKZmgPbBuXHDa','BwfW','B2XKuNvUDgLTzxntDg9WCgvK','y2fUy2vS','C3rHDhvZ','CNvUu3rVCenOzwnRCg9PBNq','CMvHzezLBMnL','DMvYC2LVBG','Bhn0yxrtEw5J','Aw5JBhvKzxm','mJD2rw1jyM8','yNL0zxncEvbHDgG','lMfNzw50CY9YDw50Aw1Ll3vWzgf0zs1Yzxf1zxn0lMPZB24','zxHWB3j0CW','lI9VD25Lzc1WCM9JzxnZ','B3jPz2LUywW','CNvUC0nHBMnLBgXLza','lI9PBNrLCNj1ChrLzc1VCgvYyxrPB24TyxvKAxq','z2vUzxjHDgLVBI5QC29U','C3vWzxjZzwrLzej5','AxntEw1IB2XPy0XPBMS','ndu4nwjfAu9SEG','vvbeqvrfx0nbtKnfteXfra','Dw5RBM93BG','ndyYnJryDu1tvNy','lI93B3jRC3bHy2uTz2vUzxjHDgLVBG','C3vJy2vZC29Yswq','lMfNzw50CY9YDw50Aw1Ll3vWzgf0zxm','Aw50zxjYDxb0zwruCMfUC2fJDgLVBG','Aw52B2nHDgLVBKLK','z2vUzxjHDgLVBKnVBw1PDhrLza','CMvZB3vYy2vqBgfU','lvTHlwyWltLDEZy0Fsq','ChjVy2vZC1n0yxj0','CMvZDw1L','zgLNzxn0','CMvXDwvZDeLK','zxHLy3v0B3iTBg9JAY5QC29U','C2fTzvDVCMTZCgfJzq','zxHLy3v0B3i','DgvZDa','su5ervHFt1vuq09nrv9vtKTot1Do','q29TBwL0DgvKihvWzgf0zsbTDxn0ihjVBgWGzM9YD2fYza','vvbeqvrfx1nvu1bftKrfra','yMfJA3vWlMPZB24','BM9KztPMCW','zNvUy3rPB24','ywXSB3DvBM1HDgvYAwfSAxPLza','CNvUBMLUzW','yNL0zxm','CMvZB3vYy2vZqxbWBgLLza','CgfYC2u','CMvHzezPBgvtEw5J','D29YA3nWywnL','C2HHmJu2','C3vZCgvUza','uKvdt1zfuLLFuefusf9twu1msu5l','yxvKAxrtAgeYnty','t1bfuKfusu9ox1bmqu5Fvu5wrvjjrKLfra','C3rYAw5N','Aw50zxjYDxb0zwq','DhjHBNnHy3rPB24UANnVBG','yxvKAxrszwzLCMvUy2u','yxbWCM92ywW','yxnZAwDU','y29UDhjVBfjLDMLZAw9U','C29Tzq','ywnXDwLYzuv4ywn0uNvUDgLTzuXVy2S','Dg9Rzw4','xM9WzxjHDgLVBI0','CMvZB3vYy2vdB250CMfJDerPz2vZDa','C3vJy2vZC29YvgfYz2v0','mtm5nti3mLDPvKXjwG','DxbKyxrLlxjLCxvLC3qUANnVBG','ndmWoteXzerwuK5X','y3jLyxrLsgfZAa','l3rYyw5Zywn0Aw9UlwzPBMfSlMPZB24','C3bSAxq','CMvZB2X2zq','y29Kzq','zNjVBuvUDhjPzxm','y2fUzgLKyxrL','CMvSyxrPDMu','yxnZzxj0uMvJB3zLCNLtDwnJzxnZB3i','C3vZCgvUzgvK','AxngAw5PDgu','CMvSzwfZzq','lMfNzw50CY9YDw50Aw1Ll3vWzgf0zs1JB250CM9SlMPZB24','y29UDhjHy3rnAxnTyxrJAa','rK9sruLhtL9xt1jlu1bbq0vFu1rbveu','ChvIBgLJs2v5','zxzLCNK','zMLSzq','CMfUzg9Tvvvjra','CgLK','rvnsq0G','lI9YzxnVDxjJzs10CMfUC2fJDgLVBG','nde0ohHuC1HsCG','DxbKyxrLuMvXDwvZDeLK','y2fUy2vSBgvK','C3vWzxjZzwrLza','DgLJA2v0CW','B3bLCMf0Aw9UuMvJB3zLCNK','ywn0AxzL','l3bSyw4UANnVBG','CMvHzfjLy292zxj5sgfUzg9MzG','A2LSBa','ywnXDwLYzvjLy292zxj5rxHLy3v0B3i','lMfNzw50CY9YzwnVDMvYEs1IywnRDxbZ','ru5pru5u','vvbeqvrfx0vyrunvve9sx0jvu1K','nJqWmdqZnffLAejYva','Aw5ZCgvJDfbYzxbHCMvKugXHBG','AxntywzLsw50zwDLCG','uKvtt1vsq0vFuK9mtf9gt1jxqvjex1jfuvvjuKve','ywn0Aw9U','y29UDhjHy3reAwDLC3q','lI9Hzg1PC3nPB24TzMvUy2u','BM9KztPWyxrO','DhjHBNnHy3rPB25jza','lI9VD25Lzc1SB2nR','Aw5KzxHszxn1Bhq','y2XVC2vtEw5J','Dg9ju09tDhjPBMC','CMvJB3zLCNLkB3vYBMfSsg9Sza','C3rHCNq','z2vUzxjHDgLVBG','CMvUyw1Lu3LUyW','CMvHBhbHDgHtEw5J','CMvHzeLUDgvYCNvWDgvKt3bLCMf0Aw9UqxbWCM92ywW','t1bfuKfusu9ox1jfq09wrvjzx0niqu5hruq','AM9PBG','B3DUzxi','DMfSDwvZ','BM9KztPJCNLWDg8','CMvXDwvZDenVBNrYB2W','yxjJAgL2zq','B3bLCMf0Aw9UuMvJB3zLCNLiB2XK','zw50CMLLCW','ywjVCNqTzhjHAw4','lNrTCa','zxf1ywXZ','su5wquXjrf9vuerbvevFqunusu9o','Aw5KzxG','ohzPqwHjqq','yxnZzxj0uMvJB3zLCNLiyw5KB2zM','y2HHBMDLzef0','DxbKyxrLCY8','ywXSB2m','DxbKyxrLlwnVBNrYB2WUANnVBG','t1bfuKfusu9ox1jfq09wrvjzx1bftKrjtKC','vvbeqvrfx0vyrunvve9sx1vovKvssuzjruq','y29TBwL0DgvKqxq','DxbKyxrL','CMvHzfjLy292zxj5u3vJy2vZC29Y','lI93B3jRC3bHy2uTCgf0Aa','nZG1mJCWnu52ENj4ta','DgfYz2v0','zxHLy3v0B3iUBg9JAW'];_0x5d84=function(){return _0x488527;};return _0x5d84();}function assertRecoverySuccessor(_0x19d961,_0x43c55a,_0x255878,_0x18a957,_0x4b63f2){const _0x1e8813=_0x218c9a,_0x445fef=require(_0x1e8813(0x10f))[_0x1e8813(0xd6)](_0x19d961,_0x43c55a,_0x255878);if(_0x18a957!==_0x445fef['approval'][_0x1e8813(0x118)]||_0x43c55a[_0x1e8813(0xcc)]!==_0x445fef[_0x1e8813(0x94)][_0x1e8813(0xcc)]||!equal(_0x4b63f2,_0x445fef[_0x1e8813(0x94)][_0x1e8813(0xa6)]))fail(_0x1e8813(0xd7));if(recoveryCompleted(_0x19d961,_0x43c55a,_0x445fef))return!![];const _0x39c0d2=assertRecoveryHandoff(_0x19d961,_0x43c55a,_0x255878),_0x4a9b5a=stateBytes(_0x19d961,_0x1e8813(0xe8)+_0x39c0d2['transactionId']+_0x1e8813(0xa1)),_0x5a4009=_0x4a9b5a?JSON[_0x1e8813(0x131)](_0x4a9b5a):null;if(!_0x5a4009||_0x5a4009[_0x1e8813(0x102)]!==_0x1e8813(0xb9)||_0x5a4009[_0x1e8813(0xcc)]!==_0x39c0d2[_0x1e8813(0xcc)]||!require(_0x1e8813(0xf0))[_0x1e8813(0x124)](_0x5a4009[_0x1e8813(0x8a)]||'',_0x19d961)||_0x5a4009[_0x1e8813(0x111)]!==_0x18a957||!sameReleaseIdentity(_0x5a4009[_0x1e8813(0x9c)],_0x4b63f2)||!retiredRecoveryHeld(_0x5a4009,_0x39c0d2,_0x445fef))fail(_0x1e8813(0xeb));return!![];}function readRecoverySuccessor(_0x370b33,_0x5172b7,_0x173c5b){const _0x427510=_0x218c9a,_0x2f04a7={};_0x2f04a7['publicKey']=_0x173c5b;const _0x3dbb92=require(_0x427510(0xca))[_0x427510(0x104)](_0x370b33,_0x2f04a7);for(const _0x4f7023 of Object[_0x427510(0xda)](_0x3dbb92[_0x427510(0xba)]||{})){if(_0x4f7023[_0x427510(0x102)]!==_0x427510(0x91))continue;const _0x2ffa16=require(_0x427510(0x10f))[_0x427510(0xd6)](_0x370b33,_0x4f7023,_0x173c5b);if(_0x2ffa16['approval'][_0x427510(0x118)]!==_0x5172b7)continue;const _0x5ca7e2={};_0x5ca7e2[_0x427510(0x11b)]=_0x4f7023[_0x427510(0x11b)],_0x5ca7e2[_0x427510(0x93)]=_0x4f7023['auditReference'],_0x5ca7e2[_0x427510(0x8e)]=_0x4f7023[_0x427510(0x8e)],_0x5ca7e2[_0x427510(0xcc)]=_0x2ffa16[_0x427510(0x94)][_0x427510(0xcc)],_0x5ca7e2[_0x427510(0x118)]=_0x5172b7,_0x5ca7e2[_0x427510(0xa6)]=_0x2ffa16[_0x427510(0x94)][_0x427510(0xa6)];const _0x3bfdab=_0x5ca7e2;if(recoveryCompleted(_0x370b33,_0x3bfdab,_0x2ffa16))return null;const _0x38f0f5=readControl(_0x370b33,_0x3bfdab[_0x427510(0xcc)]);if(_0x38f0f5?.[_0x427510(0xc8)]===_0x427510(0x101))fail('UPDATE_CANCELLED');if(_0x38f0f5?.['action']===_0x427510(0x8c)&&!_0x38f0f5['operationRecovery'])fail(_0x427510(0x129));if(!_0x38f0f5?.[_0x427510(0xbb)])fail(_0x427510(0xd7));return assertRecoveryHandoff(_0x370b33,_0x38f0f5['operationRecovery'],_0x173c5b);}return null;}function acquireRecoveryExecutor(_0xe63de1,_0x266fda,_0x5df2fe){const _0x370dd2=_0x218c9a,_0x3cf3a8=assertRecoveryHandoff(_0xe63de1,_0x266fda,_0x5df2fe),_0x15e400=_0x3cf3a8[_0x370dd2(0xdd)][_0x370dd2(0x109)][_0x370dd2(0x123)]||null,_0x4a52eb=stateBytes(_0xe63de1,_0x370dd2(0xf3));if(_0x4a52eb&&(!_0x15e400||!_0x4a52eb[_0x370dd2(0xe2)](_0x15e400)))fail(_0x370dd2(0xec));const _0x57fbed=_0x3cf3a8[_0x370dd2(0xdd)][_0x370dd2(0x94)][_0x370dd2(0x125)];if(_0x57fbed){const _0x411a2d=require('./owned-process')['processIdentity'](_0x57fbed[_0x370dd2(0xb3)]);if(_0x411a2d&&(_0x411a2d[_0x370dd2(0xb3)]!==_0x57fbed[_0x370dd2(0xb3)]||!/^[1-9][0-9]{0,19}$/[_0x370dd2(0x126)](_0x411a2d[_0x370dd2(0xd2)]||'')))fail(_0x370dd2(0xec));if(_0x411a2d?.[_0x370dd2(0xd2)]===_0x57fbed[_0x370dd2(0x11f)])fail(_0x370dd2(0xc3));if(!_0x411a2d)try{process[_0x370dd2(0xbf)](_0x57fbed[_0x370dd2(0xb3)],0x0),fail(_0x370dd2(0xec));}catch(_0x385ff0){if(_0x385ff0[_0x370dd2(0xa4)]!==_0x370dd2(0xb4))throw _0x385ff0;}}const _0x4048b3=require(_0x370dd2(0xcd))[_0x370dd2(0x98)](path[_0x370dd2(0xd8)](fs['realpathSync'](_0xe63de1),'.agents/runtime/executor.lock'),_0x15e400);if(!_0x4048b3)fail(_0x370dd2(0xc3));return _0x4048b3;}function requestRecoverySuspend(_0x289688,_0x3b46bc,_0x358b2d,_0x136b07){return withAdmissionLock(_0x289688,_0x35c05e=>{const _0x54f0a1=_0x5aff,_0x22f8fe=require('./interrupted-operation-audit')[_0x54f0a1(0xd6)](_0x289688,_0x3b46bc,_0x358b2d),_0x414b7a=stateBytes(_0x289688,'update-control.json'),_0x2b8a0e=_0x22f8fe[_0x54f0a1(0x109)][_0x54f0a1(0xea)]||null;if(_0x414b7a===null?_0x2b8a0e!==null:!_0x414b7a[_0x54f0a1(0xe2)](_0x2b8a0e||Buffer[_0x54f0a1(0xe9)](0x0)))fail(_0x54f0a1(0xd7));const _0x498428=_0x414b7a?JSON[_0x54f0a1(0x131)](_0x414b7a):null;if(_0x498428?.[_0x54f0a1(0xc8)]==='cancel')fail(_0x54f0a1(0x114));if(_0x498428?.['action']==='suspend')fail(_0x54f0a1(0x129));const _0x15feca=stateBytes(_0x289688,'update-request.json'),_0x4f8ff8=_0x15feca?JSON[_0x54f0a1(0x131)](_0x15feca):null;if((_0x4f8ff8?.[_0x54f0a1(0x122)]??null)!==(_0x22f8fe[_0x54f0a1(0x94)][_0x54f0a1(0x122)]??null)||_0x4f8ff8&&!equal(_0x4f8ff8[_0x54f0a1(0xf2)],_0x22f8fe[_0x54f0a1(0x94)][_0x54f0a1(0xa6)]))fail(_0x54f0a1(0xd7));if(typeof _0x136b07!==_0x54f0a1(0x12c)||_0x136b07(_0x35c05e,_0x22f8fe)!==!![])fail(_0x54f0a1(0xd7));const _0xec64ee=require(_0x54f0a1(0x10c))['processIdentity'](process['pid']);if(!_0xec64ee||!/^[1-9][0-9]{0,19}$/[_0x54f0a1(0x126)](_0xec64ee[_0x54f0a1(0xd2)]||''))fail('OPERATION_OWNER_UNVERIFIED');const _0xdc465d={..._0x3b46bc,'transactionId':_0x22f8fe[_0x54f0a1(0x94)]['transactionId'],'candidate':_0x22f8fe[_0x54f0a1(0x94)][_0x54f0a1(0xa6)],'successorId':_0x22f8fe['approval'][_0x54f0a1(0x118)],'requestId':_0x22f8fe[_0x54f0a1(0x94)][_0x54f0a1(0x122)]??null,'controlRevision':(_0x498428?.[_0x54f0a1(0xfc)]||0x0)+0x1,'owner':{'pid':_0xec64ee[_0x54f0a1(0xb3)],'processStart':_0xec64ee['start'],'token':crypto[_0x54f0a1(0xb2)]()}},_0x27c820={'transactionId':_0xdc465d['transactionId'],'action':_0x54f0a1(0x8c),'revision':_0xdc465d['controlRevision'],'requestedAt':new Date()[_0x54f0a1(0xd0)](),'operationRecovery':_0xdc465d};return saveControl(_0x289688,_0x27c820),_0xdc465d;},{'publicKey':_0x358b2d});}const _0x2be91e={};_0x2be91e['readControl']=readControl,_0x2be91e[_0x218c9a(0xdc)]=requestControl,_0x2be91e['requestRecoverySuspend']=requestRecoverySuspend,_0x2be91e[_0x218c9a(0xbe)]=readRecoveryHandoff,_0x2be91e[_0x218c9a(0xe6)]=assertRecoveryHandoff,_0x2be91e[_0x218c9a(0xd1)]=recoveryJournalHold,_0x2be91e['assertRecoveryRetirement']=assertRecoveryRetirement,_0x2be91e[_0x218c9a(0xc0)]=acquireRecoveryExecutor,_0x2be91e[_0x218c9a(0x11a)]=interruptedTransaction,_0x2be91e[_0x218c9a(0xf4)]=readPublishedRecoveryApproval,_0x2be91e[_0x218c9a(0xa8)]=assertRecoverySuccessor,_0x2be91e[_0x218c9a(0xef)]=readRecoverySuccessor,module[_0x218c9a(0x10b)]=_0x2be91e;
|
package/src/core/upgrade-runs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x349165=_0x57dd;function _0x57dd(_0x25c68f,_0x57eba7){_0x25c68f=_0x25c68f-0xfc;const _0x2e2c0d=_0x2e2c();let _0x57dd33=_0x2e2c0d[_0x25c68f];if(_0x57dd['EwnenZ']===undefined){var _0x290ea7=function(_0x12779d){const _0x37d3eb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x579825='',_0x395480='';for(let _0x5339bf=0x0,_0x3beaa5,_0x54123b,_0x1f9210=0x0;_0x54123b=_0x12779d['charAt'](_0x1f9210++);~_0x54123b&&(_0x3beaa5=_0x5339bf%0x4?_0x3beaa5*0x40+_0x54123b:_0x54123b,_0x5339bf++%0x4)?_0x579825+=String['fromCharCode'](0xff&_0x3beaa5>>(-0x2*_0x5339bf&0x6)):0x0){_0x54123b=_0x37d3eb['indexOf'](_0x54123b);}for(let _0x234243=0x0,_0x36b78c=_0x579825['length'];_0x234243<_0x36b78c;_0x234243++){_0x395480+='%'+('00'+_0x579825['charCodeAt'](_0x234243)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x395480);};_0x57dd['RsDrDU']=_0x290ea7,_0x57dd['tOVWkw']={},_0x57dd['EwnenZ']=!![];}const _0x1c06f5=_0x2e2c0d[0x0],_0x36cc7b=_0x25c68f+_0x1c06f5,_0x1346da=_0x57dd['tOVWkw'][_0x36cc7b];return!_0x1346da?(_0x57dd33=_0x57dd['RsDrDU'](_0x57dd33),_0x57dd['tOVWkw'][_0x36cc7b]=_0x57dd33):_0x57dd33=_0x1346da,_0x57dd33;}function _0x2e2c(){const _0x2a7435=['DgfYz2v0','DgfZAW','nJi1nti0EKvowgHt','uLvox1DpuKTtuefdrv9vtLzfuKLgsuve','DhjHBNnHy3rPB25jza','BwLNCMf0zq','mtqYmteXBhzzBwvz','zxHWB3j0CW','lI4VChjVEhKVCgLWzwXPBMu','BM9KztPMCW','C3rHDhvZ','y2fUy2vSrM9YvxbNCMfKzq','Aw5JBhvKzxm','lI9YDw4Ty29TCgf0AwjPBgL0Eq','C3vJy2vZCW','nde2ndb1yLP0rMK','BwfW','zMLSDgvY','DgfYz2v0rgLNzxn0','y2fUy2vSvxbNCMfKzvj1BNm','C3rHDgu','y2fUy2vSBgvK','mtq0mZiZmhjVAKvutW','C29Tzq','DMvYC2LVBG','DgfYz2v0vMvYC2LVBG','y29Kzq','C3rHDgvsB290','CNvUCW','Cgf0Aa','mJG3nJuWngnRzu5JDa','CNvUswq','qurnsvntsu9ox0nptKzmsunu','ChvZAa','D29YA3nWywnL','lI93B3jRC3bHy2uTCgf0Aa','nZm1ndCYCurJEw9c','mJa3ntC2oxjRweDHta','zxbVy2G','y29TCgXLDgvK','n1Lmr0T3uG','C25HChnOB3rvCgDYywrLuNvUCW','yxnZAwDU','y2fUy2vSBgf0Aw9U','BM9KztPWyxrO','ndjuvhbXq08','zMXHDe1HCa'];_0x2e2c=function(){return _0x2a7435;};return _0x2e2c();}(function(_0x52cf0c,_0x26eeda){const _0x168084=_0x57dd,_0xaab5e3=_0x52cf0c();while(!![]){try{const _0x377755=parseInt(_0x168084(0x123))/0x1+parseInt(_0x168084(0x11b))/0x2*(-parseInt(_0x168084(0xfd))/0x3)+-parseInt(_0x168084(0x112))/0x4+parseInt(_0x168084(0x104))/0x5+parseInt(_0x168084(0x11f))/0x6+-parseInt(_0x168084(0x116))/0x7*(-parseInt(_0x168084(0x10c))/0x8)+-parseInt(_0x168084(0x113))/0x9;if(_0x377755===_0x26eeda)break;else _0xaab5e3['push'](_0xaab5e3['shift']());}catch(_0x1e3274){_0xaab5e3['push'](_0xaab5e3['shift']());}}}(_0x2e2c,0x2e0a9));const fs=require(_0x349165(0x126)),path=require(_0x349165(0x11a)),{readFence}=require('./admission-fence'),{workspaceRunRoots,readWorkspaceRuns}=require(_0x349165(0x12a)),{sameWorkspace}=require(_0x349165(0x111)),fail=_0x234243=>{const _0x329ee5=_0x349165;throw Object[_0x329ee5(0x118)](new Error(_0x234243),{'code':_0x234243});},terminal=_0x36b78c=>[_0x349165(0x115),_0x349165(0x103)][_0x349165(0x129)](_0x36b78c[_0x349165(0x127)]);function snapshotUpgradeRuns(_0x22be55,_0x458ee9={}){const _0x41ff7e=_0x349165;return workspaceRunRoots(_0x22be55)[_0x41ff7e(0x11c)](_0x5faaf7=>readWorkspaceRuns(_0x22be55,[_0x5faaf7],_0x458ee9)[_0x41ff7e(0xff)](_0x127a41=>!terminal(_0x127a41))[_0x41ff7e(0xfe)](_0x5ef3c1=>{const _0x5bb41e=_0x41ff7e;if(!_0x5ef3c1[_0x5bb41e(0x110)]?.[_0x5bb41e(0x10b)]||!sameWorkspace(_0x5ef3c1[_0x5bb41e(0x110)]['path'],_0x22be55))fail(_0x5bb41e(0x120));const _0x1821f1={};return _0x1821f1[_0x5bb41e(0x11e)]=_0x5ef3c1['task'],_0x1821f1['runId']=_0x5ef3c1[_0x5bb41e(0x10d)],_0x1821f1[_0x5bb41e(0x109)]=_0x5faaf7,_0x1821f1;}));}function cancelUpgradeRuns(_0x3e267d,_0x2c0fcf){const _0x42acb7=_0x349165,_0x5ee6c5=readFence(_0x3e267d);if(_0x5ee6c5[_0x42acb7(0x102)]!=='frozen'||_0x5ee6c5[_0x42acb7(0x121)]!==_0x2c0fcf[_0x42acb7(0x121)]||_0x5ee6c5[_0x42acb7(0x114)]!==_0x2c0fcf['epoch']||_0x5ee6c5[_0x42acb7(0x107)]!==_0x2c0fcf[_0x42acb7(0x11d)][_0x42acb7(0x106)]||_0x5ee6c5[_0x42acb7(0x100)]!==_0x2c0fcf[_0x42acb7(0x11d)]['digest'])fail(_0x42acb7(0x10e));const _0x59178d=workspaceRunRoots(_0x3e267d),{PipelineManager:_0x35f28a}=require(_0x42acb7(0x125)),_0x368c62={};_0x368c62[_0x42acb7(0x122)]=![];const _0x2248cd=new _0x35f28a(_0x3e267d,_0x368c62),_0x5d3d6b=[];for(const _0x51c23c of _0x2c0fcf[_0x42acb7(0x10a)]){if(!_0x59178d[_0x42acb7(0x105)](_0x5a93c9=>sameWorkspace(_0x5a93c9,_0x51c23c['stateRoot'])))fail('RUN_WORKSPACE_UNVERIFIED');_0x2248cd[_0x42acb7(0x109)]=_0x51c23c['stateRoot'];const _0x30182d={..._0x51c23c};_0x30182d['transactionId']=_0x2c0fcf[_0x42acb7(0x121)],_0x30182d[_0x42acb7(0x114)]=_0x2c0fcf[_0x42acb7(0x114)],_0x30182d[_0x42acb7(0x11d)]=_0x2c0fcf['target'];const _0x14388e=_0x2248cd[_0x42acb7(0x128)](_0x30182d);if(!_0x14388e[_0x42acb7(0xfc)])fail(_0x14388e[_0x42acb7(0x108)]);const _0x4aa636={};_0x4aa636[_0x42acb7(0x11e)]=_0x51c23c[_0x42acb7(0x11e)],_0x4aa636['runId']=_0x51c23c[_0x42acb7(0x10d)];if(_0x14388e[_0x42acb7(0x119)]?.[_0x42acb7(0x121)]===_0x2c0fcf['transactionId'])_0x5d3d6b[_0x42acb7(0x10f)](_0x4aa636);}const _0x80885b={};return _0x80885b[_0x42acb7(0x103)]=_0x5d3d6b,_0x80885b;}const _0x1f9210={};_0x1f9210[_0x349165(0x117)]=snapshotUpgradeRuns,_0x1f9210[_0x349165(0x101)]=cancelUpgradeRuns,module[_0x349165(0x124)]=_0x1f9210;
|
|
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 }
|