@evomap/evolver-core 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.
- package/dist/algo/antiDistill.js +1 -167
- package/dist/algo/bans.js +1 -33
- package/dist/algo/candidateAssembly.js +1 -273
- package/dist/algo/capabilityCandidates.js +1 -146
- package/dist/algo/confidence.js +1 -196
- package/dist/algo/conversationSniffer.js +1 -149
- package/dist/algo/cycleEngine.js +1 -625
- package/dist/algo/cycleFailureClassifier.js +1 -112
- package/dist/algo/epigenetics.js +1 -41
- package/dist/algo/evolutionEvent.js +1 -24
- package/dist/algo/exploration.js +1 -68
- package/dist/algo/geneHealth.js +1 -17
- package/dist/algo/geneIntake.js +1 -128
- package/dist/algo/genePromotion.js +1 -53
- package/dist/algo/geneSelection.js +1 -546
- package/dist/algo/index.js +1 -22
- package/dist/algo/memoryGraph.js +1 -86
- package/dist/algo/mutation.js +1 -22
- package/dist/algo/orchestrator.js +1 -87
- package/dist/algo/publishEligibility.js +1 -52
- package/dist/algo/solidify.js +1 -63
- package/dist/algo/strategyPresets.js +1 -61
- package/dist/algo/ucb1.js +1 -156
- package/dist/benchmark/antiGeneBenchmark.js +1 -252
- package/dist/benchmark/antiGeneImpact.js +1 -34
- package/dist/benchmark/antiGeneRollout.js +1 -269
- package/dist/benchmark/benchmark.js +1 -26
- package/dist/benchmark/evolutionThesisSolver.js +1 -41
- package/dist/benchmark/index.js +1 -7
- package/dist/benchmark/selectionFlatAbstention.js +1 -481
- package/dist/benchmark/thesis.js +1 -150
- package/dist/benchmark/triggerShift.js +1 -106
- package/dist/cycle/cycleTimeline.js +1 -74
- package/dist/cycle/index.js +1 -2
- package/dist/cycle/stateMachine.js +1 -25
- package/dist/hub/agentDirectory.js +1 -104
- package/dist/hub/assetCallLog.js +1 -195
- package/dist/hub/bindings.js +1 -121
- package/dist/hub/capability.js +1 -1
- package/dist/hub/conversationDistiller.js +1 -264
- package/dist/hub/fake.js +1 -70
- package/dist/hub/hubReview.js +1 -106
- package/dist/hub/index.js +1 -11
- package/dist/hub/ingest.js +1 -15
- package/dist/hub/questionGenerator.js +1 -408
- package/dist/hub/reuseDecision.js +1 -127
- package/dist/hub/sanitize.js +1 -322
- package/dist/material/boundary.js +1 -14
- package/dist/material/consumer.js +1 -55
- package/dist/material/emit.js +1 -52
- package/dist/material/factory.js +1 -25
- package/dist/material/index.js +1 -9
- package/dist/material/materialArchive.js +1 -466
- package/dist/material/materialStore.js +1 -69
- package/dist/material/sampling.js +1 -39
- package/dist/material/sources.js +1 -33
- package/dist/material/watermark.js +1 -76
- package/dist/personality/drift.js +1 -106
- package/dist/personality/events.js +1 -37
- package/dist/personality/evolveOps.js +1 -93
- package/dist/personality/index.js +1 -11
- package/dist/personality/mutate.js +1 -39
- package/dist/personality/pivot.js +1 -22
- package/dist/personality/prompt.js +1 -62
- package/dist/personality/riskGate.js +1 -80
- package/dist/personality/schema.js +1 -119
- package/dist/personality/select.js +1 -71
- package/dist/personality/stats.js +1 -82
- package/dist/personality/store.js +1 -92
- package/dist/schema/common.js +1 -17
- package/dist/schema/evolutionGraph.js +1 -187
- package/dist/schema/index.js +1 -6
- package/dist/schema/material.js +1 -50
- package/dist/schema/problem.js +1 -45
- package/dist/schema/proofOfWork.js +1 -9
- package/dist/schema/signal.js +1 -19
- package/dist/signals/curriculum.js +1 -202
- package/dist/signals/cycleHistoryFromEvents.js +1 -105
- package/dist/signals/expand.js +1 -293
- package/dist/signals/extractor.js +1 -82
- package/dist/signals/index.js +1 -8
- package/dist/signals/metaSignals.js +1 -200
- package/dist/signals/signalGate.js +1 -40
- package/dist/signals/taskDomain.js +1 -43
- package/dist/signals/traceSignals.js +1 -123
- package/dist/strategy/constraintAblation.js +1 -2820
- package/dist/strategy/constraintAblationPredicates.js +1 -339
- package/dist/strategy/experiment.js +1 -63
- package/dist/strategy/index.js +1 -3
- package/dist/strategy/strategyPoint.js +1 -23
- package/package.json +1 -1
|
@@ -1,112 +1 @@
|
|
|
1
|
-
// Local root-cause triage for cycle failures (ported from v1 src/gep/issueReporter.js: classifyFailure, V1 PR #279).
|
|
2
|
-
//
|
|
3
|
-
// V1 #279 split signal-side (zero-blast cycles no longer feed failure-loop) from issue-reporter-side (triage host vs.
|
|
4
|
-
// evolver faults before opening a public issue). V2 #216 already ported the signal-side via the inert-gene path
|
|
5
|
-
// (producedValue===false → 'inert' in confidence/inertBan). This module is the missing issue-reporter half: it
|
|
6
|
-
// classifies a cycle failure into one of four buckets so downstream consumers (CLI/issue-reporter, hub UI, telemetry)
|
|
7
|
-
// can split confidently-host-side failures from genuine local-gene failures.
|
|
8
|
-
//
|
|
9
|
-
// Pure function — same input shape V1 used (signals, recentEvents, sessionLog). Inert-handling in cycleEngine
|
|
10
|
-
// (#216) is untouched; if the cycle engine threads context here at the failed-write site, the classification is
|
|
11
|
-
// written to the cycle.failed event payload as `failure_class`. Otherwise it is purely opt-in / advisory.
|
|
12
|
-
import { isDistilledGeneId } from './geneIntake.js';
|
|
13
|
-
// "[NO SESSION LOGS FOUND]" et al. — the host gave evolver nothing to evolve from.
|
|
14
|
-
const HOST_NO_TRANSCRIPT_RE = /\[no session logs? found\]|no session log|no transcript/i;
|
|
15
|
-
// Interactive runner gates can stop execution before the provider is invoked. They still belong to the
|
|
16
|
-
// host_provider_error compatibility bucket because the local gene never had a chance to run.
|
|
17
|
-
const HOST_RUNNER_ERR_RE = /Workspace Trust Required/i;
|
|
18
|
-
// Host LLM-provider errors. None of these strings are emitted by evolver core (v1 #279 verified the same;
|
|
19
|
-
// keeping the regex byte-for-byte equivalent), so their presence means the host Agent's provider call failed.
|
|
20
|
-
const HOST_PROVIDER_ERR_RE = /\bLLM ERROR\b|\bMaxTokens\b|field MaxTokens|max_tokens[^\n]{0,24}invalid|insufficient_quota|invalid_api_key|\brate limit(?:ed| exceeded)?\b|quota exceeded|context length exceeded|maximum context length|disabled Claude subscription access|Use an Anthropic API key|not authenticated|authentication required|login required|not logged in/i;
|
|
21
|
-
// Locality prefixes a "locally-generated" gene id can carry:
|
|
22
|
-
// - `gene_distilled_` — the namespace V2 mints for every intaken gene (geneIntake.DISTILLED_ID_PREFIX,
|
|
23
|
-
// surfaced via isDistilledGeneId). NB this is a NAMESPACE marker now, not a provenance tag: the authoritative
|
|
24
|
-
// source is generation_meta (V1 #302, read via geneGenerationSource), but this call site only has a gene id, so
|
|
25
|
-
// it falls back to the prefix. Without this the whole `local_gene_no_blast` bucket never fired for real V2 genes.
|
|
26
|
-
// - `gene_auto_` — V1-only legacy form (V2 never produces it); kept so V1-shaped inputs still match.
|
|
27
|
-
// - `sha256:` — a content asset_id (not a logical gene id); kept for back-compat / loose callers.
|
|
28
|
-
function isLocalGeneratedGene(geneId) {
|
|
29
|
-
return isDistilledGeneId(geneId) || /^sha256:/.test(geneId) || /^gene_auto_/.test(geneId);
|
|
30
|
-
}
|
|
31
|
-
function eventBlast(e) {
|
|
32
|
-
return e.blast_radius ?? e.blastRadius;
|
|
33
|
-
}
|
|
34
|
-
function isZeroBlast(e) {
|
|
35
|
-
const br = eventBlast(e);
|
|
36
|
-
return Boolean(e.meta?.empty_cycle) || (br !== undefined && br.files === 0 && br.lines === 0);
|
|
37
|
-
}
|
|
38
|
-
// NB: blast={files:0,lines:0} only means "real no-op" when it came from a git_diff proof. solidify.ts forces
|
|
39
|
-
// blast to {0,0} for non-git_diff proofs (artifact_hash/external_receipt/tool_call_trace), where it signals
|
|
40
|
-
// "blast unknown", not "no change". The cycleEngine guard only forwards blastRadius for git_diff proofs, so by
|
|
41
|
-
// the time we see a defined br here it is a true measured zero. If a caller ever passes a non-git_diff blast
|
|
42
|
-
// directly, this would mis-classify a productive run as no-op — keep the git_diff guard at the call site.
|
|
43
|
-
function blastIsZero(br) {
|
|
44
|
-
return br !== undefined && br.files === 0 && br.lines === 0;
|
|
45
|
-
}
|
|
46
|
-
function localNoBlastReason(geneId) {
|
|
47
|
-
return {
|
|
48
|
-
failureClass: 'local_gene_no_blast',
|
|
49
|
-
reason: `locally-generated gene ${geneId.slice(0, 20)}… produces no blast radius`,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Triage a cycle failure into a root-cause bucket. Default-open: if no rule fires, returns 'unclassified',
|
|
54
|
-
* which means "treat this as a real evolver bug" (so unclassified faults are never hidden).
|
|
55
|
-
*
|
|
56
|
-
* Pure — does not read filesystem, env, or events store.
|
|
57
|
-
*/
|
|
58
|
-
export function classifyCycleFailure(opts) {
|
|
59
|
-
const signals = Array.isArray(opts?.signals) ? opts.signals : [];
|
|
60
|
-
const events = Array.isArray(opts?.recentEvents) ? opts.recentEvents : [];
|
|
61
|
-
const hasSessionLog = typeof opts?.sessionLog === 'string';
|
|
62
|
-
const log = hasSessionLog ? opts.sessionLog : undefined;
|
|
63
|
-
// (a) No transcript -> the host gave evolver nothing to evolve from.
|
|
64
|
-
if (hasSessionLog && (!log.trim() || HOST_NO_TRANSCRIPT_RE.test(log))) {
|
|
65
|
-
return { failureClass: 'host_no_transcript', reason: 'no session transcript to evolve from' };
|
|
66
|
-
}
|
|
67
|
-
// (b) Host runner preflight or LLM-provider error surfaced in the transcript.
|
|
68
|
-
const runner = hasSessionLog ? log.match(HOST_RUNNER_ERR_RE) : null;
|
|
69
|
-
if (runner) {
|
|
70
|
-
return { failureClass: 'host_provider_error', reason: `host runner error: ${String(runner[0]).slice(0, 60)}` };
|
|
71
|
-
}
|
|
72
|
-
const prov = hasSessionLog ? log.match(HOST_PROVIDER_ERR_RE) : null;
|
|
73
|
-
if (prov) {
|
|
74
|
-
return { failureClass: 'host_provider_error', reason: `host LLM-provider error: ${String(prov[0]).slice(0, 60)}` };
|
|
75
|
-
}
|
|
76
|
-
// (c-v2) V2 hard-bans/filters local no-op genes instead of emitting a soft ban_gene signal. Use the current
|
|
77
|
-
// failed gene + current blast radius when the engine supplies them, while keeping the legacy ban_gene branch below.
|
|
78
|
-
const currentGeneId = typeof opts?.geneId === 'string' ? opts.geneId : undefined;
|
|
79
|
-
if (currentGeneId && isLocalGeneratedGene(currentGeneId)) {
|
|
80
|
-
if (blastIsZero(opts?.blastRadius))
|
|
81
|
-
return localNoBlastReason(currentGeneId);
|
|
82
|
-
const failedForGene = events.filter((e) => e.outcome?.status === 'failed' && (e.gene === undefined || e.gene === currentGeneId));
|
|
83
|
-
if (failedForGene.length > 0 && failedForGene.every(isZeroBlast))
|
|
84
|
-
return localNoBlastReason(currentGeneId);
|
|
85
|
-
}
|
|
86
|
-
if (!currentGeneId) {
|
|
87
|
-
const failedLocalEvents = events.filter((e) => e.outcome?.status === 'failed' && typeof e.gene === 'string' && isLocalGeneratedGene(e.gene));
|
|
88
|
-
for (const e of failedLocalEvents) {
|
|
89
|
-
if (e.gene && isZeroBlast(e))
|
|
90
|
-
return localNoBlastReason(e.gene);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// (c) The banned gene is locally generated AND every recent failing cycle changed nothing — a no-op gene,
|
|
94
|
-
// not an evolver bug. (V2 #216 already drops such genes via the inert ban; this is the issue-reporter
|
|
95
|
-
// analogue, classifying after a failure_loop fires anyway.)
|
|
96
|
-
const banned = signals.find((s) => typeof s === 'string' && s.startsWith('ban_gene:'));
|
|
97
|
-
if (banned) {
|
|
98
|
-
const geneId = banned.replace('ban_gene:', '');
|
|
99
|
-
const failed = events.filter((e) => e?.outcome?.status === 'failed');
|
|
100
|
-
const allZeroBlast = failed.length > 0 && failed.every(isZeroBlast);
|
|
101
|
-
if (isLocalGeneratedGene(geneId) && allZeroBlast) {
|
|
102
|
-
return localNoBlastReason(geneId);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return { failureClass: 'unclassified', reason: '' };
|
|
106
|
-
}
|
|
107
|
-
/** Buckets we are confident are host-side; everything else is default-open (filed / surfaced). */
|
|
108
|
-
export const HOST_SUPPRESS_CLASSES = new Set([
|
|
109
|
-
'host_no_transcript',
|
|
110
|
-
'host_provider_error',
|
|
111
|
-
'local_gene_no_blast',
|
|
112
|
-
]);
|
|
1
|
+
const _0x148320=_0x44a7;function _0x44a7(_0x5438df,_0x3e8849){_0x5438df=_0x5438df-(0x9*0x3ad+0x20*-0x3d+-0xbfb*0x2);const _0x41f6e6=_0x4267();let _0x192c0d=_0x41f6e6[_0x5438df];if(_0x44a7['\x4f\x76\x64\x41\x65\x68']===undefined){var _0x526898=function(_0x3f5fdd){const _0xafc614='\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 _0x43dc19='',_0x3af420='';for(let _0x427d7a=0x1f06*0x1+-0x1bbf+0x347*-0x1,_0x243014,_0x19d7ae,_0x478ec8=-0x153*-0x3+-0x23d+-0x1bc;_0x19d7ae=_0x3f5fdd['\x63\x68\x61\x72\x41\x74'](_0x478ec8++);~_0x19d7ae&&(_0x243014=_0x427d7a%(-0x2ad+-0x2*0xaee+0x188d)?_0x243014*(-0x886+0x5ca+0x2fc)+_0x19d7ae:_0x19d7ae,_0x427d7a++%(-0x1b43+-0x6*0xd8+0x1*0x2057))?_0x43dc19+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x1110+-0x1672+0x661&_0x243014>>(-(-0x74*-0x43+-0x231e+0x4c4)*_0x427d7a&0x9*-0x449+0x2645+-0x29*-0x2)):-0x1*-0x15ee+-0x1*-0x13e1+0xb*-0x3cd){_0x19d7ae=_0xafc614['\x69\x6e\x64\x65\x78\x4f\x66'](_0x19d7ae);}for(let _0x4b184b=-0x3*-0xc63+0x2362+-0x488b,_0x2cab1e=_0x43dc19['\x6c\x65\x6e\x67\x74\x68'];_0x4b184b<_0x2cab1e;_0x4b184b++){_0x3af420+='\x25'+('\x30\x30'+_0x43dc19['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4b184b)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x17b*-0x9+0x49*0x15+-0xe*0x160))['\x73\x6c\x69\x63\x65'](-(-0x119*-0x2+0x1dea+-0x201a));}return decodeURIComponent(_0x3af420);};const _0x165d70=function(_0x327570,_0xd76ca2){let _0x344d6a=[],_0x2db43c=-0x24d3+-0x1f25+-0x1e*-0x244,_0x219313,_0xce593a='';_0x327570=_0x526898(_0x327570);let _0x1a5b01;for(_0x1a5b01=0x7be*-0x3+-0x15b6+0x4*0xb3c;_0x1a5b01<0x1*-0x1070+-0xb7b+0x1ceb;_0x1a5b01++){_0x344d6a[_0x1a5b01]=_0x1a5b01;}for(_0x1a5b01=-0xb27+-0xc2e+0x1755;_0x1a5b01<-0xac*-0x3+0xd*0xfe+-0xdea;_0x1a5b01++){_0x2db43c=(_0x2db43c+_0x344d6a[_0x1a5b01]+_0xd76ca2['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1a5b01%_0xd76ca2['\x6c\x65\x6e\x67\x74\x68']))%(-0x1d47+0x1*0x1ad7+0x370),_0x219313=_0x344d6a[_0x1a5b01],_0x344d6a[_0x1a5b01]=_0x344d6a[_0x2db43c],_0x344d6a[_0x2db43c]=_0x219313;}_0x1a5b01=0x4*0x7e5+-0x130*-0xe+0x5*-0x9a4,_0x2db43c=0x1*0x7ed+-0x85a*0x2+-0x8c7*-0x1;for(let _0x4857d4=0x76c+-0x1ad0+-0x2*-0x9b2;_0x4857d4<_0x327570['\x6c\x65\x6e\x67\x74\x68'];_0x4857d4++){_0x1a5b01=(_0x1a5b01+(-0x1*0xd11+-0xee6+0x1bf8))%(0x9b*-0x3+-0x4*0x54e+0x1809),_0x2db43c=(_0x2db43c+_0x344d6a[_0x1a5b01])%(-0x1712*-0x1+-0x1*-0x1573+-0x2b85),_0x219313=_0x344d6a[_0x1a5b01],_0x344d6a[_0x1a5b01]=_0x344d6a[_0x2db43c],_0x344d6a[_0x2db43c]=_0x219313,_0xce593a+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x327570['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4857d4)^_0x344d6a[(_0x344d6a[_0x1a5b01]+_0x344d6a[_0x2db43c])%(-0x2645+-0xd1+0x2816)]);}return _0xce593a;};_0x44a7['\x73\x56\x64\x4f\x67\x6f']=_0x165d70,_0x44a7['\x4d\x67\x62\x6d\x6d\x54']={},_0x44a7['\x4f\x76\x64\x41\x65\x68']=!![];}const _0x13e74f=_0x41f6e6[-0x142c+-0x5*0x1a3+0x1*0x1c5b],_0x43dd7e=_0x5438df+_0x13e74f,_0x14193d=_0x44a7['\x4d\x67\x62\x6d\x6d\x54'][_0x43dd7e];return!_0x14193d?(_0x44a7['\x48\x4d\x59\x48\x72\x62']===undefined&&(_0x44a7['\x48\x4d\x59\x48\x72\x62']=!![]),_0x192c0d=_0x44a7['\x73\x56\x64\x4f\x67\x6f'](_0x192c0d,_0x3e8849),_0x44a7['\x4d\x67\x62\x6d\x6d\x54'][_0x43dd7e]=_0x192c0d):_0x192c0d=_0x14193d,_0x192c0d;}(function(_0x2c9d04,_0x437de2){const _0x109e33=_0x44a7,_0x3442bd=_0x2c9d04();while(!![]){try{const _0x4efb9a=parseInt(_0x109e33(0x204,'\x49\x23\x23\x46'))/(-0x13*-0x1a3+0x1625*0x1+-0x21*0x19d)*(-parseInt(_0x109e33(0x18f,'\x29\x39\x21\x6e'))/(0x1b60+0x2390*-0x1+0x419*0x2))+parseInt(_0x109e33(0x1cc,'\x29\x29\x24\x62'))/(0x1bff+0xa7*0x22+-0x322a)*(parseInt(_0x109e33(0x1b1,'\x30\x45\x30\x6e'))/(-0x98a+-0x6*-0x314+-0x475*0x2))+-parseInt(_0x109e33(0x1f4,'\x51\x63\x4f\x67'))/(-0x5*0x2a5+-0x1*-0x5e3+0x75b)+-parseInt(_0x109e33(0x1d4,'\x39\x24\x5e\x58'))/(-0x28d*-0xc+0x3*0x1d5+-0x2415)*(parseInt(_0x109e33(0x1a5,'\x66\x32\x24\x65'))/(-0x1c24+-0x187f+0x34aa))+parseInt(_0x109e33(0x1a0,'\x30\x45\x30\x6e'))/(-0x2070+-0x1*0xa13+0x2a8b)+-parseInt(_0x109e33(0x1c3,'\x48\x56\x4f\x56'))/(0xb51+-0x2*0x34c+-0x4b0)*(-parseInt(_0x109e33(0x1c9,'\x42\x40\x7a\x29'))/(0xe17*-0x2+-0x5d*-0x12+0x15ae))+-parseInt(_0x109e33(0x1f5,'\x47\x4a\x21\x63'))/(-0x32*-0x94+0x1*-0x2630+0x1f*0x4d)*(-parseInt(_0x109e33(0x1a2,'\x74\x5e\x25\x69'))/(0x7e1+-0x15ec+0xe17));if(_0x4efb9a===_0x437de2)break;else _0x3442bd['push'](_0x3442bd['shift']());}catch(_0x26bdeb){_0x3442bd['push'](_0x3442bd['shift']());}}}(_0x4267,-0x2*0x2a492+0x4*0x17fdf+-0xda67*-0xb));import{isDistilledGeneId}from'\x2e\x2f\x67\x65\x6e\x65\x49\x6e\x74\x61\x6b\x65\x2e\x6a\x73';const HOST_NO_TRANSCRIPT_RE=/\[no session logs? found\]|no session log|no transcript/i,HOST_RUNNER_ERR_RE=/Workspace Trust Required/i,HOST_PROVIDER_ERR_RE=/\bLLM ERROR\b|\bMaxTokens\b|field MaxTokens|max_tokens[^\n]{0,24}invalid|insufficient_quota|invalid_api_key|\brate limit(?:ed| exceeded)?\b|quota exceeded|context length exceeded|maximum context length|disabled Claude subscription access|Use an Anthropic API key|not authenticated|authentication required|login required|not logged in/i;function isLocalGeneratedGene(_0x118869){const _0x5e8c4f=_0x44a7;return isDistilledGeneId(_0x118869)||/^sha256:/[_0x5e8c4f(0x182,'\x66\x32\x24\x65')](_0x118869)||/^gene_auto_/[_0x5e8c4f(0x1d6,'\x56\x75\x40\x67')](_0x118869);}function eventBlast(_0x589459){const _0x438bc0=_0x44a7;return _0x589459[_0x438bc0(0x197,'\x40\x69\x25\x37')+_0x438bc0(0x183,'\x66\x32\x24\x65')]??_0x589459[_0x438bc0(0x1ea,'\x21\x45\x50\x62')+_0x438bc0(0x1ec,'\x41\x29\x36\x74')];}function isZeroBlast(_0x17969e){const _0x45e0e9=_0x44a7,_0x46293d=eventBlast(_0x17969e);return Boolean(_0x17969e[_0x45e0e9(0x196,'\x74\x5e\x25\x69')]?.[_0x45e0e9(0x1df,'\x40\x41\x52\x72')+_0x45e0e9(0x1e1,'\x59\x31\x49\x28')])||_0x46293d!==undefined&&_0x46293d[_0x45e0e9(0x185,'\x68\x6e\x6b\x51')]===-0x4f*-0x61+-0xc29*-0x1+-0x382*0xc&&_0x46293d[_0x45e0e9(0x193,'\x47\x4a\x21\x63')]===-0x14c0+0x7*0x1d6+-0x2*-0x3f3;}function blastIsZero(_0x571888){const _0x3fb96a=_0x44a7;return _0x571888!==undefined&&_0x571888[_0x3fb96a(0x1ed,'\x39\x24\x5e\x58')]===-0x1*0x11e6+-0x9c7*-0x2+-0x1*0x1a8&&_0x571888[_0x3fb96a(0x1d9,'\x30\x45\x30\x6e')]===-0xb90+-0x1c81*0x1+0x2811;}function localNoBlastReason(_0x1577fe){const _0x52f309=_0x44a7;return{'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':_0x52f309(0x1e2,'\x42\x40\x7a\x29')+_0x52f309(0x1fe,'\x67\x44\x41\x65')+_0x52f309(0x1c2,'\x51\x63\x4f\x67'),'\x72\x65\x61\x73\x6f\x6e':_0x52f309(0x187,'\x33\x66\x6e\x47')+'\x67\x65\x6e\x65\x72\x61\x74\x65'+_0x52f309(0x1b9,'\x6d\x28\x36\x31')+_0x1577fe[_0x52f309(0x1e8,'\x23\x69\x78\x6f')](0x6ec+0x17*-0x47+-0x8b,-0x1511+-0x286+0x17ab)+(_0x52f309(0x1a1,'\x67\x41\x35\x6c')+_0x52f309(0x192,'\x6c\x46\x68\x4a')+'\x61\x73\x74\x20\x72\x61\x64\x69'+'\x75\x73')};}export function classifyCycleFailure(_0x104fa5){const _0x327dbf=_0x44a7,_0x41d001=Array[_0x327dbf(0x1cf,'\x40\x69\x25\x37')](_0x104fa5?.[_0x327dbf(0x18d,'\x42\x6f\x58\x28')])?_0x104fa5[_0x327dbf(0x1ac,'\x41\x5a\x21\x42')]:[],_0x5a9b46=Array[_0x327dbf(0x201,'\x6c\x46\x68\x4a')](_0x104fa5?.[_0x327dbf(0x18e,'\x38\x23\x50\x64')+'\x65\x6e\x74\x73'])?_0x104fa5[_0x327dbf(0x17f,'\x47\x4a\x21\x63')+_0x327dbf(0x19f,'\x31\x2a\x29\x4e')]:[],_0x22708f=typeof _0x104fa5?.[_0x327dbf(0x1e6,'\x40\x41\x52\x72')+'\x6f\x67']===_0x327dbf(0x195,'\x30\x45\x30\x6e'),_0x1ff32b=_0x22708f?_0x104fa5[_0x327dbf(0x1f0,'\x30\x50\x56\x30')+'\x6f\x67']:undefined;if(_0x22708f&&(!_0x1ff32b[_0x327dbf(0x1e3,'\x7a\x32\x45\x6a')]()||HOST_NO_TRANSCRIPT_RE[_0x327dbf(0x186,'\x30\x45\x30\x6e')](_0x1ff32b)))return{'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':'\x68\x6f\x73\x74\x5f\x6e\x6f\x5f'+'\x74\x72\x61\x6e\x73\x63\x72\x69'+'\x70\x74','\x72\x65\x61\x73\x6f\x6e':_0x327dbf(0x19b,'\x68\x6e\x6b\x51')+_0x327dbf(0x1eb,'\x33\x66\x6e\x47')+_0x327dbf(0x1ef,'\x29\x29\x24\x62')+_0x327dbf(0x19a,'\x34\x44\x66\x21')+_0x327dbf(0x190,'\x29\x29\x24\x62')};const _0x9eee16=_0x22708f?_0x1ff32b[_0x327dbf(0x1da,'\x67\x44\x41\x65')](HOST_RUNNER_ERR_RE):null;if(_0x9eee16)return{'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':_0x327dbf(0x180,'\x66\x32\x24\x65')+_0x327dbf(0x184,'\x42\x38\x77\x78')+_0x327dbf(0x1dc,'\x31\x48\x4c\x47'),'\x72\x65\x61\x73\x6f\x6e':_0x327dbf(0x1f2,'\x66\x32\x24\x65')+_0x327dbf(0x1ae,'\x56\x75\x40\x67')+_0x327dbf(0x1aa,'\x25\x7a\x79\x36')+String(_0x9eee16[-0x576+0xf51+-0x9db])[_0x327dbf(0x191,'\x42\x38\x77\x78')](-0x1e8*-0x4+0x2302+0xe36*-0x3,-0x19f*-0x18+0x4ed*0x2+0x3086*-0x1)};const _0x560157=_0x22708f?_0x1ff32b['\x6d\x61\x74\x63\x68'](HOST_PROVIDER_ERR_RE):null;if(_0x560157)return'\x6f\x54\x46\x45\x67'===_0x327dbf(0x1ee,'\x30\x50\x56\x30')?{'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':'\x68\x6f\x73\x74\x5f\x70\x72\x6f'+_0x327dbf(0x1c1,'\x41\x5a\x21\x42')+_0x327dbf(0x1ba,'\x29\x29\x24\x62'),'\x72\x65\x61\x73\x6f\x6e':_0x327dbf(0x202,'\x33\x26\x40\x72')+_0x327dbf(0x1e5,'\x6d\x28\x36\x31')+_0x327dbf(0x1d2,'\x52\x55\x52\x67')+'\x20'+String(_0x560157[0x148d+0x24a9+-0x3936])[_0x327dbf(0x1ca,'\x30\x45\x30\x6e')](0x13fc+-0x209*0x1+0x397*-0x5,-0x14b*-0x10+-0x19*-0x176+-0x38fa)}:{'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':_0x327dbf(0x198,'\x54\x36\x70\x50')+_0x327dbf(0x1bc,'\x47\x4a\x21\x63')+_0x327dbf(0x1f3,'\x5a\x58\x4a\x5d'),'\x72\x65\x61\x73\x6f\x6e':_0x327dbf(0x1f1,'\x47\x46\x73\x5a')+_0x327dbf(0x188,'\x33\x26\x40\x72')+_0x327dbf(0x1b0,'\x30\x50\x56\x30')+'\x20'+_0x2c7a2a(_0x9dcb4[0xe8*-0x13+0x1*0x1d93+-0xc5b])[_0x327dbf(0x19c,'\x74\x5e\x25\x69')](0x1b+0x55*0x5e+-0x1*0x1f51,0x2033+-0xf37*-0x2+-0x3e65)};const _0x17eb66=typeof _0x104fa5?.[_0x327dbf(0x1c6,'\x29\x29\x24\x62')]===_0x327dbf(0x1f9,'\x42\x38\x77\x78')?_0x104fa5[_0x327dbf(0x1dd,'\x33\x66\x6e\x47')]:undefined;if(_0x17eb66&&isLocalGeneratedGene(_0x17eb66)){if(blastIsZero(_0x104fa5?.['\x62\x6c\x61\x73\x74\x52\x61\x64'+_0x327dbf(0x18a,'\x30\x50\x56\x30')]))return localNoBlastReason(_0x17eb66);const _0xaf1d90=_0x5a9b46[_0x327dbf(0x1a8,'\x59\x4a\x62\x43')](_0x135705=>_0x135705[_0x327dbf(0x1ad,'\x34\x44\x66\x21')]?.['\x73\x74\x61\x74\x75\x73']===_0x327dbf(0x1d0,'\x5a\x58\x4a\x5d')&&(_0x135705[_0x327dbf(0x199,'\x49\x23\x23\x46')]===undefined||_0x135705[_0x327dbf(0x1de,'\x31\x48\x4c\x47')]===_0x17eb66));if(_0xaf1d90[_0x327dbf(0x1d7,'\x66\x32\x24\x65')]>-0x6a+-0x7e7*-0x1+0x1*-0x77d&&_0xaf1d90['\x65\x76\x65\x72\x79'](isZeroBlast))return localNoBlastReason(_0x17eb66);}if(!_0x17eb66){if(_0x327dbf(0x19e,'\x2a\x47\x6c\x32')===_0x327dbf(0x1e0,'\x6c\x46\x68\x4a')){const _0x212a7b=_0x5a9b46[_0x327dbf(0x1c4,'\x50\x46\x32\x42')](_0x21fb8a=>_0x21fb8a['\x6f\x75\x74\x63\x6f\x6d\x65']?.[_0x327dbf(0x1d3,'\x4f\x52\x65\x42')]===_0x327dbf(0x1b8,'\x5b\x34\x50\x54')&&typeof _0x21fb8a[_0x327dbf(0x19d,'\x59\x4a\x62\x43')]===_0x327dbf(0x1d5,'\x68\x6e\x6b\x51')&&isLocalGeneratedGene(_0x21fb8a[_0x327dbf(0x18b,'\x29\x39\x21\x6e')]));for(const _0x4356ac of _0x212a7b){if(_0x327dbf(0x1c5,'\x7a\x32\x45\x6a')!==_0x327dbf(0x1c8,'\x56\x63\x42\x51')){if(_0x4356ac[_0x327dbf(0x19d,'\x59\x4a\x62\x43')]&&isZeroBlast(_0x4356ac))return localNoBlastReason(_0x4356ac['\x67\x65\x6e\x65']);}else{if(_0x32cab9(_0x27d838?.[_0x327dbf(0x1b6,'\x74\x5e\x25\x69')+_0x327dbf(0x1a9,'\x66\x32\x24\x65')]))return _0x4c30f8(_0x3f87bd);const _0x248dcf=_0x5d0ab6[_0x327dbf(0x1e9,'\x68\x6e\x6b\x51')](_0x54541d=>_0x54541d['\x6f\x75\x74\x63\x6f\x6d\x65']?.[_0x327dbf(0x1f8,'\x30\x45\x30\x6e')]===_0x327dbf(0x1ff,'\x7a\x32\x45\x6a')&&(_0x54541d[_0x327dbf(0x1cd,'\x47\x4a\x21\x63')]===_0x3ff349||_0x54541d[_0x327dbf(0x1db,'\x38\x23\x50\x64')]===_0x36ff8a));if(_0x248dcf[_0x327dbf(0x1f7,'\x25\x33\x26\x50')]>-0x1b7f+-0x2129+0x8*0x795&&_0x248dcf[_0x327dbf(0x1ab,'\x40\x69\x25\x37')](_0x27e321))return _0xf72c2d(_0x254db6);}}}else return{'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':'\x68\x6f\x73\x74\x5f\x70\x72\x6f'+_0x327dbf(0x1fa,'\x5a\x58\x4a\x5d')+_0x327dbf(0x189,'\x51\x63\x4f\x67'),'\x72\x65\x61\x73\x6f\x6e':_0x327dbf(0x1b4,'\x6c\x46\x68\x4a')+_0x327dbf(0x1b7,'\x67\x44\x41\x65')+'\x72\x3a\x20'+_0x4d43fe(_0x53beb6[0x5b*0x24+0x2081+-0x2d4d])['\x73\x6c\x69\x63\x65'](-0x134b+-0x3*-0x327+0x1*0x9d6,-0xc35+0x59f*0x5+-0xfaa)};}const _0x5cb2b0=_0x41d001[_0x327dbf(0x194,'\x25\x7a\x79\x36')](_0x2ad668=>typeof _0x2ad668===_0x327dbf(0x1f9,'\x42\x38\x77\x78')&&_0x2ad668[_0x327dbf(0x1b2,'\x54\x36\x70\x50')+'\x74\x68']('\x62\x61\x6e\x5f\x67\x65\x6e\x65'+'\x3a'));if(_0x5cb2b0){const _0x55125a=_0x5cb2b0[_0x327dbf(0x1c7,'\x42\x40\x7a\x29')]('\x62\x61\x6e\x5f\x67\x65\x6e\x65'+'\x3a',''),_0x3f8419=_0x5a9b46[_0x327dbf(0x1bb,'\x30\x45\x30\x6e')](_0x106cc9=>_0x106cc9?.[_0x327dbf(0x1be,'\x33\x26\x40\x72')]?.[_0x327dbf(0x1a6,'\x50\x46\x32\x42')]===_0x327dbf(0x18c,'\x70\x4f\x32\x6d')),_0x6924ac=_0x3f8419[_0x327dbf(0x1a4,'\x30\x45\x30\x6e')]>0x905+0x1b00+0x2405*-0x1&&_0x3f8419[_0x327dbf(0x1c0,'\x2a\x47\x6c\x32')](isZeroBlast);if(isLocalGeneratedGene(_0x55125a)&&_0x6924ac)return _0x327dbf(0x1f6,'\x74\x5e\x25\x69')!==_0x327dbf(0x181,'\x51\x63\x4f\x67')?localNoBlastReason(_0x55125a):_0x211a4c(_0x50fa26);}return{'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':_0x327dbf(0x1fc,'\x41\x29\x36\x74')+_0x327dbf(0x200,'\x23\x69\x78\x6f'),'\x72\x65\x61\x73\x6f\x6e':''};}export const HOST_SUPPRESS_CLASSES=new Set([_0x148320(0x1fb,'\x33\x26\x40\x72')+_0x148320(0x1bf,'\x31\x48\x4c\x47')+'\x70\x74',_0x148320(0x1d8,'\x25\x33\x26\x50')+_0x148320(0x1b5,'\x33\x66\x6e\x47')+_0x148320(0x1fd,'\x54\x37\x26\x37'),_0x148320(0x1e7,'\x47\x4a\x21\x63')+_0x148320(0x1fe,'\x67\x44\x41\x65')+_0x148320(0x1af,'\x47\x46\x73\x5a')]);function _0x4267(){const _0x5226c2=['\x66\x43\x6f\x35\x57\x52\x37\x64\x54\x6d\x6b\x56\x72\x43\x6f\x68\x57\x51\x69','\x57\x4f\x4c\x6d\x57\x37\x76\x78\x57\x35\x53','\x72\x53\x6f\x4d\x66\x62\x35\x53\x57\x37\x6e\x41\x57\x4f\x6d','\x57\x52\x42\x63\x4e\x43\x6b\x7a','\x46\x68\x38\x6c\x57\x34\x42\x63\x53\x47\x34\x75\x57\x50\x39\x30\x61\x43\x6b\x47','\x57\x51\x79\x74\x70\x43\x6f\x77\x57\x36\x4f\x55','\x57\x51\x53\x6f\x57\x34\x33\x63\x55\x6d\x6b\x63','\x45\x49\x71\x4f\x57\x50\x42\x63\x4f\x61\x43','\x57\x52\x39\x6f\x66\x43\x6b\x48\x57\x36\x75\x33\x7a\x57','\x76\x6d\x6b\x68\x57\x37\x62\x6b\x57\x37\x79','\x57\x37\x34\x42\x76\x53\x6f\x39\x57\x35\x34\x42\x41\x63\x70\x63\x4a\x78\x61','\x77\x63\x44\x34\x57\x36\x4e\x63\x53\x71','\x57\x34\x5a\x64\x53\x5a\x44\x6c\x57\x34\x64\x63\x4f\x71\x6e\x6d\x57\x52\x56\x64\x51\x30\x4e\x63\x49\x43\x6f\x4e','\x6c\x68\x6e\x31\x57\x52\x33\x63\x47\x49\x7a\x33\x44\x68\x43','\x57\x50\x47\x70\x79\x4b\x47','\x75\x6d\x6b\x2b\x57\x36\x2f\x63\x51\x43\x6f\x53\x44\x38\x6f\x63\x57\x4f\x37\x64\x51\x30\x6d\x62','\x57\x37\x64\x63\x55\x74\x66\x65\x43\x53\x6f\x32\x57\x36\x71','\x57\x34\x6e\x4d\x57\x34\x64\x64\x4f\x64\x2f\x64\x4a\x61','\x69\x49\x38\x6b\x70\x64\x64\x63\x48\x43\x6b\x78\x57\x36\x52\x64\x4f\x4a\x43\x43\x57\x36\x4b','\x57\x36\x48\x45\x57\x4f\x61\x73\x46\x58\x4c\x47\x6c\x57','\x78\x43\x6b\x6f\x6d\x38\x6b\x4b\x72\x4a\x34','\x57\x36\x2f\x63\x49\x43\x6b\x32\x57\x36\x79\x7a\x57\x4f\x48\x6f','\x57\x51\x66\x70\x42\x43\x6b\x79\x6e\x73\x79','\x62\x4c\x7a\x33\x74\x57','\x64\x6d\x6b\x57\x77\x38\x6f\x43\x78\x43\x6f\x46','\x45\x68\x7a\x6b\x46\x76\x33\x64\x47\x53\x6b\x4f\x57\x37\x69','\x72\x59\x6a\x2f\x57\x36\x2f\x63\x50\x57','\x77\x43\x6f\x4e\x57\x34\x52\x64\x55\x53\x6f\x58','\x78\x57\x64\x63\x4c\x6d\x6b\x4c','\x65\x38\x6f\x4b\x57\x51\x30','\x73\x65\x62\x58\x74\x73\x4e\x64\x4e\x61','\x62\x53\x6f\x55\x57\x52\x68\x64\x56\x57','\x57\x52\x74\x63\x55\x38\x6f\x6e\x57\x50\x48\x59\x57\x51\x6e\x2f\x6f\x57','\x57\x51\x35\x56\x74\x43\x6b\x47\x57\x36\x34','\x57\x4f\x68\x63\x47\x64\x6d','\x57\x51\x66\x65\x62\x53\x6b\x53\x57\x36\x47\x6c\x7a\x73\x43','\x57\x52\x61\x5a\x57\x35\x5a\x63\x50\x57','\x57\x34\x58\x41\x70\x58\x31\x43\x69\x67\x6d\x63\x77\x77\x57','\x57\x34\x61\x38\x57\x52\x70\x64\x4f\x38\x6f\x54\x57\x4f\x46\x63\x48\x43\x6f\x6d','\x57\x51\x6c\x63\x53\x38\x6f\x6f\x57\x50\x39\x49\x57\x50\x6e\x59\x64\x47','\x57\x50\x6d\x66\x42\x30\x58\x51\x6d\x67\x34\x67','\x57\x52\x4a\x63\x54\x4d\x70\x63\x4c\x61\x4b','\x57\x52\x72\x73\x43\x38\x6b\x66\x70\x4a\x6d','\x62\x53\x6b\x4e\x57\x4f\x42\x63\x55\x48\x58\x4f\x57\x52\x37\x63\x54\x71','\x71\x65\x53\x2f\x78\x62\x6c\x64\x4d\x71\x52\x63\x54\x57','\x57\x52\x4e\x64\x50\x4e\x53','\x57\x52\x2f\x63\x55\x53\x6b\x78\x57\x37\x6d\x49','\x6f\x43\x6f\x5a\x69\x53\x6b\x42\x45\x71','\x46\x4a\x6d\x56\x57\x4f\x70\x63\x4e\x75\x6e\x75\x42\x61','\x6a\x43\x6f\x63\x66\x38\x6b\x54\x44\x38\x6f\x7a\x77\x75\x6d','\x57\x50\x34\x61\x74\x4d\x6a\x42\x57\x36\x46\x63\x51\x4e\x75','\x63\x6d\x6b\x36\x72\x53\x6f\x70\x63\x43\x6f\x66\x57\x37\x69\x4c','\x57\x35\x44\x4f\x57\x35\x53','\x57\x36\x6c\x64\x4e\x38\x6f\x7a\x57\x35\x5a\x63\x4d\x32\x76\x35\x74\x31\x75\x78\x46\x38\x6b\x30\x57\x52\x75','\x57\x34\x31\x43\x70\x58\x47\x30\x77\x65\x71\x75\x7a\x75\x33\x63\x49\x49\x57','\x57\x36\x39\x49\x57\x34\x34\x33\x7a\x61','\x46\x68\x58\x78\x42\x4e\x42\x64\x4d\x47','\x77\x64\x39\x57\x57\x37\x37\x63\x4f\x73\x69','\x57\x35\x33\x63\x4f\x38\x6f\x44\x57\x37\x47\x36\x57\x52\x71','\x57\x35\x6e\x55\x57\x34\x33\x64\x51\x73\x4a\x64\x54\x38\x6b\x41\x57\x50\x79','\x65\x53\x6b\x65\x57\x37\x35\x52\x69\x6d\x6f\x4e\x57\x4f\x4e\x64\x4b\x71','\x57\x51\x78\x64\x56\x77\x54\x49\x69\x58\x35\x4b\x64\x47','\x43\x71\x61\x58','\x77\x53\x6f\x4a\x57\x36\x68\x64\x54\x38\x6f\x32\x73\x64\x78\x63\x51\x47','\x57\x51\x69\x47\x57\x35\x5a\x63\x50\x53\x6b\x77\x57\x4f\x47','\x57\x51\x33\x63\x53\x32\x2f\x63\x4b\x57','\x57\x52\x66\x50\x78\x6d\x6b\x44\x57\x35\x39\x56\x43\x61','\x65\x53\x6b\x65\x57\x37\x35\x52\x78\x38\x6f\x66\x57\x51\x52\x64\x47\x57','\x57\x51\x64\x64\x53\x4b\x69\x61\x6f\x6d\x6f\x38\x57\x36\x50\x4e\x57\x50\x70\x63\x4a\x6d\x6b\x37','\x57\x51\x38\x76\x57\x37\x66\x63\x62\x6d\x6f\x7a\x57\x51\x5a\x64\x55\x38\x6b\x72\x64\x61\x38','\x57\x4f\x30\x70\x42\x30\x48\x4f\x67\x30\x57\x76','\x63\x6d\x6b\x36\x72\x53\x6f\x70\x44\x53\x6f\x68\x57\x37\x75\x4b','\x57\x52\x52\x63\x4d\x38\x6b\x75\x57\x52\x74\x64\x4d\x57','\x66\x6d\x6b\x57\x72\x53\x6f\x70','\x62\x6d\x6b\x38\x71\x6d\x6f\x69','\x57\x35\x4a\x63\x56\x53\x6f\x6c\x57\x37\x71\x4d\x57\x4f\x58\x6b\x57\x52\x38','\x57\x52\x72\x73\x43\x38\x6b\x75\x6b\x61','\x78\x59\x35\x49\x57\x37\x34','\x71\x30\x50\x38\x73\x71\x5a\x64\x4c\x62\x33\x64\x51\x71','\x76\x38\x6b\x42\x57\x37\x39\x57\x63\x43\x6f\x47\x57\x4f\x6c\x64\x51\x57','\x57\x51\x78\x63\x47\x43\x6b\x46','\x70\x38\x6f\x73\x66\x57','\x57\x50\x37\x63\x50\x32\x30\x43','\x44\x38\x6f\x70\x6d\x38\x6b\x36\x57\x35\x65\x58','\x57\x34\x5a\x63\x56\x72\x33\x64\x55\x67\x35\x37\x57\x50\x30','\x73\x47\x64\x63\x4d\x43\x6b\x4c\x57\x35\x5a\x63\x4a\x65\x4e\x64\x50\x61','\x57\x34\x33\x64\x54\x4d\x75\x59\x57\x4f\x74\x64\x4d\x31\x4c\x79','\x45\x5a\x6d\x50\x57\x50\x34','\x57\x35\x33\x63\x55\x38\x6f\x67\x57\x37\x69\x58','\x57\x52\x31\x50\x70\x43\x6b\x62\x57\x34\x69\x55\x41\x30\x6d','\x57\x50\x6d\x64\x79\x4b\x48\x31','\x71\x43\x6f\x31\x57\x35\x72\x75','\x77\x64\x39\x4a\x57\x36\x70\x63\x55\x4a\x79','\x57\x36\x6e\x39\x57\x35\x4b\x30','\x57\x37\x56\x63\x50\x48\x66\x66\x44\x6d\x6f\x69\x57\x36\x39\x32','\x57\x37\x5a\x63\x55\x4a\x78\x63\x52\x74\x4e\x64\x47\x6d\x6f\x76\x69\x61','\x57\x37\x54\x62\x57\x51\x53\x77','\x57\x35\x6c\x63\x53\x38\x6b\x38\x57\x4f\x4a\x64\x4d\x58\x54\x70\x6d\x71','\x57\x52\x58\x75\x70\x38\x6b\x63\x70\x4a\x6a\x55\x57\x4f\x38','\x57\x37\x31\x30\x57\x34\x71\x32\x43\x61','\x6b\x58\x78\x64\x4a\x67\x4b','\x57\x50\x50\x70\x57\x34\x62\x51\x57\x36\x65','\x57\x52\x4e\x64\x4d\x71\x68\x64\x4a\x71','\x67\x4e\x53\x48\x57\x52\x56\x64\x4f\x32\x66\x52\x77\x75\x78\x63\x54\x75\x79\x61\x70\x38\x6f\x78','\x34\x4f\x6f\x57\x57\x34\x78\x64\x47\x43\x6b\x32\x69\x53\x6f\x49\x42\x53\x6b\x51','\x57\x52\x38\x47\x57\x50\x30\x74\x79\x6d\x6b\x52\x6f\x30\x64\x64\x47\x57','\x57\x36\x6d\x64\x6c\x38\x6b\x33\x6c\x49\x35\x68\x57\x52\x61\x52','\x72\x59\x35\x2f\x57\x36\x33\x63\x4f\x64\x4b','\x76\x43\x6f\x4e\x62\x43\x6b\x69\x65\x43\x6b\x67\x57\x52\x6d\x54\x57\x35\x4a\x64\x53\x43\x6b\x4c\x57\x35\x6d\x53','\x57\x52\x6d\x6f\x6d\x6d\x6f\x77\x57\x37\x4f\x56','\x57\x36\x70\x64\x4c\x38\x6b\x62\x57\x37\x44\x31\x57\x52\x43\x56\x57\x51\x2f\x63\x50\x32\x74\x64\x49\x65\x5a\x63\x47\x47','\x6b\x48\x4e\x64\x4a\x4e\x4a\x63\x56\x6d\x6f\x54','\x63\x43\x6b\x47\x72\x47','\x76\x43\x6b\x4d\x57\x50\x4f','\x57\x37\x5a\x63\x56\x62\x76\x65\x45\x71','\x71\x38\x6f\x4d\x66\x58\x76\x2f\x57\x34\x62\x6d','\x57\x50\x33\x63\x4f\x38\x6b\x2b\x57\x4f\x74\x64\x4d\x61\x62\x70','\x68\x66\x7a\x32\x67\x38\x6f\x57\x71\x77\x5a\x64\x54\x61','\x57\x50\x43\x43\x73\x71','\x6a\x6d\x6b\x68\x61\x43\x6b\x53\x42\x6d\x6f\x7a\x72\x74\x75','\x65\x4e\x6d\x4a\x57\x52\x5a\x64\x52\x64\x4f\x4c\x68\x33\x56\x63\x52\x32\x30','\x57\x36\x46\x63\x4f\x73\x46\x63\x51\x58\x6c\x64\x47\x38\x6f\x57\x6a\x47','\x57\x34\x4b\x57\x71\x76\x31\x6f\x6b\x77\x61','\x57\x52\x62\x31\x42\x53\x6b\x42\x57\x4f\x31\x38\x46\x65\x65','\x77\x75\x58\x37\x74\x72\x6c\x64\x50\x57\x68\x63\x54\x47','\x57\x36\x58\x30\x57\x34\x57\x4d\x79\x43\x6b\x77\x61\x68\x69','\x77\x53\x6f\x4a\x57\x34\x5a\x63\x55\x43\x6f\x38\x7a\x73\x78\x63\x51\x71','\x57\x50\x4f\x41\x62\x53\x6f\x4b\x68\x4e\x75','\x57\x4f\x4c\x53\x57\x51\x42\x64\x51\x43\x6f\x31\x57\x4f\x56\x64\x47\x71','\x42\x59\x34\x30','\x74\x73\x6a\x39\x57\x37\x37\x63\x53\x73\x6d','\x57\x4f\x4b\x64\x41\x65\x48\x30\x6d\x67\x57\x72','\x57\x37\x4a\x64\x51\x5a\x37\x64\x48\x4c\x53\x4c\x65\x53\x6f\x31\x57\x36\x37\x63\x4a\x38\x6f\x79','\x66\x43\x6b\x45\x57\x37\x4c\x38\x65\x6d\x6f\x4b\x57\x4f\x6d'];_0x4267=function(){return _0x5226c2;};return _0x4267();}
|
package/dist/algo/epigenetics.js
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// derive-from-events model). A gene that fails in the CURRENT environment class (but works elsewhere)
|
|
3
|
-
// should be penalized HERE only, not globally — its global health is untouched. v1 stored marks on the
|
|
4
|
-
// gene asset; v2 derives the penalty from recent per-(gene, env) outcomes at selection time, so no asset
|
|
5
|
-
// mutation and no schema churn. The penalty is subtracted from the gene's selection score; a gene that
|
|
6
|
-
// fails hard in this env falls in ranking (and below the floor → innovate) without being globally banned.
|
|
7
|
-
import { envFingerprintKey } from '../bootstrap/envFingerprint.js';
|
|
8
|
-
export { envFingerprintKey };
|
|
9
|
-
const MIN_ENV_ATTEMPTS = 3; // need this many attempts of the gene in this env before the penalty engages
|
|
10
|
-
const SUPPRESS_FAIL_RATE = 0.7; // fail rate (in this env) at/above which the penalty starts
|
|
11
|
-
const MAX_PENALTY = 0.5; // cap (subtracted from a [0,1]-ish score)
|
|
12
|
-
/**
|
|
13
|
-
* Epigenetic penalty in [0, MAX_PENALTY] for `geneId` in the current `envKey`, from recent per-env outcomes.
|
|
14
|
-
* 0 when there is not enough evidence (< MIN_ENV_ATTEMPTS) or the in-env fail rate is below SUPPRESS_FAIL_RATE;
|
|
15
|
-
* scales linearly from 0 at SUPPRESS_FAIL_RATE up to MAX_PENALTY at a 100% in-env fail rate.
|
|
16
|
-
*/
|
|
17
|
-
export function epigeneticPenaltyForIds(ids, envKey, outcomes) {
|
|
18
|
-
if (!envKey)
|
|
19
|
-
return 0;
|
|
20
|
-
const idSet = new Set(ids.filter((id) => id.length > 0));
|
|
21
|
-
if (idSet.size === 0)
|
|
22
|
-
return 0;
|
|
23
|
-
let attempts = 0;
|
|
24
|
-
let fails = 0;
|
|
25
|
-
for (const o of outcomes) {
|
|
26
|
-
if (!idSet.has(o.geneId) || o.envKey !== envKey)
|
|
27
|
-
continue;
|
|
28
|
-
attempts += 1;
|
|
29
|
-
if (o.status === 'failed')
|
|
30
|
-
fails += 1;
|
|
31
|
-
}
|
|
32
|
-
if (attempts < MIN_ENV_ATTEMPTS)
|
|
33
|
-
return 0;
|
|
34
|
-
const failRate = fails / attempts;
|
|
35
|
-
if (failRate < SUPPRESS_FAIL_RATE)
|
|
36
|
-
return 0;
|
|
37
|
-
return Math.min(MAX_PENALTY, MAX_PENALTY * ((failRate - SUPPRESS_FAIL_RATE) / (1 - SUPPRESS_FAIL_RATE)));
|
|
38
|
-
}
|
|
39
|
-
export function epigeneticPenalty(geneId, envKey, outcomes) {
|
|
40
|
-
return epigeneticPenaltyForIds([geneId], envKey, outcomes);
|
|
41
|
-
}
|
|
1
|
+
(function(_0x4b150b,_0x14c58b){const _0x31b8e3=_0x1387,_0x1d9532=_0x4b150b();while(!![]){try{const _0x3d37d3=-parseInt(_0x31b8e3(0x121,'\x69\x6d\x75\x56'))/(0x15d6+-0x1*-0x1e39+-0x340e)+-parseInt(_0x31b8e3(0x123,'\x24\x62\x76\x64'))/(0x330*0x3+-0x19a*-0x1+-0xb28)*(parseInt(_0x31b8e3(0x11d,'\x37\x5b\x61\x68'))/(-0xb90+0xb15+0x7e))+parseInt(_0x31b8e3(0x127,'\x24\x61\x44\x35'))/(0x1b5f+-0xb*-0x165+0x2ab2*-0x1)+parseInt(_0x31b8e3(0x122,'\x44\x41\x49\x66'))/(0x1*-0x19f6+-0x1092+0x2a8d)+-parseInt(_0x31b8e3(0x12a,'\x32\x39\x32\x67'))/(0x737+-0x7a*0x13+0x1dd*0x1)*(-parseInt(_0x31b8e3(0x11b,'\x67\x32\x23\x78'))/(0x1bc7+0x21be+-0x3d7e))+parseInt(_0x31b8e3(0x132,'\x5d\x58\x37\x49'))/(0xdca*-0x2+0x26cb+-0x199*0x7)*(parseInt(_0x31b8e3(0x120,'\x69\x6d\x75\x56'))/(-0x1*0x2435+-0x1887*0x1+0x3cc5))+parseInt(_0x31b8e3(0x12f,'\x34\x35\x70\x4e'))/(-0x2e*-0xbe+-0x447+0x1dd3*-0x1);if(_0x3d37d3===_0x14c58b)break;else _0x1d9532['push'](_0x1d9532['shift']());}catch(_0x2d7bc7){_0x1d9532['push'](_0x1d9532['shift']());}}}(_0x5b0f,-0xb2099+-0x482dd*0x2+0x1c289d));import{envFingerprintKey}from'\x2e\x2e\x2f\x62\x6f\x6f\x74\x73\x74\x72\x61\x70\x2f\x65\x6e\x76\x46\x69\x6e\x67\x65\x72\x70\x72\x69\x6e\x74\x2e\x6a\x73';export{envFingerprintKey};const MIN_ENV_ATTEMPTS=0x1619+-0x7ee+0xc*-0x12e,SUPPRESS_FAIL_RATE=-0x38b+0x9e4+0x145*-0x5+0.7,MAX_PENALTY=0x107e+-0x1fc2+-0xf44*-0x1+0.5;function _0x1387(_0x4a3192,_0x3b5672){_0x4a3192=_0x4a3192-(-0x355*-0x2+0xbed*0x3+-0x49*0x91);const _0x221a1b=_0x5b0f();let _0x4da580=_0x221a1b[_0x4a3192];if(_0x1387['\x67\x49\x4d\x42\x66\x48']===undefined){var _0x55cf53=function(_0x2f316d){const _0x41c9da='\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 _0x5f4910='',_0xa0335f='';for(let _0x324940=0x1b4b+-0x1b24+-0x27,_0x209117,_0x551c13,_0x5b4f30=-0x28c*-0x3+0x21fd+-0x1*0x29a1;_0x551c13=_0x2f316d['\x63\x68\x61\x72\x41\x74'](_0x5b4f30++);~_0x551c13&&(_0x209117=_0x324940%(0x1*-0x137b+-0x253b+-0x112*-0x35)?_0x209117*(0x43*-0x93+0x1fcd+0x6ec)+_0x551c13:_0x551c13,_0x324940++%(-0x261b+-0x6a1*-0x3+0x123c))?_0x5f4910+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x2561+-0x2*0x1105+0x486a&_0x209117>>(-(0x1aa0+-0x1*0x1b07+0x5*0x15)*_0x324940&-0x1aba+-0x84a+-0x2*-0x1185)):-0x137c+0x231e+-0xfa2){_0x551c13=_0x41c9da['\x69\x6e\x64\x65\x78\x4f\x66'](_0x551c13);}for(let _0x1c50e9=-0xd76*-0x1+0x13cf*0x1+0x3*-0xb17,_0x401c36=_0x5f4910['\x6c\x65\x6e\x67\x74\x68'];_0x1c50e9<_0x401c36;_0x1c50e9++){_0xa0335f+='\x25'+('\x30\x30'+_0x5f4910['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1c50e9)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x9c9*-0x2+-0x21e9+0x5f3*0x9))['\x73\x6c\x69\x63\x65'](-(0xd9*-0x25+-0x146*0x6+0x2703));}return decodeURIComponent(_0xa0335f);};const _0x4a039f=function(_0x336486,_0xb6ca3b){let _0x389fef=[],_0x4a5720=0xee5+0x969+-0x11*0x16e,_0x54939c,_0x1ea4ea='';_0x336486=_0x55cf53(_0x336486);let _0x5b91dd;for(_0x5b91dd=-0x106f+0xa49*-0x2+0x1*0x2501;_0x5b91dd<0x12ee+-0x310+-0xad*0x16;_0x5b91dd++){_0x389fef[_0x5b91dd]=_0x5b91dd;}for(_0x5b91dd=-0x677+-0x1ce9+-0x8*-0x46c;_0x5b91dd<0x255b+-0x766*-0x2+-0x1*0x3327;_0x5b91dd++){_0x4a5720=(_0x4a5720+_0x389fef[_0x5b91dd]+_0xb6ca3b['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5b91dd%_0xb6ca3b['\x6c\x65\x6e\x67\x74\x68']))%(0x1*-0x2144+0x2b*-0x88+0x391c),_0x54939c=_0x389fef[_0x5b91dd],_0x389fef[_0x5b91dd]=_0x389fef[_0x4a5720],_0x389fef[_0x4a5720]=_0x54939c;}_0x5b91dd=0x62c+-0x226f+-0x1c43*-0x1,_0x4a5720=0x1f69+-0xdd3*-0x2+-0x3b0f;for(let _0x27a33a=0xe1b+-0x1731+0x916;_0x27a33a<_0x336486['\x6c\x65\x6e\x67\x74\x68'];_0x27a33a++){_0x5b91dd=(_0x5b91dd+(0x14e7+-0x1*0x6f4+-0x33*0x46))%(0x73*0x5+-0xbd1+0xa92),_0x4a5720=(_0x4a5720+_0x389fef[_0x5b91dd])%(-0x11b+-0x3*0x8ba+0x1c49),_0x54939c=_0x389fef[_0x5b91dd],_0x389fef[_0x5b91dd]=_0x389fef[_0x4a5720],_0x389fef[_0x4a5720]=_0x54939c,_0x1ea4ea+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x336486['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x27a33a)^_0x389fef[(_0x389fef[_0x5b91dd]+_0x389fef[_0x4a5720])%(0x1c98+-0x1246+-0x4a9*0x2)]);}return _0x1ea4ea;};_0x1387['\x50\x41\x67\x76\x72\x75']=_0x4a039f,_0x1387['\x49\x43\x69\x50\x4b\x66']={},_0x1387['\x67\x49\x4d\x42\x66\x48']=!![];}const _0xcdfc01=_0x221a1b[-0x174c+0x1cca+-0x57e],_0x93949d=_0x4a3192+_0xcdfc01,_0x3692ff=_0x1387['\x49\x43\x69\x50\x4b\x66'][_0x93949d];return!_0x3692ff?(_0x1387['\x4f\x68\x4a\x77\x68\x47']===undefined&&(_0x1387['\x4f\x68\x4a\x77\x68\x47']=!![]),_0x4da580=_0x1387['\x50\x41\x67\x76\x72\x75'](_0x4da580,_0x3b5672),_0x1387['\x49\x43\x69\x50\x4b\x66'][_0x93949d]=_0x4da580):_0x4da580=_0x3692ff,_0x4da580;}function _0x5b0f(){const _0x2032a9=['\x45\x53\x6b\x65\x57\x36\x4c\x32\x67\x6d\x6f\x59','\x41\x57\x30\x43','\x41\x33\x54\x46\x6d\x49\x75\x62\x57\x4f\x79\x4e\x6d\x43\x6b\x4b\x57\x4f\x4a\x63\x56\x30\x61','\x71\x4a\x56\x63\x52\x38\x6f\x46\x57\x37\x42\x63\x4d\x57','\x57\x51\x34\x7a\x43\x38\x6f\x76\x43\x66\x4e\x63\x4f\x4e\x38\x2b\x57\x35\x6a\x4b\x65\x66\x43','\x44\x43\x6f\x53\x66\x31\x79\x39\x69\x6d\x6f\x69\x78\x32\x39\x51\x57\x34\x74\x64\x47\x4b\x61','\x42\x47\x75\x62','\x6c\x38\x6b\x63\x41\x59\x2f\x64\x53\x4e\x68\x64\x49\x57','\x57\x4f\x6c\x63\x53\x67\x74\x64\x56\x53\x6b\x69\x57\x36\x65','\x45\x6d\x6f\x30\x57\x34\x46\x63\x50\x64\x31\x52\x57\x50\x78\x63\x55\x43\x6f\x6b\x57\x50\x43\x74\x57\x36\x38','\x57\x50\x71\x46\x64\x53\x6f\x2b\x57\x35\x38\x6b\x57\x4f\x72\x79\x57\x37\x52\x64\x56\x48\x46\x64\x56\x49\x47','\x6f\x6d\x6f\x66\x70\x4e\x79','\x57\x51\x33\x64\x55\x73\x76\x68\x6d\x53\x6b\x77\x45\x4a\x64\x64\x49\x32\x53\x44\x42\x43\x6b\x51','\x57\x50\x37\x63\x54\x4b\x69\x53\x6e\x57\x65\x62\x57\x35\x39\x6f\x68\x53\x6b\x65\x57\x36\x75','\x79\x61\x30\x45\x57\x52\x6c\x63\x55\x53\x6b\x43','\x69\x43\x6b\x69\x57\x50\x68\x63\x4f\x5a\x42\x63\x4e\x38\x6b\x59','\x57\x51\x78\x64\x52\x6d\x6f\x4d\x70\x53\x6b\x31\x57\x37\x70\x64\x53\x66\x4a\x63\x4e\x48\x30\x58\x57\x50\x75','\x62\x4a\x52\x63\x55\x6d\x6f\x4b\x57\x34\x74\x63\x4d\x59\x4f','\x6d\x53\x6b\x49\x7a\x47\x48\x30\x76\x47','\x57\x37\x70\x63\x52\x43\x6b\x4b\x57\x51\x4e\x63\x55\x31\x2f\x64\x4b\x71','\x66\x53\x6b\x68\x57\x36\x71\x47\x57\x51\x69\x7a\x57\x36\x4a\x63\x49\x57\x79\x7a\x45\x38\x6f\x38\x57\x36\x57','\x79\x6d\x6f\x58\x6f\x4c\x75\x50\x61\x53\x6b\x7a\x46\x38\x6f\x54\x57\x37\x70\x63\x48\x43\x6f\x46','\x68\x43\x6b\x62\x57\x50\x44\x70\x57\x37\x6a\x4f\x57\x51\x52\x63\x48\x47','\x66\x53\x6b\x6f\x57\x36\x34\x53\x57\x51\x43\x79\x57\x50\x68\x63\x56\x57\x69\x41\x75\x38\x6f\x33','\x57\x36\x31\x69\x66\x4c\x5a\x64\x54\x6d\x6f\x6a\x76\x78\x37\x64\x4f\x6d\x6f\x45\x44\x38\x6f\x35','\x57\x37\x33\x63\x4f\x6d\x6f\x59\x57\x4f\x42\x64\x52\x65\x6d\x79\x6d\x4c\x48\x41\x67\x73\x47','\x44\x68\x6a\x6b\x57\x51\x68\x63\x52\x38\x6f\x6d\x62\x74\x68\x63\x4c\x72\x58\x77\x57\x35\x57'];_0x5b0f=function(){return _0x2032a9;};return _0x5b0f();}export function epigeneticPenaltyForIds(_0x27cc4c,_0xc66dfe,_0x12c4e0){const _0x52a6f6=_0x1387;if(!_0xc66dfe)return 0xcde+-0x1701+0xa23;const _0x153765=new Set(_0x27cc4c[_0x52a6f6(0x118,'\x65\x38\x75\x31')](_0x41bf30=>_0x41bf30['\x6c\x65\x6e\x67\x74\x68']>-0x11f8+0x1acd+-0x85*0x11));if(_0x153765[_0x52a6f6(0x130,'\x5a\x6e\x55\x43')]===-0x1f7a+0x4*0x45f+0xdfe)return-0x84a+-0x1*0x2453+0x2c9d;let _0x5cd3d3=0x231e+-0x992+0x6d*-0x3c,_0x20309f=0x9d1*0x1+0x5*-0x731+0x1a24;for(const _0x50d3b1 of _0x12c4e0){if(!_0x153765[_0x52a6f6(0x12b,'\x65\x38\x75\x31')](_0x50d3b1[_0x52a6f6(0x125,'\x64\x25\x58\x32')])||_0x50d3b1[_0x52a6f6(0x12d,'\x56\x5a\x29\x55')]!==_0xc66dfe)continue;_0x5cd3d3+=-0x21e9*0x1+0x1f5*0x9+0x104d;if(_0x50d3b1[_0x52a6f6(0x128,'\x67\x32\x23\x78')]===_0x52a6f6(0x11c,'\x21\x5a\x49\x71'))_0x20309f+=0x1e9*-0x4+0x1954+-0x11af;}if(_0x5cd3d3<MIN_ENV_ATTEMPTS)return 0xee5+0x969+-0x11*0x16e;const _0x5d47cb=_0x20309f/_0x5cd3d3;if(_0x5d47cb<SUPPRESS_FAIL_RATE)return-0x106f+0xa49*-0x2+0x1*0x2501;return Math[_0x52a6f6(0x126,'\x65\x38\x75\x31')](MAX_PENALTY,MAX_PENALTY*((_0x5d47cb-SUPPRESS_FAIL_RATE)/(0x12ee+-0x310+-0x83*0x1f-SUPPRESS_FAIL_RATE)));}export function epigeneticPenalty(_0x3cfb2e,_0xccd018,_0x4284a2){return epigeneticPenaltyForIds([_0x3cfb2e],_0xccd018,_0x4284a2);}
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { computeAssetId, SCHEMA_VERSION } from '../wire/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* EvolutionEvent = 世代记录(outcome 真值在此, 硬化 A4). 单向引 Capsule(capsule_id);
|
|
5
|
-
* 写入序列: capsule asset_id 先算 → 填 capsule_id → 再算 event asset_id.
|
|
6
|
-
*/
|
|
7
|
-
export function buildEvolutionEvent(input) {
|
|
8
|
-
const base = {
|
|
9
|
-
type: 'EvolutionEvent',
|
|
10
|
-
schema_version: SCHEMA_VERSION,
|
|
11
|
-
id: makeUlid(),
|
|
12
|
-
parent: input.parent ?? null,
|
|
13
|
-
intent: input.intent,
|
|
14
|
-
signals: [...input.signals],
|
|
15
|
-
genes_used: [...input.genesUsed],
|
|
16
|
-
mutation_id: input.mutationId,
|
|
17
|
-
blast_radius: input.blastRadius,
|
|
18
|
-
outcome: input.outcome,
|
|
19
|
-
capsule_id: input.capsuleId,
|
|
20
|
-
source_type: input.sourceType,
|
|
21
|
-
};
|
|
22
|
-
const asset_id = computeAssetId(base);
|
|
23
|
-
return { ...base, asset_id };
|
|
24
|
-
}
|
|
1
|
+
function _0x1f98(){const _0x31b0b3=['\x78\x31\x7a\x2f\x71\x38\x6b\x64\x57\x51\x43','\x6d\x6d\x6f\x6c\x57\x4f\x4c\x65\x70\x4a\x46\x63\x4e\x53\x6f\x49\x74\x38\x6b\x49\x73\x43\x6b\x48\x57\x4f\x53','\x57\x4f\x54\x57\x57\x36\x53\x37\x65\x73\x56\x64\x50\x4e\x64\x64\x53\x78\x74\x63\x4f\x49\x4a\x64\x48\x75\x4b','\x57\x50\x58\x43\x57\x4f\x74\x64\x56\x53\x6b\x6a\x69\x43\x6b\x5a\x57\x50\x61','\x67\x76\x56\x63\x4a\x6d\x6f\x70\x57\x50\x61\x55\x7a\x71','\x6d\x66\x33\x63\x55\x43\x6b\x2f\x79\x67\x44\x2b\x57\x34\x65','\x57\x4f\x78\x64\x4b\x43\x6b\x2f\x76\x38\x6f\x75\x57\x52\x56\x64\x4c\x64\x72\x52\x57\x37\x46\x64\x51\x59\x54\x69','\x57\x35\x6a\x52\x57\x37\x48\x4a\x57\x37\x38\x57\x57\x4f\x34\x70\x75\x38\x6f\x47\x57\x52\x53','\x57\x50\x50\x44\x57\x35\x70\x63\x4f\x38\x6f\x2f\x76\x38\x6f\x68\x57\x52\x72\x2b\x73\x4a\x46\x64\x54\x5a\x53','\x57\x36\x66\x44\x57\x52\x52\x64\x4a\x43\x6b\x77\x57\x4f\x56\x64\x4a\x30\x2f\x64\x53\x53\x6b\x64\x6e\x48\x61\x35\x57\x35\x65','\x68\x78\x72\x78\x71\x43\x6b\x4f\x57\x51\x71\x6b','\x57\x35\x5a\x64\x56\x38\x6f\x70\x57\x51\x6d\x67\x57\x37\x71','\x57\x52\x48\x6f\x57\x4f\x78\x63\x55\x47\x61\x6e\x57\x50\x4a\x63\x47\x47','\x57\x36\x6c\x64\x4d\x49\x61','\x57\x4f\x62\x41\x74\x43\x6f\x70\x57\x34\x76\x37\x79\x6d\x6b\x6f\x64\x53\x6f\x46\x6e\x61\x5a\x63\x47\x71','\x57\x35\x44\x55\x57\x37\x50\x4e\x57\x37\x7a\x49\x57\x37\x4c\x58\x73\x38\x6f\x52\x57\x50\x69\x57\x57\x52\x33\x63\x51\x57','\x57\x52\x6a\x45\x57\x50\x2f\x63\x56\x47\x43\x58\x57\x4f\x74\x63\x49\x71','\x74\x47\x66\x49\x77\x53\x6f\x70\x6d\x64\x33\x64\x4d\x61','\x70\x47\x56\x64\x4e\x53\x6b\x36\x57\x50\x46\x63\x56\x66\x47\x38\x57\x35\x64\x63\x51\x53\x6b\x47\x57\x37\x79','\x57\x52\x68\x63\x55\x38\x6f\x34\x46\x38\x6b\x54\x46\x53\x6b\x4f\x45\x62\x50\x5a\x57\x35\x65\x2b\x42\x4a\x65','\x6d\x53\x6f\x66\x57\x37\x30\x61\x73\x77\x52\x64\x48\x6d\x6f\x47','\x74\x66\x7a\x39\x76\x43\x6b\x79\x57\x52\x38\x31\x65\x57','\x57\x4f\x58\x59\x73\x53\x6f\x30\x6c\x49\x4e\x64\x4f\x78\x6c\x63\x49\x6d\x6f\x47\x57\x37\x47','\x57\x35\x4c\x6f\x65\x53\x6b\x6d\x57\x50\x68\x63\x47\x6d\x6b\x48\x57\x35\x64\x64\x47\x53\x6b\x39\x57\x4f\x64\x64\x4f\x61','\x57\x37\x30\x61\x57\x50\x70\x64\x4b\x53\x6f\x78\x64\x6d\x6f\x67\x57\x50\x6e\x74\x57\x50\x56\x64\x4e\x77\x7a\x59','\x71\x66\x47\x42\x7a\x58\x33\x64\x48\x75\x6d\x71\x57\x35\x78\x63\x55\x49\x44\x36\x73\x57'];_0x1f98=function(){return _0x31b0b3;};return _0x1f98();}(function(_0x1b07ee,_0x1626fb){const _0x54683e=_0x2142,_0x1f2e0d=_0x1b07ee();while(!![]){try{const _0x23470f=parseInt(_0x54683e(0xd6,'\x4c\x52\x26\x59'))/(-0x527+0x26b7+-0x218f)+-parseInt(_0x54683e(0xca,'\x78\x5a\x55\x62'))/(0xdf2+0x2a0*-0x1+0xb50*-0x1)*(parseInt(_0x54683e(0xdb,'\x66\x44\x6d\x35'))/(-0x459+0x1847+0x1*-0x13eb))+parseInt(_0x54683e(0xd9,'\x63\x54\x42\x75'))/(-0x1*-0xcb3+0x25a*0x3+-0x13bd)+-parseInt(_0x54683e(0xc8,'\x73\x24\x73\x28'))/(0x33e*-0xc+-0x2434+0x190b*0x3)+parseInt(_0x54683e(0xd4,'\x66\x44\x6d\x35'))/(-0x220e+-0x1*0x178a+0x399e)*(-parseInt(_0x54683e(0xd7,'\x4c\x43\x67\x49'))/(0x8dc+0x2c5*-0x4+-0x73*-0x5))+-parseInt(_0x54683e(0xc9,'\x66\x71\x6c\x65'))/(0x13a9*0x1+0x4eb*0x4+-0x274d)+-parseInt(_0x54683e(0xdd,'\x73\x24\x73\x28'))/(-0x23*-0x81+0x1*-0x2437+0x129d)*(-parseInt(_0x54683e(0xcf,'\x66\x47\x56\x21'))/(0x246f+-0x1*0xfd+-0x2368));if(_0x23470f===_0x1626fb)break;else _0x1f2e0d['push'](_0x1f2e0d['shift']());}catch(_0x3804ad){_0x1f2e0d['push'](_0x1f2e0d['shift']());}}}(_0x1f98,0x18c53a+-0x1d26aa+0x13081c));import{ulid as _0x11d174}from'\x75\x6c\x69\x64';function _0x2142(_0x1f67cf,_0x416159){_0x1f67cf=_0x1f67cf-(-0x254e+0xab+0x2567);const _0x292d68=_0x1f98();let _0x75c298=_0x292d68[_0x1f67cf];if(_0x2142['\x45\x6f\x45\x50\x53\x69']===undefined){var _0x57fe60=function(_0x1b07ee){const _0x1626fb='\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 _0x1f2e0d='',_0x23470f='';for(let _0x3804ad=-0x129a*0x1+0x2c*-0xa6+-0x7db*-0x6,_0x2d142f,_0x19031d,_0x1be7e3=-0x9c*0x38+-0x2c3*0x1+0x13*0x1f1;_0x19031d=_0x1b07ee['\x63\x68\x61\x72\x41\x74'](_0x1be7e3++);~_0x19031d&&(_0x2d142f=_0x3804ad%(-0x1b65+0xe*0x28d+0x5*-0x1a9)?_0x2d142f*(-0x1911+-0x1754+-0x7*-0x6f3)+_0x19031d:_0x19031d,_0x3804ad++%(0x1732+0x1*-0x1af5+0x3c7*0x1))?_0x1f2e0d+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0xd*-0x11+-0x20e5+0x2107&_0x2d142f>>(-(-0x2bc+0x1588+-0x12ca)*_0x3804ad&0x11d1+-0x10*-0x71+-0x18db)):0x7ff+0x1422+0x1*-0x1c21){_0x19031d=_0x1626fb['\x69\x6e\x64\x65\x78\x4f\x66'](_0x19031d);}for(let _0x298ede=-0x1*-0x2619+-0xe2*0x22+-0x815,_0x484dc8=_0x1f2e0d['\x6c\x65\x6e\x67\x74\x68'];_0x298ede<_0x484dc8;_0x298ede++){_0x23470f+='\x25'+('\x30\x30'+_0x1f2e0d['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x298ede)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1807+0x1929*0x1+-0x312*0x10))['\x73\x6c\x69\x63\x65'](-(-0xa65+0x2*0xaa9+-0xaeb));}return decodeURIComponent(_0x23470f);};const _0xd29253=function(_0x20fc5e,_0x180dbc){let _0x3e6ef1=[],_0x3afa20=0x1*-0x7a+0x220c+-0x2*0x10c9,_0x27173f,_0x4be2c5='';_0x20fc5e=_0x57fe60(_0x20fc5e);let _0x4d4045;for(_0x4d4045=-0x1a5c+0x4*-0x5c9+-0x18c0*-0x2;_0x4d4045<0x1*0x1f7b+-0x2f*0xb+-0x1c76;_0x4d4045++){_0x3e6ef1[_0x4d4045]=_0x4d4045;}for(_0x4d4045=0x3*-0xb35+-0x2fa*0x8+0x396f;_0x4d4045<-0x1cc8+0x7*-0x242+0x2d96;_0x4d4045++){_0x3afa20=(_0x3afa20+_0x3e6ef1[_0x4d4045]+_0x180dbc['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4d4045%_0x180dbc['\x6c\x65\x6e\x67\x74\x68']))%(0x26b7+-0xe09+-0x1*0x17ae),_0x27173f=_0x3e6ef1[_0x4d4045],_0x3e6ef1[_0x4d4045]=_0x3e6ef1[_0x3afa20],_0x3e6ef1[_0x3afa20]=_0x27173f;}_0x4d4045=0x3*-0x923+-0x1*-0x1822+-0x347*-0x1,_0x3afa20=0x3*-0xb32+0x1*0xb3+0x20e3;for(let _0x1b7a2f=0x1c78+0x210a+-0x3d82;_0x1b7a2f<_0x20fc5e['\x6c\x65\x6e\x67\x74\x68'];_0x1b7a2f++){_0x4d4045=(_0x4d4045+(0x1788+0x5a5*0x5+-0x33c0))%(-0x1*0x178a+-0x145e+-0x6*-0x77c),_0x3afa20=(_0x3afa20+_0x3e6ef1[_0x4d4045])%(0x3a9*-0x8+0xe0a+0x42*0x3f),_0x27173f=_0x3e6ef1[_0x4d4045],_0x3e6ef1[_0x4d4045]=_0x3e6ef1[_0x3afa20],_0x3e6ef1[_0x3afa20]=_0x27173f,_0x4be2c5+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x20fc5e['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1b7a2f)^_0x3e6ef1[(_0x3e6ef1[_0x4d4045]+_0x3e6ef1[_0x3afa20])%(0x8b*0x2c+0x26d8+-0x1ede*0x2)]);}return _0x4be2c5;};_0x2142['\x56\x64\x47\x78\x6b\x5a']=_0xd29253,_0x2142['\x48\x7a\x4f\x69\x71\x50']={},_0x2142['\x45\x6f\x45\x50\x53\x69']=!![];}const _0x4161a=_0x292d68[0x1*0x4d2+-0x1084+-0x1*-0xbb2],_0x2c4898=_0x1f67cf+_0x4161a,_0x58195b=_0x2142['\x48\x7a\x4f\x69\x71\x50'][_0x2c4898];return!_0x58195b?(_0x2142['\x79\x64\x75\x6a\x4e\x4d']===undefined&&(_0x2142['\x79\x64\x75\x6a\x4e\x4d']=!![]),_0x75c298=_0x2142['\x56\x64\x47\x78\x6b\x5a'](_0x75c298,_0x416159),_0x2142['\x48\x7a\x4f\x69\x71\x50'][_0x2c4898]=_0x75c298):_0x75c298=_0x58195b,_0x75c298;}import{computeAssetId,SCHEMA_VERSION}from'\x2e\x2e\x2f\x77\x69\x72\x65\x2f\x69\x6e\x64\x65\x78\x2e\x6a\x73';export function buildEvolutionEvent(_0x560f22){const _0x39a027=_0x2142,_0x307b34={'\x74\x79\x70\x65':'\x45\x76\x6f\x6c\x75\x74\x69\x6f'+_0x39a027(0xcb,'\x21\x49\x68\x62'),'\x73\x63\x68\x65\x6d\x61\x5f\x76\x65\x72\x73\x69\x6f\x6e':SCHEMA_VERSION,'\x69\x64':_0x11d174(),'\x70\x61\x72\x65\x6e\x74':_0x560f22[_0x39a027(0xda,'\x78\x5a\x55\x62')]??null,'\x69\x6e\x74\x65\x6e\x74':_0x560f22['\x69\x6e\x74\x65\x6e\x74'],'\x73\x69\x67\x6e\x61\x6c\x73':[..._0x560f22['\x73\x69\x67\x6e\x61\x6c\x73']],'\x67\x65\x6e\x65\x73\x5f\x75\x73\x65\x64':[..._0x560f22[_0x39a027(0xd0,'\x4e\x75\x68\x4d')+'\x64']],'\x6d\x75\x74\x61\x74\x69\x6f\x6e\x5f\x69\x64':_0x560f22[_0x39a027(0xcc,'\x4e\x75\x68\x4d')+'\x49\x64'],'\x62\x6c\x61\x73\x74\x5f\x72\x61\x64\x69\x75\x73':_0x560f22[_0x39a027(0xc5,'\x75\x5b\x43\x6c')+_0x39a027(0xcd,'\x39\x5a\x4b\x4e')],'\x6f\x75\x74\x63\x6f\x6d\x65':_0x560f22['\x6f\x75\x74\x63\x6f\x6d\x65'],'\x63\x61\x70\x73\x75\x6c\x65\x5f\x69\x64':_0x560f22[_0x39a027(0xd5,'\x78\x5a\x55\x62')+'\x64'],'\x73\x6f\x75\x72\x63\x65\x5f\x74\x79\x70\x65':_0x560f22['\x73\x6f\x75\x72\x63\x65\x54\x79'+'\x70\x65']},_0x3999f3=computeAssetId(_0x307b34);return{..._0x307b34,'\x61\x73\x73\x65\x74\x5f\x69\x64':_0x3999f3};}
|
package/dist/algo/exploration.js
CHANGED
|
@@ -1,68 +1 @@
|
|
|
1
|
-
// Exploration layer (ported from v1 src/gep/selector.js): adaptive drift intensity + plateau override
|
|
2
|
-
// to escape local optima. v2 selection is deterministic by default (always the top score); drift stays
|
|
3
|
-
// OFF unless the caller passes SelectionInput.exploration (typically when a plateau is detected upstream).
|
|
4
|
-
// When active, the strategy occasionally picks from the top-N candidates instead of the single top —
|
|
5
|
-
// random exploration to break a stuck pool. Randomness is injected (ctx.rng) for deterministic tests.
|
|
6
|
-
const MATURITY_ATTEMPTS_PER_GENE = 10;
|
|
7
|
-
const DRIFT_OFFSET_MAX = 0.3;
|
|
8
|
-
const DRIFT_OFFSET_MIN = 0.02;
|
|
9
|
-
const PLATEAU_SUGGEST = 5;
|
|
10
|
-
const PLATEAU_FORCE = 10;
|
|
11
|
-
/**
|
|
12
|
-
* Adaptive drift intensity (ported v1): 1/sqrt(Ne) + an offset that decays from 0.3 → 0.02 as the pool
|
|
13
|
-
* matures (totalAttempts approaches Ne * 10). Tiny pools (Ne <= 1) get a fixed high 0.7 to force exploration.
|
|
14
|
-
*/
|
|
15
|
-
export function computeDriftIntensity(ne, totalAttempts = 0) {
|
|
16
|
-
if (!Number.isFinite(ne) || ne <= 1)
|
|
17
|
-
return 0.7;
|
|
18
|
-
const attempts = Number.isFinite(totalAttempts) ? Math.max(0, totalAttempts) : 0;
|
|
19
|
-
const maturityThreshold = ne * MATURITY_ATTEMPTS_PER_GENE;
|
|
20
|
-
const maturity = maturityThreshold > 0 ? Math.min(1, attempts / maturityThreshold) : 0;
|
|
21
|
-
const offset = DRIFT_OFFSET_MAX - (DRIFT_OFFSET_MAX - DRIFT_OFFSET_MIN) * maturity;
|
|
22
|
-
return Math.min(1, 1 / Math.sqrt(ne) + offset);
|
|
23
|
-
}
|
|
24
|
-
/** Detect a plateau from recent cycle outcomes: count the trailing run of consecutive non-success. */
|
|
25
|
-
export function detectPlateau(recentOutcomes) {
|
|
26
|
-
let count = 0;
|
|
27
|
-
for (let i = recentOutcomes.length - 1; i >= 0; i--) {
|
|
28
|
-
if (recentOutcomes[i] === 'success')
|
|
29
|
-
break;
|
|
30
|
-
count++;
|
|
31
|
-
}
|
|
32
|
-
if (count >= PLATEAU_FORCE)
|
|
33
|
-
return { active: true, severity: 'required', count };
|
|
34
|
-
if (count >= PLATEAU_SUGGEST)
|
|
35
|
-
return { active: true, severity: 'suggested', count };
|
|
36
|
-
return { active: false, severity: 'suggested', count };
|
|
37
|
-
}
|
|
38
|
-
function explorationActive(exp) {
|
|
39
|
-
return Boolean(exp && (exp.driftEnabled || exp.plateau?.active));
|
|
40
|
-
}
|
|
41
|
-
/** Deterministic top-N window shared by legacy random drift and UCB1. */
|
|
42
|
-
export function explorationWindowSize(eligibleCount, exp) {
|
|
43
|
-
if (!explorationActive(exp) || eligibleCount <= 1)
|
|
44
|
-
return Math.min(1, Math.max(0, eligibleCount));
|
|
45
|
-
let intensity = computeDriftIntensity(eligibleCount, exp.totalAttempts ?? 0);
|
|
46
|
-
if (exp.plateau?.active)
|
|
47
|
-
intensity = Math.max(intensity, exp.plateau.severity === 'required' ? 1.0 : 0.7);
|
|
48
|
-
return Math.min(eligibleCount, Math.max(2, Math.ceil(eligibleCount * intensity)));
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Pick which ranked candidate to take among `eligibleCount` above-floor candidates.
|
|
52
|
-
* No exploration → deterministic top (index 0). With exploration → compute intensity (an active plateau
|
|
53
|
-
* forces it to 0.7/1.0); with probability = intensity, pick a random candidate from the top-N (N grows
|
|
54
|
-
* with intensity). rng() is called at most twice; pass a seeded rng for deterministic tests.
|
|
55
|
-
*/
|
|
56
|
-
export function driftSelect(eligibleCount, exp, rng) {
|
|
57
|
-
if (!explorationActive(exp) || eligibleCount <= 1) {
|
|
58
|
-
return { driftMode: 'deterministic', index: 0, intensity: 0 };
|
|
59
|
-
}
|
|
60
|
-
let intensity = computeDriftIntensity(eligibleCount, exp.totalAttempts ?? 0);
|
|
61
|
-
if (exp.plateau?.active)
|
|
62
|
-
intensity = Math.max(intensity, exp.plateau.severity === 'required' ? 1.0 : 0.7);
|
|
63
|
-
if (rng() >= intensity)
|
|
64
|
-
return { driftMode: 'deterministic', index: 0, intensity };
|
|
65
|
-
const topN = explorationWindowSize(eligibleCount, exp);
|
|
66
|
-
const index = Math.min(topN - 1, Math.max(0, Math.floor(rng() * topN)));
|
|
67
|
-
return { driftMode: exp.plateau?.active ? 'plateau_drift' : 'drift', index, intensity };
|
|
68
|
-
}
|
|
1
|
+
(function(_0x4b7a83,_0x1e529e){const _0x1547e0=_0x2039,_0xf79f08=_0x4b7a83();while(!![]){try{const _0x42a6fc=parseInt(_0x1547e0(0x1df,'\x29\x38\x7a\x6e'))/(-0x1*-0x1889+0x5*0xab+-0x1bdf)*(parseInt(_0x1547e0(0x1b9,'\x5d\x72\x28\x5e'))/(-0x106c+-0x1*0x43b+0x81*0x29))+-parseInt(_0x1547e0(0x1d3,'\x71\x4c\x77\x24'))/(0x197f+-0x623*-0x1+0x1*-0x1f9f)*(-parseInt(_0x1547e0(0x1d0,'\x68\x69\x6a\x65'))/(0xd*0xef+0x235f+0x17bf*-0x2))+parseInt(_0x1547e0(0x1d9,'\x24\x49\x32\x61'))/(0x59*-0x2c+0xba1+0x3b0)+parseInt(_0x1547e0(0x1bd,'\x39\x54\x6e\x77'))/(-0x2b5+-0x1*-0x69b+0xf8*-0x4)+-parseInt(_0x1547e0(0x1cc,'\x59\x52\x73\x33'))/(0x208b+0x2c4*0x6+-0x311c)*(parseInt(_0x1547e0(0x1b2,'\x59\x5a\x4a\x59'))/(0x1934+-0xf98+0x265*-0x4))+parseInt(_0x1547e0(0x1ba,'\x5a\x40\x29\x21'))/(-0x796*-0x3+-0x3eb+-0x2*0x967)*(parseInt(_0x1547e0(0x1b4,'\x4d\x59\x50\x41'))/(0x1*-0x2103+0x116b+0x1*0xfa2))+-parseInt(_0x1547e0(0x1ed,'\x73\x56\x5a\x6f'))/(0x2077*-0x1+0x820+-0x1862*-0x1)*(parseInt(_0x1547e0(0x1cf,'\x2a\x5e\x55\x63'))/(-0x6f*-0x57+0xe94+-0x3441));if(_0x42a6fc===_0x1e529e)break;else _0xf79f08['push'](_0xf79f08['shift']());}catch(_0x428b70){_0xf79f08['push'](_0xf79f08['shift']());}}}(_0x4a16,-0x35163+0x1*0xa1db5+-0x1538a));function _0x2039(_0x308654,_0x240737){_0x308654=_0x308654-(-0x2*-0x6cd+-0x51a+-0x368*0x2);const _0x2bac45=_0x4a16();let _0x10f777=_0x2bac45[_0x308654];if(_0x2039['\x7a\x6c\x53\x68\x55\x49']===undefined){var _0x146deb=function(_0x39cbcb){const _0x30f8f7='\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 _0xa061ae='',_0x5cf566='';for(let _0x3dae25=-0x3b4+0x49*0x31+0x1*-0xa45,_0x353b1c,_0x1770eb,_0x3e2f28=-0x986+0x12e5*0x2+-0x1c44;_0x1770eb=_0x39cbcb['\x63\x68\x61\x72\x41\x74'](_0x3e2f28++);~_0x1770eb&&(_0x353b1c=_0x3dae25%(0x1*-0x1674+-0x165+0x17dd)?_0x353b1c*(0x361+0x354*-0x5+0x1*0xd83)+_0x1770eb:_0x1770eb,_0x3dae25++%(0x1d84+-0x2414+0x694*0x1))?_0xa061ae+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x1123+0x273+0xfaf&_0x353b1c>>(-(0x8c1+0x1283*-0x1+0x4e2*0x2)*_0x3dae25&0xc83*0x1+0x12c9+-0x1f46)):-0xcdc+-0x27*0xa9+0x269b){_0x1770eb=_0x30f8f7['\x69\x6e\x64\x65\x78\x4f\x66'](_0x1770eb);}for(let _0x4d909d=-0x88a+0x137*0x1c+-0x2*0xcbd,_0x4c8211=_0xa061ae['\x6c\x65\x6e\x67\x74\x68'];_0x4d909d<_0x4c8211;_0x4d909d++){_0x5cf566+='\x25'+('\x30\x30'+_0xa061ae['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4d909d)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x2167*0x1+-0xe*-0x291+0x277*-0x1))['\x73\x6c\x69\x63\x65'](-(0x1156+-0x11f6+-0x1*-0xa2));}return decodeURIComponent(_0x5cf566);};const _0x2c789d=function(_0x282264,_0x1be578){let _0x376476=[],_0x41c773=-0x1564+0x10c2+0x4a2,_0x4b1500,_0x59353f='';_0x282264=_0x146deb(_0x282264);let _0x576b14;for(_0x576b14=0x378*-0x1+0x173*0xb+0x1f*-0x67;_0x576b14<-0x7a3+-0x24b0+0x2d53*0x1;_0x576b14++){_0x376476[_0x576b14]=_0x576b14;}for(_0x576b14=-0x726+-0x85*-0x41+-0x1a9f;_0x576b14<0x1*-0x2538+-0x16a3+0x3cdb;_0x576b14++){_0x41c773=(_0x41c773+_0x376476[_0x576b14]+_0x1be578['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x576b14%_0x1be578['\x6c\x65\x6e\x67\x74\x68']))%(-0x1d2e+0x140c+-0xa22*-0x1),_0x4b1500=_0x376476[_0x576b14],_0x376476[_0x576b14]=_0x376476[_0x41c773],_0x376476[_0x41c773]=_0x4b1500;}_0x576b14=-0xe*0xc9+0x96e+0x190,_0x41c773=-0x8b3*0x1+-0x738+0xfeb;for(let _0x419c94=-0x6d+-0xf61+0xfce;_0x419c94<_0x282264['\x6c\x65\x6e\x67\x74\x68'];_0x419c94++){_0x576b14=(_0x576b14+(-0x134*0xd+-0x227*-0x1+-0x9d*-0x16))%(-0x3e*-0x76+-0x1692+-0x281*0x2),_0x41c773=(_0x41c773+_0x376476[_0x576b14])%(0x640+0x3*0x89+0x249*-0x3),_0x4b1500=_0x376476[_0x576b14],_0x376476[_0x576b14]=_0x376476[_0x41c773],_0x376476[_0x41c773]=_0x4b1500,_0x59353f+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x282264['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x419c94)^_0x376476[(_0x376476[_0x576b14]+_0x376476[_0x41c773])%(-0xe8d+0xc07*0x1+0x2*0x1c3)]);}return _0x59353f;};_0x2039['\x5a\x47\x56\x76\x56\x4a']=_0x2c789d,_0x2039['\x46\x67\x6e\x79\x78\x53']={},_0x2039['\x7a\x6c\x53\x68\x55\x49']=!![];}const _0x2bb4f4=_0x2bac45[0x182+-0x515+0x393],_0x14a96b=_0x308654+_0x2bb4f4,_0x52c692=_0x2039['\x46\x67\x6e\x79\x78\x53'][_0x14a96b];return!_0x52c692?(_0x2039['\x49\x55\x6a\x7a\x62\x41']===undefined&&(_0x2039['\x49\x55\x6a\x7a\x62\x41']=!![]),_0x10f777=_0x2039['\x5a\x47\x56\x76\x56\x4a'](_0x10f777,_0x240737),_0x2039['\x46\x67\x6e\x79\x78\x53'][_0x14a96b]=_0x10f777):_0x10f777=_0x52c692,_0x10f777;}const MATURITY_ATTEMPTS_PER_GENE=-0x1db7+-0xdda+0x3*0xe89,DRIFT_OFFSET_MAX=-0x1e47+-0x6d*-0x59+-0x41*0x1e+0.3,DRIFT_OFFSET_MIN=0x8cf+-0x62*0x31+0x1*0x9f3+0.02,PLATEAU_SUGGEST=0xeb9*-0x1+-0x1a*-0xdb+-0x40*0x1e,PLATEAU_FORCE=0x3*0x7d5+-0x1*-0x2267+-0x39dc;export function computeDriftIntensity(_0x328a72,_0x1edc95=-0x4*0x5f8+-0x11ea+0x29ca){const _0x4693db=_0x2039;if(!Number[_0x4693db(0x1c5,'\x4d\x66\x6a\x73')](_0x328a72)||_0x328a72<=-0x1656+-0x343*0x1+0x1*0x199a)return-0x1edc+-0xd3*-0x2d+0x91*-0xb+0.7;const _0x5e12fc=Number[_0x4693db(0x1da,'\x24\x64\x77\x54')](_0x1edc95)?Math[_0x4693db(0x1c3,'\x4d\x59\x50\x41')](0x179d+0x16*-0x48+-0x116d*0x1,_0x1edc95):0x208d+0xeaf+-0x2f3c,_0x23e8dc=_0x328a72*MATURITY_ATTEMPTS_PER_GENE,_0x2a853e=_0x23e8dc>-0x1755+-0x5c4+0x1d19?Math[_0x4693db(0x1d7,'\x71\x73\x4d\x66')](-0x1b0c+-0x1519+0x3026,_0x5e12fc/_0x23e8dc):0x8*-0x43+0xa0f+-0x7f7,_0x546dc6=DRIFT_OFFSET_MAX-(DRIFT_OFFSET_MAX-DRIFT_OFFSET_MIN)*_0x2a853e;return Math[_0x4693db(0x1e6,'\x6c\x5a\x50\x39')](0x140c+0x165d+-0x2a68,(0x5*-0x736+-0xc76+0x3085)/Math[_0x4693db(0x1bb,'\x58\x35\x50\x49')](_0x328a72)+_0x546dc6);}export function detectPlateau(_0x5e606d){const _0x1abcfe=_0x2039;let _0x3f4642=-0xd88+0xe03+-0x7b;for(let _0xda6f53=_0x5e606d[_0x1abcfe(0x1cd,'\x6c\x62\x6e\x46')]-(0x6d5+0xf*0xb3+0x155*-0xd);_0xda6f53>=0x73b+-0x8a4+0x169;_0xda6f53--){if(_0x5e606d[_0xda6f53]===_0x1abcfe(0x1ca,'\x57\x79\x71\x25'))break;_0x3f4642++;}if(_0x3f4642>=PLATEAU_FORCE)return{'\x61\x63\x74\x69\x76\x65':!![],'\x73\x65\x76\x65\x72\x69\x74\x79':_0x1abcfe(0x1bf,'\x64\x30\x40\x28'),'\x63\x6f\x75\x6e\x74':_0x3f4642};if(_0x3f4642>=PLATEAU_SUGGEST)return{'\x61\x63\x74\x69\x76\x65':!![],'\x73\x65\x76\x65\x72\x69\x74\x79':_0x1abcfe(0x1c2,'\x6f\x36\x58\x39')+'\x64','\x63\x6f\x75\x6e\x74':_0x3f4642};return{'\x61\x63\x74\x69\x76\x65':![],'\x73\x65\x76\x65\x72\x69\x74\x79':_0x1abcfe(0x1d4,'\x34\x4e\x26\x34')+'\x64','\x63\x6f\x75\x6e\x74':_0x3f4642};}function _0x4a16(){const _0x50f6cd=['\x57\x4f\x37\x63\x56\x73\x6c\x64\x53\x4c\x70\x63\x4b\x43\x6b\x59\x57\x37\x4e\x63\x4d\x75\x4f\x38\x72\x38\x6b\x38','\x57\x52\x48\x33\x44\x57','\x74\x43\x6b\x6b\x57\x37\x30\x2f\x57\x34\x53\x67\x79\x53\x6b\x39','\x57\x51\x5a\x64\x48\x63\x44\x4f\x57\x4f\x71','\x57\x35\x46\x63\x53\x32\x33\x64\x53\x38\x6f\x61\x57\x36\x34','\x45\x43\x6b\x69\x57\x34\x37\x63\x4c\x59\x4f\x35\x6a\x67\x65','\x57\x52\x5a\x63\x4d\x4e\x61','\x6a\x53\x6f\x45\x76\x43\x6f\x33\x57\x50\x4a\x63\x48\x78\x70\x63\x4d\x43\x6f\x42\x73\x4c\x76\x63\x73\x47','\x57\x52\x37\x64\x4a\x4d\x6a\x33\x77\x53\x6b\x59\x6b\x6d\x6f\x6d','\x79\x73\x6a\x61\x65\x47','\x66\x57\x75\x78\x69\x43\x6f\x68\x72\x53\x6f\x58\x7a\x71','\x63\x38\x6b\x65\x57\x50\x37\x63\x55\x61','\x69\x49\x5a\x64\x4a\x38\x6b\x6e\x76\x38\x6f\x35\x65\x43\x6f\x61\x6c\x4c\x4b','\x57\x51\x7a\x52\x45\x53\x6f\x31\x64\x66\x75\x53','\x57\x52\x70\x64\x4a\x30\x31\x34\x71\x61','\x6d\x68\x7a\x6d\x66\x43\x6b\x5a\x57\x51\x74\x63\x56\x66\x79','\x62\x43\x6b\x6e\x57\x50\x78\x63\x55\x38\x6f\x63\x77\x71','\x67\x43\x6b\x65\x57\x50\x52\x63\x51\x6d\x6f\x74\x75\x6d\x6f\x39\x69\x57','\x6e\x38\x6b\x6e\x72\x43\x6b\x5a\x62\x74\x6e\x67\x57\x50\x65','\x57\x51\x74\x63\x53\x6d\x6b\x57\x69\x66\x62\x33\x46\x53\x6b\x77\x67\x75\x57\x74\x75\x53\x6f\x70','\x70\x43\x6b\x4a\x57\x35\x52\x64\x4a\x31\x4f','\x57\x34\x78\x63\x51\x6d\x6b\x6f','\x57\x35\x5a\x64\x4a\x63\x4e\x63\x4c\x78\x76\x72\x42\x47','\x57\x36\x53\x42\x57\x51\x61\x4c\x62\x38\x6f\x54\x6a\x5a\x30','\x57\x36\x78\x63\x4a\x72\x75\x54\x61\x38\x6f\x54\x41\x6d\x6f\x74\x57\x35\x6a\x30\x71\x6d\x6f\x4b\x71\x57','\x42\x38\x6b\x71\x57\x35\x4e\x63\x48\x64\x57','\x57\x34\x70\x64\x55\x6d\x6f\x4b','\x57\x35\x56\x63\x51\x38\x6f\x32\x57\x4f\x31\x4e\x6c\x43\x6b\x45\x57\x50\x37\x63\x4a\x64\x2f\x64\x49\x38\x6b\x51\x57\x50\x65','\x57\x37\x61\x4e\x6b\x57\x43\x66\x57\x35\x65\x64\x57\x50\x57\x42\x57\x34\x42\x64\x49\x33\x4e\x63\x4c\x71','\x57\x50\x6c\x63\x50\x71\x56\x64\x4b\x47\x52\x63\x4b\x6d\x6b\x46\x75\x61','\x57\x37\x34\x70\x57\x37\x4a\x63\x4f\x38\x6b\x31\x57\x37\x7a\x64','\x76\x57\x30\x36\x57\x51\x62\x39\x57\x34\x70\x64\x4b\x61','\x57\x52\x39\x42\x57\x51\x4a\x64\x4f\x43\x6f\x48\x57\x51\x69\x65\x57\x35\x48\x7a\x57\x4f\x4a\x63\x48\x53\x6f\x5a\x57\x50\x65','\x62\x6d\x6b\x6a\x57\x4f\x6d','\x57\x50\x4e\x64\x53\x43\x6f\x63\x57\x37\x4a\x64\x4c\x38\x6f\x65\x57\x36\x30\x69\x57\x37\x72\x30','\x65\x4b\x7a\x37\x57\x36\x66\x55\x57\x36\x2f\x63\x4e\x71','\x57\x35\x37\x63\x56\x71\x5a\x63\x4e\x31\x76\x79\x76\x38\x6b\x49','\x57\x52\x64\x63\x55\x64\x54\x38\x57\x52\x4f\x52\x57\x37\x65\x61\x57\x37\x47\x47\x57\x52\x47\x4a\x57\x51\x4f','\x62\x71\x6d\x76\x6c\x43\x6f\x64\x73\x47','\x57\x34\x5a\x64\x50\x33\x68\x63\x54\x71\x42\x64\x47\x6d\x6f\x31','\x57\x50\x70\x63\x56\x43\x6f\x54\x57\x50\x37\x63\x49\x6d\x6b\x75\x57\x35\x6a\x6c','\x70\x38\x6f\x37\x57\x37\x43','\x57\x4f\x39\x66\x73\x57','\x57\x35\x53\x75\x66\x43\x6b\x2f\x57\x4f\x6a\x48\x66\x53\x6b\x79\x79\x43\x6f\x4b\x57\x52\x4a\x64\x50\x4c\x38','\x7a\x33\x56\x63\x4a\x38\x6f\x42\x78\x53\x6f\x52\x69\x43\x6f\x57','\x41\x38\x6b\x45\x57\x35\x33\x63\x4d\x74\x4b\x56','\x6a\x4c\x46\x63\x4b\x57','\x69\x6d\x6b\x77\x57\x37\x37\x64\x53\x57\x2f\x63\x50\x38\x6b\x61\x57\x35\x69','\x64\x4b\x61\x70\x57\x52\x44\x4d\x57\x52\x6c\x64\x48\x4c\x64\x64\x50\x49\x35\x75\x57\x37\x62\x78','\x75\x62\x4e\x64\x50\x64\x47\x57\x57\x37\x79','\x57\x4f\x70\x63\x54\x38\x6f\x54\x57\x50\x52\x63\x4c\x53\x6b\x34\x57\x34\x39\x72','\x57\x51\x46\x64\x4b\x75\x76\x51\x75\x43\x6b\x36\x6b\x71','\x57\x51\x48\x73\x6d\x57','\x79\x33\x4a\x63\x4d\x53\x6f\x6f\x76\x38\x6f\x6c\x69\x61','\x41\x62\x39\x6c\x57\x52\x50\x68\x63\x64\x74\x63\x4f\x6d\x6f\x51\x57\x51\x4b\x57\x57\x37\x6d\x2f','\x57\x37\x7a\x59\x6b\x6d\x6f\x6b\x57\x36\x34\x52\x63\x71','\x57\x36\x64\x64\x49\x30\x34\x73\x57\x51\x6a\x77\x6c\x62\x43','\x57\x52\x4e\x64\x49\x67\x4b\x4f\x57\x34\x76\x47\x45\x71\x57','\x57\x52\x4a\x64\x4a\x74\x4c\x59\x57\x50\x38\x30\x61\x6d\x6b\x72','\x79\x6d\x6b\x4a\x57\x37\x58\x75\x71\x53\x6b\x70\x57\x35\x6a\x65','\x42\x53\x6b\x79\x57\x35\x33\x63\x4c\x74\x30\x4e\x6f\x77\x4f','\x57\x52\x64\x64\x49\x4d\x43\x77\x57\x35\x48\x7a\x57\x4f\x65','\x6a\x73\x78\x64\x47\x53\x6b\x6f\x63\x38\x6b\x74\x79\x53\x6f\x6b\x67\x4d\x62\x34\x57\x37\x65\x45','\x6f\x65\x46\x63\x4d\x74\x69','\x64\x64\x4f\x47\x57\x50\x62\x6d'];_0x4a16=function(){return _0x50f6cd;};return _0x4a16();}function explorationActive(_0x1733ee){const _0x2b32e1=_0x2039;return Boolean(_0x1733ee&&(_0x1733ee['\x64\x72\x69\x66\x74\x45\x6e\x61'+_0x2b32e1(0x1c8,'\x6c\x62\x6e\x46')]||_0x1733ee[_0x2b32e1(0x1e0,'\x75\x33\x66\x61')]?.[_0x2b32e1(0x1c1,'\x45\x54\x4a\x70')]));}export function explorationWindowSize(_0x4603e7,_0x5665a5){const _0xc8089a=_0x2039;if(!explorationActive(_0x5665a5)||_0x4603e7<=-0x64c+0x243d+-0x1df0)return Math[_0xc8089a(0x1e6,'\x6c\x5a\x50\x39')](-0x698*0x4+-0x4f7+0x1f58,Math[_0xc8089a(0x1b0,'\x65\x39\x49\x33')](0x182*0x16+0x224*0x11+-0x4590,_0x4603e7));let _0xe8512a=computeDriftIntensity(_0x4603e7,_0x5665a5[_0xc8089a(0x1e9,'\x5a\x40\x29\x21')+_0xc8089a(0x1d1,'\x2a\x54\x57\x54')]??0x9a3*0x1+-0x6de+-0x2c5);if(_0x5665a5[_0xc8089a(0x1db,'\x25\x4c\x7a\x75')]?.[_0xc8089a(0x1ea,'\x6f\x36\x58\x39')])_0xe8512a=Math[_0xc8089a(0x1de,'\x6c\x62\x6e\x46')](_0xe8512a,_0x5665a5[_0xc8089a(0x1b1,'\x5a\x40\x29\x21')][_0xc8089a(0x1c7,'\x6d\x79\x64\x6e')]===_0xc8089a(0x1b6,'\x70\x30\x67\x32')?-0x5*0x5c9+0x23*0x2+-0x1c*-0x106:0x556*-0x5+0x1a9+0x1905+0.7);return Math[_0xc8089a(0x1be,'\x57\x79\x71\x25')](_0x4603e7,Math[_0xc8089a(0x1eb,'\x58\x35\x50\x49')](0x21a1*0x1+0x2*0xd3a+-0x3c13,Math[_0xc8089a(0x1c6,'\x59\x52\x73\x33')](_0x4603e7*_0xe8512a)));}export function driftSelect(_0x598140,_0xaad0b,_0x2f0b62){const _0x2259eb=_0x2039;if(!explorationActive(_0xaad0b)||_0x598140<=0x10*-0x1da+0xcf6+0x10ab)return{'\x64\x72\x69\x66\x74\x4d\x6f\x64\x65':_0x2259eb(0x1ef,'\x50\x56\x24\x5d')+'\x69\x73\x74\x69\x63','\x69\x6e\x64\x65\x78':0x0,'\x69\x6e\x74\x65\x6e\x73\x69\x74\x79':0x0};let _0x539d74=computeDriftIntensity(_0x598140,_0xaad0b[_0x2259eb(0x1e5,'\x50\x56\x24\x5d')+_0x2259eb(0x1d6,'\x6f\x36\x58\x39')]??-0xa*0x1bb+0x10a1+-0xad*-0x1);if(_0xaad0b['\x70\x6c\x61\x74\x65\x61\x75']?.[_0x2259eb(0x1ee,'\x4a\x67\x5a\x67')])_0x539d74=Math[_0x2259eb(0x1c3,'\x4d\x59\x50\x41')](_0x539d74,_0xaad0b[_0x2259eb(0x1f0,'\x4d\x66\x6a\x73')][_0x2259eb(0x1c7,'\x6d\x79\x64\x6e')]===_0x2259eb(0x1b5,'\x4e\x32\x6c\x45')?0x1*0x71f+0x141f+-0x1b3d*0x1:0xe75+0x1201+0x67e*-0x5+0.7);if(_0x2f0b62()>=_0x539d74)return{'\x64\x72\x69\x66\x74\x4d\x6f\x64\x65':_0x2259eb(0x1b8,'\x6f\x36\x58\x39')+_0x2259eb(0x1bc,'\x29\x6c\x6b\x21'),'\x69\x6e\x64\x65\x78':0x0,'\x69\x6e\x74\x65\x6e\x73\x69\x74\x79':_0x539d74};const _0x3316cb=explorationWindowSize(_0x598140,_0xaad0b),_0x165d41=Math[_0x2259eb(0x1e7,'\x70\x66\x6a\x52')](_0x3316cb-(0x1a5*-0x1+-0x142+0x2e8),Math[_0x2259eb(0x1d2,'\x29\x38\x7a\x6e')](0x1b45+0x21eb*-0x1+0x6a6,Math[_0x2259eb(0x1c0,'\x70\x30\x67\x32')](_0x2f0b62()*_0x3316cb)));return{'\x64\x72\x69\x66\x74\x4d\x6f\x64\x65':_0xaad0b[_0x2259eb(0x1e4,'\x39\x54\x6e\x77')]?.[_0x2259eb(0x1e3,'\x6d\x79\x64\x6e')]?_0x2259eb(0x1ce,'\x6c\x62\x6e\x46')+_0x2259eb(0x1cb,'\x4d\x66\x6a\x73'):'\x64\x72\x69\x66\x74','\x69\x6e\x64\x65\x78':_0x165d41,'\x69\x6e\x74\x65\x6e\x73\x69\x74\x79':_0x539d74};}
|
package/dist/algo/geneHealth.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
export const HEALTH_WEIGHTS_VERSION = '
|
|
2
|
-
export const DEFAULT_HEALTH_WEIGHTS = { successRate: 0.6, reuse: 0.1, antiPattern: 0.4 };
|
|
3
|
-
/** reuseCount 归一(对数压缩, 复用越多分越高但边际递减). */
|
|
4
|
-
function reuseScore(count) {
|
|
5
|
-
return count <= 0 ? 0 : Math.min(1, Math.log10(count + 1) / 2); // 100 次≈封顶
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* gene 健康分 = successRate·(w1 + w2·reuse归一) − w3·antiPattern密度.
|
|
9
|
-
* 输入 = M3-6 聚合视图(不内联 learning_history) + anti_patterns 数 + 复用计数.
|
|
10
|
-
*/
|
|
11
|
-
export function geneHealthScore(view, opts = {}, w = DEFAULT_HEALTH_WEIGHTS) {
|
|
12
|
-
const reuseCount = opts.reuseCount ?? view.total;
|
|
13
|
-
const antiPatternPenalty = Math.min(1, (opts.antiPatternCount ?? 0) / 5); // 5+ anti-pattern 封顶惩罚
|
|
14
|
-
const confidenceAdjustedSuccess = view.successRate * (w.successRate + w.reuse * reuseScore(reuseCount));
|
|
15
|
-
const score = confidenceAdjustedSuccess - w.antiPattern * antiPatternPenalty;
|
|
16
|
-
return { geneId: view.geneId, successRate: view.successRate, reuseCount, antiPatternPenalty, score };
|
|
17
|
-
}
|
|
1
|
+
const _0x3a51a8=_0x3d16;function _0x3d16(_0x569bd6,_0x573053){_0x569bd6=_0x569bd6-(0xc96+0x1*-0x2149+0x1*0x15cd);const _0x1c9b41=_0xfd56();let _0x18a843=_0x1c9b41[_0x569bd6];if(_0x3d16['\x71\x65\x63\x74\x47\x47']===undefined){var _0x4e3585=function(_0x160540){const _0x4fe36d='\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 _0x41a87e='',_0x38a7b2='';for(let _0x1a00a5=-0xd*-0x83+-0x2b*-0x86+-0x1*0x1d29,_0x5154e7,_0x58cab1,_0xbb666b=0x1fff+0x1*0x2307+-0x175*0x2e;_0x58cab1=_0x160540['\x63\x68\x61\x72\x41\x74'](_0xbb666b++);~_0x58cab1&&(_0x5154e7=_0x1a00a5%(0x1*-0x883+0x3*-0x24d+0xf6e)?_0x5154e7*(0x15e6+-0x3*0x18d+0x13*-0xe5)+_0x58cab1:_0x58cab1,_0x1a00a5++%(0x36a*-0x1+-0x49f+-0x3*-0x2af))?_0x41a87e+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x120b*0x1+0x1124+0x1e6&_0x5154e7>>(-(0x1*0x1bc9+-0x11b8+-0xa0f)*_0x1a00a5&-0x119*-0x7+-0xc41*0x1+0x62*0xc)):0x1d30+0x7*0x1+-0x1d37){_0x58cab1=_0x4fe36d['\x69\x6e\x64\x65\x78\x4f\x66'](_0x58cab1);}for(let _0x41d44f=0x373*-0x1+0xdf5+0x2*-0x541,_0x7bbd40=_0x41a87e['\x6c\x65\x6e\x67\x74\x68'];_0x41d44f<_0x7bbd40;_0x41d44f++){_0x38a7b2+='\x25'+('\x30\x30'+_0x41a87e['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x41d44f)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x2*-0x1041+0x931+0x1761))['\x73\x6c\x69\x63\x65'](-(0x57*-0xd+-0x9*-0x3ff+-0x1f8a));}return decodeURIComponent(_0x38a7b2);};const _0x2a2c31=function(_0x45ec9a,_0x21cfc7){let _0x59bf0b=[],_0x1abf85=-0x8c5+0x1caf+-0x13ea,_0x556732,_0x1f933a='';_0x45ec9a=_0x4e3585(_0x45ec9a);let _0x2de989;for(_0x2de989=-0x745+-0xddb+0x1520;_0x2de989<-0x13d*-0x19+-0x13b5+-0xa40;_0x2de989++){_0x59bf0b[_0x2de989]=_0x2de989;}for(_0x2de989=-0x1f*-0x2b+-0x539*-0x4+0x189*-0x11;_0x2de989<0x1*0xcd3+0x7bf*-0x1+-0x414;_0x2de989++){_0x1abf85=(_0x1abf85+_0x59bf0b[_0x2de989]+_0x21cfc7['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2de989%_0x21cfc7['\x6c\x65\x6e\x67\x74\x68']))%(-0x21af*-0x1+-0x1*-0x1ece+-0x3f7d),_0x556732=_0x59bf0b[_0x2de989],_0x59bf0b[_0x2de989]=_0x59bf0b[_0x1abf85],_0x59bf0b[_0x1abf85]=_0x556732;}_0x2de989=-0x11c8*-0x2+-0x103d+-0x1353,_0x1abf85=0x931+-0x8*-0x1a6+-0x1661;for(let _0x540605=-0x1088+0xe3e+-0x24a*-0x1;_0x540605<_0x45ec9a['\x6c\x65\x6e\x67\x74\x68'];_0x540605++){_0x2de989=(_0x2de989+(0x89e+-0x196b+-0x59a*-0x3))%(-0x17*0x1a3+0x1f*0x8+-0x5*-0x789),_0x1abf85=(_0x1abf85+_0x59bf0b[_0x2de989])%(0x1d*0x67+0x48e+0x3*-0x513),_0x556732=_0x59bf0b[_0x2de989],_0x59bf0b[_0x2de989]=_0x59bf0b[_0x1abf85],_0x59bf0b[_0x1abf85]=_0x556732,_0x1f933a+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x45ec9a['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x540605)^_0x59bf0b[(_0x59bf0b[_0x2de989]+_0x59bf0b[_0x1abf85])%(-0x23bb*-0x1+0x394+0x7*-0x579)]);}return _0x1f933a;};_0x3d16['\x5a\x50\x50\x67\x65\x4b']=_0x2a2c31,_0x3d16['\x64\x56\x77\x65\x4a\x70']={},_0x3d16['\x71\x65\x63\x74\x47\x47']=!![];}const _0xdcc627=_0x1c9b41[0x214c+-0x102d+-0x111f],_0x372fa9=_0x569bd6+_0xdcc627,_0x1db8ac=_0x3d16['\x64\x56\x77\x65\x4a\x70'][_0x372fa9];return!_0x1db8ac?(_0x3d16['\x62\x5a\x78\x7a\x5a\x47']===undefined&&(_0x3d16['\x62\x5a\x78\x7a\x5a\x47']=!![]),_0x18a843=_0x3d16['\x5a\x50\x50\x67\x65\x4b'](_0x18a843,_0x573053),_0x3d16['\x64\x56\x77\x65\x4a\x70'][_0x372fa9]=_0x18a843):_0x18a843=_0x1db8ac,_0x18a843;}(function(_0x1a589a,_0x4770f5){const _0x408090=_0x3d16,_0x3d065e=_0x1a589a();while(!![]){try{const _0xb942fc=-parseInt(_0x408090(0x134,'\x30\x58\x34\x44'))/(-0x1128+0x1ee7+-0x6df*0x2)*(parseInt(_0x408090(0x12c,'\x43\x62\x68\x30'))/(0x141f+0x111b*-0x1+0x9a*-0x5))+parseInt(_0x408090(0x124,'\x69\x6d\x44\x6b'))/(0x1*-0x1825+0x14ce+-0x4e*-0xb)*(-parseInt(_0x408090(0x138,'\x25\x36\x77\x59'))/(0x1524+0x24b3+-0x1*0x39d3))+-parseInt(_0x408090(0x11b,'\x40\x73\x45\x6e'))/(-0x1*0x1b40+0x1e5+0x74*0x38)*(-parseInt(_0x408090(0x136,'\x36\x79\x45\x7a'))/(-0xd*0x68+-0x89*0x8+0x332*0x3))+parseInt(_0x408090(0x13c,'\x6b\x5a\x76\x55'))/(-0xd*-0x57+-0xbd9+-0x53*-0x17)*(parseInt(_0x408090(0x120,'\x25\x36\x77\x59'))/(0x9a8+0x1f5*0x8+-0x1948))+parseInt(_0x408090(0x12b,'\x57\x61\x29\x29'))/(0x283+0xb41+-0xdbb)*(parseInt(_0x408090(0x141,'\x52\x78\x74\x43'))/(0x547+-0x22fe+0x1dc1))+-parseInt(_0x408090(0x12f,'\x4b\x63\x67\x36'))/(0x17*-0xc0+-0x9*-0x294+-0x5e9)+parseInt(_0x408090(0x137,'\x6b\x70\x53\x4d'))/(0x4ed+-0xcf*-0xa+0x1*-0xcf7)*(parseInt(_0x408090(0x130,'\x54\x62\x6a\x7a'))/(0x52c+0xc20+0x373*-0x5));if(_0xb942fc===_0x4770f5)break;else _0x3d065e['push'](_0x3d065e['shift']());}catch(_0x20c3aa){_0x3d065e['push'](_0x3d065e['shift']());}}}(_0xfd56,0x5b80e+-0x7f*-0xdfa+-0x8b3ba));export const HEALTH_WEIGHTS_VERSION=_0x3a51a8(0x142,'\x23\x6f\x65\x74');function _0xfd56(){const _0x59ed02=['\x57\x34\x66\x6b\x57\x52\x44\x50','\x57\x35\x6d\x4b\x57\x51\x6d\x6c\x66\x58\x4a\x64\x49\x43\x6b\x58\x73\x4a\x4a\x63\x53\x43\x6f\x6f\x57\x52\x75','\x57\x34\x70\x64\x47\x65\x64\x64\x4a\x38\x6f\x58\x6a\x43\x6f\x62\x57\x52\x61','\x63\x57\x71\x38','\x73\x4e\x50\x67','\x57\x34\x48\x45\x57\x34\x37\x63\x4a\x6d\x6b\x6e\x6c\x6d\x6b\x44\x57\x50\x75','\x57\x50\x5a\x63\x4e\x38\x6b\x67\x6a\x73\x79\x74\x57\x35\x4c\x4a','\x57\x50\x4c\x50\x6d\x4d\x68\x64\x48\x38\x6f\x72\x57\x34\x56\x64\x4b\x38\x6b\x39\x57\x35\x64\x64\x56\x38\x6f\x63\x75\x57','\x57\x34\x35\x72\x71\x53\x6f\x53\x57\x52\x68\x64\x49\x53\x6b\x65\x57\x36\x34','\x71\x38\x6b\x5a\x45\x47','\x41\x73\x76\x5a\x57\x4f\x50\x56\x57\x34\x68\x64\x56\x38\x6b\x5a\x45\x49\x38\x53\x57\x4f\x79','\x57\x35\x37\x64\x52\x67\x39\x4a\x57\x36\x4f\x7a\x57\x50\x2f\x64\x56\x57\x6c\x63\x48\x62\x43','\x57\x36\x6e\x30\x57\x34\x47\x6f\x41\x59\x2f\x63\x4d\x43\x6b\x76','\x62\x6d\x6b\x2b\x41\x65\x71\x6e\x70\x66\x54\x45\x68\x71','\x78\x6d\x6b\x2f\x79\x43\x6b\x61\x67\x47','\x57\x35\x70\x64\x4a\x47\x56\x63\x4f\x38\x6b\x2f\x57\x51\x6c\x63\x4b\x4d\x75\x42\x72\x32\x46\x64\x4d\x43\x6b\x46','\x57\x35\x64\x64\x48\x61\x4a\x63\x4f\x53\x6b\x34\x57\x51\x33\x64\x54\x4e\x4b\x42\x43\x68\x46\x64\x48\x71','\x57\x35\x7a\x48\x57\x35\x48\x35\x79\x77\x68\x63\x4a\x57','\x46\x43\x6f\x77\x57\x34\x2f\x63\x56\x38\x6f\x73\x57\x50\x44\x70\x6c\x47\x46\x63\x50\x53\x6b\x4a\x57\x4f\x75','\x78\x61\x79\x42\x6a\x53\x6f\x52\x57\x50\x4c\x31','\x78\x43\x6f\x32\x57\x34\x68\x63\x4d\x4d\x4e\x63\x56\x43\x6f\x79\x57\x35\x66\x55\x44\x38\x6f\x59','\x7a\x43\x6f\x36\x66\x65\x52\x64\x4e\x43\x6f\x32\x57\x34\x65\x48','\x57\x52\x7a\x42\x57\x34\x37\x64\x51\x43\x6b\x61\x57\x50\x34\x44\x7a\x53\x6b\x6e\x57\x36\x61\x69\x79\x49\x57','\x62\x57\x2f\x64\x56\x6d\x6b\x74\x57\x34\x33\x64\x4c\x75\x78\x64\x50\x4e\x71','\x6e\x33\x78\x63\x4e\x68\x4a\x63\x4b\x6d\x6b\x53\x57\x35\x39\x63\x57\x36\x37\x64\x49\x43\x6f\x65\x57\x34\x71','\x57\x35\x58\x6b\x76\x43\x6f\x4d\x57\x4f\x74\x64\x4d\x6d\x6b\x64\x57\x34\x47','\x57\x36\x75\x62\x57\x4f\x4e\x63\x54\x53\x6f\x49\x57\x34\x31\x43\x71\x57','\x70\x6d\x6f\x4d\x70\x72\x74\x64\x49\x72\x61\x6b\x6a\x38\x6f\x33\x57\x36\x61\x46\x57\x50\x57','\x68\x5a\x47\x42\x6c\x4a\x4f\x4d\x73\x65\x4a\x64\x55\x47','\x57\x35\x61\x37\x77\x6d\x6f\x33\x64\x53\x6b\x62\x57\x50\x35\x38\x57\x50\x66\x31\x57\x34\x66\x45','\x62\x38\x6b\x75\x57\x35\x33\x63\x56\x6d\x6b\x2b\x57\x36\x54\x62\x65\x43\x6b\x6f\x57\x51\x44\x34\x57\x37\x75','\x57\x50\x50\x53\x6d\x72\x37\x63\x48\x43\x6b\x6b\x57\x52\x4e\x64\x50\x53\x6b\x2b','\x57\x50\x76\x2f\x57\x36\x72\x43\x73\x71','\x57\x34\x4a\x64\x49\x53\x6b\x70\x6c\x64\x4b\x48','\x57\x36\x75\x42\x57\x50\x47','\x73\x62\x61\x76\x69\x48\x68\x64\x53\x62\x4f','\x57\x34\x57\x33\x57\x52\x4f\x48\x45\x53\x6f\x75\x73\x71\x71','\x57\x4f\x57\x49\x57\x4f\x79\x33\x7a\x43\x6f\x37\x79\x71','\x68\x43\x6b\x33\x57\x50\x64\x64\x49\x64\x4e\x63\x48\x38\x6f\x73\x57\x35\x53','\x57\x52\x31\x68\x6d\x43\x6b\x6e\x57\x52\x65','\x68\x72\x69\x46\x62\x53\x6f\x74\x57\x52\x70\x63\x4f\x68\x43'];_0xfd56=function(){return _0x59ed02;};return _0xfd56();}export const DEFAULT_HEALTH_WEIGHTS={'\x73\x75\x63\x63\x65\x73\x73\x52\x61\x74\x65':0.6,'\x72\x65\x75\x73\x65':0.1,'\x61\x6e\x74\x69\x50\x61\x74\x74\x65\x72\x6e':0.4};function reuseScore(_0x26d155){const _0x89d6fd=_0x3a51a8;return _0x26d155<=0x1124+0xb4c+-0x1c70?0x1*0x1bc9+-0x11b8+-0xa11:Math[_0x89d6fd(0x122,'\x5d\x64\x51\x6c')](-0x119*-0x7+-0xc41*0x1+0x493*0x1,Math[_0x89d6fd(0x140,'\x62\x5d\x6c\x4e')](_0x26d155+(0x1d30+0x7*0x1+-0x1d36))/(0x373*-0x1+0xdf5+0xc*-0xe0));}export function geneHealthScore(_0x1ec6be,_0x2cb688={},_0x88506e=DEFAULT_HEALTH_WEIGHTS){const _0x5e8815=_0x3a51a8,_0x2aebe0=_0x2cb688[_0x5e8815(0x13d,'\x50\x6f\x30\x23')+'\x6e\x74']??_0x1ec6be[_0x5e8815(0x139,'\x26\x6b\x67\x36')],_0x5578d3=Math['\x6d\x69\x6e'](0x2*-0x1041+0x931+0x1752,(_0x2cb688[_0x5e8815(0x132,'\x74\x29\x54\x49')+_0x5e8815(0x125,'\x6f\x6f\x45\x75')]??0x57*-0xd+-0x9*-0x3ff+-0x1f8c)/(-0x8c5+0x1caf+-0x13e5)),_0x17a320=_0x1ec6be[_0x5e8815(0x13f,'\x77\x26\x45\x26')+_0x5e8815(0x11d,'\x4a\x28\x58\x2a')]*(_0x88506e[_0x5e8815(0x121,'\x74\x29\x54\x49')+'\x61\x74\x65']+_0x88506e[_0x5e8815(0x127,'\x5d\x64\x51\x6c')]*reuseScore(_0x2aebe0)),_0x4e003f=_0x17a320-_0x88506e[_0x5e8815(0x133,'\x4b\x63\x67\x36')+_0x5e8815(0x11c,'\x43\x62\x68\x30')]*_0x5578d3;return{'\x67\x65\x6e\x65\x49\x64':_0x1ec6be[_0x5e8815(0x13a,'\x72\x29\x5b\x28')],'\x73\x75\x63\x63\x65\x73\x73\x52\x61\x74\x65':_0x1ec6be[_0x5e8815(0x12e,'\x51\x75\x44\x56')+_0x5e8815(0x13b,'\x4b\x63\x67\x36')],'\x72\x65\x75\x73\x65\x43\x6f\x75\x6e\x74':_0x2aebe0,'\x61\x6e\x74\x69\x50\x61\x74\x74\x65\x72\x6e\x50\x65\x6e\x61\x6c\x74\x79':_0x5578d3,'\x73\x63\x6f\x72\x65':_0x4e003f};}
|
package/dist/algo/geneIntake.js
CHANGED
|
@@ -1,128 +1 @@
|
|
|
1
|
-
// Gene intake — the structural part of skill distillation (ported from v1 src/gep/skillDistiller.js).
|
|
2
|
-
// v2's solidify produces Capsules but never Genes, so the reusable gene pool is otherwise static (only
|
|
3
|
-
// seeded/imported). This is the safe INTAKE gate for a distilled/proposed gene before it joins the pool:
|
|
4
|
-
// normalize defaults, validate structure + the gep-sdk schema, recompute asset_id, and reject a gene whose
|
|
5
|
-
// signals fully overlap an existing one (dedup, so the pool does not grow redundant). The gene's CONTENT
|
|
6
|
-
// is generated upstream (the agent runtime / a distillation prompt — generative, out of core scope); this
|
|
7
|
-
// slice is the structural gate. Pairs with capabilityCandidates (which proposes what to distill).
|
|
8
|
-
import { computeAssetId, validateWire, SCHEMA_VERSION, normalizeRoutingHint, normalizeToolPolicy, normalizeGenerationMeta, stripGeneHints, } from '../wire/index.js';
|
|
9
|
-
const VALID_CATEGORIES = ['repair', 'optimize', 'innovate', 'explore'];
|
|
10
|
-
const DEFAULT_FORBIDDEN_PATHS = ['.git', 'node_modules'];
|
|
11
|
-
const DEFAULT_MAX_FILES = 12;
|
|
12
|
-
/** Id prefix every distilled (skill-derived) gene carries. Recognised via {@link isDistilledGeneId}. */
|
|
13
|
-
const DISTILLED_ID_PREFIX = 'gene_distilled_';
|
|
14
|
-
/**
|
|
15
|
-
* True when a gene id is in the `gene_distilled_` namespace. NB this prefix is now a NAMESPACE marker, NOT a
|
|
16
|
-
* provenance tag: v1 used it to mean "skill-derived" (auto-evolved genes were `gene_auto_`), but v2's intakeGene
|
|
17
|
-
* tags EVERY intaken gene this way regardless of origin. The authoritative provenance is {@link geneGenerationSource};
|
|
18
|
-
* this prefix check remains as a back-compat fallback for legacy pooled genes that predate generation_meta, and for
|
|
19
|
-
* call sites that only have a gene id (not the full record).
|
|
20
|
-
*/
|
|
21
|
-
export function isDistilledGeneId(id) {
|
|
22
|
-
return typeof id === 'string' && id.startsWith(DISTILLED_ID_PREFIX);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The authoritative gene-generation source: read `generation_meta.source` from a gene-shaped record (V1 #302). Falls
|
|
26
|
-
* back to the id-prefix namespace when the record carries no generation_meta (legacy pooled genes predate the field),
|
|
27
|
-
* returning 'distilled' for a `gene_distilled_` id and 'manual' otherwise — so the fallback never claims a higher
|
|
28
|
-
* provenance tier than the prefix can vouch for. `null` means "undetermined" (no record, no recognizable id).
|
|
29
|
-
*/
|
|
30
|
-
export function geneGenerationSource(gene, geneId) {
|
|
31
|
-
const meta = gene?.['generation_meta'];
|
|
32
|
-
if (meta && typeof meta === 'object') {
|
|
33
|
-
const src = meta['source'];
|
|
34
|
-
if (typeof src === 'string' && (src === 'evolved' || src === 'distilled' || src === 'manual'))
|
|
35
|
-
return src;
|
|
36
|
-
}
|
|
37
|
-
// Legacy fallback: a `gene_distilled_` id is at best a distilled gene (v2 minted it for ALL intake sources, so it
|
|
38
|
-
// cannot be trusted as "evolved"); any other id is treated as manual (human-authored / externally seeded).
|
|
39
|
-
const id = geneId ?? (typeof gene?.['id'] === 'string' ? String(gene['id']) : null);
|
|
40
|
-
if (id && isDistilledGeneId(id))
|
|
41
|
-
return 'distilled';
|
|
42
|
-
if (id)
|
|
43
|
-
return 'manual';
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
function fnv1a(s) {
|
|
47
|
-
let h = 2166136261;
|
|
48
|
-
for (let i = 0; i < s.length; i++) {
|
|
49
|
-
h ^= s.charCodeAt(i);
|
|
50
|
-
h = Math.imul(h, 16777619);
|
|
51
|
-
}
|
|
52
|
-
return (h >>> 0).toString(16).padStart(8, '0');
|
|
53
|
-
}
|
|
54
|
-
const clean = (xs) => (xs ?? []).map((s) => String(s).trim()).filter((s) => s.length > 0);
|
|
55
|
-
/** Returns the id of an existing gene whose signals are a superset of `signals` (i.e. the candidate is redundant), else null. */
|
|
56
|
-
function fullyOverlaps(signals, existing) {
|
|
57
|
-
const newSet = signals.map((s) => s.toLowerCase());
|
|
58
|
-
for (const eg of existing) {
|
|
59
|
-
const egSet = new Set((eg.signals_match ?? []).map((s) => String(s).toLowerCase()));
|
|
60
|
-
if (egSet.size === 0)
|
|
61
|
-
continue;
|
|
62
|
-
if (newSet.every((s) => egSet.has(s)))
|
|
63
|
-
return eg.id ?? '?';
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Validate + normalize a distilled/proposed gene for pool insertion. On success returns the canonical Gene
|
|
69
|
-
* (defaults filled, asset_id computed); otherwise the structural / dedup / schema errors.
|
|
70
|
-
*/
|
|
71
|
-
export function intakeGene(candidate, existing = []) {
|
|
72
|
-
const errors = [];
|
|
73
|
-
const signals = clean(candidate.signals_match);
|
|
74
|
-
const strategy = clean(candidate.strategy);
|
|
75
|
-
if (signals.length === 0)
|
|
76
|
-
errors.push('signals_match is empty');
|
|
77
|
-
if (strategy.length === 0)
|
|
78
|
-
errors.push('strategy is empty');
|
|
79
|
-
if (signals.length > 0) {
|
|
80
|
-
const dup = fullyOverlaps(signals, existing);
|
|
81
|
-
if (dup)
|
|
82
|
-
errors.push(`signals_match fully overlaps existing gene: ${dup}`);
|
|
83
|
-
}
|
|
84
|
-
if (errors.length > 0)
|
|
85
|
-
return { ok: false, errors };
|
|
86
|
-
const category = VALID_CATEGORIES.includes(candidate.category) ? candidate.category : 'optimize';
|
|
87
|
-
const id = candidate.id && candidate.id.startsWith(DISTILLED_ID_PREFIX) ? candidate.id : `${DISTILLED_ID_PREFIX}${fnv1a(signals.join('|'))}`;
|
|
88
|
-
// v2-delta EvoX hints (v1 PR #93): normalized so a candidate carrying them lands canonical, dropped to
|
|
89
|
-
// absent when malformed/empty. The router / tool-gate reads absent === "no opinion".
|
|
90
|
-
const routingHint = normalizeRoutingHint(candidate.routing_hint);
|
|
91
|
-
const toolPolicy = normalizeToolPolicy(candidate.tool_policy);
|
|
92
|
-
// v2-delta provenance + quality metadata (v1 #302): normalized so a candidate carrying it lands canonical,
|
|
93
|
-
// dropped to absent when malformed/no-recognized-source.
|
|
94
|
-
const generationMeta = normalizeGenerationMeta(candidate.generation_meta);
|
|
95
|
-
const gene = {
|
|
96
|
-
type: 'Gene',
|
|
97
|
-
schema_version: SCHEMA_VERSION,
|
|
98
|
-
id,
|
|
99
|
-
category,
|
|
100
|
-
signals_match: signals,
|
|
101
|
-
strategy,
|
|
102
|
-
constraints: {
|
|
103
|
-
max_files: candidate.constraints?.max_files ?? DEFAULT_MAX_FILES,
|
|
104
|
-
forbidden_paths: [...(candidate.constraints?.forbidden_paths ?? DEFAULT_FORBIDDEN_PATHS)],
|
|
105
|
-
},
|
|
106
|
-
validation: candidate.validation ? [...candidate.validation] : [],
|
|
107
|
-
summary: candidate.summary ?? `Strategy for: ${signals.slice(0, 3).join(', ')}`,
|
|
108
|
-
...(candidate.preconditions ? { preconditions: [...candidate.preconditions] } : {}),
|
|
109
|
-
...(routingHint ? { routing_hint: routingHint } : {}),
|
|
110
|
-
...(toolPolicy ? { tool_policy: toolPolicy } : {}),
|
|
111
|
-
...(generationMeta ? { generation_meta: generationMeta } : {}),
|
|
112
|
-
asset_id: '',
|
|
113
|
-
};
|
|
114
|
-
// asset_id folds in the hints + generation_meta (intake's own canonical shape — gep-sdk canonicalize hashes every
|
|
115
|
-
// own key). NB: this is NOT byte-equal to what v1's createGene would hash for the same logical gene — v1 always emits
|
|
116
|
-
// routing_hint/tool_policy:null plus empty epigenetic_marks/learning_history/anti_patterns/preconditions that
|
|
117
|
-
// v2 intake omits, so the canonical shapes differ. Self-consistent here; not a cross-impl parity guarantee.
|
|
118
|
-
gene.asset_id = computeAssetId(gene) ?? '';
|
|
119
|
-
// Structural gate validates the gep-sdk-known CORE. routing_hint / tool_policy / generation_meta are v2-delta
|
|
120
|
-
// (pending a gene-schema bump), so strip them before the check — else additionalProperties:false rejects the
|
|
121
|
-
// gene at intake. The full hinted gene stays schema-invalid until the SDK catches up — surfaced by the advisory
|
|
122
|
-
// validateWire preview (evolver_gep_build) and enforced by the hub on receipt, NOT by a local egress gate
|
|
123
|
-
// (the publish/egress path is sanitize-only). Same v2-delta contract Capsule's proof_of_work had pre-1.11.0.
|
|
124
|
-
const v = validateWire(stripGeneHints(gene));
|
|
125
|
-
if (!v.ok)
|
|
126
|
-
return { ok: false, errors: v.errors };
|
|
127
|
-
return { ok: true, gene, errors: [] };
|
|
128
|
-
}
|
|
1
|
+
const _0x54ccdc=_0x4259;(function(_0x5cb434,_0x31df32){const _0x83f858=_0x4259,_0x90d809=_0x5cb434();while(!![]){try{const _0x30411c=-parseInt(_0x83f858(0xef,'\x43\x62\x2a\x53'))/(-0x17dc+-0xcf*-0x21+-0x169*0x2)+parseInt(_0x83f858(0xd1,'\x32\x34\x6c\x4d'))/(-0x69*0x17+-0xc2d+0x159e)*(-parseInt(_0x83f858(0xcc,'\x63\x38\x6f\x42'))/(-0x9*0x43+0x2564+0x1183*-0x2))+parseInt(_0x83f858(0x11e,'\x2a\x6e\x42\x48'))/(-0x2622+-0x1*-0x1c67+0x1*0x9bf)*(-parseInt(_0x83f858(0xb1,'\x32\x30\x4e\x52'))/(0x65b+-0x1d80+0x172a))+parseInt(_0x83f858(0xce,'\x39\x46\x59\x64'))/(-0x1602+-0x204+0x36*0x72)+parseInt(_0x83f858(0xe5,'\x21\x55\x68\x35'))/(0x2412+-0xf26*-0x1+-0x3331*0x1)*(parseInt(_0x83f858(0xc5,'\x74\x52\x66\x6e'))/(0x1915+-0x7*0x20f+-0xaa4))+parseInt(_0x83f858(0xf7,'\x6b\x31\x6c\x46'))/(0x2a5*0x4+0x1d65+-0x27f0)*(parseInt(_0x83f858(0xb3,'\x6a\x4f\x6b\x76'))/(0x1d6d+-0x26f9+0x996))+parseInt(_0x83f858(0x118,'\x5b\x24\x55\x36'))/(-0x795+-0x1bf5+0x2395);if(_0x30411c===_0x31df32)break;else _0x90d809['push'](_0x90d809['shift']());}catch(_0x59bc1b){_0x90d809['push'](_0x90d809['shift']());}}}(_0x9eaf,-0x43*0x4c1+0x3*-0x9cb3+0xcf44e));import{computeAssetId,validateWire,SCHEMA_VERSION,normalizeRoutingHint,normalizeToolPolicy,normalizeGenerationMeta,stripGeneHints}from'\x2e\x2e\x2f\x77\x69\x72\x65\x2f\x69\x6e\x64\x65\x78\x2e\x6a\x73';const VALID_CATEGORIES=['\x72\x65\x70\x61\x69\x72',_0x54ccdc(0x116,'\x32\x30\x4e\x52'),_0x54ccdc(0xd5,'\x70\x4a\x36\x75'),_0x54ccdc(0xca,'\x21\x55\x68\x35')],DEFAULT_FORBIDDEN_PATHS=[_0x54ccdc(0x111,'\x52\x23\x72\x29'),_0x54ccdc(0x102,'\x31\x29\x24\x44')+_0x54ccdc(0x122,'\x51\x29\x68\x63')],DEFAULT_MAX_FILES=0x1338+-0x22a4+0xf78,DISTILLED_ID_PREFIX=_0x54ccdc(0x109,'\x51\x29\x68\x63')+_0x54ccdc(0x103,'\x6d\x28\x4e\x77');export function isDistilledGeneId(_0x5d4073){const _0x9a0de3=_0x54ccdc;return typeof _0x5d4073===_0x9a0de3(0xe8,'\x52\x33\x79\x79')&&_0x5d4073[_0x9a0de3(0xe3,'\x7a\x46\x38\x52')+'\x74\x68'](DISTILLED_ID_PREFIX);}function _0x9eaf(){const _0x485e6b=['\x6b\x64\x65\x63\x57\x37\x58\x2b\x43\x47','\x72\x59\x6c\x63\x4b\x4b\x66\x79\x57\x36\x70\x63\x4a\x38\x6f\x41','\x45\x6d\x6b\x69\x57\x51\x74\x64\x54\x57\x71\x75\x57\x36\x4e\x64\x4f\x57','\x62\x66\x44\x31\x42\x43\x6f\x44\x42\x71','\x57\x36\x6a\x71\x57\x50\x64\x64\x4a\x47','\x57\x51\x76\x37\x57\x52\x57\x7a\x57\x36\x35\x4c\x76\x5a\x53','\x78\x75\x54\x5a\x57\x50\x4e\x63\x4c\x6d\x6b\x75\x57\x50\x4e\x64\x4a\x4e\x57','\x57\x34\x69\x47\x78\x53\x6f\x62\x57\x37\x30\x6b\x57\x51\x53\x4f','\x62\x66\x44\x56\x45\x38\x6f\x75','\x57\x4f\x42\x64\x49\x58\x66\x62\x57\x35\x56\x63\x55\x74\x4b','\x68\x74\x30\x33\x42\x47','\x73\x38\x6b\x64\x57\x4f\x61','\x57\x34\x70\x64\x47\x38\x6f\x38\x77\x71\x43','\x6a\x32\x43\x6f\x57\x4f\x75','\x73\x6d\x6f\x69\x6c\x53\x6f\x72\x6f\x48\x52\x63\x51\x59\x79','\x57\x37\x47\x53\x71\x43\x6b\x77\x57\x37\x78\x64\x47\x71','\x44\x30\x37\x63\x47\x6d\x6f\x5a\x63\x76\x6d\x53','\x6a\x53\x6f\x4c\x76\x6d\x6b\x72\x57\x34\x33\x63\x4c\x53\x6b\x45\x57\x37\x38','\x75\x38\x6f\x78\x66\x53\x6f\x78\x69\x62\x42\x63\x4f\x57\x61','\x71\x53\x6b\x6c\x57\x4f\x6d\x53\x57\x36\x46\x64\x55\x63\x78\x64\x4e\x47','\x57\x36\x6e\x37\x75\x38\x6b\x4a\x57\x4f\x74\x64\x48\x6d\x6f\x44\x57\x52\x4e\x63\x4a\x66\x42\x63\x47\x4e\x65\x56','\x78\x73\x4a\x64\x50\x61\x34','\x6a\x43\x6f\x69\x44\x6d\x6f\x4f\x57\x34\x70\x64\x4f\x4b\x6c\x63\x49\x71','\x57\x50\x64\x64\x49\x43\x6f\x36\x73\x66\x4a\x63\x54\x71','\x75\x4a\x37\x63\x52\x75\x54\x42\x57\x35\x4e\x63\x4c\x6d\x6f\x39','\x71\x64\x78\x63\x48\x4b\x4e\x63\x4f\x59\x50\x6d\x72\x47','\x44\x77\x44\x75\x57\x51\x47\x59\x6b\x53\x6b\x4a\x57\x36\x4e\x64\x4f\x74\x33\x64\x4e\x43\x6b\x4b','\x6e\x43\x6f\x73\x57\x51\x75\x32\x57\x4f\x78\x63\x54\x73\x53\x2f\x57\x34\x44\x41\x62\x6d\x6f\x56\x70\x47','\x62\x43\x6f\x59\x57\x51\x6e\x53\x57\x37\x61\x70\x57\x34\x6c\x63\x4e\x68\x64\x63\x49\x4e\x46\x63\x47\x71','\x43\x61\x71\x71\x57\x36\x75','\x57\x52\x44\x59\x57\x52\x43\x70','\x57\x36\x39\x70\x57\x50\x68\x64\x4c\x53\x6b\x48\x6a\x58\x75','\x63\x6d\x6b\x73\x66\x6d\x6f\x74\x68\x64\x33\x63\x53\x62\x38','\x57\x52\x64\x64\x49\x71\x58\x6d\x57\x35\x4e\x63\x55\x74\x52\x63\x54\x57','\x65\x74\x56\x64\x54\x68\x72\x43\x57\x50\x47\x33\x74\x6d\x6b\x4a\x73\x43\x6b\x69\x57\x51\x69','\x77\x38\x6f\x73\x57\x34\x46\x64\x49\x71','\x44\x47\x4f\x6a\x57\x37\x47\x43\x45\x58\x6c\x63\x54\x61','\x44\x78\x74\x63\x4e\x53\x6f\x31\x63\x76\x6d','\x57\x52\x61\x4b\x63\x63\x33\x63\x47\x73\x2f\x64\x55\x6d\x6b\x79','\x73\x53\x6f\x75\x57\x35\x65','\x75\x53\x6f\x7a\x75\x57','\x57\x51\x56\x64\x52\x6d\x6b\x6d\x57\x34\x6c\x63\x48\x43\x6b\x7a\x46\x38\x6b\x38\x57\x36\x79\x67\x41\x66\x57\x36','\x45\x4b\x38\x67\x64\x67\x4f\x75\x45\x43\x6b\x72','\x44\x68\x64\x63\x4e\x53\x6f\x4e\x68\x66\x43','\x57\x37\x4c\x6e\x57\x50\x2f\x64\x49\x6d\x6b\x4a\x6d\x73\x7a\x4c','\x77\x43\x6b\x47\x57\x36\x38\x38\x57\x51\x61\x46\x57\x37\x74\x63\x52\x47','\x57\x35\x34\x79\x66\x6d\x6b\x42\x6d\x43\x6b\x66\x68\x6d\x6f\x75','\x57\x52\x4f\x4e\x67\x43\x6b\x5a\x57\x35\x5a\x63\x49\x53\x6b\x6d\x57\x4f\x61','\x57\x51\x61\x53\x67\x59\x42\x63\x48\x59\x5a\x64\x55\x43\x6b\x2b','\x57\x36\x47\x72\x57\x37\x52\x63\x47\x73\x4a\x63\x55\x67\x2f\x63\x4a\x71','\x62\x6d\x6b\x53\x42\x61','\x6f\x43\x6f\x31\x77\x38\x6b\x78\x57\x34\x68\x63\x4a\x61','\x41\x38\x6f\x55\x75\x38\x6f\x6f\x57\x35\x37\x64\x51\x78\x65','\x57\x51\x7a\x68\x57\x34\x7a\x4e\x65\x57','\x57\x34\x6d\x6c\x63\x43\x6b\x4e\x6f\x6d\x6b\x63\x66\x6d\x6f\x79','\x79\x53\x6b\x42\x6b\x53\x6b\x58\x57\x50\x70\x64\x53\x68\x5a\x63\x4d\x4a\x44\x33\x57\x51\x75','\x64\x62\x61\x32\x57\x50\x74\x63\x53\x53\x6b\x69\x57\x52\x74\x64\x55\x57','\x45\x31\x34\x66\x66\x67\x57\x6b\x43\x61','\x78\x71\x44\x50','\x57\x35\x34\x57\x73\x67\x6a\x5a\x57\x50\x31\x59\x6a\x75\x6c\x63\x4c\x4c\x4b','\x63\x57\x52\x63\x4c\x77\x66\x77\x57\x36\x5a\x63\x55\x47','\x77\x57\x79\x53\x6c\x53\x6b\x6a\x6e\x75\x62\x57\x57\x37\x46\x63\x50\x5a\x54\x4d','\x57\x52\x44\x30\x41\x38\x6b\x59\x57\x34\x68\x64\x47\x78\x52\x63\x55\x57','\x66\x43\x6b\x6b\x73\x43\x6b\x33','\x75\x6d\x6f\x56\x41\x53\x6b\x42\x61\x61\x69\x4e\x57\x36\x43','\x65\x43\x6b\x32\x7a\x53\x6b\x46\x6e\x57','\x73\x6d\x6f\x46\x73\x73\x4f','\x7a\x53\x6b\x45\x57\x37\x46\x63\x53\x48\x62\x72','\x57\x37\x66\x62\x6e\x53\x6b\x4b\x57\x50\x35\x72\x7a\x43\x6f\x79','\x45\x43\x6b\x50\x57\x4f\x34\x34\x75\x31\x38','\x6e\x6d\x6f\x6d\x44\x53\x6f\x4b\x57\x35\x78\x64\x4f\x4b\x6c\x63\x49\x71','\x6a\x6d\x6f\x42\x57\x52\x6c\x64\x52\x30\x38\x67\x68\x6d\x6b\x34\x57\x35\x53\x75\x57\x35\x74\x63\x55\x71','\x57\x4f\x74\x63\x4d\x53\x6f\x4a\x76\x5a\x70\x64\x4c\x38\x6b\x76\x69\x57','\x57\x37\x54\x61\x6e\x53\x6b\x34\x57\x50\x58\x63\x43\x6d\x6f\x75','\x41\x47\x4f\x44\x57\x35\x48\x69\x46\x58\x4a\x63\x51\x71','\x72\x47\x4c\x56\x68\x6d\x6b\x30\x57\x51\x69','\x61\x43\x6f\x58\x57\x37\x47\x31\x57\x4f\x58\x35\x57\x37\x33\x63\x4f\x57','\x64\x57\x30\x32\x57\x50\x4e\x63\x51\x43\x6b\x46','\x57\x34\x70\x64\x4c\x61\x30\x6e\x57\x34\x4a\x63\x53\x73\x33\x63\x55\x47','\x57\x50\x31\x54\x64\x59\x79\x55\x57\x4f\x62\x46\x61\x61','\x61\x43\x6b\x32\x45\x53\x6b\x66\x6c\x73\x47\x4b\x57\x37\x4f','\x57\x51\x34\x53\x67\x59\x64\x63\x49\x61','\x76\x63\x74\x63\x49\x76\x37\x63\x50\x74\x48\x56\x72\x47','\x57\x35\x70\x64\x4a\x53\x6f\x48\x78\x57\x78\x64\x55\x53\x6b\x6f\x69\x61','\x6b\x58\x6e\x6e\x73\x74\x7a\x61\x6a\x53\x6b\x5a\x75\x78\x48\x35\x42\x4c\x53','\x57\x37\x30\x72\x57\x37\x68\x63\x4d\x59\x5a\x63\x50\x47','\x57\x35\x2f\x64\x47\x43\x6f\x6b\x76\x57\x46\x64\x4f\x43\x6b\x44','\x71\x64\x4e\x63\x52\x65\x44\x62\x57\x36\x65','\x57\x37\x2f\x63\x55\x59\x4a\x63\x50\x6d\x6b\x71\x71\x6d\x6b\x78\x46\x47','\x43\x38\x6b\x77\x57\x36\x72\x56\x57\x35\x5a\x64\x51\x47','\x57\x51\x61\x4c\x64\x4a\x68\x63\x4f\x59\x5a\x64\x52\x38\x6b\x49','\x57\x50\x4c\x4a\x66\x4a\x53\x4a\x57\x4f\x39\x6d\x6e\x47','\x57\x50\x39\x79\x71\x43\x6f\x6c\x41\x6d\x6f\x74\x73\x6d\x6f\x79\x57\x36\x7a\x72\x57\x34\x4f\x30\x57\x35\x79','\x57\x51\x39\x2b\x41\x53\x6b\x35\x57\x36\x52\x64\x4d\x71','\x62\x43\x6f\x5a\x57\x51\x54\x53\x57\x37\x34\x68\x57\x51\x6c\x63\x56\x4e\x46\x63\x4f\x32\x6c\x63\x49\x6d\x6b\x30','\x6f\x78\x75\x52\x57\x52\x79','\x76\x64\x4e\x63\x4b\x4b\x4b','\x57\x52\x7a\x33\x57\x52\x30\x73\x57\x34\x69','\x42\x73\x4a\x64\x4d\x53\x6f\x7a\x6b\x4b\x72\x36\x57\x4f\x30','\x43\x61\x42\x63\x4b\x38\x6b\x6a\x57\x37\x56\x63\x53\x71','\x42\x76\x6d\x79\x66\x77\x69\x6b\x42\x61','\x74\x4a\x37\x63\x49\x30\x64\x63\x50\x63\x39\x44\x78\x61','\x77\x4e\x58\x5a\x41\x43\x6b\x6a\x57\x36\x47\x75\x78\x64\x34','\x76\x63\x74\x63\x4d\x4b\x78\x63\x56\x59\x57','\x57\x37\x66\x63\x6c\x43\x6b\x4e','\x42\x57\x52\x63\x4d\x53\x6b\x61\x57\x36\x37\x63\x54\x43\x6b\x4e\x57\x34\x6d','\x57\x37\x7a\x42\x6b\x57','\x6c\x77\x4b\x52\x57\x51\x52\x64\x51\x38\x6f\x6a\x57\x37\x6e\x4a','\x57\x52\x66\x51\x57\x51\x61\x76\x57\x35\x39\x4d','\x57\x4f\x76\x37\x57\x52\x57\x7a','\x41\x4e\x42\x64\x4a\x43\x6b\x64\x41\x38\x6b\x46','\x74\x38\x6f\x7a\x75\x49\x42\x63\x49\x6d\x6b\x78\x57\x37\x72\x4e','\x57\x51\x6e\x7a\x71\x67\x4a\x64\x52\x32\x34','\x57\x52\x6d\x38\x57\x51\x74\x63\x48\x38\x6b\x6b\x75\x32\x62\x5a','\x57\x52\x44\x59\x41\x6d\x6b\x59\x57\x37\x56\x64\x4c\x75\x4f'];_0x9eaf=function(){return _0x485e6b;};return _0x9eaf();}export function geneGenerationSource(_0x114ef6,_0xc91f44){const _0x479965=_0x54ccdc,_0x4b2133=_0x114ef6?.['\x67\x65\x6e\x65\x72\x61\x74\x69'+'\x6f\x6e\x5f\x6d\x65\x74\x61'];if(_0x4b2133&&typeof _0x4b2133===_0x479965(0xc4,'\x5a\x74\x35\x69')){const _0x591a1a=_0x4b2133[_0x479965(0xdc,'\x70\x5a\x25\x74')];if(typeof _0x591a1a===_0x479965(0xf8,'\x7a\x46\x38\x52')&&(_0x591a1a===_0x479965(0x123,'\x4a\x67\x69\x44')||_0x591a1a===_0x479965(0xfc,'\x6b\x46\x41\x46')+'\x64'||_0x591a1a===_0x479965(0x107,'\x39\x46\x59\x64')))return _0x591a1a;}const _0x39bc74=_0xc91f44??(typeof _0x114ef6?.['\x69\x64']===_0x479965(0xea,'\x42\x42\x41\x50')?String(_0x114ef6['\x69\x64']):null);if(_0x39bc74&&isDistilledGeneId(_0x39bc74))return _0x479965(0xbb,'\x21\x55\x68\x35')+'\x64';if(_0x39bc74)return'\x6d\x61\x6e\x75\x61\x6c';return null;}function fnv1a(_0x35fa54){const _0x51fc5f=_0x54ccdc;let _0x2170dd=-0x1*0xc69b909+-0x17d6*-0x24f97+0xc*0x7341a77;for(let _0x34c02e=0x5*-0x147+-0xd00+0x1363;_0x34c02e<_0x35fa54[_0x51fc5f(0xb6,'\x76\x2a\x61\x4d')];_0x34c02e++){_0x2170dd^=_0x35fa54[_0x51fc5f(0xeb,'\x55\x40\x63\x64')+'\x41\x74'](_0x34c02e),_0x2170dd=Math[_0x51fc5f(0xf9,'\x70\x4a\x36\x75')](_0x2170dd,-0x967a4c+-0xbf*-0x232f9+0x18*-0x907f);}return(_0x2170dd>>>-0x1e34+0x33a*-0x7+-0x1d*-0x1d2)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1c10+0x3*0xb26+-0x3d72)[_0x51fc5f(0xdb,'\x54\x5d\x28\x76')](0x251*-0xd+0x1271*-0x2+-0x1*-0x4307,'\x30');}function _0x4259(_0x5d0bf2,_0x1c2fd1){_0x5d0bf2=_0x5d0bf2-(-0x1536+0x3e*-0x25+0x1edd);const _0x3f8b45=_0x9eaf();let _0x341d2e=_0x3f8b45[_0x5d0bf2];if(_0x4259['\x57\x6d\x6d\x6a\x52\x58']===undefined){var _0x27e530=function(_0x615736){const _0x21ad07='\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 _0x56cd50='',_0x1eb98d='';for(let _0x394de6=-0x2435+0x2666+-0x1*0x231,_0x1ff549,_0x3d2277,_0x3a96e4=0x751*0x1+0x1cf3*-0x1+0x15a2;_0x3d2277=_0x615736['\x63\x68\x61\x72\x41\x74'](_0x3a96e4++);~_0x3d2277&&(_0x1ff549=_0x394de6%(-0x1*-0x163+0x1919+0x7*-0x3c8)?_0x1ff549*(-0x203c+-0xc2*-0x1e+0x9c*0x10)+_0x3d2277:_0x3d2277,_0x394de6++%(0x5b*-0xb+0x8*-0x3ad+0x2155))?_0x56cd50+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x1920+-0x1*-0xcee+0x35*-0xb3&_0x1ff549>>(-(-0x4ea*-0x5+0x9*-0x139+0x1*-0xd8f)*_0x394de6&-0x45f+-0x1433+0x4*0x626)):0x194b+-0x868+0x5a1*-0x3){_0x3d2277=_0x21ad07['\x69\x6e\x64\x65\x78\x4f\x66'](_0x3d2277);}for(let _0xad34de=-0x591*0x4+-0xfba+0x25fe,_0x141ea2=_0x56cd50['\x6c\x65\x6e\x67\x74\x68'];_0xad34de<_0x141ea2;_0xad34de++){_0x1eb98d+='\x25'+('\x30\x30'+_0x56cd50['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xad34de)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x2*-0x989+0x3a*-0x72+0x6d2))['\x73\x6c\x69\x63\x65'](-(-0x1*-0x254f+0x796*-0x1+-0x1db7));}return decodeURIComponent(_0x1eb98d);};const _0x1e518e=function(_0x215f7a,_0x50cffe){let _0x5493ac=[],_0x4c1122=0x2*-0x3af+-0xd*0x9b+-0x1*-0xf3d,_0x23a1dc,_0x51f046='';_0x215f7a=_0x27e530(_0x215f7a);let _0x588299;for(_0x588299=0x1811+-0x8*-0x40e+-0x523*0xb;_0x588299<0x1835*0x1+0x805*0x1+-0x1f3a;_0x588299++){_0x5493ac[_0x588299]=_0x588299;}for(_0x588299=-0xca2+0x997*0x2+-0x68c;_0x588299<0x2a*-0xcb+0x1a95*0x1+-0x293*-0x3;_0x588299++){_0x4c1122=(_0x4c1122+_0x5493ac[_0x588299]+_0x50cffe['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x588299%_0x50cffe['\x6c\x65\x6e\x67\x74\x68']))%(-0x1*-0x224b+-0x145e+0xced*-0x1),_0x23a1dc=_0x5493ac[_0x588299],_0x5493ac[_0x588299]=_0x5493ac[_0x4c1122],_0x5493ac[_0x4c1122]=_0x23a1dc;}_0x588299=-0x1b1*-0xb+0x1b25+-0x2dc0,_0x4c1122=0x14d9+0x208+0x16e1*-0x1;for(let _0x1d0e6a=-0x6a*0x42+0x1*0xc93+0xec1;_0x1d0e6a<_0x215f7a['\x6c\x65\x6e\x67\x74\x68'];_0x1d0e6a++){_0x588299=(_0x588299+(-0xe01+0x2295*0x1+-0x1493))%(-0x1142+-0x45b*0x1+0x169d*0x1),_0x4c1122=(_0x4c1122+_0x5493ac[_0x588299])%(0x14b+0xe04+-0xe4f),_0x23a1dc=_0x5493ac[_0x588299],_0x5493ac[_0x588299]=_0x5493ac[_0x4c1122],_0x5493ac[_0x4c1122]=_0x23a1dc,_0x51f046+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x215f7a['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1d0e6a)^_0x5493ac[(_0x5493ac[_0x588299]+_0x5493ac[_0x4c1122])%(0x3*-0x92f+-0x1441*0x1+0x30ce)]);}return _0x51f046;};_0x4259['\x72\x58\x71\x42\x44\x72']=_0x1e518e,_0x4259['\x69\x66\x73\x50\x6f\x62']={},_0x4259['\x57\x6d\x6d\x6a\x52\x58']=!![];}const _0x1fd2b7=_0x3f8b45[-0x1e1a+0x3*-0x593+0x2ed3],_0x36ce0e=_0x5d0bf2+_0x1fd2b7,_0x3d265c=_0x4259['\x69\x66\x73\x50\x6f\x62'][_0x36ce0e];return!_0x3d265c?(_0x4259['\x56\x54\x55\x52\x51\x7a']===undefined&&(_0x4259['\x56\x54\x55\x52\x51\x7a']=!![]),_0x341d2e=_0x4259['\x72\x58\x71\x42\x44\x72'](_0x341d2e,_0x1c2fd1),_0x4259['\x69\x66\x73\x50\x6f\x62'][_0x36ce0e]=_0x341d2e):_0x341d2e=_0x3d265c,_0x341d2e;}const clean=_0x1ed1b4=>(_0x1ed1b4??[])['\x6d\x61\x70'](_0x33b86e=>String(_0x33b86e)[_0x54ccdc(0xd3,'\x5d\x75\x26\x56')]())[_0x54ccdc(0xe6,'\x23\x50\x79\x75')](_0x3423a8=>_0x3423a8['\x6c\x65\x6e\x67\x74\x68']>0x1*0xafa+0x2*0x254+0xfa2*-0x1);function fullyOverlaps(_0x3188b3,_0x13b3da){const _0x699aa5=_0x54ccdc,_0x589336=_0x3188b3['\x6d\x61\x70'](_0x153242=>_0x153242[_0x699aa5(0x105,'\x52\x33\x79\x79')+_0x699aa5(0xb8,'\x79\x78\x73\x59')]());for(const _0xfaf843 of _0x13b3da){if(_0x699aa5(0xc6,'\x67\x62\x21\x77')!=='\x4a\x76\x67\x77\x68'){const _0x1ff1af=new Set((_0xfaf843[_0x699aa5(0xc2,'\x23\x50\x79\x75')+_0x699aa5(0x10c,'\x39\x46\x59\x64')]??[])[_0x699aa5(0x10f,'\x55\x4a\x43\x25')](_0x1837fc=>String(_0x1837fc)[_0x699aa5(0x112,'\x32\x30\x4e\x52')+_0x699aa5(0xc3,'\x32\x34\x6c\x4d')]()));if(_0x1ff1af[_0x699aa5(0xf1,'\x7a\x46\x38\x52')]===-0x16b1*-0x1+-0x2*0x69d+-0x977)continue;if(_0x589336['\x65\x76\x65\x72\x79'](_0x1d1377=>_0x1ff1af[_0x699aa5(0xcb,'\x70\x5a\x25\x74')](_0x1d1377)))return _0xfaf843['\x69\x64']??'\x3f';}else{const _0x42c859=_0x26fd57?.[_0x699aa5(0xd7,'\x74\x52\x66\x6e')+_0x699aa5(0xe7,'\x4c\x67\x7a\x4f')];if(_0x42c859&&typeof _0x42c859==='\x6f\x62\x6a\x65\x63\x74'){const _0x2258f3=_0x42c859[_0x699aa5(0x113,'\x62\x24\x76\x50')];if(typeof _0x2258f3===_0x699aa5(0xd4,'\x47\x6e\x71\x45')&&(_0x2258f3===_0x699aa5(0x10d,'\x29\x47\x79\x44')||_0x2258f3===_0x699aa5(0xe1,'\x32\x34\x6c\x4d')+'\x64'||_0x2258f3===_0x699aa5(0xbc,'\x76\x2a\x61\x4d')))return _0x2258f3;}const _0x4f4a30=_0x18d14f??(typeof _0x5a2af2?.['\x69\x64']===_0x699aa5(0xfd,'\x51\x29\x68\x63')?_0x3618bf(_0x858f94['\x69\x64']):null);if(_0x4f4a30&&_0x4b6f9a(_0x4f4a30))return _0x699aa5(0x117,'\x55\x4a\x43\x25')+'\x64';if(_0x4f4a30)return _0x699aa5(0x101,'\x70\x7a\x6c\x31');return null;}}return null;}export function intakeGene(_0x4f9fdb,_0x39f61d=[]){const _0x36495a=_0x54ccdc,_0x17a7ef=[],_0xa37117=clean(_0x4f9fdb[_0x36495a(0xf3,'\x34\x4c\x68\x42')+_0x36495a(0xe2,'\x55\x40\x63\x64')]),_0x5b6cbd=clean(_0x4f9fdb['\x73\x74\x72\x61\x74\x65\x67\x79']);if(_0xa37117[_0x36495a(0xee,'\x6d\x28\x4e\x77')]===0x250+-0x1b5d+0x190d)_0x17a7ef[_0x36495a(0x10e,'\x6b\x31\x6c\x46')](_0x36495a(0xfa,'\x4d\x4b\x4c\x2a')+_0x36495a(0xe9,'\x58\x35\x6c\x67')+_0x36495a(0xff,'\x77\x37\x33\x78'));if(_0x5b6cbd[_0x36495a(0xf4,'\x4d\x4b\x4c\x2a')]===0xf17+0x1*-0x21a6+-0x1*-0x128f)_0x17a7ef[_0x36495a(0xf0,'\x6b\x46\x41\x46')](_0x36495a(0x100,'\x5d\x75\x26\x56')+_0x36495a(0xdf,'\x29\x47\x79\x44')+'\x79');if(_0xa37117[_0x36495a(0x104,'\x2a\x6e\x42\x48')]>-0x4cf+0x2*0xa62+-0x331*0x5){const _0x2bb51d=fullyOverlaps(_0xa37117,_0x39f61d);if(_0x2bb51d)_0x17a7ef[_0x36495a(0xb4,'\x79\x78\x73\x59')](_0x36495a(0xb7,'\x55\x40\x63\x64')+_0x36495a(0xbe,'\x43\x62\x2a\x53')+_0x36495a(0xc0,'\x5b\x24\x55\x36')+_0x36495a(0xb5,'\x54\x5d\x28\x76')+_0x36495a(0x10b,'\x6d\x78\x67\x51')+_0x36495a(0x119,'\x52\x33\x79\x79')+_0x2bb51d);}if(_0x17a7ef[_0x36495a(0xd6,'\x6b\x4a\x6c\x35')]>0x1e5b+0x184f+-0x1*0x36aa)return{'\x6f\x6b':![],'\x65\x72\x72\x6f\x72\x73':_0x17a7ef};const _0x669a5a=VALID_CATEGORIES[_0x36495a(0xf6,'\x7a\x46\x38\x52')](_0x4f9fdb[_0x36495a(0xe4,'\x4c\x67\x7a\x4f')])?_0x4f9fdb[_0x36495a(0xc1,'\x55\x40\x63\x64')]:'\x6f\x70\x74\x69\x6d\x69\x7a\x65',_0x13da65=_0x4f9fdb['\x69\x64']&&_0x4f9fdb['\x69\x64'][_0x36495a(0xbd,'\x4a\x67\x69\x44')+'\x74\x68'](DISTILLED_ID_PREFIX)?_0x4f9fdb['\x69\x64']:''+DISTILLED_ID_PREFIX+fnv1a(_0xa37117[_0x36495a(0x121,'\x54\x5d\x28\x76')]('\x7c')),_0xdc6ea2=normalizeRoutingHint(_0x4f9fdb[_0x36495a(0xe0,'\x63\x38\x6f\x42')+_0x36495a(0x108,'\x4a\x67\x69\x44')]),_0x22a410=normalizeToolPolicy(_0x4f9fdb[_0x36495a(0xcf,'\x6d\x28\x4e\x77')+'\x69\x63\x79']),_0x447151=normalizeGenerationMeta(_0x4f9fdb[_0x36495a(0x11d,'\x7a\x46\x38\x52')+'\x6f\x6e\x5f\x6d\x65\x74\x61']),_0x1791a5={'\x74\x79\x70\x65':_0x36495a(0xfe,'\x51\x29\x68\x63'),'\x73\x63\x68\x65\x6d\x61\x5f\x76\x65\x72\x73\x69\x6f\x6e':SCHEMA_VERSION,'\x69\x64':_0x13da65,'\x63\x61\x74\x65\x67\x6f\x72\x79':_0x669a5a,'\x73\x69\x67\x6e\x61\x6c\x73\x5f\x6d\x61\x74\x63\x68':_0xa37117,'\x73\x74\x72\x61\x74\x65\x67\x79':_0x5b6cbd,'\x63\x6f\x6e\x73\x74\x72\x61\x69\x6e\x74\x73':{'\x6d\x61\x78\x5f\x66\x69\x6c\x65\x73':_0x4f9fdb[_0x36495a(0x106,'\x72\x32\x21\x5b')+_0x36495a(0xfb,'\x70\x4a\x36\x75')]?.[_0x36495a(0xc7,'\x42\x5e\x45\x6f')+'\x73']??DEFAULT_MAX_FILES,'\x66\x6f\x72\x62\x69\x64\x64\x65\x6e\x5f\x70\x61\x74\x68\x73':[..._0x4f9fdb[_0x36495a(0xda,'\x70\x4a\x36\x75')+_0x36495a(0xb9,'\x5d\x75\x26\x56')]?.[_0x36495a(0xc9,'\x78\x23\x53\x38')+_0x36495a(0x114,'\x76\x2a\x61\x4d')]??DEFAULT_FORBIDDEN_PATHS]},'\x76\x61\x6c\x69\x64\x61\x74\x69\x6f\x6e':_0x4f9fdb[_0x36495a(0x11a,'\x74\x52\x66\x6e')+'\x6f\x6e']?[..._0x4f9fdb[_0x36495a(0xec,'\x63\x38\x6f\x42')+'\x6f\x6e']]:[],'\x73\x75\x6d\x6d\x61\x72\x79':_0x4f9fdb[_0x36495a(0xf5,'\x21\x55\x68\x35')]??_0x36495a(0xb2,'\x29\x47\x79\x44')+_0x36495a(0x11b,'\x4c\x67\x7a\x4f')+_0xa37117[_0x36495a(0x110,'\x4c\x67\x7a\x4f')](-0x7d*-0x2+0x3b5+-0x4af,0xaf5+-0x1*0xdd0+-0x1*-0x2de)[_0x36495a(0xd0,'\x25\x6c\x5d\x69')]('\x2c\x20'),..._0x4f9fdb[_0x36495a(0xbf,'\x42\x5e\x45\x6f')+_0x36495a(0xf2,'\x51\x29\x68\x63')]?{'\x70\x72\x65\x63\x6f\x6e\x64\x69\x74\x69\x6f\x6e\x73':[..._0x4f9fdb[_0x36495a(0x115,'\x5a\x74\x35\x69')+_0x36495a(0xd2,'\x32\x34\x6c\x4d')]]}:{},..._0xdc6ea2?{'\x72\x6f\x75\x74\x69\x6e\x67\x5f\x68\x69\x6e\x74':_0xdc6ea2}:{},..._0x22a410?{'\x74\x6f\x6f\x6c\x5f\x70\x6f\x6c\x69\x63\x79':_0x22a410}:{},..._0x447151?{'\x67\x65\x6e\x65\x72\x61\x74\x69\x6f\x6e\x5f\x6d\x65\x74\x61':_0x447151}:{},'\x61\x73\x73\x65\x74\x5f\x69\x64':''};_0x1791a5[_0x36495a(0x11c,'\x52\x33\x79\x79')]=computeAssetId(_0x1791a5)??'';const _0x39d9ec=validateWire(stripGeneHints(_0x1791a5));if(!_0x39d9ec['\x6f\x6b'])return{'\x6f\x6b':![],'\x65\x72\x72\x6f\x72\x73':_0x39d9ec[_0x36495a(0xde,'\x78\x23\x53\x38')]};return{'\x6f\x6b':!![],'\x67\x65\x6e\x65':_0x1791a5,'\x65\x72\x72\x6f\x72\x73':[]};}
|