@evomap/evolver 1.89.15 → 1.89.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +1 -1
- package/README.ko-KR.md +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/index.js +89 -17
- package/package.json +1 -1
- package/src/adapters/claudeCode.js +38 -9
- package/src/adapters/codex.js +2 -2
- package/src/adapters/hookAdapter.js +38 -2
- package/src/adapters/scripts/evolver-session-start.js +182 -2
- package/src/atp/atpExecute.js +3 -1
- package/src/atp/hubClient.js +5 -3
- package/src/atp/serviceHelper.js +3 -2
- package/src/config.js +11 -3
- package/src/evolve/guards.js +1 -1
- package/src/evolve/pipeline/collect.js +1 -1
- package/src/evolve/pipeline/dispatch.js +1 -1
- package/src/evolve/pipeline/enrich.js +1 -1
- package/src/evolve/pipeline/hub.js +1 -1
- package/src/evolve/pipeline/select.js +1 -1
- package/src/evolve/pipeline/signals.js +1 -1
- package/src/evolve/utils.js +1 -1
- package/src/evolve.js +1 -1
- package/src/gep/a2aProtocol.js +1 -1
- package/src/gep/antiAbuseTelemetry.js +1 -1
- package/src/gep/autoDistillConv.js +1 -1
- package/src/gep/autoDistillLlm.js +1 -1
- package/src/gep/candidateEval.js +1 -1
- package/src/gep/candidates.js +1 -1
- package/src/gep/cliContracts.js +37 -1
- package/src/gep/contentHash.js +1 -1
- package/src/gep/conversationDistiller.js +1 -1
- package/src/gep/conversationSniffer.js +1 -1
- package/src/gep/crypto.js +1 -1
- package/src/gep/curriculum.js +1 -1
- package/src/gep/deviceId.js +1 -1
- package/src/gep/directoryClient.js +7 -3
- package/src/gep/envFingerprint.js +1 -1
- package/src/gep/epigenetics.js +1 -1
- package/src/gep/execBridge.js +1 -1
- package/src/gep/explore.js +1 -1
- package/src/gep/hash.js +1 -1
- package/src/gep/hostErrorClassifier.js +34 -0
- package/src/gep/hubFetch.js +1 -1
- package/src/gep/hubReview.js +1 -1
- package/src/gep/hubSearch.js +1 -1
- package/src/gep/hubVerify.js +1 -1
- package/src/gep/issueReporter.js +5 -4
- package/src/gep/learningSignals.js +1 -1
- package/src/gep/memoryGraph.js +1 -1
- package/src/gep/memoryGraphAdapter.js +1 -1
- package/src/gep/mutation.js +1 -1
- package/src/gep/narrativeMemory.js +1 -1
- package/src/gep/oauthLogin.js +3 -5
- package/src/gep/openPRRegistry.js +1 -1
- package/src/gep/paths.js +20 -0
- package/src/gep/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- package/src/gep/privacyClient.js +28 -10
- package/src/gep/prompt.js +1 -1
- package/src/gep/recallInject.js +1 -1
- package/src/gep/recallVerifier.js +1 -1
- package/src/gep/reflection.js +1 -1
- package/src/gep/savingsCore.js +1 -1
- package/src/gep/selector.js +1 -1
- package/src/gep/signals.js +37 -15
- package/src/gep/skillDistiller.js +1 -1
- package/src/gep/skillPublisher.js +8 -3
- package/src/gep/solidify.js +1 -1
- package/src/gep/strategy.js +1 -1
- package/src/gep/taskReceiver.js +3 -2
- package/src/gep/tokenSavings.js +1 -1
- package/src/gep/validator/index.js +7 -2
- package/src/gep/validator/reporter.js +7 -2
- package/src/gep/validator/stakeBootstrap.js +7 -2
- package/src/gep/workspaceKeychain.js +1 -1
- package/src/ops/lifecycle.js +501 -31
- package/src/proxy/clientSettings.js +405 -0
- package/src/proxy/extensions/traceControl.js +1 -1
- package/src/proxy/index.js +10 -5
- package/src/proxy/inject.js +1 -1
- package/src/proxy/lifecycle/manager.js +82 -16
- package/src/proxy/mailbox/state.js +207 -0
- package/src/proxy/mailbox/store.js +164 -64
- package/src/proxy/router/messages_route.js +4 -3
- package/src/proxy/server/http.js +40 -6
- package/src/proxy/sync/inbound.js +31 -12
- package/src/proxy/sync/outbound.js +157 -22
- package/src/proxy/trace/extractor.js +1 -1
- package/src/proxy/trace/usage.js +1 -1
package/src/proxy/index.js
CHANGED
|
@@ -184,6 +184,7 @@ class EvoMapProxy {
|
|
|
184
184
|
this.dataDir = opts.dataDir || opts.dbPath || _defaultDataDir();
|
|
185
185
|
this.port = opts.port;
|
|
186
186
|
this.logger = opts.logger || console;
|
|
187
|
+
this.clientSettings = opts.clientSettings || null;
|
|
187
188
|
this._skillPath = opts.skillPath || null;
|
|
188
189
|
this._anthropicBaseUrl = (opts.anthropicBaseUrl || process.env.EVOMAP_ANTHROPIC_BASE_URL || 'https://api.anthropic.com').replace(/\/+$/, '');
|
|
189
190
|
this._openaiBaseUrl = String(opts.openaiBaseUrl || process.env.EVOMAP_OPENAI_BASE_URL || DEFAULT_OPENAI_BASE_URL).replace(/\/+$/, '');
|
|
@@ -396,6 +397,7 @@ class EvoMapProxy {
|
|
|
396
397
|
this.server = new ProxyHttpServer(routes, {
|
|
397
398
|
port: this.port,
|
|
398
399
|
logger: this.logger,
|
|
400
|
+
clientSettings: this.clientSettings,
|
|
399
401
|
});
|
|
400
402
|
|
|
401
403
|
const serverInfo = await this.server.start();
|
|
@@ -462,7 +464,8 @@ class EvoMapProxy {
|
|
|
462
464
|
|| (stats.skipped || 0) > 0
|
|
463
465
|
|| (stats.duplicates || 0) > 0;
|
|
464
466
|
if (!madeProgress) break;
|
|
465
|
-
if (stats.reasons?.max_pending_uploads || stats.reasons?.
|
|
467
|
+
if (stats.reasons?.max_pending_uploads || stats.reasons?.max_enqueue_bytes
|
|
468
|
+
|| stats.reasons?.collection_disabled
|
|
466
469
|
|| stats.reasons?.missing_file || stats.reasons?.missing_store
|
|
467
470
|
|| stats.reasons?.read_failed || stats.reasons?.thrown) {
|
|
468
471
|
break;
|
|
@@ -824,8 +827,9 @@ class EvoMapProxy {
|
|
|
824
827
|
// here, so clients (e.g. Claude Code) can authenticate to the proxy
|
|
825
828
|
// with `ANTHROPIC_AUTH_TOKEN=<proxy_token>` without losing the ability
|
|
826
829
|
// to reach Anthropic upstream. When the client did not pass x-api-key,
|
|
827
|
-
// the proxy substitutes its own
|
|
828
|
-
// env var on the upstream request.
|
|
830
|
+
// the proxy substitutes its own EVOMAP_ANTHROPIC_API_KEY /
|
|
831
|
+
// ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN env var on the upstream request.
|
|
832
|
+
// Env is read per-request so creds
|
|
829
833
|
// can be hot-swapped without restart, matching the EVOMAP_MODEL_*
|
|
830
834
|
// policy in README.
|
|
831
835
|
async _proxyAnthropic(reqPath, body, opts = {}) {
|
|
@@ -846,8 +850,9 @@ class EvoMapProxy {
|
|
|
846
850
|
}
|
|
847
851
|
|
|
848
852
|
if (!fwd['x-api-key']) {
|
|
849
|
-
|
|
850
|
-
|
|
853
|
+
const upstreamApiKey = process.env.EVOMAP_ANTHROPIC_API_KEY || process.env.ANTHROPIC_API_KEY;
|
|
854
|
+
if (upstreamApiKey) {
|
|
855
|
+
fwd['x-api-key'] = upstreamApiKey;
|
|
851
856
|
} else {
|
|
852
857
|
const upstreamAuthToken = process.env.EVOMAP_ANTHROPIC_AUTH_TOKEN
|
|
853
858
|
|| (process.env.EVOMAP_PROXY_AUTO_INJECTED === '1' ? '' : process.env.ANTHROPIC_AUTH_TOKEN);
|
package/src/proxy/inject.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x34e318=_0x3381;(function(_0x56ed55,_0x4c46d8){const _0x455371=_0x3381,_0x4c021a=_0x56ed55();while(!![]){try{const _0x104df4=-parseInt(_0x455371(0x1a7,'\x4a\x35\x62\x51'))/(0x12b3*-0x1+0xc5*0xa+-0x2*-0x581)+-parseInt(_0x455371(0x156,'\x6b\x73\x37\x77'))/(0x1ee9+-0x63*-0x63+0x36*-0x148)*(parseInt(_0x455371(0x169,'\x25\x47\x77\x52'))/(-0x5*0x19+-0x204a+0x20ca))+-parseInt(_0x455371(0x179,'\x4a\x35\x62\x51'))/(0x1ded+0x5*0x1d6+-0x2717)*(-parseInt(_0x455371(0x154,'\x6b\x73\x37\x77'))/(0x1b71+0x1*-0x7a5+-0x1*0x13c7))+parseInt(_0x455371(0x152,'\x70\x28\x78\x43'))/(0x2*-0x5e+0xdb4*0x2+-0x1aa6)*(parseInt(_0x455371(0x1b1,'\x70\x28\x78\x43'))/(-0x5*-0x79a+-0x121d*-0x2+-0x4a35))+parseInt(_0x455371(0x19c,'\x28\x71\x6a\x37'))/(-0xf1+-0x1e*-0x96+-0x109b)*(-parseInt(_0x455371(0x16a,'\x7a\x24\x59\x79'))/(0x117+0x1fc*0x5+-0x2*0x57d))+-parseInt(_0x455371(0x160,'\x26\x69\x45\x35'))/(0x13*0x14+-0x2*0xafa+-0x7d*-0x2a)*(parseInt(_0x455371(0x1ad,'\x70\x28\x78\x43'))/(0x1729+0x35*-0xa7+0x7*0x1a3))+parseInt(_0x455371(0x1a0,'\x6d\x64\x61\x72'))/(-0x10ee+0x301*-0xb+0x3205);if(_0x104df4===_0x4c46d8)break;else _0x4c021a['push'](_0x4c021a['shift']());}catch(_0x4b2cb6){_0x4c021a['push'](_0x4c021a['shift']());}}}(_0x4ec5,0x182b3b*-0x1+-0x17e085+0x3d0df8));const _0x16cbf0=(function(){const _0x1bd377=_0x3381,_0x1b237a={};_0x1b237a[_0x1bd377(0x140,'\x29\x70\x38\x70')]=_0x1bd377(0x18d,'\x26\x69\x45\x35'),_0x1b237a[_0x1bd377(0x171,'\x70\x28\x78\x43')]=function(_0x3cc216,_0x489dac){return _0x3cc216===_0x489dac;};const _0xbe4bbf=_0x1b237a;let _0x5cfc5a=!![];return function(_0xda9de9,_0x40d849){const _0x3e0594=_0x1bd377,_0x213c96={};_0x213c96[_0x3e0594(0x15a,'\x4e\x39\x30\x4c')]=_0xbe4bbf[_0x3e0594(0x15e,'\x24\x30\x47\x6f')];const _0x44d01b=_0x213c96;if(_0xbe4bbf[_0x3e0594(0x1a4,'\x21\x40\x21\x70')](_0x3e0594(0x1b8,'\x56\x45\x38\x49'),_0x3e0594(0x163,'\x61\x38\x7a\x32'))){const _0x482105=_0x5cfc5a?function(){const _0x476901=_0x3e0594;if(_0x476901(0x193,'\x64\x4c\x5b\x71')==='\x70\x49\x4e\x70\x6f'){if(_0x40d849){const _0x4fded3=_0x40d849[_0x476901(0x1b3,'\x4f\x26\x24\x59')](_0xda9de9,arguments);return _0x40d849=null,_0x4fded3;}}else return _0x35339e['\x74\x6f\x53\x74\x72\x69\x6e\x67']()[_0x476901(0x189,'\x2a\x30\x42\x6f')](_0x476901(0x162,'\x70\x28\x78\x43')+_0x476901(0x161,'\x5e\x78\x45\x51'))[_0x476901(0x16d,'\x51\x62\x70\x76')]()[_0x476901(0x164,'\x36\x77\x68\x71')+_0x476901(0x17f,'\x38\x49\x32\x72')](_0x1be76b)['\x73\x65\x61\x72\x63\x68'](_0x476901(0x13c,'\x29\x70\x38\x70')+_0x476901(0x1a3,'\x53\x25\x28\x67'));}:function(){};return _0x5cfc5a=![],_0x482105;}else{const _0x36ad54={};return _0x36ad54[_0x3e0594(0x194,'\x6b\x44\x30\x37')]=![],_0x36ad54[_0x3e0594(0x15b,'\x6a\x77\x37\x24')]=_0x44d01b['\x46\x6a\x71\x6d\x48'],_0x36ad54;}};}()),_0x21cd06=_0x16cbf0(this,function(){const _0x34e5b4=_0x3381;return _0x21cd06[_0x34e5b4(0x137,'\x64\x6c\x74\x4a')]()[_0x34e5b4(0x153,'\x40\x23\x7a\x63')](_0x34e5b4(0x187,'\x72\x35\x48\x78')+_0x34e5b4(0x135,'\x36\x77\x6e\x76'))[_0x34e5b4(0x142,'\x70\x28\x78\x43')]()[_0x34e5b4(0x17a,'\x36\x77\x6e\x76')+'\x74\x6f\x72'](_0x21cd06)['\x73\x65\x61\x72\x63\x68'](_0x34e5b4(0x19a,'\x64\x6c\x74\x4a')+_0x34e5b4(0x1a3,'\x53\x25\x28\x67'));});function _0x4ec5(){const _0x2dd794=['\x65\x64\x33\x63\x53\x65\x54\x6a','\x57\x36\x6e\x59\x57\x52\x69\x55\x42\x38\x6b\x78\x57\x52\x4a\x64\x50\x71','\x42\x38\x6f\x31\x6e\x32\x2f\x64\x56\x43\x6b\x5a\x57\x51\x70\x64\x47\x57','\x69\x38\x6f\x4f\x70\x6d\x6f\x30\x46\x61','\x57\x4f\x48\x51\x75\x75\x56\x63\x47\x62\x56\x64\x52\x72\x56\x63\x56\x6d\x6f\x64\x57\x36\x6e\x75\x68\x61','\x57\x35\x62\x39\x57\x34\x65\x47\x57\x37\x46\x64\x53\x38\x6b\x63','\x6d\x77\x71\x76\x61\x6d\x6f\x6d\x6e\x43\x6b\x6e\x57\x36\x69','\x6c\x38\x6f\x4d\x57\x36\x38\x6d\x57\x50\x69','\x57\x50\x56\x64\x4a\x4a\x70\x64\x47\x77\x69','\x57\x35\x7a\x51\x57\x35\x47\x48','\x65\x76\x30\x44\x63\x47','\x73\x6d\x6b\x76\x6a\x38\x6f\x77\x72\x74\x4c\x49\x45\x53\x6b\x55\x57\x51\x4f\x6e','\x74\x6d\x6b\x47\x57\x50\x2f\x64\x4c\x6d\x6f\x72\x64\x47','\x73\x30\x4a\x64\x4c\x62\x53\x42\x6e\x59\x46\x63\x47\x38\x6b\x58\x57\x34\x2f\x64\x4f\x53\x6f\x4e','\x77\x33\x5a\x63\x4e\x6d\x6b\x70\x57\x4f\x69\x4f\x64\x38\x6f\x65','\x73\x49\x6c\x63\x52\x78\x58\x54\x76\x62\x69','\x57\x50\x68\x64\x53\x47\x2f\x64\x51\x30\x53','\x57\x37\x71\x6c\x6b\x73\x2f\x64\x54\x4e\x56\x63\x4c\x48\x43','\x68\x43\x6b\x32\x57\x34\x4b\x43\x68\x71','\x57\x52\x57\x55\x6c\x65\x4a\x64\x48\x61','\x57\x50\x64\x63\x55\x65\x42\x64\x50\x53\x6b\x70\x57\x51\x53','\x66\x6d\x6f\x67\x6b\x43\x6f\x76\x46\x30\x38\x2f\x57\x36\x71','\x43\x77\x38\x36\x44\x71\x37\x63\x56\x61','\x57\x50\x56\x63\x51\x43\x6b\x45\x41\x38\x6b\x59','\x45\x43\x6b\x54\x57\x4f\x2f\x64\x54\x53\x6f\x32','\x57\x35\x68\x63\x49\x53\x6f\x4d\x73\x64\x75\x6d\x57\x52\x56\x63\x49\x64\x30\x4d\x57\x4f\x71\x75\x57\x4f\x47','\x77\x6d\x6f\x6c\x57\x4f\x48\x61','\x75\x38\x6b\x6c\x6f\x43\x6f\x69\x77\x65\x43\x69\x65\x71','\x57\x37\x4c\x67\x57\x34\x37\x63\x47\x43\x6b\x4f','\x62\x66\x6d\x62\x63\x4a\x5a\x63\x50\x78\x4e\x64\x47\x71','\x62\x53\x6b\x43\x57\x34\x4a\x64\x4e\x47','\x67\x6d\x6b\x31\x57\x37\x78\x63\x49\x62\x56\x64\x56\x64\x35\x77','\x57\x50\x74\x63\x4f\x4b\x31\x77\x6d\x71','\x57\x50\x65\x53\x57\x35\x2f\x63\x4f\x71\x33\x64\x48\x38\x6b\x4a','\x57\x35\x68\x63\x53\x33\x6c\x63\x4d\x4a\x70\x63\x4d\x4c\x6d\x2f\x71\x43\x6f\x77\x57\x50\x4a\x63\x4a\x43\x6b\x45','\x6d\x47\x78\x64\x56\x43\x6b\x59\x57\x51\x71\x36\x64\x38\x6f\x49\x57\x4f\x43','\x57\x52\x38\x73\x65\x4d\x4a\x64\x4a\x72\x33\x63\x48\x61\x4f','\x57\x51\x4b\x42\x57\x51\x4a\x63\x55\x64\x42\x63\x4a\x63\x42\x64\x4f\x57','\x64\x4d\x43\x55\x57\x34\x4a\x64\x49\x74\x72\x71\x57\x36\x75','\x6a\x4e\x69\x37\x6d\x72\x52\x63\x4d\x66\x5a\x64\x51\x57','\x57\x51\x5a\x64\x4a\x71\x46\x64\x4f\x47','\x57\x4f\x48\x54\x65\x49\x56\x64\x47\x65\x4a\x63\x49\x73\x75','\x6e\x43\x6f\x53\x44\x6d\x6b\x70\x6a\x47','\x77\x43\x6f\x7a\x68\x66\x4e\x64\x4d\x38\x6b\x79\x57\x50\x70\x64\x54\x71','\x57\x35\x39\x41\x57\x4f\x57\x4c\x57\x37\x56\x63\x50\x6d\x6f\x52\x76\x71','\x57\x50\x52\x63\x56\x38\x6b\x74\x45\x6d\x6b\x6d\x57\x34\x47\x35\x42\x57','\x57\x35\x64\x63\x4d\x43\x6b\x63\x57\x4f\x48\x43\x57\x36\x4b','\x57\x36\x46\x63\x51\x53\x6b\x53\x57\x52\x7a\x59\x57\x35\x46\x63\x4c\x4e\x75','\x57\x34\x53\x65\x6e\x30\x44\x43','\x57\x35\x44\x75\x57\x52\x75\x69\x57\x36\x53','\x41\x30\x30\x36\x6c\x6d\x6b\x74\x57\x52\x6c\x63\x51\x61','\x57\x34\x79\x54\x69\x66\x35\x42\x57\x52\x39\x54\x57\x4f\x57','\x57\x50\x70\x64\x54\x63\x33\x64\x4c\x68\x70\x64\x54\x72\x69\x76','\x73\x43\x6f\x65\x66\x65\x74\x64\x4c\x6d\x6b\x63\x57\x4f\x78\x64\x53\x57','\x57\x36\x6e\x77\x57\x36\x75\x65\x57\x34\x74\x64\x4e\x38\x6b\x33\x6d\x61','\x57\x52\x5a\x63\x4b\x38\x6b\x45\x78\x38\x6b\x31\x57\x36\x57\x79\x76\x57','\x57\x35\x44\x77\x57\x34\x65','\x57\x52\x4e\x63\x51\x6d\x6b\x73\x57\x52\x69','\x6e\x66\x57\x31\x57\x36\x37\x64\x54\x61\x31\x33\x57\x34\x65','\x57\x50\x69\x36\x57\x50\x52\x63\x48\x61\x52\x63\x52\x73\x74\x64\x4e\x71','\x63\x43\x6b\x4e\x71\x6d\x6b\x54\x41\x43\x6f\x41','\x79\x4e\x4b\x4b\x41\x58\x2f\x63\x52\x72\x52\x63\x4d\x57','\x6d\x4d\x6a\x52\x57\x51\x78\x63\x4f\x5a\x68\x63\x54\x53\x6b\x66\x57\x36\x4c\x42\x57\x35\x4f\x6a\x57\x4f\x75','\x79\x43\x6f\x34\x6d\x43\x6f\x2b\x64\x49\x31\x32\x57\x4f\x4b','\x65\x6d\x6b\x6a\x57\x34\x69\x2b\x44\x38\x6f\x7a\x57\x50\x75\x47','\x57\x51\x74\x64\x4a\x43\x6f\x59\x57\x36\x4e\x64\x47\x4b\x75\x34\x57\x36\x38','\x57\x37\x53\x42\x57\x34\x61\x4e\x77\x53\x6f\x43','\x7a\x6d\x6b\x48\x78\x38\x6b\x47\x63\x73\x39\x73\x57\x50\x65\x6b\x44\x38\x6f\x54\x57\x4f\x7a\x59\x57\x52\x30','\x57\x37\x72\x75\x57\x35\x57\x54\x57\x37\x75','\x6f\x6d\x6b\x66\x7a\x53\x6b\x6f\x74\x38\x6f\x35\x57\x52\x35\x6b','\x57\x4f\x70\x64\x4b\x38\x6b\x4e\x65\x77\x39\x74\x57\x36\x37\x63\x55\x71','\x73\x4e\x65\x44\x79\x77\x70\x64\x50\x75\x42\x63\x4a\x47','\x66\x77\x34\x42','\x45\x68\x66\x62\x57\x37\x70\x63\x50\x57','\x73\x4d\x54\x7a\x57\x34\x34','\x63\x43\x6f\x31\x57\x34\x5a\x63\x4e\x53\x6b\x6b\x76\x43\x6f\x74\x57\x50\x64\x64\x4c\x4e\x4a\x64\x49\x63\x71\x37','\x57\x4f\x78\x63\x50\x32\x48\x6c\x6d\x71','\x57\x51\x74\x63\x54\x6d\x6b\x72\x57\x52\x50\x58\x79\x5a\x56\x63\x47\x61','\x78\x6d\x6b\x47\x57\x36\x33\x64\x52\x31\x46\x64\x47\x53\x6f\x2b','\x70\x43\x6f\x33\x57\x35\x43\x30\x57\x50\x74\x64\x48\x43\x6b\x67\x74\x57','\x57\x37\x72\x73\x57\x50\x61\x54\x43\x57','\x72\x75\x38\x77\x78\x59\x4e\x63\x49\x73\x64\x63\x51\x57','\x6a\x43\x6f\x67\x57\x52\x4e\x64\x4e\x74\x70\x63\x50\x6d\x6b\x71\x57\x37\x57','\x43\x43\x6f\x74\x57\x4f\x4e\x64\x52\x4d\x6c\x63\x4d\x4b\x75\x32','\x57\x51\x52\x63\x52\x67\x44\x4f\x67\x38\x6f\x32\x6e\x49\x30','\x72\x5a\x57\x6f\x7a\x4a\x78\x64\x4a\x77\x62\x77\x64\x43\x6b\x79\x64\x74\x75','\x66\x38\x6b\x6a\x57\x37\x4f\x44\x62\x57','\x6e\x66\x42\x63\x54\x31\x5a\x64\x53\x72\x4e\x63\x4d\x43\x6b\x56','\x57\x34\x78\x64\x4f\x4c\x4e\x63\x48\x53\x6f\x6f\x57\x52\x37\x64\x48\x77\x53','\x57\x50\x43\x6e\x57\x35\x39\x45\x63\x53\x6f\x4f\x57\x35\x52\x63\x4d\x6d\x6b\x4d\x76\x6d\x6f\x4e\x57\x36\x52\x64\x4e\x58\x69','\x7a\x68\x61\x51\x43\x57\x52\x63\x54\x72\x52\x63\x4e\x57','\x64\x53\x6b\x7a\x57\x35\x35\x35\x6d\x53\x6b\x39\x57\x36\x50\x47\x57\x51\x53','\x69\x43\x6b\x43\x57\x37\x46\x63\x4a\x71','\x6f\x75\x42\x63\x4b\x68\x74\x64\x54\x57','\x57\x35\x44\x77\x57\x34\x52\x63\x56\x6d\x6b\x32\x78\x76\x70\x63\x53\x47','\x68\x53\x6b\x6c\x57\x35\x61\x78\x6f\x48\x53\x41\x70\x47','\x79\x49\x31\x49\x75\x43\x6f\x31\x57\x36\x4e\x64\x4e\x65\x37\x63\x49\x38\x6f\x4b\x57\x51\x6a\x50\x57\x50\x61','\x67\x33\x53\x79','\x67\x66\x53\x76','\x57\x52\x47\x6c\x57\x52\x6c\x63\x4f\x64\x52\x63\x4e\x63\x56\x64\x55\x47','\x57\x34\x57\x53\x6a\x65\x48\x6d\x57\x52\x4c\x39\x57\x4f\x53','\x57\x35\x43\x4e\x6c\x31\x35\x61\x57\x51\x6d','\x73\x43\x6b\x72\x79\x53\x6b\x57\x63\x47\x31\x31\x73\x71','\x57\x50\x39\x75\x57\x4f\x4f\x68\x71\x47','\x57\x4f\x4a\x64\x47\x53\x6b\x54\x6e\x77\x6e\x6a','\x45\x53\x6b\x6e\x57\x51\x50\x37\x6f\x63\x66\x2f\x68\x47','\x73\x53\x6b\x75\x6a\x53\x6f\x45\x68\x64\x44\x59\x78\x38\x6b\x34\x57\x50\x53','\x57\x52\x46\x63\x4d\x4d\x56\x64\x4f\x6d\x6b\x77','\x57\x36\x58\x4c\x57\x51\x71\x71\x57\x35\x30','\x74\x6d\x6f\x6f\x57\x4f\x66\x31\x6d\x47','\x79\x4e\x6c\x63\x53\x6d\x6b\x54\x57\x51\x53','\x67\x6d\x6b\x76\x73\x6d\x6b\x68\x7a\x71','\x57\x37\x62\x78\x57\x36\x4b\x76\x57\x34\x4e\x64\x48\x43\x6b\x31\x6e\x71','\x57\x50\x4b\x72\x57\x37\x4a\x63\x50\x59\x34','\x57\x52\x57\x4c\x57\x36\x62\x65\x57\x50\x78\x64\x4b\x38\x6f\x55\x77\x38\x6b\x57\x57\x34\x57\x6a\x66\x61','\x46\x53\x6f\x6a\x57\x50\x54\x61\x67\x61','\x57\x4f\x35\x52\x7a\x71\x4b','\x57\x37\x50\x2f\x57\x52\x34\x46\x7a\x57','\x6c\x43\x6b\x75\x57\x37\x6c\x63\x54\x64\x56\x64\x4d\x47\x62\x34','\x57\x51\x4a\x64\x53\x43\x6b\x72\x70\x47','\x6e\x43\x6b\x6b\x57\x35\x69\x30\x66\x57','\x71\x38\x6f\x6e\x65\x4b\x46\x64\x4e\x38\x6b\x78\x57\x50\x4e\x64\x50\x47','\x65\x65\x53\x69\x6e\x53\x6b\x70\x57\x50\x42\x63\x53\x77\x47','\x57\x4f\x6a\x6a\x57\x37\x62\x35\x6e\x59\x76\x48\x42\x61','\x57\x51\x46\x63\x4f\x31\x42\x64\x4d\x6d\x6f\x71\x57\x51\x76\x61\x57\x35\x64\x63\x56\x65\x35\x53\x67\x47','\x57\x50\x75\x79\x57\x34\x74\x63\x4f\x58\x61','\x67\x67\x54\x6a','\x57\x34\x69\x65\x57\x50\x65\x54\x75\x71','\x62\x67\x4c\x6b\x6d\x4d\x78\x63\x4d\x66\x75','\x64\x38\x6f\x6d\x71\x53\x6b\x73\x61\x71\x44\x6e\x78\x57','\x69\x74\x64\x63\x53\x33\x58\x4e\x78\x71\x70\x63\x48\x71','\x61\x4d\x6e\x32\x6d\x78\x70\x63\x4e\x4b\x6a\x70','\x6e\x38\x6f\x51\x57\x35\x30\x33','\x63\x78\x70\x64\x4d\x43\x6f\x75\x74\x38\x6f\x77'];_0x4ec5=function(){return _0x2dd794;};return _0x4ec5();}_0x21cd06();'use strict';const {getProxyToken:_0xf00944,getProxyUrl:_0x28e1d3}=require(_0x34e318(0x14d,'\x6f\x4b\x66\x28')+_0x34e318(0x199,'\x53\x25\x28\x67')+'\x73');function _0x2b5499(_0x345989=process.env){const _0x5b8738=_0x34e318,_0x383ae8={'\x72\x74\x4d\x47\x41':function(_0x2ebf39,_0x420d8d){return _0x2ebf39(_0x420d8d);},'\x66\x4f\x79\x76\x61':function(_0x11ce46,_0x27f6c4){return _0x11ce46===_0x27f6c4;},'\x61\x4c\x6b\x6d\x6f':function(_0x4b9615,_0x2e2509){return _0x4b9615===_0x2e2509;},'\x5a\x41\x61\x74\x4f':'\x66\x61\x6c\x73\x65','\x58\x43\x58\x79\x5a':_0x5b8738(0x18f,'\x51\x62\x70\x76'),'\x64\x6b\x59\x79\x54':_0x5b8738(0x165,'\x4a\x29\x47\x32')},_0x4c32af=_0x383ae8[_0x5b8738(0x157,'\x25\x47\x77\x52')](String,_0x345989[_0x5b8738(0x1a1,'\x30\x43\x59\x6f')+'\x52\x4f\x58\x59\x5f\x41\x55\x54'+_0x5b8738(0x17e,'\x24\x30\x47\x6f')]||'')[_0x5b8738(0x191,'\x61\x78\x26\x64')]()[_0x5b8738(0x144,'\x28\x71\x6a\x37')+_0x5b8738(0x1a8,'\x51\x62\x70\x76')]();return _0x383ae8['\x66\x4f\x79\x76\x61'](_0x4c32af,'\x30')||_0x383ae8[_0x5b8738(0x13e,'\x56\x45\x38\x49')](_0x4c32af,_0x383ae8[_0x5b8738(0x178,'\x4f\x26\x24\x59')])||_0x4c32af===_0x383ae8[_0x5b8738(0x136,'\x6d\x64\x61\x72')]||_0x383ae8[_0x5b8738(0x167,'\x64\x4c\x5b\x71')](_0x4c32af,_0x383ae8[_0x5b8738(0x19d,'\x5e\x78\x45\x51')])||_0x383ae8[_0x5b8738(0x1b5,'\x7a\x24\x59\x79')](_0x4c32af,'\x6e\x6f');}function _0x3381(_0x5ecc95,_0x1523fe){_0x5ecc95=_0x5ecc95-(-0x51*-0x67+0x412*-0x3+0x199*-0xc);const _0x333193=_0x4ec5();let _0x4444c9=_0x333193[_0x5ecc95];if(_0x3381['\x77\x49\x55\x4c\x67\x69']===undefined){var _0x4a7ee5=function(_0x18fec5){const _0x547f60='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x31229f='',_0x3e3752='',_0x49dcef=_0x31229f+_0x4a7ee5,_0x576bbc=(''+function(){return-0x319*0x7+0xa4b+0xb64;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(-0x19d0+0x484+-0x154d*-0x1);for(let _0x18fcd6=-0x16eb+-0x1f*-0xb5+0x100,_0x2764b1,_0x4345fe,_0x49586c=0x1a1*-0x9+-0x2af*0x9+0x26d0;_0x4345fe=_0x18fec5['\x63\x68\x61\x72\x41\x74'](_0x49586c++);~_0x4345fe&&(_0x2764b1=_0x18fcd6%(0x58c+0xe1d*0x2+-0x21c2)?_0x2764b1*(-0x1158+0x23de+0x2*-0x923)+_0x4345fe:_0x4345fe,_0x18fcd6++%(-0x1391*0x1+-0x8*-0xc2+0xd85*0x1))?_0x31229f+=_0x576bbc||_0x49dcef['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x49586c+(0x1*0x7b8+0x1*0x4d2+-0x190*0x8))-(0x5*-0x1a+0x169*-0x1b+0x1*0x269f)!==0x1b0d+-0x3c7+0x7c2*-0x3?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x431*-0x1+-0x18b8+0x1de8&_0x2764b1>>(-(0x4eb*-0x1+0x105c*-0x2+-0x17*-0x1a3)*_0x18fcd6&-0x87c+-0x1a*-0xe9+-0xf28)):_0x18fcd6:0x3*0x7+0x2163+-0x2178){_0x4345fe=_0x547f60['\x69\x6e\x64\x65\x78\x4f\x66'](_0x4345fe);}for(let _0x4a9ba4=-0x1df*0xb+0xe99+0x5fc,_0x79c09d=_0x31229f['\x6c\x65\x6e\x67\x74\x68'];_0x4a9ba4<_0x79c09d;_0x4a9ba4++){_0x3e3752+='\x25'+('\x30\x30'+_0x31229f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4a9ba4)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0xb32+-0x106f+0x54d))['\x73\x6c\x69\x63\x65'](-(-0xda4+-0x1*0x1c51+-0x1*-0x29f7));}return decodeURIComponent(_0x3e3752);};const _0xc3c5aa=function(_0x2962ab,_0xdc747){let _0x182aa3=[],_0x541f51=-0x303*0x1+0x1444+0x1141*-0x1,_0x10b425,_0x2ba51c='';_0x2962ab=_0x4a7ee5(_0x2962ab);let _0x48499d;for(_0x48499d=0x1842+0x778+-0x1fba;_0x48499d<-0x63*0x1b+-0x1*-0x1705+-0xb94;_0x48499d++){_0x182aa3[_0x48499d]=_0x48499d;}for(_0x48499d=0x52+0x53a+0x163*-0x4;_0x48499d<0x191b+0xee3+-0x26fe;_0x48499d++){_0x541f51=(_0x541f51+_0x182aa3[_0x48499d]+_0xdc747['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x48499d%_0xdc747['\x6c\x65\x6e\x67\x74\x68']))%(0x215f+-0x1*0x4d2+-0x3*0x92f),_0x10b425=_0x182aa3[_0x48499d],_0x182aa3[_0x48499d]=_0x182aa3[_0x541f51],_0x182aa3[_0x541f51]=_0x10b425;}_0x48499d=0x1*-0x922+0x1354+-0x9*0x122,_0x541f51=0xd*-0x81+-0x29e*-0x5+-0x1*0x689;for(let _0x57d59a=-0x667*0x1+-0x26d4*0x1+-0x2d3b*-0x1;_0x57d59a<_0x2962ab['\x6c\x65\x6e\x67\x74\x68'];_0x57d59a++){_0x48499d=(_0x48499d+(-0x14c0+-0x10d6+0x1*0x2597))%(0x1337*-0x2+-0x9f4+0x18b1*0x2),_0x541f51=(_0x541f51+_0x182aa3[_0x48499d])%(0x3ac+-0x1165*-0x2+-0x2576),_0x10b425=_0x182aa3[_0x48499d],_0x182aa3[_0x48499d]=_0x182aa3[_0x541f51],_0x182aa3[_0x541f51]=_0x10b425,_0x2ba51c+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x2962ab['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x57d59a)^_0x182aa3[(_0x182aa3[_0x48499d]+_0x182aa3[_0x541f51])%(0x1266+0x6d8+-0x183e)]);}return _0x2ba51c;};_0x3381['\x51\x5a\x70\x52\x50\x70']=_0xc3c5aa,_0x3381['\x67\x49\x74\x6f\x41\x6a']={},_0x3381['\x77\x49\x55\x4c\x67\x69']=!![];}const _0x3c4708=_0x333193[0x4*0x94d+-0x1bd+-0x2377],_0x2d121f=_0x5ecc95+_0x3c4708,_0x30e880=_0x3381['\x67\x49\x74\x6f\x41\x6a'][_0x2d121f];if(!_0x30e880){if(_0x3381['\x66\x6e\x44\x53\x70\x6f']===undefined){const _0x587576=function(_0x187156){this['\x58\x68\x72\x56\x77\x4b']=_0x187156,this['\x79\x42\x4b\x68\x74\x52']=[0x4ee+0x1a6b+-0x1f58,-0x227a+0xc8f+-0x1f*-0xb5,0x1*0x2237+0x9c7+-0x2bfe],this['\x46\x4e\x41\x73\x56\x74']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x67\x49\x72\x44\x48\x46']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x51\x6f\x55\x66\x53\x47']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x587576['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x43\x41\x79\x48\x46\x6b']=function(){const _0x28f980=new RegExp(this['\x67\x49\x72\x44\x48\x46']+this['\x51\x6f\x55\x66\x53\x47']),_0x2214be=_0x28f980['\x74\x65\x73\x74'](this['\x46\x4e\x41\x73\x56\x74']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x79\x42\x4b\x68\x74\x52'][0x17f1+-0x1*-0x5b3+-0x1da3]:--this['\x79\x42\x4b\x68\x74\x52'][0xb75+-0xe5e+0x2e9];return this['\x76\x50\x78\x62\x6b\x44'](_0x2214be);},_0x587576['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x76\x50\x78\x62\x6b\x44']=function(_0x195c5d){if(!Boolean(~_0x195c5d))return _0x195c5d;return this['\x77\x48\x54\x55\x77\x68'](this['\x58\x68\x72\x56\x77\x4b']);},_0x587576['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x77\x48\x54\x55\x77\x68']=function(_0x2789ac){for(let _0x1ea2b8=0x1712+-0x54e+-0x1*0x11c4,_0x5bdbd7=this['\x79\x42\x4b\x68\x74\x52']['\x6c\x65\x6e\x67\x74\x68'];_0x1ea2b8<_0x5bdbd7;_0x1ea2b8++){this['\x79\x42\x4b\x68\x74\x52']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x5bdbd7=this['\x79\x42\x4b\x68\x74\x52']['\x6c\x65\x6e\x67\x74\x68'];}return _0x2789ac(this['\x79\x42\x4b\x68\x74\x52'][-0x1880+-0xb7b+0x3d*0x97]);},(''+function(){return 0x1ff9+0x1094+-0x308d;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(0xb5d+-0x4*-0x4a2+-0x1de4)&&new _0x587576(_0x3381)['\x43\x41\x79\x48\x46\x6b'](),_0x3381['\x66\x6e\x44\x53\x70\x6f']=!![];}_0x4444c9=_0x3381['\x51\x5a\x70\x52\x50\x70'](_0x4444c9,_0x1523fe),_0x3381['\x67\x49\x74\x6f\x41\x6a'][_0x2d121f]=_0x4444c9;}else _0x4444c9=_0x30e880;return _0x4444c9;}function _0x4a149c(_0x40e76a={},_0x5b942c=process.env){const _0x334f23=_0x34e318,_0x460f75={'\x46\x68\x71\x50\x44':function(_0x44231c,_0x2f6496){return _0x44231c(_0x2f6496);},'\x78\x48\x71\x6d\x68':_0x334f23(0x198,'\x30\x43\x59\x6f'),'\x6e\x46\x79\x6a\x73':function(_0x131417,_0x56f8df){return _0x131417!==_0x56f8df;},'\x56\x4c\x6d\x61\x63':function(_0x24988d,_0x2791f2){return _0x24988d(_0x2791f2);},'\x72\x78\x5a\x6c\x42':function(_0xa45d5f){return _0xa45d5f();},'\x56\x6e\x76\x4b\x4e':function(_0xa45ca7){return _0xa45ca7();},'\x6e\x54\x6a\x78\x4e':function(_0xaf5fed,_0x1dbcf2){return _0xaf5fed||_0x1dbcf2;},'\x57\x47\x77\x75\x47':function(_0x34e42a,_0x2f293b){return _0x34e42a!==_0x2f293b;},'\x49\x45\x6c\x6a\x45':function(_0x268222,_0x3c6eb1){return _0x268222!==_0x3c6eb1;},'\x6a\x49\x78\x4a\x62':_0x334f23(0x16e,'\x36\x77\x68\x71')+_0x334f23(0x19e,'\x21\x40\x21\x70')+'\x52\x4c','\x55\x47\x4c\x75\x76':'\x41\x4e\x54\x48\x52\x4f\x50\x49'+'\x43\x5f\x41\x55\x54\x48\x5f\x54'+_0x334f23(0x145,'\x6e\x4d\x36\x46'),'\x65\x46\x61\x44\x6b':_0x334f23(0x1a5,'\x61\x38\x7a\x32')+_0x334f23(0x15d,'\x30\x43\x59\x6f'),'\x6e\x4c\x56\x63\x66':_0x334f23(0x18c,'\x4e\x56\x57\x26')+_0x334f23(0x16c,'\x29\x5a\x4e\x55')};if(_0x460f75[_0x334f23(0x15f,'\x40\x23\x7a\x63')](_0x2b5499,_0x5b942c)){const _0x210db3={};return _0x210db3[_0x334f23(0x1ab,'\x36\x77\x6e\x76')]=![],_0x210db3[_0x334f23(0x1ac,'\x36\x77\x6e\x76')]=_0x460f75[_0x334f23(0x14f,'\x25\x47\x77\x52')],_0x210db3;}const _0x2949e0=_0x5b942c===process.env&&_0x460f75[_0x334f23(0x177,'\x36\x77\x6e\x76')](_0x40e76a[_0x334f23(0x1b0,'\x51\x37\x65\x59')+_0x334f23(0x13f,'\x28\x71\x6a\x37')],![]),_0x7e7909=_0x460f75[_0x334f23(0x18b,'\x6b\x26\x21\x7a')](String,_0x40e76a['\x75\x72\x6c']||(_0x2949e0?_0x460f75[_0x334f23(0x14a,'\x4f\x6f\x57\x69')](_0x28e1d3):'')||'')[_0x334f23(0x14c,'\x6b\x26\x21\x7a')](/\/+$/,''),_0x5dc751=_0x460f75[_0x334f23(0x1ba,'\x72\x35\x48\x78')](String,_0x40e76a[_0x334f23(0x1b4,'\x72\x35\x48\x78')]||(_0x2949e0?_0x460f75[_0x334f23(0x197,'\x6d\x64\x61\x72')](_0xf00944):'')||'');if(_0x460f75[_0x334f23(0x159,'\x5e\x78\x45\x51')](!_0x7e7909,!_0x5dc751)){const _0x3283a8={};return _0x3283a8[_0x334f23(0x149,'\x54\x49\x31\x52')]=![],_0x3283a8[_0x334f23(0x175,'\x78\x6c\x38\x31')]=_0x334f23(0x1a6,'\x5e\x78\x45\x51')+_0x334f23(0x17b,'\x25\x47\x77\x52')+_0x334f23(0x183,'\x4e\x56\x57\x26'),_0x3283a8;}const _0x53e6f3=_0x460f75[_0x334f23(0x139,'\x5e\x78\x45\x51')](String,_0x5b942c[_0x334f23(0x17d,'\x6b\x26\x21\x7a')+_0x334f23(0x1aa,'\x29\x5a\x4e\x55')+'\x52\x4c']||'')[_0x334f23(0x150,'\x6b\x26\x21\x7a')]()[_0x334f23(0x141,'\x28\x71\x6a\x37')](/\/+$/,'');_0x53e6f3&&_0x460f75[_0x334f23(0x14e,'\x6e\x4d\x36\x46')](_0x53e6f3,_0x7e7909)&&!_0x5b942c[_0x334f23(0x196,'\x6e\x4d\x36\x46')+_0x334f23(0x158,'\x4d\x4d\x67\x55')+_0x334f23(0x172,'\x54\x49\x31\x52')+'\x4c']&&(_0x5b942c[_0x334f23(0x15c,'\x4f\x6f\x57\x69')+_0x334f23(0x158,'\x4d\x4d\x67\x55')+_0x334f23(0x19b,'\x64\x4c\x5b\x71')+'\x4c']=_0x53e6f3);const _0x5d98fa=_0x460f75[_0x334f23(0x190,'\x61\x78\x26\x64')](String,_0x5b942c[_0x334f23(0x148,'\x6d\x64\x61\x72')+_0x334f23(0x188,'\x56\x6f\x29\x62')+_0x334f23(0x16f,'\x25\x47\x77\x52')]||'')[_0x334f23(0x180,'\x6b\x44\x30\x37')]();_0x5d98fa&&_0x460f75[_0x334f23(0x1ae,'\x31\x6b\x78\x29')](_0x5d98fa,_0x5dc751)&&!_0x5b942c['\x45\x56\x4f\x4d\x41\x50\x5f\x41'+_0x334f23(0x181,'\x51\x62\x70\x76')+_0x334f23(0x143,'\x6b\x73\x37\x77')+_0x334f23(0x1a9,'\x4a\x35\x62\x51')]&&(_0x5b942c[_0x334f23(0x13a,'\x54\x49\x31\x52')+_0x334f23(0x18e,'\x38\x72\x25\x54')+_0x334f23(0x155,'\x7a\x24\x59\x79')+_0x334f23(0x1a9,'\x4a\x35\x62\x51')]=_0x5d98fa);_0x5b942c[_0x334f23(0x19f,'\x5a\x40\x73\x78')+'\x43\x5f\x42\x41\x53\x45\x5f\x55'+'\x52\x4c']=_0x7e7909,_0x5b942c[_0x334f23(0x166,'\x64\x6c\x74\x4a')+_0x334f23(0x184,'\x30\x43\x59\x6f')+_0x334f23(0x138,'\x26\x69\x45\x35')]=_0x5dc751,_0x5b942c[_0x334f23(0x13b,'\x4a\x35\x62\x51')+_0x334f23(0x146,'\x4e\x41\x48\x5d')]=_0x5dc751,_0x5b942c[_0x334f23(0x16b,'\x4e\x39\x30\x4c')+_0x334f23(0x1b7,'\x6b\x26\x21\x7a')]=_0x7e7909,_0x5b942c[_0x334f23(0x176,'\x78\x6c\x38\x31')+_0x334f23(0x173,'\x4f\x26\x24\x59')+_0x334f23(0x17c,'\x54\x49\x31\x52')+'\x45\x44']='\x31';const _0x1ab403={};return _0x1ab403[_0x334f23(0x186,'\x6d\x5e\x72\x58')]=!![],_0x1ab403['\x75\x72\x6c']=_0x7e7909,_0x1ab403[_0x334f23(0x151,'\x36\x77\x68\x71')]=[_0x460f75['\x6a\x49\x78\x4a\x62'],_0x460f75[_0x334f23(0x1b2,'\x6a\x77\x37\x24')],_0x460f75[_0x334f23(0x1b6,'\x4e\x56\x57\x26')],_0x460f75[_0x334f23(0x147,'\x6b\x73\x37\x77')]],_0x1ab403;}const _0x360470={};_0x360470[_0x34e318(0x182,'\x29\x5a\x4e\x55')+_0x34e318(0x1af,'\x26\x69\x45\x35')]=_0x4a149c,_0x360470[_0x34e318(0x174,'\x24\x30\x47\x6f')+'\x65\x64']=_0x2b5499,module[_0x34e318(0x168,'\x56\x45\x38\x49')]=_0x360470;
|
|
1
|
+
const _0xe0b292=_0x5365;(function(_0x442d10,_0x2998bf){const _0x535fd7=_0x5365,_0x404e84=_0x442d10();while(!![]){try{const _0x131a4c=parseInt(_0x535fd7(0xa5,'\x6e\x31\x4a\x6b'))/(-0x2*-0x239+0x166f+0x50*-0x56)*(parseInt(_0x535fd7(0xce,'\x6b\x41\x63\x56'))/(0x1379*0x2+0x5f*-0x48+-0x22*0x5c))+parseInt(_0x535fd7(0x8f,'\x6b\x41\x63\x56'))/(-0x78b*-0x2+-0x3c4+0x5*-0x243)+-parseInt(_0x535fd7(0xa0,'\x67\x58\x59\x6e'))/(-0x370*-0x4+-0x1011+0x255)*(parseInt(_0x535fd7(0xc7,'\x73\x39\x63\x37'))/(0x26c1*-0x1+-0xd25*0x1+0x33eb))+-parseInt(_0x535fd7(0x9d,'\x55\x43\x6e\x24'))/(-0x905+-0x2*0xe03+0x2511)*(parseInt(_0x535fd7(0xd6,'\x6b\x41\x63\x56'))/(0x1*-0xec5+-0x1*0x1951+0x1e9*0x15))+-parseInt(_0x535fd7(0x9b,'\x67\x58\x59\x6e'))/(-0xfc6+0x259*-0x1+0x1227)+parseInt(_0x535fd7(0xf7,'\x7a\x48\x33\x4d'))/(-0x1b0e+-0x1924+0x343b)*(parseInt(_0x535fd7(0xe6,'\x47\x42\x66\x54'))/(-0x986+0x29*0x6a+0xd*-0x92))+parseInt(_0x535fd7(0x97,'\x73\x39\x63\x37'))/(-0x1e3e+-0x23a3+0x41ec*0x1);if(_0x131a4c===_0x2998bf)break;else _0x404e84['push'](_0x404e84['shift']());}catch(_0x3fd5e7){_0x404e84['push'](_0x404e84['shift']());}}}(_0x2603,0x26056*0xb+-0xa0e05+-0x105fc));const _0xa36954=(function(){const _0x58d999=_0x5365,_0xb90aa={};_0xb90aa[_0x58d999(0xe9,'\x38\x29\x59\x40')]=function(_0x428f86,_0x592f2f){return _0x428f86===_0x592f2f;},_0xb90aa[_0x58d999(0xc0,'\x6b\x6c\x48\x49')]=_0x58d999(0x83,'\x68\x26\x53\x4a'),_0xb90aa[_0x58d999(0xe0,'\x4d\x71\x24\x40')]=_0x58d999(0x82,'\x52\x31\x35\x76');const _0x473d8d=_0xb90aa;let _0x10d159=!![];return function(_0x5bd8db,_0x3c8b54){const _0x12e2d6=_0x10d159?function(){const _0x476b34=_0x5365;if(_0x473d8d[_0x476b34(0xa6,'\x75\x77\x23\x51')]('\x49\x56\x6c\x7a\x76',_0x476b34(0xbb,'\x39\x6d\x6f\x73'))){const _0x26bd5d={};return _0x26bd5d[_0x476b34(0xe2,'\x39\x6d\x6f\x73')]=![],_0x26bd5d[_0x476b34(0xc4,'\x4f\x71\x42\x21')]='\x64\x69\x73\x61\x62\x6c\x65\x64',_0x26bd5d;}else{if(_0x3c8b54){if(_0x473d8d[_0x476b34(0xab,'\x29\x75\x35\x54')](_0x473d8d[_0x476b34(0xf9,'\x53\x45\x24\x33')],_0x473d8d[_0x476b34(0xa2,'\x67\x37\x24\x74')]))_0x1807f2['\x45\x56\x4f\x4d\x41\x50\x5f\x41'+_0x476b34(0xca,'\x4f\x71\x42\x21')+_0x476b34(0x8b,'\x7a\x48\x33\x4d')+_0x476b34(0xf4,'\x63\x54\x39\x49')]=_0x23aa55;else{const _0x49bc16=_0x3c8b54[_0x476b34(0xf5,'\x4e\x42\x49\x46')](_0x5bd8db,arguments);return _0x3c8b54=null,_0x49bc16;}}}}:function(){};return _0x10d159=![],_0x12e2d6;};}()),_0x5d449f=_0xa36954(this,function(){const _0x5a1916=_0x5365,_0x52685b={};_0x52685b[_0x5a1916(0xe7,'\x73\x39\x63\x37')]=_0x5a1916(0xb7,'\x4d\x71\x24\x40')+_0x5a1916(0x7f,'\x58\x46\x52\x35');const _0x517d37=_0x52685b;return _0x5d449f[_0x5a1916(0xb1,'\x6e\x31\x4a\x6b')]()[_0x5a1916(0x87,'\x67\x46\x45\x6e')](_0x517d37[_0x5a1916(0x9c,'\x47\x42\x66\x54')])[_0x5a1916(0xe1,'\x4f\x71\x42\x21')]()['\x63\x6f\x6e\x73\x74\x72\x75\x63'+_0x5a1916(0xd9,'\x36\x48\x67\x34')](_0x5d449f)[_0x5a1916(0x91,'\x45\x21\x41\x74')](_0x517d37['\x62\x57\x4c\x72\x6a']);});function _0x5365(_0x382e41,_0x280320){_0x382e41=_0x382e41-(0x88e+-0xbd0+-0x2*-0x1de);const _0x52dff6=_0x2603();let _0x56b979=_0x52dff6[_0x382e41];if(_0x5365['\x6a\x47\x6c\x4e\x72\x66']===undefined){var _0x166e65=function(_0x55a27a){const _0x30eeb6='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x345dc3='',_0x31aed9='',_0x50bde1=_0x345dc3+_0x166e65,_0x6978c5=(''+function(){return-0x5da*-0x5+-0x266*0x1+-0x1adc;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(0x20b*-0x4+-0x1f0c*-0x1+0x493*-0x5);for(let _0x20934c=0xbba+0xb*0x376+0x18e6*-0x2,_0x3db9c6,_0x399cf3,_0x4090e9=-0x1362+0x61*-0x1a+0x1d3c;_0x399cf3=_0x55a27a['\x63\x68\x61\x72\x41\x74'](_0x4090e9++);~_0x399cf3&&(_0x3db9c6=_0x20934c%(0x136e*0x1+-0x1a34+-0x16*-0x4f)?_0x3db9c6*(0x1b4c+-0x1d23+0x217)+_0x399cf3:_0x399cf3,_0x20934c++%(0xac7*0x1+-0x2708+0x1c45))?_0x345dc3+=_0x6978c5||_0x50bde1['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4090e9+(-0x72f+-0x76a+0xea3))-(-0x7*-0x33f+-0x1*0x1a14+0xb*0x4f)!==0x1c87+0x2*0x679+-0x2979?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x1e54+-0x377+0x92*0x3d&_0x3db9c6>>(-(0x1dab+-0x3c7*-0x8+-0x1*0x3be1)*_0x20934c&0x4*0x1b8+0x88+-0x762)):_0x20934c:-0x619+-0x1197+0x17b0){_0x399cf3=_0x30eeb6['\x69\x6e\x64\x65\x78\x4f\x66'](_0x399cf3);}for(let _0x47959c=0x272*-0xa+0x19ed*0x1+-0x1*0x179,_0x12f23a=_0x345dc3['\x6c\x65\x6e\x67\x74\x68'];_0x47959c<_0x12f23a;_0x47959c++){_0x31aed9+='\x25'+('\x30\x30'+_0x345dc3['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x47959c)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x1ad5+0x264f+-0xb6a*0x1))['\x73\x6c\x69\x63\x65'](-(0x9fb+0x15ba+0xf*-0x21d));}return decodeURIComponent(_0x31aed9);};const _0x19987c=function(_0x2c21d1,_0x5df9f5){let _0x13f8c3=[],_0x2829ce=-0xf72+0x1278+-0x306,_0x5674dc,_0x499e0f='';_0x2c21d1=_0x166e65(_0x2c21d1);let _0x38e5ee;for(_0x38e5ee=0xb*-0x2a1+-0xa8*-0x2a+0x1*0x15b;_0x38e5ee<-0x2169+-0x208e+0x42f7;_0x38e5ee++){_0x13f8c3[_0x38e5ee]=_0x38e5ee;}for(_0x38e5ee=0x2479+-0x1ba1+0x46c*-0x2;_0x38e5ee<-0x1219*0x1+0xa*0xc1+0xb8f;_0x38e5ee++){_0x2829ce=(_0x2829ce+_0x13f8c3[_0x38e5ee]+_0x5df9f5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x38e5ee%_0x5df9f5['\x6c\x65\x6e\x67\x74\x68']))%(-0x18b7+-0x258e+0x3*0x1517),_0x5674dc=_0x13f8c3[_0x38e5ee],_0x13f8c3[_0x38e5ee]=_0x13f8c3[_0x2829ce],_0x13f8c3[_0x2829ce]=_0x5674dc;}_0x38e5ee=-0x7*-0x458+-0x1f6*0x2+-0x1a7c,_0x2829ce=-0x2*-0x68f+0x1*0x210a+-0x34c*0xe;for(let _0x3a0c88=-0x21e9+0x1ba9+0x640;_0x3a0c88<_0x2c21d1['\x6c\x65\x6e\x67\x74\x68'];_0x3a0c88++){_0x38e5ee=(_0x38e5ee+(-0x6a3*0x4+0x610+0x147d))%(0x79*-0x46+0x2*-0xa21+0x6cb*0x8),_0x2829ce=(_0x2829ce+_0x13f8c3[_0x38e5ee])%(0x12ac+-0x1eb8+0x5*0x29c),_0x5674dc=_0x13f8c3[_0x38e5ee],_0x13f8c3[_0x38e5ee]=_0x13f8c3[_0x2829ce],_0x13f8c3[_0x2829ce]=_0x5674dc,_0x499e0f+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x2c21d1['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3a0c88)^_0x13f8c3[(_0x13f8c3[_0x38e5ee]+_0x13f8c3[_0x2829ce])%(-0x4*0x3ef+-0x61*-0x4f+-0x6d*0x1f)]);}return _0x499e0f;};_0x5365['\x65\x5a\x46\x42\x6f\x69']=_0x19987c,_0x5365['\x6d\x46\x4f\x70\x4b\x6e']={},_0x5365['\x6a\x47\x6c\x4e\x72\x66']=!![];}const _0x239af6=_0x52dff6[0x70c+-0x2b*0xa7+0x1501],_0x7641d8=_0x382e41+_0x239af6,_0x9dd4f0=_0x5365['\x6d\x46\x4f\x70\x4b\x6e'][_0x7641d8];if(!_0x9dd4f0){if(_0x5365['\x45\x4d\x5a\x4a\x56\x6a']===undefined){const _0x399cb2=function(_0x2c57b2){this['\x45\x6e\x51\x62\x41\x53']=_0x2c57b2,this['\x6f\x6c\x71\x4d\x4d\x64']=[-0x1fe2+0x2587+-0x13*0x4c,-0x13e6+-0x22ed+0x36d3,-0xe20+-0x11c0+0x50*0x66],this['\x6c\x53\x76\x56\x68\x4b']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x76\x43\x48\x6e\x6f\x54']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x41\x75\x65\x62\x4e\x4f']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x399cb2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x74\x4e\x41\x7a\x45\x53']=function(){const _0x16431f=new RegExp(this['\x76\x43\x48\x6e\x6f\x54']+this['\x41\x75\x65\x62\x4e\x4f']),_0x7eab3a=_0x16431f['\x74\x65\x73\x74'](this['\x6c\x53\x76\x56\x68\x4b']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x6f\x6c\x71\x4d\x4d\x64'][-0x183*-0x13+-0x247e+0x7c6]:--this['\x6f\x6c\x71\x4d\x4d\x64'][-0x2416+0x1*0x927+0x1aef];return this['\x53\x65\x68\x73\x5a\x63'](_0x7eab3a);},_0x399cb2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x53\x65\x68\x73\x5a\x63']=function(_0x2e335d){if(!Boolean(~_0x2e335d))return _0x2e335d;return this['\x50\x46\x44\x67\x53\x72'](this['\x45\x6e\x51\x62\x41\x53']);},_0x399cb2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x50\x46\x44\x67\x53\x72']=function(_0x6389cf){for(let _0x23f4e2=-0x1b*0x1b+0x2709+-0x2430,_0x5ac781=this['\x6f\x6c\x71\x4d\x4d\x64']['\x6c\x65\x6e\x67\x74\x68'];_0x23f4e2<_0x5ac781;_0x23f4e2++){this['\x6f\x6c\x71\x4d\x4d\x64']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x5ac781=this['\x6f\x6c\x71\x4d\x4d\x64']['\x6c\x65\x6e\x67\x74\x68'];}return _0x6389cf(this['\x6f\x6c\x71\x4d\x4d\x64'][0x1b9b+-0x181b+-0x7*0x80]);},(''+function(){return 0x503+-0xd3f*0x1+-0x2*-0x41e;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(-0x1a9d*0x1+0x8*0xe5+0x1376)&&new _0x399cb2(_0x5365)['\x74\x4e\x41\x7a\x45\x53'](),_0x5365['\x45\x4d\x5a\x4a\x56\x6a']=!![];}_0x56b979=_0x5365['\x65\x5a\x46\x42\x6f\x69'](_0x56b979,_0x280320),_0x5365['\x6d\x46\x4f\x70\x4b\x6e'][_0x7641d8]=_0x56b979;}else _0x56b979=_0x9dd4f0;return _0x56b979;}_0x5d449f();'use strict';const {getProxyToken:_0x1dee21,getProxyUrl:_0x5678f9}=require(_0xe0b292(0xc2,'\x39\x6d\x6f\x73')+_0xe0b292(0xea,'\x64\x6b\x58\x44')+'\x73');function _0x3608b0(_0x3caa2a=process.env){const _0x5d198b=_0xe0b292,_0x473c89={'\x42\x77\x57\x41\x53':function(_0x4201d2,_0x4191ce){return _0x4201d2(_0x4191ce);},'\x4c\x6a\x7a\x79\x64':function(_0x37b876,_0xe4dc2c){return _0x37b876===_0xe4dc2c;},'\x4d\x4a\x52\x55\x4d':function(_0x17e497,_0x357525){return _0x17e497===_0x357525;},'\x72\x56\x48\x70\x54':_0x5d198b(0xcf,'\x68\x26\x53\x4a'),'\x68\x49\x67\x45\x68':_0x5d198b(0xf6,'\x68\x26\x53\x4a'),'\x6e\x70\x65\x59\x7a':function(_0x8dd62a,_0x1df5e5){return _0x8dd62a===_0x1df5e5;},'\x6f\x6d\x63\x6a\x66':_0x5d198b(0xc5,'\x50\x54\x6a\x6c')},_0x45cf57=_0x473c89[_0x5d198b(0x9e,'\x5e\x40\x35\x34')](String,_0x3caa2a[_0x5d198b(0xac,'\x67\x37\x24\x74')+_0x5d198b(0xd2,'\x6b\x42\x72\x2a')+_0x5d198b(0xd4,'\x68\x4c\x32\x43')]||'')[_0x5d198b(0xa7,'\x25\x21\x55\x4e')]()[_0x5d198b(0xec,'\x30\x71\x4f\x78')+_0x5d198b(0xbc,'\x50\x54\x6a\x6c')]();return _0x473c89[_0x5d198b(0x7e,'\x73\x54\x24\x64')](_0x45cf57,'\x30')||_0x473c89[_0x5d198b(0xc1,'\x21\x6d\x32\x4e')](_0x45cf57,_0x473c89[_0x5d198b(0xb0,'\x36\x48\x67\x34')])||_0x45cf57===_0x473c89[_0x5d198b(0xc8,'\x5e\x37\x76\x67')]||_0x473c89[_0x5d198b(0xf2,'\x53\x45\x24\x33')](_0x45cf57,_0x473c89[_0x5d198b(0xba,'\x64\x6b\x58\x44')])||_0x473c89[_0x5d198b(0x7e,'\x73\x54\x24\x64')](_0x45cf57,'\x6e\x6f');}function _0x152238(_0x523962={},_0x4112c4=process.env){const _0x3d88c8=_0xe0b292,_0x4c99f4={'\x43\x67\x79\x5a\x57':function(_0x45a63c,_0x32bc33){return _0x45a63c(_0x32bc33);},'\x53\x6a\x73\x71\x58':_0x3d88c8(0xbd,'\x67\x72\x6f\x46'),'\x6e\x54\x64\x58\x78':function(_0x33372c,_0x4549c0){return _0x33372c===_0x4549c0;},'\x44\x64\x58\x4d\x62':function(_0x3ed705,_0x10400b){return _0x3ed705!==_0x10400b;},'\x66\x6e\x55\x41\x43':function(_0x45f71f){return _0x45f71f();},'\x4a\x4e\x6b\x79\x5a':function(_0xdd2093,_0x167db2){return _0xdd2093(_0x167db2);},'\x79\x6d\x65\x7a\x64':function(_0x181446,_0x46aaee){return _0x181446||_0x46aaee;},'\x62\x58\x54\x54\x6f':function(_0x27ca59,_0x1da19d){return _0x27ca59!==_0x1da19d;},'\x50\x4c\x6b\x4a\x6e':_0x3d88c8(0x7c,'\x67\x58\x59\x6e')+_0x3d88c8(0xd3,'\x53\x45\x24\x33')+'\x52\x4c','\x4b\x69\x4c\x78\x77':_0x3d88c8(0x9f,'\x36\x48\x67\x34')+'\x43\x5f\x41\x55\x54\x48\x5f\x54'+_0x3d88c8(0x9a,'\x37\x61\x43\x54'),'\x65\x67\x62\x78\x52':_0x3d88c8(0x8a,'\x6d\x51\x48\x78')+'\x50\x49\x5f\x4b\x45\x59','\x59\x4e\x73\x4d\x6c':_0x3d88c8(0xd7,'\x4e\x42\x49\x46')+_0x3d88c8(0xb9,'\x55\x43\x6e\x24')};if(_0x4c99f4[_0x3d88c8(0xe3,'\x25\x21\x55\x4e')](_0x3608b0,_0x4112c4)){const _0x412590={};return _0x412590['\x69\x6e\x6a\x65\x63\x74\x65\x64']=![],_0x412590['\x72\x65\x61\x73\x6f\x6e']=_0x4c99f4['\x53\x6a\x73\x71\x58'],_0x412590;}const _0xa0c3f7=_0x4c99f4['\x6e\x54\x64\x58\x78'](_0x4112c4,process.env)&&_0x4c99f4[_0x3d88c8(0x80,'\x6e\x31\x4a\x6b')](_0x523962[_0x3d88c8(0xda,'\x75\x77\x23\x51')+'\x6e\x67\x73'],![]),_0x1b54e7=String(_0x523962[_0x3d88c8(0xb3,'\x73\x54\x24\x64')]||(_0xa0c3f7?_0x4c99f4[_0x3d88c8(0xf0,'\x36\x48\x67\x34')](_0x5678f9):'')||'')[_0x3d88c8(0xef,'\x73\x54\x24\x64')](/\/+$/,''),_0x99c469=_0x4c99f4[_0x3d88c8(0x7d,'\x4f\x71\x42\x21')](String,_0x523962[_0x3d88c8(0xe5,'\x67\x37\x24\x74')]||(_0xa0c3f7?_0x1dee21():'')||'');if(_0x4c99f4[_0x3d88c8(0xbe,'\x23\x33\x34\x5e')](!_0x1b54e7,!_0x99c469)){const _0x130be4={};return _0x130be4[_0x3d88c8(0xb2,'\x52\x31\x35\x76')]=![],_0x130be4[_0x3d88c8(0xa4,'\x36\x69\x45\x6a')]=_0x3d88c8(0xe4,'\x30\x71\x4f\x78')+_0x3d88c8(0xb8,'\x40\x4e\x6b\x73')+_0x3d88c8(0x98,'\x25\x21\x55\x4e'),_0x130be4;}const _0xbf79e3=_0x4c99f4[_0x3d88c8(0xde,'\x64\x6b\x58\x44')](String,_0x4112c4[_0x3d88c8(0xfb,'\x68\x4c\x32\x43')+_0x3d88c8(0x86,'\x6b\x42\x72\x2a')+'\x52\x4c']||'')[_0x3d88c8(0x7a,'\x67\x37\x24\x74')]()[_0x3d88c8(0x94,'\x39\x6d\x6f\x73')](/\/+$/,'');_0xbf79e3&&_0x4c99f4['\x44\x64\x58\x4d\x62'](_0xbf79e3,_0x1b54e7)&&!_0x4112c4[_0x3d88c8(0xd8,'\x21\x6d\x32\x4e')+_0x3d88c8(0xcc,'\x25\x21\x55\x4e')+_0x3d88c8(0x88,'\x6e\x31\x4a\x6b')+'\x4c']&&(_0x4112c4[_0x3d88c8(0xae,'\x51\x6b\x57\x4a')+_0x3d88c8(0xaa,'\x5e\x40\x35\x34')+_0x3d88c8(0x92,'\x58\x46\x52\x35')+'\x4c']=_0xbf79e3);const _0x547f03=String(_0x4112c4[_0x3d88c8(0xa9,'\x30\x71\x4f\x78')+_0x3d88c8(0xdd,'\x5e\x40\x35\x34')+_0x3d88c8(0xbf,'\x58\x28\x46\x6e')]||'')[_0x3d88c8(0xa1,'\x40\x4e\x6b\x73')]();_0x547f03&&_0x4c99f4[_0x3d88c8(0xc9,'\x28\x23\x36\x35')](_0x547f03,_0x99c469)&&!_0x4112c4[_0x3d88c8(0x8e,'\x6b\x41\x63\x56')+_0x3d88c8(0x95,'\x64\x6b\x58\x44')+_0x3d88c8(0xf1,'\x73\x54\x24\x64')+_0x3d88c8(0xa8,'\x25\x21\x55\x4e')]&&(_0x4112c4[_0x3d88c8(0xcb,'\x28\x23\x36\x35')+_0x3d88c8(0xaf,'\x68\x26\x53\x4a')+_0x3d88c8(0x8b,'\x7a\x48\x33\x4d')+_0x3d88c8(0xed,'\x75\x61\x64\x75')]=_0x547f03);_0x4112c4[_0x3d88c8(0x89,'\x5e\x40\x35\x34')+_0x3d88c8(0x8d,'\x73\x39\x63\x37')+'\x52\x4c']=_0x1b54e7,_0x4112c4[_0x3d88c8(0xd1,'\x39\x6d\x6f\x73')+_0x3d88c8(0xcd,'\x7a\x48\x33\x4d')+_0x3d88c8(0x7b,'\x4d\x53\x48\x5b')]=_0x99c469,_0x4112c4[_0x3d88c8(0xe8,'\x36\x69\x45\x6a')+_0x3d88c8(0x99,'\x50\x54\x6a\x6c')]=_0x99c469,_0x4112c4[_0x3d88c8(0xb6,'\x6d\x51\x48\x78')+_0x3d88c8(0xfc,'\x4e\x42\x49\x46')]=_0x1b54e7,_0x4112c4[_0x3d88c8(0xac,'\x67\x37\x24\x74')+_0x3d88c8(0x85,'\x58\x46\x52\x35')+_0x3d88c8(0xc3,'\x5e\x40\x35\x34')+'\x45\x44']='\x31';const _0x4ed879={};return _0x4ed879[_0x3d88c8(0xf3,'\x55\x43\x6e\x24')]=!![],_0x4ed879[_0x3d88c8(0xa3,'\x68\x4c\x32\x43')]=_0x1b54e7,_0x4ed879[_0x3d88c8(0xad,'\x67\x72\x6f\x46')]=[_0x4c99f4[_0x3d88c8(0x90,'\x68\x52\x74\x76')],_0x4c99f4[_0x3d88c8(0x96,'\x58\x46\x52\x35')],_0x4c99f4[_0x3d88c8(0xd5,'\x5e\x37\x76\x67')],_0x4c99f4[_0x3d88c8(0xc6,'\x58\x28\x46\x6e')]],_0x4ed879;}function _0x2603(){const _0xcdfda6=['\x65\x59\x4f\x50\x6a\x53\x6b\x4d\x57\x34\x33\x63\x47\x63\x6d','\x65\x6d\x6b\x73\x68\x6d\x6b\x51\x72\x43\x6f\x45\x57\x51\x70\x63\x4c\x71','\x46\x64\x75\x2b\x77\x30\x4b\x38\x45\x43\x6f\x31','\x79\x43\x6f\x58\x57\x50\x78\x63\x4a\x71\x53','\x57\x51\x68\x64\x47\x78\x46\x64\x4c\x53\x6f\x33','\x57\x36\x64\x64\x55\x68\x79','\x57\x37\x54\x52\x57\x34\x54\x49\x57\x50\x48\x67\x79\x30\x65','\x71\x43\x6f\x62\x6b\x58\x5a\x63\x48\x71','\x71\x6d\x6f\x6d\x70\x43\x6f\x55','\x57\x50\x33\x63\x53\x76\x70\x64\x50\x67\x53','\x44\x77\x6a\x77\x57\x36\x74\x64\x56\x47','\x57\x37\x4e\x63\x4e\x67\x2f\x64\x47\x6d\x6f\x76\x57\x51\x70\x64\x55\x38\x6f\x67','\x57\x35\x6c\x63\x47\x43\x6f\x33\x6d\x6d\x6b\x4e\x57\x4f\x33\x63\x52\x6d\x6f\x53','\x46\x61\x2f\x64\x4e\x72\x4a\x63\x50\x74\x75','\x57\x36\x2f\x64\x50\x68\x30\x46','\x76\x53\x6f\x6a\x63\x38\x6f\x54\x72\x61','\x6a\x61\x56\x64\x54\x43\x6f\x77\x57\x52\x65\x48\x57\x52\x64\x63\x4a\x43\x6b\x32\x57\x51\x68\x64\x56\x38\x6b\x70\x57\x51\x71','\x57\x36\x74\x63\x50\x72\x6d\x79\x63\x71','\x68\x38\x6b\x70\x45\x53\x6f\x2b\x74\x57','\x71\x64\x37\x64\x54\x64\x4e\x63\x48\x71\x54\x56\x57\x35\x53','\x6f\x6d\x6b\x62\x79\x43\x6f\x4e\x79\x43\x6f\x66\x57\x34\x70\x63\x53\x61','\x57\x4f\x35\x30\x57\x35\x6a\x37\x57\x35\x79\x71\x6a\x38\x6f\x49','\x57\x50\x74\x64\x4e\x4b\x4b\x38\x57\x36\x6c\x64\x4f\x77\x6e\x6d','\x57\x35\x70\x63\x54\x38\x6f\x48\x57\x34\x6a\x32\x76\x53\x6b\x6d\x57\x36\x56\x63\x55\x53\x6b\x65\x57\x51\x68\x63\x55\x71','\x69\x6d\x6f\x77\x57\x4f\x61\x2f\x57\x36\x75','\x6e\x31\x52\x63\x49\x76\x4e\x64\x53\x32\x4f\x74\x57\x37\x4c\x31\x57\x35\x75\x59\x70\x78\x47','\x57\x50\x42\x64\x56\x75\x4a\x64\x52\x43\x6f\x31\x57\x50\x52\x64\x4a\x53\x6f\x39','\x46\x64\x71\x69\x57\x36\x64\x64\x4e\x38\x6f\x74\x57\x4f\x66\x64','\x43\x77\x37\x64\x47\x58\x76\x33\x69\x5a\x62\x4e','\x57\x52\x68\x64\x50\x4c\x4e\x64\x56\x6d\x6f\x72\x57\x37\x4f\x43\x57\x52\x30','\x57\x36\x4e\x63\x49\x58\x79\x4c\x6d\x57','\x57\x35\x37\x63\x53\x53\x6f\x50\x57\x34\x62\x2f\x75\x38\x6b\x49\x57\x37\x2f\x63\x48\x53\x6b\x46\x57\x52\x78\x63\x52\x57','\x57\x51\x4a\x64\x4d\x6d\x6b\x41\x57\x52\x37\x63\x48\x43\x6b\x35\x57\x51\x68\x63\x4a\x71','\x46\x78\x35\x6c\x57\x37\x5a\x64\x53\x53\x6f\x7a\x57\x35\x6d\x77','\x72\x30\x31\x4e','\x64\x57\x70\x63\x4a\x6d\x6b\x6e\x70\x49\x50\x61\x57\x51\x4b','\x6a\x72\x64\x63\x56\x43\x6f\x4e\x57\x36\x33\x64\x4a\x71\x61','\x57\x35\x31\x44\x78\x48\x57\x6c\x57\x52\x2f\x64\x55\x66\x6d','\x57\x35\x37\x63\x47\x43\x6f\x2f\x6b\x38\x6b\x35\x57\x4f\x64\x63\x53\x6d\x6f\x53','\x74\x43\x6f\x37\x57\x4f\x2f\x63\x56\x74\x4f','\x57\x34\x6c\x63\x54\x6d\x6b\x47\x79\x53\x6b\x55\x57\x52\x54\x47\x57\x35\x4b','\x43\x78\x6a\x6d\x42\x53\x6f\x55','\x45\x47\x78\x64\x52\x58\x2f\x63\x55\x64\x6a\x69\x57\x37\x38','\x57\x52\x37\x64\x4e\x78\x42\x64\x47\x6d\x6f\x65\x57\x51\x68\x64\x55\x38\x6f\x71','\x57\x4f\x6e\x68\x57\x36\x6e\x5a\x57\x34\x34','\x57\x52\x78\x63\x4f\x62\x57\x31\x42\x6d\x6b\x46\x57\x51\x4f\x51','\x6c\x4e\x75\x4a\x71\x75\x65','\x7a\x32\x61\x64\x57\x52\x62\x2f\x57\x34\x43\x64\x57\x34\x34','\x46\x32\x5a\x63\x4a\x6d\x6b\x77\x57\x36\x69','\x57\x50\x31\x58\x61\x38\x6b\x72\x57\x36\x6e\x53\x57\x51\x76\x62','\x57\x51\x46\x64\x4f\x38\x6f\x34\x57\x50\x44\x6f','\x69\x43\x6f\x56\x57\x50\x70\x63\x4b\x58\x4e\x64\x51\x59\x56\x63\x50\x71','\x57\x52\x4a\x64\x55\x58\x34\x4e\x6b\x53\x6b\x4d\x57\x50\x2f\x64\x4e\x57','\x57\x51\x5a\x63\x50\x49\x6d\x50\x43\x53\x6b\x75\x57\x52\x38\x32','\x62\x47\x56\x64\x53\x71','\x76\x31\x62\x39\x57\x37\x74\x64\x4e\x43\x6f\x2f','\x69\x33\x38\x57\x43\x64\x52\x63\x48\x62\x65','\x76\x75\x58\x61\x61\x31\x30','\x64\x4c\x53\x76\x73\x62\x70\x63\x55\x63\x61\x47','\x78\x65\x68\x64\x50\x61\x31\x45','\x72\x58\x71\x6d\x7a\x33\x75\x44\x74\x53\x6f\x44','\x6c\x43\x6f\x35\x57\x4f\x65','\x57\x4f\x5a\x64\x56\x53\x6b\x4c\x57\x50\x2f\x63\x56\x71','\x6b\x43\x6f\x72\x57\x4f\x4f','\x57\x36\x74\x63\x53\x4a\x35\x79\x57\x4f\x70\x63\x4d\x71\x76\x5a\x41\x61\x6a\x6d\x70\x53\x6b\x51','\x66\x4b\x38\x41\x57\x37\x33\x64\x49\x43\x6f\x2f\x57\x52\x62\x4d','\x43\x66\x64\x64\x48\x48\x54\x64','\x6c\x61\x37\x64\x53\x43\x6f\x73\x57\x52\x30\x49\x57\x52\x68\x64\x4e\x6d\x6b\x79\x57\x4f\x5a\x64\x4b\x53\x6b\x4b\x57\x52\x62\x6e','\x57\x52\x2f\x64\x54\x30\x74\x64\x55\x53\x6f\x6a\x57\x37\x61\x70\x57\x51\x61','\x57\x52\x2f\x64\x47\x43\x6b\x6e\x57\x51\x52\x63\x4d\x38\x6b\x38\x57\x51\x5a\x63\x4b\x71','\x6c\x4d\x47\x48\x73\x71','\x68\x53\x6f\x41\x6a\x32\x69','\x57\x4f\x6d\x4f\x6c\x62\x61\x76\x65\x58\x4a\x64\x55\x57','\x72\x63\x74\x64\x4c\x58\x6c\x63\x4b\x61','\x68\x78\x61\x36\x7a\x74\x38','\x57\x51\x64\x64\x4f\x4e\x66\x78','\x76\x74\x5a\x63\x4f\x38\x6f\x48\x57\x36\x34','\x64\x65\x6e\x6a\x75\x53\x6f\x6a\x57\x4f\x52\x64\x55\x71','\x61\x38\x6f\x42\x46\x4d\x52\x63\x55\x71','\x63\x38\x6f\x45\x57\x51\x4b\x76\x57\x36\x79','\x64\x4a\x69\x58\x70\x6d\x6b\x31\x57\x35\x6c\x64\x48\x33\x2f\x63\x55\x53\x6f\x61\x76\x63\x57','\x57\x35\x4e\x63\x48\x61\x69\x51\x6a\x6d\x6b\x73\x57\x4f\x4e\x64\x49\x61','\x42\x73\x71\x73\x57\x37\x4a\x64\x4b\x38\x6f\x78\x57\x4f\x54\x63','\x57\x34\x31\x33\x57\x4f\x69\x4e\x57\x4f\x64\x63\x47\x71','\x74\x48\x52\x63\x55\x53\x6f\x2f\x57\x34\x4e\x64\x4d\x71\x64\x63\x4c\x61','\x57\x35\x5a\x63\x4b\x6d\x6f\x51\x6e\x53\x6b\x2f\x57\x4f\x46\x63\x56\x38\x6f\x58','\x57\x51\x74\x63\x55\x6d\x6f\x6e\x57\x37\x31\x51\x57\x37\x6e\x33\x44\x57','\x57\x4f\x4a\x64\x47\x66\x30\x39\x57\x37\x37\x64\x54\x4d\x48\x78','\x75\x38\x6f\x74\x72\x43\x6f\x4a\x63\x43\x6b\x58\x57\x36\x4e\x63\x4d\x33\x35\x32\x57\x35\x42\x63\x4d\x33\x75','\x78\x4d\x74\x63\x47\x53\x6b\x4c\x57\x35\x54\x76\x57\x35\x52\x63\x55\x71','\x57\x51\x70\x64\x4b\x43\x6b\x45\x57\x52\x53\x70\x6d\x6d\x6b\x2f\x57\x35\x38','\x57\x35\x46\x63\x53\x6d\x6f\x4c\x57\x34\x44\x2b\x75\x53\x6f\x7a\x57\x36\x52\x63\x4d\x43\x6b\x69\x57\x4f\x6c\x63\x48\x6d\x6b\x77','\x57\x36\x53\x2b\x57\x52\x5a\x64\x53\x6d\x6b\x33','\x57\x34\x44\x77\x76\x71\x53\x6c\x57\x51\x6d','\x57\x35\x74\x63\x49\x72\x53\x47\x70\x53\x6b\x6d\x57\x4f\x4e\x64\x4a\x47','\x41\x59\x31\x38\x66\x72\x38\x73\x57\x52\x33\x64\x4f\x30\x4e\x63\x4f\x47\x5a\x64\x48\x6d\x6b\x4d','\x57\x51\x78\x64\x4c\x4d\x5a\x64\x49\x43\x6f\x67\x57\x52\x42\x64\x55\x57','\x71\x6d\x6f\x69\x57\x52\x37\x63\x54\x73\x6c\x64\x4b\x47\x5a\x63\x47\x71','\x57\x34\x64\x63\x4f\x48\x79\x6c\x64\x61','\x6c\x47\x4e\x64\x54\x43\x6f\x78\x57\x52\x38\x4e\x57\x52\x74\x64\x4d\x6d\x6b\x47\x57\x50\x68\x64\x47\x6d\x6b\x38\x57\x51\x54\x61','\x57\x52\x72\x75\x57\x37\x6e\x68\x57\x37\x34\x5a','\x57\x35\x68\x64\x47\x4b\x57\x58\x78\x67\x69','\x70\x53\x6f\x4a\x76\x64\x61','\x57\x37\x6e\x74\x73\x77\x35\x59\x42\x4e\x5a\x63\x47\x53\x6b\x74\x57\x51\x4f\x62\x57\x35\x33\x63\x4d\x31\x69','\x6e\x47\x43\x6c\x57\x50\x7a\x65','\x66\x4b\x34\x53\x72\x4c\x38\x65\x74\x38\x6f\x69','\x57\x35\x2f\x63\x51\x43\x6f\x50\x70\x38\x6b\x2b','\x43\x4d\x58\x62\x63\x4b\x58\x4e\x66\x6d\x6f\x7a','\x57\x37\x79\x55\x70\x48\x6d\x4d\x66\x58\x30','\x66\x6d\x6b\x73\x67\x53\x6b\x2f','\x65\x67\x4f\x66\x71\x4b\x57','\x57\x4f\x56\x64\x49\x33\x57','\x57\x51\x58\x62\x6d\x43\x6b\x32\x57\x34\x6e\x70','\x6a\x48\x4e\x63\x53\x38\x6f\x32\x57\x34\x4a\x64\x51\x61\x43','\x65\x63\x6c\x63\x50\x38\x6b\x6d\x66\x61','\x57\x52\x72\x73\x57\x37\x6e\x65','\x57\x4f\x54\x4c\x57\x35\x71','\x57\x50\x4e\x63\x48\x5a\x53\x6f\x76\x38\x6b\x2b\x57\x50\x30\x38','\x57\x35\x70\x63\x49\x53\x6f\x32\x6c\x6d\x6b\x49\x57\x50\x4a\x63\x50\x53\x6f\x37','\x75\x71\x58\x72\x57\x4f\x74\x64\x53\x57','\x68\x30\x57\x68\x41\x77\x35\x57\x57\x35\x56\x64\x48\x57','\x57\x36\x4c\x4a\x57\x34\x50\x57','\x6f\x73\x56\x63\x56\x53\x6f\x6b\x6c\x38\x6b\x48\x57\x35\x42\x64\x53\x71','\x63\x6d\x6f\x4a\x57\x51\x71\x45\x57\x34\x38\x49\x75\x4c\x57','\x71\x78\x72\x44\x6d\x4b\x4f','\x7a\x74\x46\x63\x51\x6d\x6f\x79\x57\x37\x37\x64\x52\x5a\x56\x63\x4f\x71','\x6f\x43\x6f\x66\x72\x32\x4a\x63\x55\x6d\x6f\x58\x70\x53\x6b\x76','\x6a\x67\x47\x53','\x57\x36\x30\x77\x7a\x43\x6f\x32\x57\x50\x53\x77\x57\x34\x53\x30\x57\x35\x2f\x63\x47\x53\x6f\x54\x57\x35\x48\x64\x57\x50\x6d','\x57\x4f\x57\x67\x64\x65\x39\x7a\x57\x37\x4a\x64\x51\x4b\x64\x64\x4c\x76\x48\x2f\x42\x57','\x57\x51\x6c\x63\x55\x38\x6f\x72\x57\x36\x72\x4b\x57\x36\x35\x33\x7a\x47'];_0x2603=function(){return _0xcdfda6;};return _0x2603();}const _0x595b34={};_0x595b34[_0xe0b292(0xdc,'\x45\x21\x41\x74')+_0xe0b292(0xee,'\x21\x6d\x32\x4e')]=_0x152238,_0x595b34[_0xe0b292(0xdf,'\x36\x49\x32\x21')+'\x65\x64']=_0x3608b0,module['\x65\x78\x70\x6f\x72\x74\x73']=_0x595b34;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { PROXY_PROTOCOL_VERSION } = require('../mailbox/store');
|
|
6
|
+
const { readMailboxStateFile } = require('../mailbox/state');
|
|
6
7
|
const { buildEnvelope } = require('../envelope');
|
|
7
8
|
const crypto = require('crypto');
|
|
8
9
|
const {
|
|
@@ -601,6 +602,23 @@ class LifecycleManager {
|
|
|
601
602
|
return storeSecret;
|
|
602
603
|
}
|
|
603
604
|
if (validNodeSecret(envSecret)) {
|
|
605
|
+
const diskRotated = this._latestDiskHubRotatedSecret();
|
|
606
|
+
if (diskRotated) {
|
|
607
|
+
this._setNodeSecretState({
|
|
608
|
+
secret: diskRotated.secret,
|
|
609
|
+
version: diskRotated.version ? String(diskRotated.version) : '',
|
|
610
|
+
source: 'hub_rotate',
|
|
611
|
+
envSuppressed: this.store.getState('node_secret_env_suppressed') || '',
|
|
612
|
+
});
|
|
613
|
+
if (!this._storeSourceLogged) {
|
|
614
|
+
this._storeSourceLogged = true;
|
|
615
|
+
this.logger.warn(
|
|
616
|
+
'[lifecycle] MailboxStore memory differs from disk hub-rotated node_secret; ' +
|
|
617
|
+
'using disk value and treating env as stale.'
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
return diskRotated.secret;
|
|
621
|
+
}
|
|
604
622
|
this._syncEnvNodeSecretToStore(envSecret);
|
|
605
623
|
if (!this._envOverrideLogged) {
|
|
606
624
|
this._envOverrideLogged = true;
|
|
@@ -618,16 +636,40 @@ class LifecycleManager {
|
|
|
618
636
|
return storeSecret || envSecret || null;
|
|
619
637
|
}
|
|
620
638
|
|
|
639
|
+
_latestDiskHubRotatedSecret() {
|
|
640
|
+
const file = this.store && this.store._stateFile;
|
|
641
|
+
if (!file) return null;
|
|
642
|
+
const state = readMailboxStateFile(file);
|
|
643
|
+
const secret = typeof state?.node_secret === 'string' ? state.node_secret.trim() : null;
|
|
644
|
+
if (!validNodeSecret(secret) || state?.node_secret_source !== 'hub_rotate') return null;
|
|
645
|
+
return {
|
|
646
|
+
secret,
|
|
647
|
+
version: parseNodeSecretVersion(state.node_secret_version),
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
|
|
621
651
|
_syncEnvNodeSecretToStore(envSecret) {
|
|
622
652
|
const envVersion = parseNodeSecretVersion(process.env.A2A_NODE_SECRET_VERSION || process.env.EVOMAP_NODE_SECRET_VERSION);
|
|
623
|
-
this.
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
653
|
+
this._setNodeSecretState({
|
|
654
|
+
secret: envSecret,
|
|
655
|
+
version: envVersion ? String(envVersion) : '',
|
|
656
|
+
source: 'env_seed',
|
|
657
|
+
envSuppressed: '',
|
|
658
|
+
});
|
|
628
659
|
this._clearEnvSecretSuppression();
|
|
629
660
|
}
|
|
630
661
|
|
|
662
|
+
_setNodeSecretState({ secret = '', version = '', source = '', envSuppressed = '' } = {}) {
|
|
663
|
+
if (this.store && typeof this.store.setNodeSecretState === 'function') {
|
|
664
|
+
this.store.setNodeSecretState({ secret, version, source, envSuppressed });
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
this.store.setState('node_secret', secret);
|
|
668
|
+
this.store.setState('node_secret_version', version ? String(version) : '');
|
|
669
|
+
this.store.setState('node_secret_source', source);
|
|
670
|
+
this.store.setState('node_secret_env_suppressed', envSuppressed);
|
|
671
|
+
}
|
|
672
|
+
|
|
631
673
|
_effectiveEnvNodeSecret() {
|
|
632
674
|
const envSecret = getEnvNodeSecret();
|
|
633
675
|
return this._isEnvNodeSecretSuppressed(envSecret) ? null : envSecret;
|
|
@@ -811,11 +853,6 @@ class LifecycleManager {
|
|
|
811
853
|
const secret = data?.payload?.node_secret || data?.node_secret || null;
|
|
812
854
|
const secretVersion = parseNodeSecretVersion(data?.payload?.node_secret_version || data?.node_secret_version);
|
|
813
855
|
if (secret && validNodeSecret(secret)) {
|
|
814
|
-
this.store.setState('node_secret', secret);
|
|
815
|
-
// Tag the store entry so the next process that boots into a stale
|
|
816
|
-
// shell env can recognise this value as hub-authoritative and
|
|
817
|
-
// refuse to overwrite it (see _resolveNodeSecret above).
|
|
818
|
-
this.store.setState('node_secret_source', 'hub_rotate');
|
|
819
856
|
// Hub just handed us a fresh secret. Whatever sits in
|
|
820
857
|
// A2A_NODE_SECRET is now older than the store, so suppress the
|
|
821
858
|
// env-wins reconciliation in _resolveNodeSecret for the rest of
|
|
@@ -830,9 +867,14 @@ class LifecycleManager {
|
|
|
830
867
|
} else {
|
|
831
868
|
this._clearEnvSecretSuppression();
|
|
832
869
|
}
|
|
870
|
+
this._setNodeSecretState({
|
|
871
|
+
secret,
|
|
872
|
+
version: secretVersion ? String(secretVersion) : '',
|
|
873
|
+
source: 'hub_rotate',
|
|
874
|
+
envSuppressed: this.store.getState('node_secret_env_suppressed') || '',
|
|
875
|
+
});
|
|
833
876
|
this.logger.log('[lifecycle] new node_secret stored from hello response');
|
|
834
|
-
}
|
|
835
|
-
if (secretVersion) {
|
|
877
|
+
} else if (secretVersion) {
|
|
836
878
|
this.store.setState('node_secret_version', String(secretVersion));
|
|
837
879
|
} else {
|
|
838
880
|
this.store.setState('node_secret_version', '');
|
|
@@ -1001,10 +1043,34 @@ class LifecycleManager {
|
|
|
1001
1043
|
*/
|
|
1002
1044
|
_dropLocalSecret(reason) {
|
|
1003
1045
|
this.logger.warn(`[lifecycle] dropping cached node_secret (reason=${reason}); next hello will run unauthenticated`);
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1046
|
+
const diskRotated = this._latestDiskHubRotatedSecret();
|
|
1047
|
+
const storeSecret = this.store.getState('node_secret') || null;
|
|
1048
|
+
if (diskRotated && diskRotated.secret !== storeSecret) {
|
|
1049
|
+
try {
|
|
1050
|
+
this._setNodeSecretState({
|
|
1051
|
+
secret: diskRotated.secret,
|
|
1052
|
+
version: diskRotated.version ? String(diskRotated.version) : '',
|
|
1053
|
+
source: 'hub_rotate',
|
|
1054
|
+
envSuppressed: this.store.getState('node_secret_env_suppressed') || '',
|
|
1055
|
+
});
|
|
1056
|
+
this.logger.warn('[lifecycle] local in-memory node_secret is stale; preserving newer disk hub-rotated secret');
|
|
1057
|
+
return;
|
|
1058
|
+
} catch (err) {
|
|
1059
|
+
const reason = err && (err.code || err.name) ? (err.code || err.name) : 'error';
|
|
1060
|
+
this.logger.warn(`[lifecycle] failed to sync newer disk hub-rotated node_secret into memory (reason=${reason})`);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
try {
|
|
1064
|
+
this._setNodeSecretState({
|
|
1065
|
+
secret: '',
|
|
1066
|
+
version: '',
|
|
1067
|
+
source: '',
|
|
1068
|
+
envSuppressed: this.store.getState('node_secret_env_suppressed') || '',
|
|
1069
|
+
});
|
|
1070
|
+
} catch (err) {
|
|
1071
|
+
const reason = err && (err.code || err.name || err.message) ? (err.code || err.name || err.message) : 'error';
|
|
1072
|
+
this.logger.warn(`[lifecycle] failed to clear local node_secret state (reason=${reason})`);
|
|
1073
|
+
}
|
|
1008
1074
|
// Suppress only the exact env secret that was just proven stale. If no
|
|
1009
1075
|
// env secret is present, do not leave a marker that blocks a future reset.
|
|
1010
1076
|
this._markCurrentEnvSecretSuppressed();
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const PRIVATE_DIR_MODE = 0o700;
|
|
7
|
+
const PRIVATE_FILE_MODE = 0o600;
|
|
8
|
+
const STATE_LOCK_STALE_MS = 10_000;
|
|
9
|
+
const STATE_LOCK_WAIT_MS = 10;
|
|
10
|
+
|
|
11
|
+
const MAILBOX_NODE_SECRET_STATE_KEYS = Object.freeze([
|
|
12
|
+
'node_secret',
|
|
13
|
+
'node_secret_version',
|
|
14
|
+
'node_secret_source',
|
|
15
|
+
'node_secret_env_suppressed',
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
const MAILBOX_NODE_SECRET_STATE_KEY_SET = new Set(MAILBOX_NODE_SECRET_STATE_KEYS);
|
|
19
|
+
const MAILBOX_NODE_SECRET_TUPLE_KEYS = Object.freeze([
|
|
20
|
+
'node_secret',
|
|
21
|
+
'node_secret_version',
|
|
22
|
+
'node_secret_source',
|
|
23
|
+
]);
|
|
24
|
+
const MAILBOX_NODE_SECRET_TUPLE_KEY_SET = new Set(MAILBOX_NODE_SECRET_TUPLE_KEYS);
|
|
25
|
+
|
|
26
|
+
function bestEffortChmod(filePath, mode) {
|
|
27
|
+
try { fs.chmodSync(filePath, mode); } catch { /* best effort; no-op on Windows */ }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function ensurePrivateDir(dir) {
|
|
31
|
+
if (!fs.existsSync(dir)) {
|
|
32
|
+
fs.mkdirSync(dir, { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
33
|
+
}
|
|
34
|
+
bestEffortChmod(dir, PRIVATE_DIR_MODE);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function writePrivateFile(filePath, content) {
|
|
38
|
+
fs.writeFileSync(filePath, content, { encoding: 'utf8', mode: PRIVATE_FILE_MODE });
|
|
39
|
+
bestEffortChmod(filePath, PRIVATE_FILE_MODE);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function sleepSync(ms) {
|
|
43
|
+
try {
|
|
44
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
45
|
+
} catch {
|
|
46
|
+
const end = Date.now() + ms;
|
|
47
|
+
while (Date.now() < end) {}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function acquireStateFileLock(stateFile) {
|
|
52
|
+
ensurePrivateDir(path.dirname(stateFile));
|
|
53
|
+
const lockDir = `${stateFile}.lock`;
|
|
54
|
+
const startedAt = Date.now();
|
|
55
|
+
while (true) {
|
|
56
|
+
try {
|
|
57
|
+
fs.mkdirSync(lockDir, { mode: PRIVATE_DIR_MODE });
|
|
58
|
+
bestEffortChmod(lockDir, PRIVATE_DIR_MODE);
|
|
59
|
+
return function releaseStateFileLock() {
|
|
60
|
+
try { fs.rmdirSync(lockDir); } catch {}
|
|
61
|
+
};
|
|
62
|
+
} catch (e) {
|
|
63
|
+
if (!e || e.code !== 'EEXIST') throw e;
|
|
64
|
+
try {
|
|
65
|
+
const ageMs = Date.now() - fs.statSync(lockDir).mtimeMs;
|
|
66
|
+
if (ageMs > STATE_LOCK_STALE_MS) {
|
|
67
|
+
fs.rmSync(lockDir, { recursive: true, force: true });
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
} catch (statErr) {
|
|
71
|
+
if (statErr && statErr.code === 'ENOENT') continue;
|
|
72
|
+
throw statErr;
|
|
73
|
+
}
|
|
74
|
+
if (Date.now() - startedAt > STATE_LOCK_STALE_MS) {
|
|
75
|
+
const err = new Error('timed out waiting for mailbox state lock');
|
|
76
|
+
err.code = 'MAILBOX_STATE_LOCK_TIMEOUT';
|
|
77
|
+
throw err;
|
|
78
|
+
}
|
|
79
|
+
sleepSync(STATE_LOCK_WAIT_MS);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function isPlainState(value) {
|
|
85
|
+
return value && typeof value === 'object' && !Array.isArray(value);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function isHubRotatedNodeSecretState(state) {
|
|
89
|
+
return isPlainState(state)
|
|
90
|
+
&& state.node_secret_source === 'hub_rotate'
|
|
91
|
+
&& typeof state.node_secret === 'string'
|
|
92
|
+
&& Boolean(state.node_secret.trim());
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function parseNodeSecretVersion(value) {
|
|
96
|
+
const n = Number(value);
|
|
97
|
+
return Number.isInteger(n) && n > 0 ? n : null;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function isFullNodeSecretTupleUpdate(updatedSet) {
|
|
101
|
+
return Boolean(updatedSet) && MAILBOX_NODE_SECRET_TUPLE_KEYS.every((key) => updatedSet.has(key));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function canApplyPartialNodeSecretTupleWrite(key, disk, next) {
|
|
105
|
+
if (key !== 'node_secret_version') return false;
|
|
106
|
+
if (!isHubRotatedNodeSecretState(disk)) return true;
|
|
107
|
+
if (!isHubRotatedNodeSecretState(next)) return false;
|
|
108
|
+
if (String(next.node_secret).trim() !== String(disk.node_secret).trim()) return false;
|
|
109
|
+
const nextVersion = parseNodeSecretVersion(next.node_secret_version);
|
|
110
|
+
const diskVersion = parseNodeSecretVersion(disk.node_secret_version);
|
|
111
|
+
return Boolean(nextVersion && (!diskVersion || nextVersion >= diskVersion));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @param {string} stateFile
|
|
116
|
+
* @returns {Record<string, unknown>|null}
|
|
117
|
+
*/
|
|
118
|
+
function readMailboxStateFile(stateFile) {
|
|
119
|
+
try {
|
|
120
|
+
if (!fs.existsSync(stateFile)) return null;
|
|
121
|
+
const parsed = JSON.parse(fs.readFileSync(stateFile, 'utf8'));
|
|
122
|
+
return isPlainState(parsed) ? parsed : null;
|
|
123
|
+
} catch {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function replaceStateFile(stateFile, state) {
|
|
129
|
+
const dir = path.dirname(stateFile);
|
|
130
|
+
ensurePrivateDir(dir);
|
|
131
|
+
const tmp = `${stateFile}.${process.pid}.tmp`;
|
|
132
|
+
writePrivateFile(tmp, JSON.stringify(state || {}, null, 2) + '\n');
|
|
133
|
+
// Windows: renameSync throws EPERM when the destination file already
|
|
134
|
+
// exists, unlike POSIX where rename(2) atomically replaces the target.
|
|
135
|
+
if (process.platform === 'win32') {
|
|
136
|
+
try { fs.unlinkSync(stateFile); } catch (e) {
|
|
137
|
+
if (e.code !== 'ENOENT') throw e;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
fs.renameSync(tmp, stateFile);
|
|
141
|
+
bestEffortChmod(stateFile, PRIVATE_FILE_MODE);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Merge a partial state write with the latest on-disk state.
|
|
146
|
+
*
|
|
147
|
+
* Callers pass the keys they intentionally changed. Secret-bearing keys are
|
|
148
|
+
* only written when they are in `updatedKeys`, so an old long-running
|
|
149
|
+
* MailboxStore cannot overwrite a fresher Hub-rotated or divergence-cleared
|
|
150
|
+
* secret tuple that was written by another process between load and persist.
|
|
151
|
+
*
|
|
152
|
+
* @param {string} stateFile
|
|
153
|
+
* @param {Record<string, unknown>} nextState
|
|
154
|
+
* @param {Iterable<string>} updatedKeys
|
|
155
|
+
* @returns {Record<string, unknown>}
|
|
156
|
+
*/
|
|
157
|
+
function writeMergedMailboxStateFile(stateFile, nextState, updatedKeys) {
|
|
158
|
+
const releaseLock = acquireStateFileLock(stateFile);
|
|
159
|
+
try {
|
|
160
|
+
const next = isPlainState(nextState) ? nextState : {};
|
|
161
|
+
const disk = readMailboxStateFile(stateFile);
|
|
162
|
+
const hasDiskState = isPlainState(disk);
|
|
163
|
+
const merged = hasDiskState ? { ...disk } : {};
|
|
164
|
+
const updatedSet = updatedKeys ? new Set(Array.from(updatedKeys)) : null;
|
|
165
|
+
const keys = updatedSet ? Array.from(updatedSet) : Object.keys(next);
|
|
166
|
+
const touchesNodeSecretTuple = keys.some((key) => MAILBOX_NODE_SECRET_TUPLE_KEY_SET.has(key));
|
|
167
|
+
const preserveDiskNodeSecretTuple = touchesNodeSecretTuple
|
|
168
|
+
&& hasDiskState
|
|
169
|
+
&& isHubRotatedNodeSecretState(disk)
|
|
170
|
+
&& !isFullNodeSecretTupleUpdate(updatedSet);
|
|
171
|
+
|
|
172
|
+
for (const key of keys) {
|
|
173
|
+
if (MAILBOX_NODE_SECRET_STATE_KEY_SET.has(key) && hasDiskState && (!updatedSet || !updatedSet.has(key))) {
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if (
|
|
177
|
+
MAILBOX_NODE_SECRET_TUPLE_KEY_SET.has(key) &&
|
|
178
|
+
preserveDiskNodeSecretTuple &&
|
|
179
|
+
!canApplyPartialNodeSecretTupleWrite(key, disk, next)
|
|
180
|
+
) {
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
if (!Object.prototype.hasOwnProperty.call(next, key)) {
|
|
184
|
+
delete merged[key];
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
merged[key] = next[key];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
replaceStateFile(stateFile, merged);
|
|
191
|
+
return merged;
|
|
192
|
+
} finally {
|
|
193
|
+
releaseLock();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
module.exports = {
|
|
198
|
+
PRIVATE_DIR_MODE,
|
|
199
|
+
PRIVATE_FILE_MODE,
|
|
200
|
+
MAILBOX_NODE_SECRET_STATE_KEYS,
|
|
201
|
+
bestEffortChmod,
|
|
202
|
+
ensurePrivateDir,
|
|
203
|
+
writePrivateFile,
|
|
204
|
+
readMailboxStateFile,
|
|
205
|
+
isHubRotatedNodeSecretState,
|
|
206
|
+
writeMergedMailboxStateFile,
|
|
207
|
+
};
|