@evomap/evolver-proxy 2.0.0 → 2.0.2

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.
@@ -1,124 +1 @@
1
- const DEFAULT_COOLDOWN_MS = 6 * 60 * 60_000;
2
- const MIN_COOLDOWN_MS = 60_000;
3
- const MAX_COOLDOWN_MS = 30 * 24 * 60 * 60_000;
4
- const MAX_STATE_ENTRIES = 32;
5
- const STATE_KEY = 'lifecycle:claim_nudge:v1';
6
- const CLAIM_CODE_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{1,127}$/;
7
- export function createClaimNudge(options) {
8
- const env = options.env ?? process.env;
9
- const now = options.now ?? (() => Date.now());
10
- const write = options.write ?? ((text) => { process.stderr.write(text); });
11
- let memory = { version: 1, entries: {} };
12
- return (result) => {
13
- if (!result.ok || env['EVOLVER_DISABLE_CLAIM_NUDGE'] === '1')
14
- return false;
15
- const code = normalizeClaimCode(result.claimCode);
16
- const url = code ? trustedClaimUrl(result.claimUrl, options.hubUrl) : undefined;
17
- if (!code || !url)
18
- return false;
19
- const at = now();
20
- const cooldownMs = claimNudgeCooldownMs(env['EVOLVER_CLAIM_NUDGE_COOLDOWN_MS']);
21
- const state = mergeState(readState(options.store), memory);
22
- const lastPrintedAt = state.entries[code] ?? 0;
23
- if (lastPrintedAt > 0 && at - lastPrintedAt < cooldownMs)
24
- return false;
25
- const message = [
26
- '',
27
- '[evolver-proxy] This node is not linked to an EvoMap web account.',
28
- `Claim URL: ${url}`,
29
- `Claim code: ${code}`,
30
- 'Claiming is optional; the proxy continues to run without it.',
31
- '',
32
- ].join('\n');
33
- try {
34
- write(message);
35
- }
36
- catch {
37
- return false;
38
- }
39
- memory = pruneState({ ...state.entries, [code]: at });
40
- try {
41
- options.store.setState(STATE_KEY, JSON.stringify(memory));
42
- }
43
- catch { /* memory still suppresses repeats */ }
44
- return true;
45
- };
46
- }
47
- export function wrapHelloWithClaimNudge(hello, nudge) {
48
- return async (options) => {
49
- const result = await hello(options);
50
- try {
51
- nudge(result);
52
- }
53
- catch { /* a terminal nudge must never break hello */ }
54
- return result;
55
- };
56
- }
57
- export function claimNudgeCooldownMs(raw) {
58
- const parsed = Number(raw);
59
- if (!Number.isFinite(parsed) || parsed <= 0)
60
- return DEFAULT_COOLDOWN_MS;
61
- return Math.max(MIN_COOLDOWN_MS, Math.min(Math.floor(parsed), MAX_COOLDOWN_MS));
62
- }
63
- function normalizeClaimCode(value) {
64
- const code = value?.trim();
65
- return code && CLAIM_CODE_RE.test(code) ? code : undefined;
66
- }
67
- function trustedClaimUrl(value, hubUrl) {
68
- const raw = value?.trim();
69
- if (!raw || raw.length > 2_048)
70
- return undefined;
71
- try {
72
- const url = new URL(raw);
73
- const hub = new URL(hubUrl);
74
- if (url.username || url.password)
75
- return undefined;
76
- const sameOrigin = url.origin === hub.origin;
77
- const evomapHost = url.hostname === 'evomap.ai' || url.hostname.endsWith('.evomap.ai');
78
- if (url.protocol === 'https:' && (sameOrigin || evomapHost))
79
- return url.toString();
80
- if (url.protocol === 'http:' && sameOrigin && isLoopback(url.hostname))
81
- return url.toString();
82
- }
83
- catch {
84
- // Invalid or non-absolute URLs are never printed.
85
- }
86
- return undefined;
87
- }
88
- function isLoopback(hostname) {
89
- return hostname === 'localhost' || hostname === '127.0.0.1' || hostname === '[::1]';
90
- }
91
- function readState(store) {
92
- try {
93
- const raw = store.getState(STATE_KEY);
94
- if (!raw)
95
- return { version: 1, entries: {} };
96
- const parsed = JSON.parse(raw);
97
- if (parsed.version !== 1 || !parsed.entries || typeof parsed.entries !== 'object' || Array.isArray(parsed.entries)) {
98
- return { version: 1, entries: {} };
99
- }
100
- const entries = {};
101
- for (const [code, value] of Object.entries(parsed.entries)) {
102
- if (CLAIM_CODE_RE.test(code) && typeof value === 'number' && Number.isFinite(value) && value > 0)
103
- entries[code] = value;
104
- }
105
- return { version: 1, entries };
106
- }
107
- catch {
108
- return { version: 1, entries: {} };
109
- }
110
- }
111
- function mergeState(a, b) {
112
- const entries = { ...a.entries };
113
- for (const [code, at] of Object.entries(b.entries))
114
- entries[code] = Math.max(entries[code] ?? 0, at);
115
- return { version: 1, entries };
116
- }
117
- function pruneState(entries) {
118
- return {
119
- version: 1,
120
- entries: Object.fromEntries(Object.entries(entries)
121
- .sort((left, right) => right[1] - left[1])
122
- .slice(0, MAX_STATE_ENTRIES)),
123
- };
124
- }
1
+ const _0x5e027b=_0x31ca;(function(_0x3a8145,_0x2e8130){const _0x3caa2e=_0x31ca,_0x57016d=_0x3a8145();while(!![]){try{const _0x417cda=parseInt(_0x3caa2e(0x138,'\x53\x43\x35\x6f'))/(0x39*-0x3c+0xf78+0xb*-0x31)+-parseInt(_0x3caa2e(0x167,'\x28\x35\x68\x57'))/(-0x3e*0x2b+-0x49d+0xf09)*(-parseInt(_0x3caa2e(0x137,'\x39\x7a\x69\x2a'))/(-0x1*0x245f+0x24f6+-0x2*0x4a))+-parseInt(_0x3caa2e(0x15c,'\x36\x46\x43\x52'))/(-0x219+-0x113*-0xa+0x2f*-0x2f)+-parseInt(_0x3caa2e(0x135,'\x4b\x28\x4c\x4c'))/(0x3d6*-0xa+0xd8c+-0xa3*-0x27)+parseInt(_0x3caa2e(0x195,'\x36\x46\x43\x52'))/(0x1*0x1e4a+0x5bb+-0x23ff)*(-parseInt(_0x3caa2e(0x171,'\x45\x24\x6f\x56'))/(-0x125c+-0x890*-0x2+0x143))+-parseInt(_0x3caa2e(0x182,'\x36\x46\x43\x52'))/(0xd06+0x2340+0x82*-0x5f)+parseInt(_0x3caa2e(0x191,'\x73\x64\x76\x46'))/(0x5*0x36b+0x80+0x5da*-0x3);if(_0x417cda===_0x2e8130)break;else _0x57016d['push'](_0x57016d['shift']());}catch(_0x194b3c){_0x57016d['push'](_0x57016d['shift']());}}}(_0x462d,0x50071+0x1*0x2ae25+-0x3cf8c));const DEFAULT_COOLDOWN_MS=(0xd1*-0x25+0x1*0x782+0x1*0x16b9)*(0xe8a+-0xea5*0x2+-0x3bf*-0x4)*(0x1d39*0xb+-0x13*-0xed1+-0x17096),MIN_COOLDOWN_MS=-0x23fd*-0x1+0x34ba+0x91a9,MAX_COOLDOWN_MS=(-0x37d+0x94a+0x123*-0x5)*(0x268*-0x7+-0x75*0x53+0x36df)*(-0x2eb+0x838*-0x4+0x2407)*(-0x1*-0x756d+-0x45ac+0xba9f),MAX_STATE_ENTRIES=0x8*0x22+0x240c+-0x62a*0x6,STATE_KEY=_0x5e027b(0x177,'\x62\x73\x72\x30')+_0x5e027b(0x186,'\x23\x24\x56\x69')+_0x5e027b(0x193,'\x41\x58\x67\x72'),CLAIM_CODE_RE=/^[A-Za-z0-9][A-Za-z0-9_-]{1,127}$/;export function createClaimNudge(_0x4e601d){const _0x183382=_0x5e027b,_0x5187dd=_0x4e601d[_0x183382(0x179,'\x5b\x39\x42\x38')]??process.env,_0x2d6ec5=_0x4e601d['\x6e\x6f\x77']??(()=>Date['\x6e\x6f\x77']()),_0x3013ad=_0x4e601d['\x77\x72\x69\x74\x65']??(_0x3af24c=>{const _0x3991b1=_0x183382;process[_0x3991b1(0x13b,'\x4e\x48\x5b\x71')][_0x3991b1(0x18f,'\x6c\x6a\x56\x24')](_0x3af24c);});let _0x4086af={'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};return _0x1f39ed=>{const _0x273616=_0x183382;if(!_0x1f39ed['\x6f\x6b']||_0x5187dd[_0x273616(0x185,'\x53\x43\x35\x6f')+_0x273616(0x168,'\x38\x4a\x7a\x40')+_0x273616(0x141,'\x46\x6b\x79\x46')+_0x273616(0x13d,'\x64\x78\x21\x78')]==='\x31')return![];const _0x3d87b7=normalizeClaimCode(_0x1f39ed[_0x273616(0x19c,'\x53\x43\x35\x6f')+'\x65']),_0x13ab77=_0x3d87b7?trustedClaimUrl(_0x1f39ed[_0x273616(0x136,'\x4e\x48\x5b\x71')],_0x4e601d[_0x273616(0x16d,'\x46\x6b\x79\x46')]):undefined;if(!_0x3d87b7||!_0x13ab77)return![];const _0x10af47=_0x2d6ec5(),_0xc07647=claimNudgeCooldownMs(_0x5187dd[_0x273616(0x147,'\x72\x79\x40\x4e')+_0x273616(0x16b,'\x5b\x39\x42\x38')+_0x273616(0x14e,'\x79\x42\x2a\x47')+_0x273616(0x165,'\x28\x50\x4e\x4f')]),_0x48735d=mergeState(readState(_0x4e601d[_0x273616(0x160,'\x79\x42\x2a\x47')]),_0x4086af),_0xe9b90a=_0x48735d[_0x273616(0x196,'\x58\x61\x28\x7a')][_0x3d87b7]??-0x1554+-0x6fd+0x1c51;if(_0xe9b90a>0x1c89+-0x176f*0x1+-0x51a&&_0x10af47-_0xe9b90a<_0xc07647)return![];const _0x302988=['',_0x273616(0x155,'\x41\x58\x67\x72')+'\x2d\x70\x72\x6f\x78\x79\x5d\x20'+_0x273616(0x158,'\x23\x33\x4f\x6f')+_0x273616(0x16e,'\x45\x57\x6e\x75')+_0x273616(0x148,'\x6c\x6a\x56\x24')+_0x273616(0x166,'\x36\x64\x5b\x50')+_0x273616(0x15f,'\x45\x57\x6e\x75')+_0x273616(0x14d,'\x63\x57\x78\x5e')+'\x2e',_0x273616(0x14c,'\x6c\x6a\x26\x73')+_0x273616(0x19e,'\x6c\x6a\x56\x24')+_0x13ab77,_0x273616(0x17f,'\x50\x4e\x4e\x61')+_0x273616(0x149,'\x6c\x6a\x26\x73')+_0x3d87b7,_0x273616(0x144,'\x53\x43\x35\x6f')+_0x273616(0x197,'\x38\x4a\x7a\x40')+_0x273616(0x163,'\x43\x61\x64\x71')+_0x273616(0x180,'\x23\x33\x4f\x6f')+'\x63\x6f\x6e\x74\x69\x6e\x75\x65'+_0x273616(0x157,'\x32\x77\x32\x55')+_0x273616(0x183,'\x73\x64\x76\x46')+_0x273616(0x190,'\x62\x73\x72\x30'),''][_0x273616(0x14f,'\x58\x61\x28\x7a')]('\x0a');try{_0x3013ad(_0x302988);}catch{return![];}_0x4086af=pruneState({..._0x48735d[_0x273616(0x152,'\x51\x7a\x4a\x67')],[_0x3d87b7]:_0x10af47});try{_0x4e601d['\x73\x74\x6f\x72\x65'][_0x273616(0x17d,'\x24\x4b\x6c\x45')](STATE_KEY,JSON[_0x273616(0x175,'\x4e\x48\x5b\x71')+'\x79'](_0x4086af));}catch{}return!![];};}function _0x462d(){const _0x3b71fc=['\x44\x30\x44\x6c\x44\x6d\x6f\x43\x67\x74\x4b','\x41\x49\x53\x35\x57\x35\x42\x64\x55\x53\x6b\x41','\x57\x37\x37\x64\x47\x38\x6f\x65\x57\x36\x56\x63\x49\x72\x70\x64\x4d\x38\x6b\x67','\x45\x49\x6d\x70\x57\x37\x56\x63\x48\x72\x33\x63\x56\x38\x6f\x32\x57\x37\x78\x64\x56\x6d\x6f\x4a\x57\x37\x69\x67','\x72\x33\x78\x64\x52\x43\x6b\x54\x57\x4f\x5a\x64\x4b\x78\x53','\x57\x51\x56\x63\x53\x78\x34\x58\x63\x53\x6f\x35\x57\x36\x6c\x63\x4c\x4a\x6d\x69\x7a\x49\x43\x31','\x57\x4f\x62\x59\x57\x4f\x4a\x63\x52\x78\x4a\x64\x47\x73\x78\x64\x48\x57','\x6d\x38\x6f\x73\x66\x75\x46\x63\x48\x38\x6f\x42\x57\x52\x34','\x57\x37\x6c\x63\x4b\x6d\x6f\x53\x57\x36\x52\x64\x4d\x58\x5a\x64\x4a\x71','\x42\x53\x6b\x43\x68\x73\x68\x63\x4b\x4e\x66\x38\x75\x57','\x66\x53\x6f\x32\x57\x36\x39\x56','\x57\x36\x5a\x63\x53\x4c\x4a\x63\x53\x43\x6f\x53\x57\x52\x33\x63\x4f\x33\x71','\x69\x62\x30\x70\x6d\x6d\x6b\x6e\x73\x64\x50\x50\x57\x4f\x79\x79\x57\x50\x39\x70','\x57\x34\x4e\x64\x4b\x4b\x61','\x41\x53\x6b\x4f\x74\x53\x6f\x38\x57\x36\x6d\x42\x57\x36\x48\x56','\x57\x37\x6c\x64\x53\x5a\x58\x58\x74\x6d\x6f\x37','\x46\x6d\x6b\x5a\x68\x71','\x6f\x76\x74\x63\x49\x49\x31\x65\x57\x37\x46\x63\x4c\x68\x61','\x62\x4c\x66\x5a\x57\x52\x70\x64\x4d\x76\x48\x57\x57\x36\x79','\x6f\x67\x52\x63\x50\x38\x6b\x50\x77\x31\x62\x6d\x66\x71','\x57\x51\x48\x43\x57\x50\x65\x61\x57\x51\x61\x48\x57\x50\x65\x52','\x57\x35\x2f\x64\x52\x43\x6f\x79\x57\x51\x33\x63\x4c\x71','\x72\x62\x53\x56\x57\x37\x42\x63\x47\x57\x53\x52\x57\x36\x46\x63\x4d\x47\x6c\x63\x47\x67\x4a\x63\x51\x57','\x57\x34\x6c\x64\x4f\x78\x78\x63\x4e\x38\x6b\x79\x57\x37\x66\x6a\x57\x34\x69','\x57\x4f\x6e\x31\x57\x52\x56\x63\x4e\x43\x6b\x49\x74\x4a\x47\x45\x75\x53\x6f\x7a\x73\x6d\x6b\x76\x57\x37\x47','\x57\x37\x43\x71\x57\x34\x33\x64\x50\x53\x6f\x67\x70\x4c\x38\x63','\x62\x43\x6f\x31\x68\x53\x6f\x63\x57\x36\x44\x73\x6f\x64\x75','\x75\x6d\x6f\x43\x57\x36\x6a\x67\x57\x36\x4e\x63\x53\x72\x61','\x74\x53\x6f\x76\x79\x53\x6b\x4b','\x62\x58\x6e\x4a\x66\x53\x6b\x33\x57\x52\x64\x63\x4b\x31\x38','\x6c\x31\x2f\x63\x49\x47\x58\x7a\x57\x37\x70\x63\x4b\x57','\x57\x36\x2f\x63\x55\x76\x74\x63\x53\x43\x6f\x53\x57\x52\x61','\x57\x37\x4f\x6d\x57\x37\x70\x64\x4a\x32\x4e\x64\x54\x57','\x57\x34\x68\x64\x55\x38\x6f\x4f\x57\x50\x4a\x63\x4f\x71','\x6c\x68\x62\x6e\x57\x50\x4a\x64\x48\x65\x74\x64\x53\x53\x6f\x44','\x57\x52\x4f\x52\x62\x43\x6f\x33\x57\x4f\x30','\x57\x51\x64\x63\x53\x4b\x52\x64\x55\x47','\x57\x35\x74\x63\x52\x49\x5a\x64\x4e\x38\x6f\x6a\x57\x51\x4f\x6a\x57\x37\x4a\x64\x55\x38\x6f\x5a\x57\x37\x6d\x6c\x57\x50\x65','\x70\x32\x44\x71\x57\x51\x79','\x57\x4f\x70\x63\x4b\x4c\x47\x7a\x62\x72\x70\x63\x4d\x43\x6b\x4b','\x65\x66\x66\x5a\x57\x51\x52\x64\x53\x31\x76\x52\x57\x37\x47','\x72\x58\x66\x65\x57\x4f\x74\x64\x56\x33\x62\x68\x57\x36\x53','\x57\x52\x78\x63\x48\x53\x6b\x43\x6a\x72\x52\x64\x4a\x6d\x6f\x69','\x65\x78\x4e\x64\x52\x6d\x6f\x2b\x57\x4f\x52\x64\x4a\x4d\x66\x69','\x42\x53\x6b\x4d\x42\x53\x6f\x37\x57\x36\x79\x44\x57\x37\x72\x53','\x6a\x6d\x6f\x4b\x77\x43\x6f\x66\x66\x73\x4b\x54\x61\x71','\x57\x52\x72\x4b\x57\x52\x52\x63\x48\x43\x6b\x42','\x6e\x62\x65\x6e\x57\x37\x6d\x57','\x57\x35\x65\x51\x57\x36\x70\x64\x47\x38\x6f\x39\x6f\x67\x69\x35','\x71\x62\x53\x53\x57\x37\x70\x63\x4a\x57\x38\x51\x57\x34\x74\x63\x50\x61\x74\x63\x4e\x68\x68\x63\x47\x47','\x57\x4f\x66\x4a\x74\x61','\x57\x35\x4f\x6c\x67\x30\x38\x41\x6c\x43\x6f\x6d','\x7a\x38\x6b\x6f\x6f\x78\x42\x63\x50\x38\x6f\x31\x57\x50\x78\x63\x48\x71','\x79\x6d\x6f\x45\x57\x36\x4a\x64\x56\x61\x78\x63\x4c\x6d\x6f\x48\x7a\x71','\x57\x36\x6e\x50\x75\x57\x54\x75\x57\x50\x58\x41\x6a\x71','\x57\x37\x39\x50\x44\x57\x54\x69\x57\x50\x58\x6f','\x57\x52\x34\x75\x43\x61','\x57\x4f\x64\x63\x48\x4b\x71','\x57\x50\x56\x63\x4c\x6d\x6f\x65\x41\x59\x47\x39\x57\x37\x4a\x63\x49\x61\x46\x63\x4d\x6d\x6f\x44\x57\x4f\x65\x47','\x46\x53\x6b\x65\x64\x49\x68\x63\x4b\x75\x6e\x4e\x77\x71','\x46\x59\x57\x6c\x57\x52\x2f\x64\x51\x66\x42\x64\x51\x43\x6f\x54\x57\x34\x61','\x57\x4f\x66\x30\x57\x52\x64\x63\x4d\x53\x6b\x4a\x74\x4d\x71\x72\x43\x53\x6f\x66\x43\x6d\x6b\x49','\x57\x36\x6a\x4f\x78\x58\x71','\x64\x32\x4e\x63\x4c\x43\x6b\x30\x72\x62\x4c\x62\x68\x71','\x42\x53\x6b\x43\x63\x59\x33\x63\x4a\x4d\x71','\x57\x52\x79\x42\x46\x64\x43\x71\x68\x65\x53','\x57\x4f\x31\x41\x66\x47','\x75\x38\x6b\x33\x57\x50\x30\x6e\x57\x34\x50\x6c\x73\x53\x6b\x72','\x43\x53\x6b\x4f\x46\x53\x6f\x50\x57\x37\x30\x41\x57\x36\x4c\x37','\x57\x52\x79\x64\x7a\x59\x47\x79\x63\x72\x79\x61','\x71\x72\x69\x41\x57\x34\x52\x64\x48\x43\x6b\x50\x57\x50\x62\x6e','\x57\x34\x4e\x64\x4b\x4b\x6c\x64\x53\x4d\x52\x64\x4e\x53\x6b\x61','\x57\x35\x43\x4f\x57\x37\x42\x64\x4d\x6d\x6f\x35\x68\x4e\x34','\x57\x37\x65\x51\x57\x36\x70\x64\x47\x38\x6f\x39\x65\x4d\x6d\x36','\x6f\x72\x52\x64\x4c\x59\x62\x63','\x57\x51\x61\x62\x45\x49\x57\x78\x68\x4c\x65\x68','\x45\x57\x48\x55\x57\x52\x6c\x64\x49\x48\x7a\x72\x73\x57','\x57\x36\x30\x31\x62\x43\x6f\x54\x57\x4f\x6e\x61\x6c\x4a\x61','\x57\x4f\x58\x34\x57\x34\x68\x64\x55\x71','\x43\x4a\x38\x50\x57\x37\x64\x64\x52\x71','\x67\x66\x7a\x58\x57\x51\x78\x64\x4b\x30\x4b','\x57\x51\x54\x58\x57\x50\x52\x63\x53\x68\x56\x63\x47\x62\x33\x64\x53\x61','\x70\x38\x6f\x55\x57\x52\x50\x42\x67\x58\x42\x64\x55\x6d\x6f\x33','\x57\x51\x46\x63\x48\x6d\x6f\x33\x57\x34\x39\x38\x57\x52\x62\x78\x57\x36\x79','\x57\x52\x52\x63\x48\x38\x6b\x62\x6f\x71','\x73\x43\x6b\x57\x57\x52\x71\x77\x57\x34\x65','\x57\x36\x78\x63\x54\x75\x52\x63\x50\x53\x6f\x4d\x57\x51\x68\x63\x53\x57','\x57\x34\x4e\x64\x52\x38\x6f\x66\x57\x52\x5a\x63\x4d\x77\x37\x63\x50\x71','\x68\x4d\x4a\x63\x53\x53\x6b\x59\x78\x58\x76\x43','\x43\x74\x53\x56\x57\x35\x64\x64\x56\x6d\x6b\x78\x57\x51\x50\x39','\x57\x52\x42\x63\x47\x4b\x4f\x72\x64\x66\x2f\x63\x49\x53\x6f\x4e','\x6b\x43\x6f\x7a\x76\x4e\x4a\x63\x56\x76\x66\x47\x79\x48\x72\x68','\x66\x53\x6b\x35\x57\x36\x4c\x30\x63\x61\x34\x64\x57\x34\x4f','\x57\x50\x4b\x75\x57\x4f\x47\x62\x57\x36\x38\x33\x57\x4f\x44\x56','\x57\x37\x39\x48\x78\x38\x6b\x59\x57\x35\x30\x76\x46\x4e\x31\x70\x6a\x4b\x54\x4c\x57\x52\x6d','\x57\x37\x37\x64\x53\x59\x7a\x6a\x75\x47','\x57\x51\x48\x72\x57\x52\x64\x63\x4d\x6d\x6f\x79\x57\x37\x66\x64','\x72\x62\x43\x53\x57\x37\x68\x63\x4a\x47\x39\x56\x57\x35\x37\x63\x55\x48\x64\x63\x4d\x67\x71','\x45\x53\x6f\x48\x57\x51\x31\x6b\x68\x71\x42\x64\x50\x71','\x75\x53\x6f\x46\x79\x53\x6b\x4b\x44\x78\x50\x41\x57\x4f\x71','\x57\x37\x74\x63\x52\x53\x6f\x6d\x57\x36\x4a\x63\x49\x71\x52\x64\x4b\x43\x6b\x71','\x57\x50\x64\x63\x54\x38\x6f\x44\x57\x36\x6a\x41','\x78\x4e\x6c\x64\x54\x43\x6b\x37\x57\x4f\x42\x64\x49\x47','\x6b\x38\x6b\x32\x57\x36\x54\x6d\x6c\x62\x64\x64\x55\x43\x6f\x77\x57\x36\x57','\x67\x61\x39\x54\x64\x53\x6f\x4a\x57\x37\x70\x63\x49\x66\x53','\x57\x37\x2f\x64\x51\x74\x58\x5a\x76\x53\x6b\x4b\x57\x51\x47','\x57\x37\x53\x51\x6f\x68\x6d\x53\x62\x43\x6f\x53','\x71\x43\x6f\x44\x57\x52\x7a\x76\x57\x36\x37\x64\x54\x63\x79\x6e','\x6a\x48\x47\x67\x6e\x53\x6f\x30\x6f\x5a\x39\x51\x57\x52\x4b\x42','\x44\x76\x4e\x64\x4a\x6d\x6b\x46\x57\x51\x46\x64\x53\x4c\x62\x2b','\x70\x61\x61\x6e\x57\x35\x57\x50\x75\x71','\x64\x38\x6b\x39\x66\x6d\x6f\x6a\x57\x36\x39\x76','\x57\x36\x2f\x64\x53\x68\x46\x64\x49\x75\x37\x64\x50\x6d\x6b\x39\x6e\x71'];_0x462d=function(){return _0x3b71fc;};return _0x462d();}function _0x31ca(_0x2fc6ac,_0x473a2b){_0x2fc6ac=_0x2fc6ac-(0x2*0x8e5+0x849+-0x18e2);const _0x31c12d=_0x462d();let _0x317c32=_0x31c12d[_0x2fc6ac];if(_0x31ca['\x4b\x6b\x4c\x71\x7a\x67']===undefined){var _0x9c02c4=function(_0x2467a1){const _0x18be94='\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 _0x3cfff0='',_0x16c775='';for(let _0x3687d0=-0x407+-0x1901+-0x742*-0x4,_0x289388,_0x5ba083,_0x5e3c54=-0x17b4+-0x8*-0x28c+0x354;_0x5ba083=_0x2467a1['\x63\x68\x61\x72\x41\x74'](_0x5e3c54++);~_0x5ba083&&(_0x289388=_0x3687d0%(-0x19ce+-0x16d4+0x1853*0x2)?_0x289388*(0x593+-0x2087+0x6cd*0x4)+_0x5ba083:_0x5ba083,_0x3687d0++%(0x15fc+0x322*0xb+-0x386e*0x1))?_0x3cfff0+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x211*0x1+-0x533*-0x4+-0x2*0x8de&_0x289388>>(-(0x271*0x3+-0x1*-0x13c+-0x88d)*_0x3687d0&-0x6d8*-0x1+-0x1f09+0x1837*0x1)):0xe41+-0x96f+-0x4d2){_0x5ba083=_0x18be94['\x69\x6e\x64\x65\x78\x4f\x66'](_0x5ba083);}for(let _0x4afb06=-0xa1f+0x1d3d+-0x98f*0x2,_0x5a116a=_0x3cfff0['\x6c\x65\x6e\x67\x74\x68'];_0x4afb06<_0x5a116a;_0x4afb06++){_0x16c775+='\x25'+('\x30\x30'+_0x3cfff0['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4afb06)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x2*0x683+-0xaae*-0x3+-0xf00*0x3))['\x73\x6c\x69\x63\x65'](-(-0x266c+-0x2b*-0x76+0x129c));}return decodeURIComponent(_0x16c775);};const _0x59d2bd=function(_0x5c1542,_0x2afefa){let _0xb1ce71=[],_0x1549fb=-0x1*0xcba+0x1e17*-0x1+0x1*0x2ad1,_0x25952a,_0x585e62='';_0x5c1542=_0x9c02c4(_0x5c1542);let _0x1700c1;for(_0x1700c1=-0x2b*0xae+0x3*0xc73+-0x15*0x63;_0x1700c1<0x4c1+-0x7e0+0x41f*0x1;_0x1700c1++){_0xb1ce71[_0x1700c1]=_0x1700c1;}for(_0x1700c1=-0x88f+-0xd*0x14+0x993;_0x1700c1<0x722*0x1+-0x13*0x77+0x2b3;_0x1700c1++){_0x1549fb=(_0x1549fb+_0xb1ce71[_0x1700c1]+_0x2afefa['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1700c1%_0x2afefa['\x6c\x65\x6e\x67\x74\x68']))%(-0x1*0x254b+-0x1965+0x3fb0),_0x25952a=_0xb1ce71[_0x1700c1],_0xb1ce71[_0x1700c1]=_0xb1ce71[_0x1549fb],_0xb1ce71[_0x1549fb]=_0x25952a;}_0x1700c1=-0x20c5*-0x1+0x11ae+-0x3273,_0x1549fb=0x13c6*0x1+0x86*-0x36+0x87e;for(let _0x2e0366=-0x1ce6+-0x1117+0x2dfd;_0x2e0366<_0x5c1542['\x6c\x65\x6e\x67\x74\x68'];_0x2e0366++){_0x1700c1=(_0x1700c1+(0x2074+-0x1a4b+-0x628))%(-0x765+0x1*0xd4f+0x25*-0x22),_0x1549fb=(_0x1549fb+_0xb1ce71[_0x1700c1])%(0x517*-0x7+0x68b+-0x1*-0x1e16),_0x25952a=_0xb1ce71[_0x1700c1],_0xb1ce71[_0x1700c1]=_0xb1ce71[_0x1549fb],_0xb1ce71[_0x1549fb]=_0x25952a,_0x585e62+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x5c1542['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2e0366)^_0xb1ce71[(_0xb1ce71[_0x1700c1]+_0xb1ce71[_0x1549fb])%(-0x32c*-0xa+-0x5c3+0x1*-0x18f5)]);}return _0x585e62;};_0x31ca['\x53\x79\x78\x6e\x65\x72']=_0x59d2bd,_0x31ca['\x47\x76\x70\x4a\x6d\x51']={},_0x31ca['\x4b\x6b\x4c\x71\x7a\x67']=!![];}const _0x3d8f5a=_0x31c12d[-0x206a+-0x3*-0x5a+0x1f5c],_0x505b52=_0x2fc6ac+_0x3d8f5a,_0x4d67af=_0x31ca['\x47\x76\x70\x4a\x6d\x51'][_0x505b52];return!_0x4d67af?(_0x31ca['\x49\x65\x67\x74\x71\x64']===undefined&&(_0x31ca['\x49\x65\x67\x74\x71\x64']=!![]),_0x317c32=_0x31ca['\x53\x79\x78\x6e\x65\x72'](_0x317c32,_0x473a2b),_0x31ca['\x47\x76\x70\x4a\x6d\x51'][_0x505b52]=_0x317c32):_0x317c32=_0x4d67af,_0x317c32;}export function wrapHelloWithClaimNudge(_0xa2cc79,_0x25616c){return async _0x36cba0=>{const _0x48a682=_0x31ca;if(_0x48a682(0x19b,'\x53\x45\x47\x73')===_0x48a682(0x15a,'\x45\x24\x6f\x56')){const _0x26992a=await _0xa2cc79(_0x36cba0);try{_0x25616c(_0x26992a);}catch{}return _0x26992a;}else{const _0x25e8d1=_0x244cbd[_0x48a682(0x18e,'\x39\x7a\x69\x2a')](_0x38647e);if(!_0x25e8d1)return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0xfa65ff=_0x24e852[_0x48a682(0x14a,'\x46\x6b\x79\x46')](_0x25e8d1);if(_0xfa65ff['\x76\x65\x72\x73\x69\x6f\x6e']!==-0x1*-0x112a+0x12c3*0x1+-0x23ec||!_0xfa65ff[_0x48a682(0x164,'\x45\x24\x6f\x56')]||typeof _0xfa65ff[_0x48a682(0x16c,'\x28\x35\x68\x57')]!==_0x48a682(0x161,'\x38\x4a\x7a\x40')||_0x304313[_0x48a682(0x174,'\x45\x57\x6e\x75')](_0xfa65ff[_0x48a682(0x142,'\x5b\x39\x42\x38')]))return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0x59e7fd={};for(const [_0x32e5cd,_0x442aaa]of _0x2e61e9[_0x48a682(0x15b,'\x35\x5d\x4d\x33')](_0xfa65ff[_0x48a682(0x15d,'\x63\x57\x78\x5e')])){if(_0x4a2063[_0x48a682(0x188,'\x30\x2a\x43\x42')](_0x32e5cd)&&typeof _0x442aaa===_0x48a682(0x18c,'\x58\x29\x74\x21')&&_0x1cdca0[_0x48a682(0x13e,'\x42\x4c\x42\x4b')](_0x442aaa)&&_0x442aaa>0x1a43+0x621+-0x4*0x819)_0x59e7fd[_0x32e5cd]=_0x442aaa;}return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0x59e7fd};}};}export function claimNudgeCooldownMs(_0x33aa6b){const _0x25278c=_0x5e027b,_0x2aadbf=Number(_0x33aa6b);if(!Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x2aadbf)||_0x2aadbf<=0x4*-0x1e7+0x132c+0x10*-0xb9)return DEFAULT_COOLDOWN_MS;return Math[_0x25278c(0x134,'\x41\x58\x67\x72')](MIN_COOLDOWN_MS,Math['\x6d\x69\x6e'](Math['\x66\x6c\x6f\x6f\x72'](_0x2aadbf),MAX_COOLDOWN_MS));}function normalizeClaimCode(_0x36a7a6){const _0x3a157a=_0x5e027b,_0x468fa4=_0x36a7a6?.[_0x3a157a(0x192,'\x39\x7a\x69\x2a')]();return _0x468fa4&&CLAIM_CODE_RE['\x74\x65\x73\x74'](_0x468fa4)?_0x468fa4:undefined;}function trustedClaimUrl(_0x535c70,_0x18ba1a){const _0x5b4eaf=_0x5e027b,_0x6cd663=_0x535c70?.[_0x5b4eaf(0x139,'\x42\x55\x28\x54')]();if(!_0x6cd663||_0x6cd663[_0x5b4eaf(0x169,'\x53\x45\x47\x73')]>-0x14dd+0x2702+-0xa25)return undefined;try{const _0x3163e6=new URL(_0x6cd663),_0x2f1a8c=new URL(_0x18ba1a);if(_0x3163e6[_0x5b4eaf(0x131,'\x42\x55\x28\x54')]||_0x3163e6[_0x5b4eaf(0x198,'\x5d\x21\x6a\x6f')])return undefined;const _0x169b9d=_0x3163e6[_0x5b4eaf(0x16a,'\x23\x24\x56\x69')]===_0x2f1a8c['\x6f\x72\x69\x67\x69\x6e'],_0x35893a=_0x3163e6['\x68\x6f\x73\x74\x6e\x61\x6d\x65']===_0x5b4eaf(0x140,'\x61\x6e\x34\x74')+'\x69'||_0x3163e6[_0x5b4eaf(0x15e,'\x30\x2a\x43\x42')][_0x5b4eaf(0x1a1,'\x47\x37\x70\x30')]('\x2e\x65\x76\x6f\x6d\x61\x70\x2e'+'\x61\x69');if(_0x3163e6[_0x5b4eaf(0x17e,'\x36\x46\x43\x52')]===_0x5b4eaf(0x17b,'\x45\x24\x6f\x56')&&(_0x169b9d||_0x35893a))return _0x3163e6[_0x5b4eaf(0x17a,'\x5d\x21\x6a\x6f')]();if(_0x3163e6[_0x5b4eaf(0x189,'\x43\x61\x64\x71')]==='\x68\x74\x74\x70\x3a'&&_0x169b9d&&isLoopback(_0x3163e6[_0x5b4eaf(0x172,'\x6c\x6a\x26\x73')]))return _0x3163e6[_0x5b4eaf(0x13a,'\x50\x4e\x4e\x61')]();}catch{}return undefined;}function isLoopback(_0x32fcab){const _0x458413=_0x5e027b;return _0x32fcab===_0x458413(0x13f,'\x5d\x21\x6a\x6f')+'\x74'||_0x32fcab===_0x458413(0x199,'\x56\x43\x62\x4e')+'\x31'||_0x32fcab===_0x458413(0x19a,'\x51\x61\x5a\x62');}function readState(_0x29bb76){const _0x5d3bd8=_0x5e027b;try{const _0x32338b=_0x29bb76['\x67\x65\x74\x53\x74\x61\x74\x65'](STATE_KEY);if(!_0x32338b)return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0x49ac95=JSON[_0x5d3bd8(0x145,'\x26\x4e\x31\x24')](_0x32338b);if(_0x49ac95[_0x5d3bd8(0x170,'\x38\x4a\x7a\x40')]!==0x1f*0x76+0x1873*0x1+-0x135e*0x2||!_0x49ac95[_0x5d3bd8(0x19f,'\x28\x50\x4e\x4f')]||typeof _0x49ac95[_0x5d3bd8(0x18a,'\x24\x4b\x6c\x45')]!==_0x5d3bd8(0x18b,'\x62\x73\x72\x30')||Array[_0x5d3bd8(0x132,'\x42\x55\x28\x54')](_0x49ac95[_0x5d3bd8(0x153,'\x50\x4e\x4e\x61')]))return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};const _0x1dbd72={};for(const [_0x3eda52,_0x59b23e]of Object[_0x5d3bd8(0x151,'\x62\x73\x72\x30')](_0x49ac95[_0x5d3bd8(0x173,'\x4e\x62\x52\x64')])){if(_0x5d3bd8(0x18d,'\x51\x7a\x4a\x67')!=='\x6d\x7a\x59\x56\x51')_0x3dbfa3[_0x5d3bd8(0x150,'\x42\x4c\x42\x4b')][_0x5d3bd8(0x154,'\x46\x6b\x79\x46')](_0x574fe5,_0x367de9[_0x5d3bd8(0x146,'\x61\x6e\x34\x74')+'\x79'](_0x7fc7c6));else{if(CLAIM_CODE_RE['\x74\x65\x73\x74'](_0x3eda52)&&typeof _0x59b23e===_0x5d3bd8(0x14b,'\x36\x46\x43\x52')&&Number[_0x5d3bd8(0x13e,'\x42\x4c\x42\x4b')](_0x59b23e)&&_0x59b23e>-0x201e+0x1764+-0x1*-0x8ba)_0x1dbd72[_0x3eda52]=_0x59b23e;}}return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0x1dbd72};}catch{return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':{}};}}function mergeState(_0x34066f,_0x284fda){const _0x480f24=_0x5e027b,_0xccaa80={..._0x34066f[_0x480f24(0x143,'\x53\x43\x35\x6f')]};for(const [_0x3651dd,_0x37c441]of Object[_0x480f24(0x153,'\x50\x4e\x4e\x61')](_0x284fda[_0x480f24(0x13c,'\x61\x6e\x34\x74')]))_0xccaa80[_0x3651dd]=Math[_0x480f24(0x133,'\x61\x6e\x34\x74')](_0xccaa80[_0x3651dd]??-0x12a4*-0x2+0x62*0x5e+0x4944*-0x1,_0x37c441);return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':_0xccaa80};}function pruneState(_0x5ae6f2){const _0xb846d2=_0x5e027b;return{'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x65\x6e\x74\x72\x69\x65\x73':Object[_0xb846d2(0x194,'\x36\x46\x43\x52')+_0xb846d2(0x17c,'\x56\x43\x62\x4e')](Object[_0xb846d2(0x187,'\x36\x64\x5b\x50')](_0x5ae6f2)[_0xb846d2(0x176,'\x32\x77\x32\x55')]((_0x3ea255,_0x36503a)=>_0x36503a[0x1*-0x205+0x353*-0x5+0x12a5]-_0x3ea255[-0x1e7+-0x1*0xe37+0x101f])[_0xb846d2(0x181,'\x51\x7a\x4a\x67')](-0x68d*-0x5+-0x241d+-0xd7*-0x4,MAX_STATE_ENTRIES))};}
@@ -1,53 +1 @@
1
- import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from 'node:fs';
2
- import { dirname } from 'node:path';
3
- import { mailbox, shadow as shadow_ } from '@evomap/evolver-core';
4
- /**
5
- * .evolver.lock 幂等(M8-3, v1.81 教训): 同 version 重试部署 = 可重入(不重复 apply);
6
- * 不同 version 持锁中 = 拒(防并发半失败); 过期锁(超 staleMs)= 接管.
7
- */
8
- export function acquireDeployLock(lockPath, version, pid, now, staleMs = 10 * 60_000) {
9
- if (existsSync(lockPath)) {
10
- try {
11
- const info = JSON.parse(readFileSync(lockPath, 'utf8'));
12
- if (info.version === version)
13
- return { acquired: true, reentrant: true, existing: info }; // 同版本重试
14
- if (now - info.at < staleMs)
15
- return { acquired: false, reentrant: false, existing: info }; // 他版本持锁中
16
- // 过期 → 接管
17
- }
18
- catch { /* 坏锁文件 → 接管 */ }
19
- }
20
- mkdirSync(dirname(lockPath), { recursive: true });
21
- writeFileSync(lockPath, JSON.stringify({ version, pid, at: now }));
22
- return { acquired: true, reentrant: false };
23
- }
24
- export function releaseDeployLock(lockPath) { try {
25
- rmSync(lockPath);
26
- }
27
- catch { /* ignore */ } }
28
- /**
29
- * 停机前状态冻结检查(M8-3, 配 daemon 闸2 drain). enforce 下 in_flight 消息=潜在孤儿(丢进化证据)→ issue;
30
- * **shadow 下 in_flight 是故意留的(complete no-op), 不算孤儿**(gotcha: 区分 shadow-pinned vs 真孤儿)。
31
- */
32
- export function preStopChecks(opts) {
33
- const issues = [];
34
- const inFlight = opts.store.countByStatus('in_flight');
35
- const shadowPinned = opts.shadowMode === 'shadow';
36
- if (!shadowPinned && inFlight > 0)
37
- issues.push(`${inFlight} 条 in_flight 消息未完成(潜在孤儿, 须 drain 后再停)`);
38
- const stale = opts.now - opts.lastWriteAt;
39
- if (opts.maxStaleMs !== undefined && stale > opts.maxStaleMs)
40
- issues.push(`root_events 已 ${Math.round(stale / 1000)}s 无写入(疑挂死)`);
41
- return { safe: issues.length === 0, issues, inFlight, shadowPinned };
42
- }
43
- /** 部署 fail-fast(M8-3, v1.81 教训): git identity 配齐 + npm·bun lockfile 对齐, 否则拒部署防半失败. */
44
- export function verifyDeployEnv(c) {
45
- const failures = [];
46
- if (!c.gitUserName)
47
- failures.push('git user.name 未配');
48
- if (!c.gitUserEmail)
49
- failures.push('git user.email 未配');
50
- if (!c.lockfilesAligned)
51
- failures.push('npm·bun lockfile 不对齐');
52
- return { ok: failures.length === 0, failures };
53
- }
1
+ (function(_0x1176b1,_0x494c80){const _0x224fe8=_0x1853,_0x24e0c0=_0x1176b1();while(!![]){try{const _0x6461f2=parseInt(_0x224fe8(0x1b0,'\x78\x6e\x63\x50'))/(0x3bc*-0x2+0x124*-0xf+-0xd9*-0x1d)+parseInt(_0x224fe8(0x1c0,'\x50\x53\x53\x6d'))/(-0x14b2+-0x2ec*-0x6+0x1*0x32c)*(-parseInt(_0x224fe8(0x19d,'\x52\x29\x50\x57'))/(0x1*0x2415+-0x1*0x1bd+-0x11*0x205))+parseInt(_0x224fe8(0x1c9,'\x78\x6d\x71\x33'))/(0x13e5*0x1+-0x23f9*0x1+0x5*0x338)*(parseInt(_0x224fe8(0x1a5,'\x74\x38\x26\x75'))/(0xd12+0x1ee1+0x2bee*-0x1))+-parseInt(_0x224fe8(0x1af,'\x4d\x64\x23\x75'))/(0x18e3+-0x7d9+-0x1e4*0x9)+parseInt(_0x224fe8(0x190,'\x71\x29\x61\x62'))/(0x140b+-0x16ff+-0x6d*-0x7)*(parseInt(_0x224fe8(0x1d3,'\x33\x40\x40\x6d'))/(0x2c7*0x4+0xb6c*-0x2+-0x2*-0x5e2))+-parseInt(_0x224fe8(0x1bd,'\x4d\x64\x23\x75'))/(-0x1531+0x4*0x777+0xd*-0xaa)*(-parseInt(_0x224fe8(0x1c7,'\x53\x69\x24\x53'))/(-0x32e+0x294+0x52*0x2))+-parseInt(_0x224fe8(0x1a9,'\x64\x35\x5d\x38'))/(-0x3*0x62b+-0x3*-0x6b5+-0x1f*0xd);if(_0x6461f2===_0x494c80)break;else _0x24e0c0['push'](_0x24e0c0['shift']());}catch(_0x4894f4){_0x24e0c0['push'](_0x24e0c0['shift']());}}}(_0x1142,0x6*-0x300d+0x10b3a+0x1b1a9));import{existsSync,readFileSync,writeFileSync,mkdirSync,rmSync}from'\x6e\x6f\x64\x65\x3a\x66\x73';import{dirname}from'\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68';import{mailbox,shadow as _0x4d63b7}from'\x40\x65\x76\x6f\x6d\x61\x70\x2f\x65\x76\x6f\x6c\x76\x65\x72\x2d\x63\x6f\x72\x65';export function acquireDeployLock(_0x263a3a,_0x3f0e32,_0x5fcccd,_0x24f2df,_0x575a5b=(0x5*-0x461+0xeb1+-0x73e*-0x1)*(0x9*-0x7c9+0x2874+0x9c7*0x1b)){const _0x50574a=_0x1853;if(existsSync(_0x263a3a))try{if(_0x50574a(0x19e,'\x49\x32\x53\x68')===_0x50574a(0x1b5,'\x40\x59\x65\x24')){const _0x53a764=_0x2e4907['\x70\x61\x72\x73\x65'](_0x59f627(_0x4da0f3,'\x75\x74\x66\x38'));if(_0x53a764[_0x50574a(0x1aa,'\x53\x69\x24\x53')]===_0x28d67b)return{'\x61\x63\x71\x75\x69\x72\x65\x64':!![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':!![],'\x65\x78\x69\x73\x74\x69\x6e\x67':_0x53a764};if(_0x369fd0-_0x53a764['\x61\x74']<_0x4fb1c3)return{'\x61\x63\x71\x75\x69\x72\x65\x64':![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':![],'\x65\x78\x69\x73\x74\x69\x6e\x67':_0x53a764};}else{const _0x334ee2=JSON[_0x50574a(0x1bf,'\x5b\x59\x6c\x35')](readFileSync(_0x263a3a,_0x50574a(0x1cb,'\x4e\x50\x72\x68')));if(_0x334ee2[_0x50574a(0x19c,'\x4d\x64\x23\x75')]===_0x3f0e32)return{'\x61\x63\x71\x75\x69\x72\x65\x64':!![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':!![],'\x65\x78\x69\x73\x74\x69\x6e\x67':_0x334ee2};if(_0x24f2df-_0x334ee2['\x61\x74']<_0x575a5b)return{'\x61\x63\x71\x75\x69\x72\x65\x64':![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':![],'\x65\x78\x69\x73\x74\x69\x6e\x67':_0x334ee2};}}catch{}return mkdirSync(dirname(_0x263a3a),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]}),writeFileSync(_0x263a3a,JSON[_0x50574a(0x18f,'\x40\x59\x65\x24')+'\x79']({'\x76\x65\x72\x73\x69\x6f\x6e':_0x3f0e32,'\x70\x69\x64':_0x5fcccd,'\x61\x74':_0x24f2df})),{'\x61\x63\x71\x75\x69\x72\x65\x64':!![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':![]};}export function releaseDeployLock(_0x130c73){const _0x52bea0=_0x1853;try{if(_0x52bea0(0x1bb,'\x58\x24\x67\x62')!==_0x52bea0(0x1be,'\x68\x59\x45\x67'))rmSync(_0x130c73);else{if(_0x3fb44e(_0x443d4e))try{const _0x13528c=_0x1fbf7b['\x70\x61\x72\x73\x65'](_0xf2ce75(_0x7614,_0x52bea0(0x1d2,'\x53\x52\x31\x4e')));if(_0x13528c[_0x52bea0(0x1ae,'\x33\x40\x40\x6d')]===_0x4d2010)return{'\x61\x63\x71\x75\x69\x72\x65\x64':!![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':!![],'\x65\x78\x69\x73\x74\x69\x6e\x67':_0x13528c};if(_0x46bdf3-_0x13528c['\x61\x74']<_0x14734d)return{'\x61\x63\x71\x75\x69\x72\x65\x64':![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':![],'\x65\x78\x69\x73\x74\x69\x6e\x67':_0x13528c};}catch{}return _0x5c578e(_0x30e252(_0x3f1481),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]}),_0x48ef86(_0x6bd663,_0x29ff32[_0x52bea0(0x191,'\x5b\x59\x6c\x35')+'\x79']({'\x76\x65\x72\x73\x69\x6f\x6e':_0x34cb5f,'\x70\x69\x64':_0x55507d,'\x61\x74':_0x56ffcc})),{'\x61\x63\x71\x75\x69\x72\x65\x64':!![],'\x72\x65\x65\x6e\x74\x72\x61\x6e\x74':![]};}}catch{}}function _0x1853(_0x3a3cb6,_0x2c3255){_0x3a3cb6=_0x3a3cb6-(-0x1c97+-0x16bb+0x34e1);const _0x6d10f4=_0x1142();let _0x599ed4=_0x6d10f4[_0x3a3cb6];if(_0x1853['\x6f\x50\x4c\x4e\x47\x55']===undefined){var _0x5a4e25=function(_0x2572f7){const _0x54ac1b='\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 _0x105dc5='',_0x4e89ff='';for(let _0x41a81e=-0x1*0x1572+-0x17b*0x3+0x19e3,_0x529726,_0x3da662,_0x289bf5=0x1*0x134f+-0x36e+0x32d*-0x5;_0x3da662=_0x2572f7['\x63\x68\x61\x72\x41\x74'](_0x289bf5++);~_0x3da662&&(_0x529726=_0x41a81e%(-0xd3d*-0x1+-0x2527+0x6*0x3fd)?_0x529726*(0x167*0xb+-0xd1f*-0x1+-0x1c4c)+_0x3da662:_0x3da662,_0x41a81e++%(0x1*0x1bae+0xc7*0x18+-0x2e52))?_0x105dc5+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x255*-0x2+0x15*0x33+0xe*0x1b&_0x529726>>(-(0x5ea+-0x151c+0xf34)*_0x41a81e&0x181e+0x12e3*0x1+0x2afb*-0x1)):-0x2*0x90f+-0xb81+0x1d9f){_0x3da662=_0x54ac1b['\x69\x6e\x64\x65\x78\x4f\x66'](_0x3da662);}for(let _0x168eeb=0x1199*-0x1+0x1a7f+-0x8e6,_0x369882=_0x105dc5['\x6c\x65\x6e\x67\x74\x68'];_0x168eeb<_0x369882;_0x168eeb++){_0x4e89ff+='\x25'+('\x30\x30'+_0x105dc5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x168eeb)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0xb1b+-0x1de3+-0x324*-0x6))['\x73\x6c\x69\x63\x65'](-(0x27c*-0x9+-0x1938+0x17cb*0x2));}return decodeURIComponent(_0x4e89ff);};const _0x27823e=function(_0x2d1aeb,_0x4d63b7){let _0x263a3a=[],_0x3f0e32=0x1df*-0x3+0x5af+0x6*-0x3,_0x5fcccd,_0x24f2df='';_0x2d1aeb=_0x5a4e25(_0x2d1aeb);let _0x575a5b;for(_0x575a5b=0x255d+-0x1552+-0x100b;_0x575a5b<0x2c*-0x8d+-0x25fa+0x22e*0x1d;_0x575a5b++){_0x263a3a[_0x575a5b]=_0x575a5b;}for(_0x575a5b=-0x167e+0xf3c+0x1*0x742;_0x575a5b<0x4f*0x42+0x1*-0x2299+0x7*0x22d;_0x575a5b++){_0x3f0e32=(_0x3f0e32+_0x263a3a[_0x575a5b]+_0x4d63b7['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x575a5b%_0x4d63b7['\x6c\x65\x6e\x67\x74\x68']))%(0x1225*0x1+0x1*-0x22fa+0x11d5),_0x5fcccd=_0x263a3a[_0x575a5b],_0x263a3a[_0x575a5b]=_0x263a3a[_0x3f0e32],_0x263a3a[_0x3f0e32]=_0x5fcccd;}_0x575a5b=-0x2122+-0x248*0xe+-0x2*-0x2089,_0x3f0e32=-0x30a+0xd2b*-0x2+-0xbc*-0x28;for(let _0x523d36=-0x5b3*0x1+-0xfed+0x15a0;_0x523d36<_0x2d1aeb['\x6c\x65\x6e\x67\x74\x68'];_0x523d36++){_0x575a5b=(_0x575a5b+(-0xba*0x31+-0x13d5+0x3770))%(0x68*-0x16+-0x9*0x2f+-0x17*-0x81),_0x3f0e32=(_0x3f0e32+_0x263a3a[_0x575a5b])%(-0x1c77+0xa*0x19a+-0xb*-0x139),_0x5fcccd=_0x263a3a[_0x575a5b],_0x263a3a[_0x575a5b]=_0x263a3a[_0x3f0e32],_0x263a3a[_0x3f0e32]=_0x5fcccd,_0x24f2df+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x2d1aeb['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x523d36)^_0x263a3a[(_0x263a3a[_0x575a5b]+_0x263a3a[_0x3f0e32])%(0x19bf+0x1*-0x2608+-0x13*-0xb3)]);}return _0x24f2df;};_0x1853['\x47\x53\x68\x42\x56\x42']=_0x27823e,_0x1853['\x64\x61\x42\x46\x5a\x41']={},_0x1853['\x6f\x50\x4c\x4e\x47\x55']=!![];}const _0x102635=_0x6d10f4[0xcab+0x434*0x5+0x21af*-0x1],_0x49a221=_0x3a3cb6+_0x102635,_0x2a0405=_0x1853['\x64\x61\x42\x46\x5a\x41'][_0x49a221];return!_0x2a0405?(_0x1853['\x47\x78\x57\x68\x64\x65']===undefined&&(_0x1853['\x47\x78\x57\x68\x64\x65']=!![]),_0x599ed4=_0x1853['\x47\x53\x68\x42\x56\x42'](_0x599ed4,_0x2c3255),_0x1853['\x64\x61\x42\x46\x5a\x41'][_0x49a221]=_0x599ed4):_0x599ed4=_0x2a0405,_0x599ed4;}export function preStopChecks(_0x1d5c8e){const _0x5bb7d9=_0x1853,_0x1a02bc=[],_0x4d3279=_0x1d5c8e[_0x5bb7d9(0x1c4,'\x42\x36\x40\x69')][_0x5bb7d9(0x19b,'\x4d\x53\x5a\x78')+_0x5bb7d9(0x194,'\x53\x69\x24\x53')](_0x5bb7d9(0x1ad,'\x49\x32\x53\x68')+'\x74'),_0x4f9165=_0x1d5c8e[_0x5bb7d9(0x1c5,'\x28\x4c\x66\x24')+'\x64\x65']===_0x5bb7d9(0x196,'\x50\x53\x53\x6d');if(!_0x4f9165&&_0x4d3279>0x1*-0x2641+0x6*0x589+0x50b)_0x1a02bc[_0x5bb7d9(0x1a0,'\x63\x38\x71\x33')](_0x4d3279+(_0x5bb7d9(0x1a2,'\x57\x26\x53\x5d')+_0x5bb7d9(0x1b7,'\x72\x73\x66\x5b')+_0x5bb7d9(0x1b8,'\x39\x36\x48\x44')+'\x20\u987b\x20\x64\x72\x61\x69\x6e'+_0x5bb7d9(0x1a7,'\x29\x79\x43\x49')));const _0x46ea59=_0x1d5c8e[_0x5bb7d9(0x1c3,'\x53\x69\x24\x53')]-_0x1d5c8e[_0x5bb7d9(0x1bc,'\x78\x6d\x71\x33')+'\x65\x41\x74'];if(_0x1d5c8e[_0x5bb7d9(0x1ce,'\x6c\x25\x6a\x33')+'\x4d\x73']!==undefined&&_0x46ea59>_0x1d5c8e[_0x5bb7d9(0x1a3,'\x78\x6d\x71\x33')+'\x4d\x73'])_0x1a02bc[_0x5bb7d9(0x1ba,'\x42\x36\x40\x69')](_0x5bb7d9(0x1c8,'\x42\x36\x40\x69')+_0x5bb7d9(0x1d4,'\x5a\x69\x40\x66')+Math[_0x5bb7d9(0x1a4,'\x63\x38\x71\x33')](_0x46ea59/(-0x217d*0x1+0x225b+0x30a))+(_0x5bb7d9(0x198,'\x68\x59\x45\x67')+'\u6b7b\x29'));return{'\x73\x61\x66\x65':_0x1a02bc[_0x5bb7d9(0x199,'\x53\x69\x24\x53')]===-0x6b4+-0x864+0x1c*0x8a,'\x69\x73\x73\x75\x65\x73':_0x1a02bc,'\x69\x6e\x46\x6c\x69\x67\x68\x74':_0x4d3279,'\x73\x68\x61\x64\x6f\x77\x50\x69\x6e\x6e\x65\x64':_0x4f9165};}function _0x1142(){const _0x3337f9=['\x73\x53\x6b\x4f\x61\x66\x33\x64\x4c\x32\x52\x63\x55\x53\x6f\x4c\x6b\x43\x6b\x41','\x45\x38\x6f\x58\x57\x52\x37\x63\x48\x57','\x57\x52\x70\x64\x53\x43\x6b\x33\x57\x52\x69\x64\x57\x52\x58\x4d\x57\x50\x47','\x57\x35\x47\x44\x43\x6d\x6f\x53\x57\x51\x74\x63\x49\x73\x37\x63\x49\x59\x6d\x56\x57\x34\x5a\x63\x4b\x47','\x66\x6d\x6f\x34\x74\x4a\x5a\x64\x4b\x68\x5a\x63\x54\x6d\x6f\x4a','\x57\x35\x56\x64\x4d\x5a\x4c\x6a','\x57\x4f\x54\x67\x6e\x53\x6f\x36\x57\x36\x74\x64\x49\x49\x6c\x63\x53\x71','\x57\x37\x68\x64\x55\x6d\x6f\x56\x79\x57','\x57\x35\x37\x64\x51\x4c\x4f\x5a','\x57\x51\x35\x6d\x57\x37\x4a\x63\x53\x38\x6f\x36\x57\x35\x62\x47\x68\x30\x69','\x70\x30\x39\x31\x57\x51\x5a\x4c\x54\x42\x76\x66','\x78\x73\x37\x64\x4d\x72\x79\x74\x57\x4f\x74\x63\x4b\x64\x61','\x57\x34\x68\x63\x4b\x53\x6b\x2b\x57\x34\x5a\x64\x52\x78\x62\x65\x68\x47\x37\x64\x4f\x71','\x57\x35\x4b\x65\x57\x50\x70\x64\x54\x4a\x70\x64\x4a\x53\x6b\x70\x6b\x71','\x73\x5a\x70\x63\x4a\x68\x52\x64\x4f\x38\x6b\x67\x74\x53\x6b\x53\x67\x38\x6b\x54\x78\x43\x6b\x6f\x57\x51\x79','\x57\x35\x75\x68\x57\x50\x4c\x33\x79\x59\x6a\x44\x6a\x53\x6b\x79\x77\x53\x6b\x73\x73\x53\x6f\x63','\x57\x35\x2f\x64\x4a\x5a\x35\x75\x57\x35\x34','\x57\x51\x34\x6f\x57\x52\x7a\x33\x43\x4c\x5a\x4d\x4e\x42\x68\x50\x48\x51\x34','\x65\x6d\x6b\x57\x57\x35\x65\x71\x57\x36\x44\x58','\x68\x53\x6f\x4f\x75\x48\x42\x63\x53\x68\x46\x63\x56\x43\x6f\x38\x78\x47','\x6e\x53\x6f\x2f\x35\x50\x45\x30\x35\x79\x45\x68\x35\x79\x73\x74\x46\x45\x45\x75\x4e\x2b\x41\x6d\x51\x47','\x57\x34\x46\x64\x49\x59\x72\x67\x57\x35\x4e\x64\x4b\x57','\x57\x34\x6a\x6b\x6c\x38\x6b\x37\x57\x37\x4a\x64\x4c\x77\x46\x4d\x4e\x36\x4b','\x57\x52\x5a\x64\x53\x43\x6b\x48\x57\x52\x43\x72\x57\x50\x44\x5a\x57\x51\x34','\x57\x34\x4a\x64\x52\x73\x75\x4d\x57\x4f\x5a\x64\x4e\x4e\x34','\x6e\x6d\x6b\x6c\x66\x38\x6b\x71\x57\x52\x53\x66\x44\x6d\x6f\x4f','\x71\x53\x6f\x66\x57\x52\x31\x50\x64\x57','\x68\x65\x52\x64\x49\x71\x35\x4b\x66\x43\x6b\x44\x57\x52\x79','\x78\x43\x6b\x53\x65\x57\x53','\x66\x65\x2f\x64\x48\x43\x6b\x58\x69\x53\x6f\x79\x57\x50\x2f\x63\x49\x61','\x57\x52\x2f\x4d\x4e\x42\x4b\x72\x41\x4e\x42\x64\x4d\x38\x6f\x51\x57\x34\x53','\x57\x36\x30\x62\x57\x51\x39\x6a\x79\x58\x30\x33\x57\x4f\x79','\x78\x38\x6b\x32\x66\x71\x33\x63\x50\x71','\x57\x4f\x62\x38\x61\x38\x6f\x5a\x57\x51\x44\x54\x76\x57\x6a\x77\x57\x50\x56\x63\x52\x78\x71','\x57\x4f\x4e\x64\x4b\x38\x6f\x39\x57\x50\x6d','\x67\x45\x77\x73\x47\x55\x77\x67\x4f\x6f\x77\x64\x53\x4e\x79','\x74\x5a\x70\x63\x49\x4e\x4a\x64\x50\x53\x6b\x63\x6b\x43\x6b\x54\x62\x53\x6b\x65\x41\x43\x6b\x4d','\x71\x53\x6b\x6c\x57\x4f\x6e\x58\x57\x51\x30\x67\x57\x37\x57\x42\x57\x52\x56\x64\x4b\x63\x64\x64\x56\x43\x6f\x52','\x57\x35\x33\x64\x49\x5a\x48\x73\x57\x34\x74\x64\x4c\x62\x79','\x57\x51\x57\x4f\x77\x76\x62\x55\x57\x36\x5a\x64\x49\x43\x6f\x72','\x57\x35\x4b\x58\x57\x4f\x33\x64\x54\x4a\x52\x64\x48\x38\x6b\x64\x6b\x57','\x7a\x53\x6f\x65\x57\x50\x50\x4d\x62\x59\x30\x30\x73\x61','\x57\x36\x53\x79\x57\x52\x4a\x63\x54\x43\x6f\x49\x57\x35\x76\x6a','\x57\x4f\x2f\x63\x55\x67\x72\x49\x57\x35\x70\x63\x47\x63\x61\x6c\x72\x6d\x6f\x53\x74\x4c\x62\x4f','\x67\x38\x6b\x48\x57\x4f\x5a\x63\x4b\x38\x6b\x6c\x44\x43\x6b\x43\x73\x76\x5a\x64\x50\x43\x6f\x54','\x42\x73\x2f\x64\x4b\x66\x69\x44\x57\x51\x70\x64\x4b\x71','\x57\x4f\x70\x64\x48\x43\x6f\x69\x57\x34\x79','\x57\x34\x53\x44\x57\x4f\x71','\x65\x43\x6b\x4e\x57\x36\x4a\x64\x50\x38\x6f\x45\x7a\x38\x6b\x70\x46\x71','\x42\x62\x74\x64\x55\x58\x75\x6b','\x57\x36\x42\x63\x52\x53\x6f\x4c\x57\x36\x48\x74\x57\x4f\x6a\x39\x57\x50\x58\x43\x57\x35\x6a\x30','\x57\x51\x33\x64\x54\x4e\x33\x64\x4d\x4e\x4a\x4d\x54\x42\x70\x4d\x47\x52\x68\x4d\x4e\x36\x61','\x35\x41\x36\x56\x35\x4f\x51\x6b\x46\x45\x41\x38\x54\x55\x77\x44\x4e\x45\x77\x55\x50\x55\x77\x65\x4d\x49\x30','\x57\x34\x78\x63\x4f\x53\x6f\x64\x74\x43\x6b\x76\x45\x71','\x63\x66\x78\x64\x4c\x43\x6b\x59','\x42\x43\x6b\x4f\x57\x35\x52\x63\x4f\x6d\x6b\x34','\x57\x36\x57\x62\x57\x51\x72\x55\x71\x61\x34\x59\x57\x50\x43','\x57\x4f\x33\x63\x56\x47\x69\x71\x57\x4f\x42\x64\x54\x68\x71\x77','\x70\x6d\x6b\x43\x72\x71\x71\x79','\x57\x35\x4f\x72\x57\x50\x70\x64\x52\x64\x47','\x75\x6d\x6f\x50\x57\x4f\x7a\x67\x57\x37\x54\x58\x71\x5a\x37\x64\x53\x61\x4f','\x57\x34\x30\x7a\x57\x50\x78\x64\x49\x49\x37\x64\x4a\x6d\x6b\x75\x61\x71','\x57\x34\x78\x64\x4e\x49\x46\x63\x4c\x53\x6f\x70\x57\x34\x34\x77\x71\x57','\x57\x34\x78\x64\x47\x74\x30','\x63\x31\x74\x64\x49\x43\x6b\x4f\x69\x71','\x57\x34\x6d\x66\x75\x6d\x6f\x42\x75\x66\x33\x63\x49\x38\x6b\x71','\x41\x6d\x6f\x64\x57\x52\x66\x76\x67\x63\x65\x48\x7a\x71','\x57\x50\x2f\x63\x4e\x68\x47\x78\x57\x50\x4a\x63\x49\x58\x65\x52\x57\x35\x50\x58\x57\x4f\x62\x78','\x63\x4b\x2f\x64\x49\x43\x6b\x55\x67\x38\x6f\x75\x57\x4f\x78\x63\x49\x61','\x57\x52\x71\x79\x57\x51\x7a\x37\x43\x63\x57\x62'];_0x1142=function(){return _0x3337f9;};return _0x1142();}export function verifyDeployEnv(_0x3ce9ec){const _0x2fca32=_0x1853,_0x10d79d=[];if(!_0x3ce9ec[_0x2fca32(0x1c1,'\x5b\x59\x6c\x35')+_0x2fca32(0x1b3,'\x5b\x59\x6c\x35')])_0x10d79d[_0x2fca32(0x1d1,'\x5d\x5e\x39\x6f')](_0x2fca32(0x19f,'\x61\x71\x25\x5d')+_0x2fca32(0x195,'\x78\x6d\x71\x33'));if(!_0x3ce9ec[_0x2fca32(0x1c6,'\x49\x32\x53\x68')+_0x2fca32(0x1b2,'\x45\x37\x6a\x70')])_0x10d79d[_0x2fca32(0x1a6,'\x71\x29\x61\x62')](_0x2fca32(0x1d0,'\x41\x63\x76\x4d')+_0x2fca32(0x19a,'\x41\x63\x76\x4d')+'\u914d');if(!_0x3ce9ec[_0x2fca32(0x1a1,'\x42\x36\x40\x69')+_0x2fca32(0x1ac,'\x5b\x59\x6c\x35')])_0x10d79d[_0x2fca32(0x1cf,'\x53\x69\x24\x53')](_0x2fca32(0x1c2,'\x53\x69\x24\x53')+_0x2fca32(0x1cc,'\x4d\x53\x5a\x78')+'\x20\u4e0d\u5bf9\u9f50');return{'\x6f\x6b':_0x10d79d[_0x2fca32(0x1b9,'\x6a\x78\x64\x42')]===0x1c99+0xb70+-0x1*0x2809,'\x66\x61\x69\x6c\x75\x72\x65\x73':_0x10d79d};}
@@ -1,178 +1 @@
1
- import { existsSync, readFileSync } from 'node:fs';
2
- import { homedir } from 'node:os';
3
- import { dirname, isAbsolute, join } from 'node:path';
4
- import { fileURLToPath } from 'node:url';
5
- /**
6
- * Hub nodeId shape; mirror of v1 `src/gep/a2aProtocol.js` NODE_ID_RE so a
7
- * malformed legacy file can never feed garbage onto the hello wire.
8
- */
9
- const NODE_ID_RE = /^node_[a-f0-9]{12,32}$/;
10
- const PROXY_PACKAGE_NAME = '@evomap/evolver-proxy';
11
- const OUTER_INSTALL_PACKAGE_NAMES = new Set(['@evomap/evolver', 'evolver-v2']);
12
- const MAX_PACKAGE_ROOT_DEPTH = 8;
13
- const _moduleDir = dirname(fileURLToPath(import.meta.url));
14
- function cleanAbsolutePath(value) {
15
- const trimmed = value?.trim();
16
- if (!trimmed)
17
- return undefined;
18
- return isAbsolute(trimmed) ? trimmed : undefined;
19
- }
20
- // Identity homes in probe order (#555 T2): the explicit test/caller override wins outright; otherwise
21
- // EVOMAP_HOME (THE identity home) outranks EVOLVER_HOME (the state root) so the evox agentDir split
22
- // (`--evomap-home <agentDir>/evomap` + `--home <agentDir>/evolver`) reads node files from the evomap dir.
23
- // legacyNodeIdCandidates() splices that explicit identity home ahead of EVOMAP_DIR so node_id and
24
- // node_secret cannot come from different halves of the split layout. Both homes stay in the candidate union,
25
- // so single-home setups resolve exactly as before.
26
- function identityHomeCandidates(opts, fallbackHomeDir) {
27
- const fromOpts = cleanAbsolutePath(opts.evomapHomeDir);
28
- if (fromOpts !== undefined)
29
- return [fromOpts];
30
- const homes = [
31
- cleanAbsolutePath(process.env['EVOMAP_HOME']),
32
- cleanAbsolutePath(process.env['EVOLVER_HOME']),
33
- ].filter((value) => value !== undefined);
34
- if (homes.length > 0)
35
- return homes;
36
- return fallbackHomeDir === undefined ? [] : [join(fallbackHomeDir, '.evomap')];
37
- }
38
- function packageNameAt(dir) {
39
- const pkgPath = join(dir, 'package.json');
40
- if (!existsSync(pkgPath))
41
- return undefined;
42
- try {
43
- const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
44
- return typeof pkg.name === 'string' ? pkg.name : undefined;
45
- }
46
- catch {
47
- return undefined;
48
- }
49
- }
50
- function installRootNodeIdCandidates(moduleDir) {
51
- const candidates = [];
52
- let dir = moduleDir;
53
- let sawProxyPackage = false;
54
- for (let depth = 0; depth < MAX_PACKAGE_ROOT_DEPTH; depth += 1) {
55
- const name = packageNameAt(dir);
56
- if (name !== undefined) {
57
- if (name === PROXY_PACKAGE_NAME)
58
- sawProxyPackage = true;
59
- if (name === PROXY_PACKAGE_NAME || (sawProxyPackage && OUTER_INSTALL_PACKAGE_NAMES.has(name))) {
60
- candidates.push(join(dir, '.evomap_node_id'));
61
- }
62
- }
63
- const parent = dirname(dir);
64
- if (parent === dir)
65
- break;
66
- dir = parent;
67
- }
68
- return candidates;
69
- }
70
- /**
71
- * Legacy node_id file locations, in priority order. Mirror of v1
72
- * `_loadPersistedNodeId`:
73
- *
74
- * 0. `<EVOMAP_HOME>/node_id` — when an explicit identity home is configured, it
75
- * must precede every state-root candidate. The legacy node_secret resolver uses
76
- * the same priority, keeping both credentials on one identity in split layouts.
77
- * 1. `<EVOMAP_DIR>/node_id` — the explicit dir the CLI recipe / ATP / proxy
78
- * anti-abuse code write under (`recipeHomeCandidates` puts EVOMAP_DIR ahead
79
- * of EVOLVER_HOME/EVOMAP_HOME). `resolveEvomapHome` never consults EVOMAP_DIR,
80
- * so a deployment that pivots on it would otherwise send no node_id on hello
81
- * and let the hub mint a duplicate. It remains first when EVOMAP_HOME is not
82
- * configured, preserving the existing EVOMAP_DIR-only contract. Deduped.
83
- * 2. `<EVOLVER_HOME>/node_id` — the state-home compatibility candidate, kept
84
- * after the identity roots so readers still walk every dir a writer may have used.
85
- * 3. `~/.evomap/node_id` — the UNCONDITIONAL v1 location. v1's writer pivots on
86
- * `getEvomapDir` = `EVOLVER_HOME || ~/.evomap` and ignores EVOMAP_HOME
87
- * entirely, so unless EVOLVER_HOME was set a v1 file always physically lands
88
- * here. We probe it explicitly so a v2 install that sets only EVOMAP_HOME
89
- * (which steers candidate 1 away from `~/.evomap`) still recovers the v1
90
- * identity instead of letting the hub mint a duplicate orphan node. Deduped
91
- * against candidate 1 for the common no-override case where they coincide.
92
- * 4. `<proxy package>/.evomap_node_id` — the install-root file the writer falls
93
- * back to when `~/.evomap/` isn't writable (read-only $HOME in
94
- * containers / restricted CI). Kept first for parity with the old v2
95
- * candidate.
96
- * 5. `<outer package/workspace root>/.evomap_node_id` — the v1/outer install
97
- * root fallback. In v2's multi-package layout the proxy code lives below
98
- * `packages/evolver-proxy`, so only checking the proxy package root misses
99
- * a file written at the install/workspace root.
100
- *
101
- * Resolved on every call rather than cached at module load: env and `homedir()`
102
- * are read at call time, so caching would freeze the home path and silently
103
- * ignore a later EVOLVER_HOME/EVOMAP_HOME change (this is also how the tests
104
- * point it at a tmp dir). The install-root paths use a bounded package.json walk
105
- * from the module dir so source and dist layouts both work.
106
- */
107
- export function legacyNodeIdCandidates(opts = {}) {
108
- const home = cleanAbsolutePath(opts.homeDir) ?? cleanAbsolutePath(homedir());
109
- const moduleDir = opts.moduleDir ?? _moduleDir;
110
- const evomapHomes = identityHomeCandidates(opts, home);
111
- const identityHome = cleanAbsolutePath(opts.evomapHomeDir)
112
- ?? cleanAbsolutePath(process.env['EVOMAP_HOME']);
113
- const evomapDir = cleanAbsolutePath(opts.evomapDir) ?? cleanAbsolutePath(process.env['EVOMAP_DIR']);
114
- return [
115
- ...new Set([
116
- ...(identityHome === undefined ? [] : [join(identityHome, 'node_id')]),
117
- ...(evomapDir === undefined ? [] : [join(evomapDir, 'node_id')]),
118
- ...evomapHomes
119
- .filter((dir) => dir !== identityHome)
120
- .map((dir) => join(dir, 'node_id')),
121
- ...(home === undefined ? [] : [join(home, '.evomap', 'node_id')]),
122
- ...installRootNodeIdCandidates(moduleDir),
123
- ]),
124
- ];
125
- }
126
- /**
127
- * Recover a node_id persisted by the legacy v1 GEP path. Returns the first
128
- * candidate file whose trimmed contents match NODE_ID_RE, else `undefined`.
129
- *
130
- * Why this exists (PORT v1 #117): v2 resolves the wire node_id as
131
- * `store.node_id ?? EVOMAP_NODE_ID/A2A_NODE_ID`. When BOTH are empty the
132
- * `/a2a/hello` payload carries no `node_id` and the hub MINTS A FRESH A2ANode,
133
- * which the lifecycle manager then persists. So any install whose mailbox
134
- * store was created (or wiped) after a v1 `~/.evomap/node_id` already existed —
135
- * an upgrade from a pre-lifecycle version, or a partial recovery flow —
136
- * silently registers a brand-new node under the same owner on the very next
137
- * daemon boot, abandoning the original record (with its stake / reputation /
138
- * aliases) as an orphan in the web UI. Reading the legacy file between the
139
- * store/env lookup and the hub mint keeps both code paths agreeing on a single
140
- * identity.
141
- */
142
- export function readLegacyNodeId(opts = {}) {
143
- const candidates = opts.candidates ?? legacyNodeIdCandidates(opts);
144
- for (const file of candidates) {
145
- try {
146
- if (!existsSync(file))
147
- continue;
148
- const raw = readFileSync(file, 'utf8').trim();
149
- if (NODE_ID_RE.test(raw))
150
- return raw;
151
- }
152
- catch {
153
- // Unreadable / racing writer — try the next location.
154
- }
155
- }
156
- return undefined;
157
- }
158
- /**
159
- * Resolve the node_id the proxy presents on the wire, in priority order:
160
- * persisted store value → operator env override → recovered legacy file →
161
- * `undefined` (the hub mints a fresh id on hello). An explicit env override
162
- * outranks the legacy file because the operator set it deliberately.
163
- *
164
- * The legacy read only fires while the store is unprimed AND no env override
165
- * is set — the first-boot window before a successful hello persists an id.
166
- * Already-registered nodes short-circuit on the store value and never touch
167
- * the filesystem.
168
- *
169
- * Empty / whitespace store and env values are normalised to `undefined` first:
170
- * `??` alone treats `''` as a present value, so a blank `EVOMAP_NODE_ID=` (or a
171
- * store cleared to `''`) would otherwise suppress legacy recovery and put a
172
- * blank id on the wire — the exact orphan-node failure this module prevents.
173
- */
174
- export function resolveProxyNodeId(opts) {
175
- const stored = opts.storedNodeId?.trim() || undefined;
176
- const configured = opts.configuredNodeId?.trim() || undefined;
177
- return stored ?? configured ?? (opts.readLegacy ?? readLegacyNodeId)();
178
- }
1
+ const _0x13dc89=_0x4beb;function _0x4beb(_0x624195,_0x93fc09){_0x624195=_0x624195-(0x95b+-0x994*0x2+-0x25*-0x4b);const _0x5df3d9=_0xdf74();let _0xc51b92=_0x5df3d9[_0x624195];if(_0x4beb['\x7a\x53\x53\x78\x5a\x53']===undefined){var _0x13eab6=function(_0x2e842b){const _0x41a798='\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 _0x4bc14d='',_0x57670f='';for(let _0x25d27a=-0x613+0x2304+-0x1cf1,_0x5190d0,_0x3a7029,_0x40ab4c=0x1eef+-0x2285*0x1+-0x1b*-0x22;_0x3a7029=_0x2e842b['\x63\x68\x61\x72\x41\x74'](_0x40ab4c++);~_0x3a7029&&(_0x5190d0=_0x25d27a%(0xb18+0x19e7+0x1*-0x24fb)?_0x5190d0*(-0x13a6+0xb07+0x8df)+_0x3a7029:_0x3a7029,_0x25d27a++%(0x1a55+0x2452+-0x3ea3))?_0x4bc14d+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0xee8+-0x20e5+0x30cc*0x1&_0x5190d0>>(-(0x3f1*0x1+-0x1*-0x1aa3+0x45e*-0x7)*_0x25d27a&-0x5*-0x8b+0x1*0x18f8+-0x1ba9)):-0x22d1+-0x261b+0x167*0x34){_0x3a7029=_0x41a798['\x69\x6e\x64\x65\x78\x4f\x66'](_0x3a7029);}for(let _0x5f45e6=0xc42+-0x636*-0x4+-0x251a,_0x5c3117=_0x4bc14d['\x6c\x65\x6e\x67\x74\x68'];_0x5f45e6<_0x5c3117;_0x5f45e6++){_0x57670f+='\x25'+('\x30\x30'+_0x4bc14d['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5f45e6)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x1*-0xb2+-0x24ff+0x245d))['\x73\x6c\x69\x63\x65'](-(0x183b*-0x1+0x4*-0x7b5+0x3711));}return decodeURIComponent(_0x57670f);};const _0x3ca1a8=function(_0x298063,_0xec8f90){let _0x2543a6=[],_0x43d4f7=-0x1c3*-0x1+0x3*0x96d+-0x2*0xf05,_0x155480,_0x102708='';_0x298063=_0x13eab6(_0x298063);let _0x2a5fdf;for(_0x2a5fdf=0x13c8+0x23*0xe2+0x1f3*-0x1a;_0x2a5fdf<0x1*0x15c5+0x51b+-0x170*0x12;_0x2a5fdf++){_0x2543a6[_0x2a5fdf]=_0x2a5fdf;}for(_0x2a5fdf=-0x1f8d*0x1+-0x118d*-0x1+0xe00;_0x2a5fdf<-0xd9c+-0x1084*-0x2+-0x189*0xc;_0x2a5fdf++){_0x43d4f7=(_0x43d4f7+_0x2543a6[_0x2a5fdf]+_0xec8f90['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2a5fdf%_0xec8f90['\x6c\x65\x6e\x67\x74\x68']))%(-0x164+0x66a*0x1+-0x5*0xce),_0x155480=_0x2543a6[_0x2a5fdf],_0x2543a6[_0x2a5fdf]=_0x2543a6[_0x43d4f7],_0x2543a6[_0x43d4f7]=_0x155480;}_0x2a5fdf=-0x1537+-0x1157+0x268e,_0x43d4f7=0x2562+0x173d+-0x3c9f;for(let _0xc3fe4c=-0xabd+0x40a+0x7*0xf5;_0xc3fe4c<_0x298063['\x6c\x65\x6e\x67\x74\x68'];_0xc3fe4c++){_0x2a5fdf=(_0x2a5fdf+(0xade+0x1e48+-0x2925))%(-0x1*0xb48+0x1*0x942+0x3*0x102),_0x43d4f7=(_0x43d4f7+_0x2543a6[_0x2a5fdf])%(0x1*0x1a4d+-0xf0f*0x1+-0xa3e),_0x155480=_0x2543a6[_0x2a5fdf],_0x2543a6[_0x2a5fdf]=_0x2543a6[_0x43d4f7],_0x2543a6[_0x43d4f7]=_0x155480,_0x102708+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x298063['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xc3fe4c)^_0x2543a6[(_0x2543a6[_0x2a5fdf]+_0x2543a6[_0x43d4f7])%(-0x2*-0xc73+-0x22*0x125+-0x4*-0x3c1)]);}return _0x102708;};_0x4beb['\x4a\x78\x68\x4f\x53\x6d']=_0x3ca1a8,_0x4beb['\x64\x6a\x68\x75\x57\x51']={},_0x4beb['\x7a\x53\x53\x78\x5a\x53']=!![];}const _0x12bb0f=_0x5df3d9[-0xe*-0xd3+-0x10*0x194+0x1e*0x75],_0x31c9f3=_0x624195+_0x12bb0f,_0x10d92f=_0x4beb['\x64\x6a\x68\x75\x57\x51'][_0x31c9f3];return!_0x10d92f?(_0x4beb['\x65\x45\x49\x56\x72\x42']===undefined&&(_0x4beb['\x65\x45\x49\x56\x72\x42']=!![]),_0xc51b92=_0x4beb['\x4a\x78\x68\x4f\x53\x6d'](_0xc51b92,_0x93fc09),_0x4beb['\x64\x6a\x68\x75\x57\x51'][_0x31c9f3]=_0xc51b92):_0xc51b92=_0x10d92f,_0xc51b92;}(function(_0x462918,_0x30fdcd){const _0x247da7=_0x4beb,_0x44edfc=_0x462918();while(!![]){try{const _0x326c81=-parseInt(_0x247da7(0x139,'\x30\x67\x28\x21'))/(-0xccb*-0x1+0x12ce+0x8*-0x3f3)*(parseInt(_0x247da7(0x13d,'\x44\x5e\x5e\x26'))/(0x12dc+0x1ad2+0x25*-0x13c))+-parseInt(_0x247da7(0x11f,'\x44\x4a\x78\x6a'))/(0x1*-0x20d1+-0x506+0x13*0x1fe)+-parseInt(_0x247da7(0x10b,'\x67\x42\x45\x5a'))/(0xb*0x267+0x10*0xde+0x1*-0x2849)*(parseInt(_0x247da7(0x11b,'\x74\x46\x31\x47'))/(-0x9a+0x8f5+0x1*-0x856))+-parseInt(_0x247da7(0x10f,'\x5b\x4e\x65\x29'))/(-0xb44+-0x216+0xd60)+parseInt(_0x247da7(0x10a,'\x28\x4a\x53\x78'))/(0x1211*-0x1+0x2445+-0x122d)*(parseInt(_0x247da7(0x130,'\x37\x68\x40\x48'))/(-0x22a0+0x25a5+-0x2fd))+-parseInt(_0x247da7(0x12c,'\x45\x36\x29\x41'))/(0x2705+-0x1*-0xcd9+-0x33d5)+parseInt(_0x247da7(0x155,'\x53\x26\x51\x29'))/(-0x8e0+-0x9*-0x3e2+0xe*-0x1dc);if(_0x326c81===_0x30fdcd)break;else _0x44edfc['push'](_0x44edfc['shift']());}catch(_0x2c48ba){_0x44edfc['push'](_0x44edfc['shift']());}}}(_0xdf74,-0x1*-0x60e26+-0x148d*-0x3a+-0x794b9));import{existsSync,readFileSync}from'\x6e\x6f\x64\x65\x3a\x66\x73';import{homedir}from'\x6e\x6f\x64\x65\x3a\x6f\x73';import{dirname,isAbsolute,join}from'\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68';function _0xdf74(){const _0x3e8a42=['\x57\x35\x75\x59\x66\x47\x7a\x77\x57\x35\x7a\x43\x62\x43\x6f\x37\x62\x71\x6d','\x57\x50\x6e\x51\x44\x6d\x6b\x75','\x57\x36\x46\x64\x55\x76\x71\x56\x68\x4a\x57\x69\x57\x37\x53','\x57\x37\x70\x64\x4d\x38\x6b\x2f\x57\x36\x34','\x57\x34\x6e\x79\x57\x37\x66\x56','\x62\x67\x6e\x43\x57\x37\x70\x64\x4c\x38\x6b\x7a\x71\x49\x71','\x7a\x31\x72\x5a\x6d\x38\x6f\x6d\x57\x35\x53\x6c\x57\x35\x69','\x57\x37\x42\x64\x56\x76\x69\x56','\x43\x43\x6f\x34\x57\x50\x69\x6e\x57\x37\x53\x6b\x6d\x6d\x6f\x50','\x57\x51\x6c\x63\x4e\x32\x5a\x64\x49\x43\x6b\x41\x57\x34\x4f','\x57\x50\x62\x4c\x71\x4c\x71\x55\x57\x37\x54\x34\x66\x47','\x57\x52\x7a\x2f\x57\x35\x56\x64\x4a\x38\x6f\x75\x57\x36\x39\x61\x57\x50\x43','\x57\x52\x44\x38\x57\x36\x35\x5a\x41\x53\x6b\x6c\x57\x37\x30','\x57\x37\x78\x64\x51\x76\x33\x64\x4a\x53\x6b\x2b\x6a\x63\x5a\x63\x53\x71\x2f\x63\x56\x43\x6f\x6c\x62\x72\x4b','\x57\x37\x57\x4f\x6d\x6d\x6b\x50\x79\x4d\x30','\x6a\x63\x44\x77\x41\x6d\x6b\x39\x57\x36\x4f\x72','\x57\x35\x74\x63\x56\x6d\x6f\x61\x41\x61\x74\x64\x51\x38\x6f\x52\x57\x35\x38','\x57\x35\x5a\x63\x50\x43\x6f\x6c\x43\x72\x37\x64\x51\x38\x6f\x44','\x66\x32\x4e\x64\x48\x53\x6f\x4d\x61\x62\x47\x56\x57\x37\x71\x6b\x57\x37\x6d','\x57\x4f\x56\x63\x4b\x6d\x6b\x31\x57\x37\x52\x64\x4f\x32\x56\x64\x4d\x38\x6b\x6c\x57\x37\x6c\x64\x50\x6d\x6f\x77','\x68\x5a\x69\x51\x57\x35\x6a\x4d\x57\x4f\x6d\x31','\x67\x4a\x4c\x58\x67\x4c\x34','\x57\x34\x5a\x63\x50\x38\x6f\x63\x6a\x71','\x78\x4d\x47\x58\x41\x61\x68\x64\x53\x30\x79\x2b\x57\x51\x58\x34\x69\x6d\x6f\x50','\x45\x57\x64\x64\x4a\x49\x42\x64\x55\x76\x6e\x43\x74\x75\x65\x4a','\x6d\x72\x75\x54\x42\x43\x6f\x4f\x57\x37\x57\x6e\x57\x52\x6e\x4e\x57\x50\x61','\x43\x73\x78\x63\x4a\x6d\x6b\x48','\x57\x35\x64\x63\x4f\x43\x6f\x6b\x44\x62\x65','\x71\x58\x70\x64\x4c\x57\x44\x74\x57\x50\x70\x63\x54\x63\x38','\x57\x51\x64\x63\x4c\x77\x42\x64\x49\x38\x6b\x58\x57\x34\x56\x63\x53\x61','\x57\x35\x4a\x63\x53\x72\x79\x67\x79\x59\x53\x54\x69\x71','\x57\x4f\x4c\x33\x45\x43\x6b\x43\x65\x38\x6f\x55\x73\x57','\x57\x36\x69\x39\x6d\x47','\x61\x47\x71\x50\x74\x71','\x57\x37\x56\x63\x55\x4a\x37\x63\x54\x38\x6f\x6f\x45\x30\x75','\x57\x52\x31\x50\x69\x38\x6b\x56\x73\x78\x4a\x64\x4f\x5a\x38','\x57\x51\x37\x63\x52\x32\x4b','\x57\x51\x4a\x63\x4f\x78\x34\x31\x57\x50\x30\x75\x57\x51\x65','\x57\x35\x2f\x63\x55\x53\x6f\x69\x41\x71\x33\x64\x56\x61','\x78\x65\x68\x63\x4c\x66\x30\x70\x57\x34\x64\x63\x51\x62\x4c\x30\x46\x78\x35\x50','\x57\x36\x2f\x64\x51\x4e\x38\x52\x64\x71','\x74\x38\x6b\x4c\x61\x43\x6f\x64\x45\x53\x6b\x72','\x57\x34\x76\x70\x57\x4f\x70\x64\x54\x67\x68\x63\x48\x76\x4b\x7a\x57\x34\x35\x76\x6a\x38\x6f\x37\x61\x61','\x66\x6d\x6b\x77\x46\x38\x6b\x4e\x57\x52\x75\x61\x6b\x43\x6f\x65','\x41\x67\x78\x63\x4b\x47\x52\x63\x48\x43\x6b\x6f\x43\x47','\x6c\x62\x64\x64\x4c\x33\x53','\x57\x37\x31\x38\x75\x38\x6b\x68\x57\x37\x79\x79','\x42\x71\x62\x56\x70\x59\x70\x64\x51\x43\x6b\x33\x57\x36\x79','\x57\x35\x74\x63\x54\x53\x6f\x47\x44\x62\x4f','\x46\x43\x6f\x54\x69\x49\x58\x45\x66\x38\x6f\x6a\x57\x50\x4f','\x6e\x58\x31\x78\x57\x52\x75','\x57\x51\x74\x64\x4e\x65\x44\x6e\x79\x30\x6d\x53','\x57\x35\x61\x34\x65\x47\x76\x74\x57\x51\x4f\x50\x61\x53\x6f\x64\x65\x5a\x66\x30\x70\x61','\x57\x36\x48\x30\x64\x43\x6b\x58\x69\x71','\x6e\x48\x74\x64\x49\x77\x4f','\x57\x35\x64\x64\x48\x38\x6f\x55\x57\x51\x56\x63\x4f\x30\x53','\x6d\x5a\x33\x64\x4a\x4c\x33\x63\x4b\x38\x6b\x4c\x44\x6d\x6f\x51\x7a\x77\x34','\x77\x30\x37\x63\x4b\x31\x47\x69\x57\x34\x56\x64\x54\x64\x4c\x70\x71\x78\x58\x6e\x57\x36\x38','\x57\x37\x4f\x4f\x6a\x6d\x6f\x34','\x6e\x72\x64\x64\x4f\x67\x42\x63\x4f\x57','\x6e\x71\x57\x4f\x42\x43\x6f\x38\x57\x50\x38','\x57\x50\x6c\x64\x50\x38\x6f\x39\x42\x43\x6b\x6b\x43\x5a\x43\x74','\x43\x43\x6f\x34\x57\x50\x69\x6d\x57\x36\x57\x46\x63\x53\x6b\x52','\x57\x36\x33\x64\x4a\x38\x6b\x48\x57\x36\x6d','\x6c\x31\x33\x63\x4d\x32\x64\x64\x4d\x4b\x4b','\x57\x51\x31\x37\x6c\x43\x6f\x4b\x73\x68\x72\x46\x46\x6d\x6b\x63\x57\x50\x52\x64\x4a\x57','\x57\x50\x44\x51\x43\x53\x6b\x62\x6e\x71','\x6c\x66\x64\x63\x55\x78\x56\x64\x4d\x31\x35\x75\x79\x71','\x57\x36\x68\x64\x52\x4c\x75\x4d\x66\x49\x47\x54\x57\x36\x79','\x57\x51\x78\x64\x4b\x43\x6b\x64\x57\x34\x69\x35\x57\x37\x34\x57','\x69\x61\x78\x64\x4e\x77\x78\x63\x55\x61','\x6f\x78\x48\x79','\x73\x5a\x5a\x63\x4b\x53\x6b\x58','\x6d\x61\x4f\x51\x46\x38\x6f\x57\x57\x4f\x4f\x33\x57\x37\x38','\x6d\x58\x75\x50\x41\x53\x6b\x6c\x57\x4f\x57\x76\x57\x50\x7a\x44\x57\x50\x72\x61\x57\x37\x65','\x57\x52\x4e\x63\x53\x38\x6b\x43\x6d\x47','\x6d\x53\x6b\x45\x74\x78\x56\x64\x4e\x6d\x6f\x52\x41\x72\x4c\x79\x57\x35\x78\x64\x4b\x4d\x38','\x57\x4f\x39\x33\x43\x6d\x6b\x43\x63\x6d\x6f\x55\x78\x71','\x57\x36\x69\x5a\x6a\x53\x6b\x31\x79\x67\x2f\x64\x56\x4a\x65','\x57\x34\x37\x63\x56\x43\x6f\x34\x7a\x38\x6b\x71\x41\x61\x4f'];_0xdf74=function(){return _0x3e8a42;};return _0xdf74();}import{fileURLToPath}from'\x6e\x6f\x64\x65\x3a\x75\x72\x6c';const NODE_ID_RE=/^node_[a-f0-9]{12,32}$/,PROXY_PACKAGE_NAME=_0x13dc89(0x129,'\x30\x47\x32\x32')+_0x13dc89(0x150,'\x33\x4a\x7a\x41')+_0x13dc89(0x13a,'\x33\x77\x24\x76'),OUTER_INSTALL_PACKAGE_NAMES=new Set(['\x40\x65\x76\x6f\x6d\x61\x70\x2f'+_0x13dc89(0x159,'\x68\x70\x53\x62'),_0x13dc89(0x14e,'\x6a\x74\x39\x72')+'\x76\x32']),MAX_PACKAGE_ROOT_DEPTH=-0x1*-0xf86+-0xd33+-0x24b,_moduleDir=dirname(fileURLToPath(import.meta.url));function cleanAbsolutePath(_0x2030e6){const _0x1bffcf=_0x13dc89,_0x6aafdc=_0x2030e6?.[_0x1bffcf(0x149,'\x33\x77\x24\x76')]();if(!_0x6aafdc)return undefined;return isAbsolute(_0x6aafdc)?_0x6aafdc:undefined;}function identityHomeCandidates(_0x39aa21,_0x234435){const _0x2d03a4=_0x13dc89,_0x5a0079=cleanAbsolutePath(_0x39aa21[_0x2d03a4(0x136,'\x33\x4a\x7a\x41')+_0x2d03a4(0x128,'\x68\x70\x53\x62')]);if(_0x5a0079!==undefined)return[_0x5a0079];const _0x338f5f=[cleanAbsolutePath(process.env['EVOMAP_HOME']),cleanAbsolutePath(process.env['EVOLVER_HOME'])][_0x2d03a4(0x134,'\x50\x6a\x69\x62')](_0x59ada0=>_0x59ada0!==undefined);if(_0x338f5f[_0x2d03a4(0x151,'\x32\x32\x33\x4f')]>-0x103e+-0x1553+0xa3*0x3b)return _0x338f5f;return _0x234435===undefined?[]:[join(_0x234435,_0x2d03a4(0x10c,'\x70\x2a\x50\x25'))];}function packageNameAt(_0x51a88a){const _0x4429e3=_0x13dc89,_0x4efce7=join(_0x51a88a,_0x4429e3(0x14d,'\x43\x49\x61\x37')+_0x4429e3(0x119,'\x59\x35\x41\x71'));if(!existsSync(_0x4efce7))return undefined;try{if(_0x4429e3(0x12d,'\x71\x5e\x62\x25')===_0x4429e3(0x10d,'\x5b\x4e\x65\x29')){const _0xe2b87f=_0x135a32(_0x5e566e[_0x4429e3(0x145,'\x33\x77\x24\x76')])??_0x3c963d(_0x3cf3ab()),_0x42c364=_0x54a649[_0x4429e3(0x158,'\x68\x70\x53\x62')+'\x72']??_0x16d824,_0xe5da23=_0x3939ee(_0x22340a,_0xe2b87f),_0x49462f=_0x21eb5c(_0x3afcec[_0x4429e3(0x153,'\x55\x6e\x49\x4a')+_0x4429e3(0x120,'\x4e\x41\x48\x34')])??_0x5b5d77(_0x2de74e.env['EVOMAP_HOME']),_0x45ab77=_0x3a1fa1(_0x32661f[_0x4429e3(0x116,'\x48\x32\x57\x29')+'\x72'])??_0x54f1ef(_0x38937d.env['EVOMAP_DIR']);return[...new _0x4fca4c([..._0x49462f===_0x1d4f4a?[]:[_0x42c103(_0x49462f,'\x6e\x6f\x64\x65\x5f\x69\x64')],..._0x45ab77===_0x45bb56?[]:[_0x587fdd(_0x45ab77,_0x4429e3(0x157,'\x5e\x77\x30\x36'))],..._0xe5da23[_0x4429e3(0x138,'\x47\x29\x29\x66')](_0x65d8d7=>_0x65d8d7!==_0x49462f)[_0x4429e3(0x13f,'\x6d\x4e\x34\x38')](_0x30f546=>_0x30a95c(_0x30f546,_0x4429e3(0x12b,'\x64\x6f\x32\x61'))),..._0xe2b87f===_0x266f26?[]:[_0x4e13b0(_0xe2b87f,_0x4429e3(0x154,'\x4c\x44\x59\x70'),_0x4429e3(0x11d,'\x41\x73\x65\x40'))],..._0x30ef5(_0x42c364)])];}else{const _0x4a1692=JSON['\x70\x61\x72\x73\x65'](readFileSync(_0x4efce7,_0x4429e3(0x132,'\x74\x46\x31\x47')));return typeof _0x4a1692[_0x4429e3(0x140,'\x28\x4a\x53\x78')]===_0x4429e3(0x126,'\x50\x4c\x5b\x79')?_0x4a1692[_0x4429e3(0x14b,'\x44\x5e\x5e\x26')]:undefined;}}catch{if(_0x4429e3(0x113,'\x68\x70\x53\x62')!==_0x4429e3(0x13e,'\x25\x55\x44\x4f'))return undefined;else{const _0x49f1b2=_0x121da9['\x70\x61\x72\x73\x65'](_0xa0ff78(_0x5a1dd3,_0x4429e3(0x143,'\x6a\x31\x72\x77')));return typeof _0x49f1b2[_0x4429e3(0x12e,'\x25\x55\x44\x4f')]===_0x4429e3(0x156,'\x74\x46\x31\x47')?_0x49f1b2[_0x4429e3(0x12a,'\x35\x5a\x4e\x33')]:_0x48cdac;}}}function installRootNodeIdCandidates(_0x52d075){const _0x199091=_0x13dc89,_0xe5fa35=[];let _0xa2d6c4=_0x52d075,_0x7d16bb=![];for(let _0x1ffc2a=-0xd4*0x8+-0x40*0x3c+0x15a0;_0x1ffc2a<MAX_PACKAGE_ROOT_DEPTH;_0x1ffc2a+=-0x7*-0xe5+-0x306+0x9*-0x5c){if('\x64\x58\x61\x4a\x77'!=='\x69\x51\x49\x6a\x5a'){const _0x598552=packageNameAt(_0xa2d6c4);if(_0x598552!==undefined){if(_0x598552===PROXY_PACKAGE_NAME)_0x7d16bb=!![];(_0x598552===PROXY_PACKAGE_NAME||_0x7d16bb&&OUTER_INSTALL_PACKAGE_NAMES[_0x199091(0x11c,'\x41\x73\x65\x40')](_0x598552))&&_0xe5fa35[_0x199091(0x137,'\x44\x5e\x5e\x26')](join(_0xa2d6c4,_0x199091(0x114,'\x44\x4a\x78\x6a')+_0x199091(0x147,'\x58\x4e\x33\x55')));}const _0x89311f=dirname(_0xa2d6c4);if(_0x89311f===_0xa2d6c4)break;_0xa2d6c4=_0x89311f;}else{const _0x3ce18f=_0x5c0487(_0x2404b9[_0x199091(0x127,'\x57\x33\x5b\x64')+_0x199091(0x133,'\x25\x55\x44\x4f')]);if(_0x3ce18f!==_0x5a425f)return[_0x3ce18f];const _0x5002bf=[_0x1b0de2(_0x1d7e99.env['EVOMAP_HOME']),_0x78a864(_0x27f8d7.env['EVOLVER_HOME'])][_0x199091(0x121,'\x4e\x34\x78\x62')](_0x5e31f4=>_0x5e31f4!==_0x40b57d);if(_0x5002bf[_0x199091(0x12f,'\x67\x42\x45\x5a')]>0x1ca*0x2+0x24fe+-0x2892)return _0x5002bf;return _0x383f68===_0x5dd317?[]:[_0x347fa8(_0x5032d4,'\x2e\x65\x76\x6f\x6d\x61\x70')];}}return _0xe5fa35;}export function legacyNodeIdCandidates(_0x1ff132={}){const _0x365122=_0x13dc89,_0x4dd749=cleanAbsolutePath(_0x1ff132[_0x365122(0x124,'\x37\x68\x40\x48')])??cleanAbsolutePath(homedir()),_0x2fd864=_0x1ff132[_0x365122(0x146,'\x74\x46\x31\x47')+'\x72']??_moduleDir,_0x416b61=identityHomeCandidates(_0x1ff132,_0x4dd749),_0x2a99af=cleanAbsolutePath(_0x1ff132['\x65\x76\x6f\x6d\x61\x70\x48\x6f'+'\x6d\x65\x44\x69\x72'])??cleanAbsolutePath(process.env['EVOMAP_HOME']),_0x291e37=cleanAbsolutePath(_0x1ff132[_0x365122(0x14a,'\x4e\x41\x48\x34')+'\x72'])??cleanAbsolutePath(process.env['EVOMAP_DIR']);return[...new Set([..._0x2a99af===undefined?[]:[join(_0x2a99af,'\x6e\x6f\x64\x65\x5f\x69\x64')],..._0x291e37===undefined?[]:[join(_0x291e37,_0x365122(0x115,'\x32\x32\x33\x4f'))],..._0x416b61[_0x365122(0x11e,'\x68\x70\x53\x62')](_0x31c8e8=>_0x31c8e8!==_0x2a99af)[_0x365122(0x118,'\x74\x46\x31\x47')](_0x26e47d=>join(_0x26e47d,'\x6e\x6f\x64\x65\x5f\x69\x64')),..._0x4dd749===undefined?[]:[join(_0x4dd749,'\x2e\x65\x76\x6f\x6d\x61\x70',_0x365122(0x117,'\x33\x77\x24\x76'))],...installRootNodeIdCandidates(_0x2fd864)])];}export function readLegacyNodeId(_0x49283f={}){const _0x4b5f29=_0x13dc89,_0x5ce0ee=_0x49283f[_0x4b5f29(0x13c,'\x4e\x41\x48\x34')+'\x65\x73']??legacyNodeIdCandidates(_0x49283f);for(const _0x3ee25e of _0x5ce0ee){try{if(!existsSync(_0x3ee25e))continue;const _0x5125b8=readFileSync(_0x3ee25e,_0x4b5f29(0x10e,'\x68\x70\x53\x62'))[_0x4b5f29(0x112,'\x49\x41\x55\x64')]();if(NODE_ID_RE[_0x4b5f29(0x125,'\x25\x55\x44\x4f')](_0x5125b8))return _0x5125b8;}catch{}}return undefined;}export function resolveProxyNodeId(_0x3ab242){const _0x4f3e74=_0x13dc89,_0x5833fd=_0x3ab242[_0x4f3e74(0x123,'\x23\x58\x6b\x48')+'\x64\x65\x49\x64']?.[_0x4f3e74(0x14f,'\x4e\x41\x48\x34')]()||undefined,_0x26ab01=_0x3ab242[_0x4f3e74(0x141,'\x50\x6a\x69\x62')+_0x4f3e74(0x13b,'\x47\x29\x29\x66')]?.[_0x4f3e74(0x14c,'\x66\x58\x6c\x31')]()||undefined;return _0x5833fd??_0x26ab01??(_0x3ab242[_0x4f3e74(0x152,'\x45\x36\x29\x41')+'\x63\x79']??readLegacyNodeId)();}