@evomap/evolver-core 2.0.0-beta.9 → 2.0.1
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.d.ts +7 -2
- package/dist/algo/candidateAssembly.js +1 -205
- package/dist/algo/capabilityCandidates.js +1 -136
- package/dist/algo/confidence.js +1 -196
- package/dist/algo/conversationSniffer.js +1 -149
- package/dist/algo/cycleEngine.d.ts +23 -2
- package/dist/algo/cycleEngine.js +1 -425
- 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.d.ts +7 -0
- package/dist/algo/exploration.js +1 -55
- package/dist/algo/geneHealth.d.ts +2 -2
- package/dist/algo/geneHealth.js +1 -16
- package/dist/algo/geneIntake.js +1 -128
- package/dist/algo/genePromotion.js +1 -53
- package/dist/algo/geneSelection.d.ts +63 -5
- package/dist/algo/geneSelection.js +1 -246
- package/dist/algo/index.d.ts +2 -0
- package/dist/algo/index.js +1 -20
- package/dist/algo/memoryGraph.js +1 -86
- package/dist/algo/mutation.js +1 -22
- package/dist/algo/orchestrator.d.ts +8 -1
- package/dist/algo/orchestrator.js +1 -75
- package/dist/algo/publishEligibility.d.ts +34 -0
- package/dist/algo/publishEligibility.js +1 -0
- package/dist/algo/solidify.js +1 -63
- package/dist/algo/strategyPresets.js +1 -61
- package/dist/algo/ucb1.d.ts +53 -0
- package/dist/algo/ucb1.js +1 -0
- package/dist/assetstore/assetSidecarRecords.d.ts +7 -2
- package/dist/assetstore/assetSidecarRecords.js +238 -0
- package/dist/assetstore/assetSidecarRecovery.js +2 -2
- package/dist/assetstore/assetStoreHealth.d.ts +6 -0
- package/dist/assetstore/assetStoreHealth.js +56 -14
- package/dist/assetstore/assetStoreStorage.d.ts +1 -1
- package/dist/assetstore/assetStoreStorage.js +27 -9
- package/dist/assetstore/assetSyncLedger.d.ts +86 -0
- package/dist/assetstore/assetSyncLedger.js +683 -4
- package/dist/assetstore/index.d.ts +1 -0
- package/dist/assetstore/index.js +1 -0
- package/dist/assetstore/localAssetStoreSnapshot.d.ts +51 -0
- package/dist/assetstore/localAssetStoreSnapshot.js +329 -0
- package/dist/assetstore/localJsonl.d.ts +4 -2
- package/dist/assetstore/localJsonl.js +89 -9
- package/dist/assetstore/provenance.d.ts +80 -4
- package/dist/assetstore/provenance.js +313 -5
- package/dist/assetstore/provider.d.ts +58 -1
- package/dist/assetstore/provider.js +97 -6
- package/dist/benchmark/antiGeneBenchmark.d.ts +2 -0
- package/dist/benchmark/antiGeneBenchmark.js +1 -251
- package/dist/benchmark/antiGeneImpact.js +1 -34
- package/dist/benchmark/antiGeneRollout.d.ts +2 -0
- package/dist/benchmark/antiGeneRollout.js +1 -268
- package/dist/benchmark/benchmark.js +1 -26
- package/dist/benchmark/evolutionThesisSolver.js +1 -41
- package/dist/benchmark/index.d.ts +2 -1
- package/dist/benchmark/index.js +1 -6
- package/dist/benchmark/selectionFlatAbstention.d.ts +152 -0
- package/dist/benchmark/selectionFlatAbstention.js +1 -0
- package/dist/benchmark/thesis.js +1 -150
- package/dist/benchmark/triggerShift.js +1 -106
- package/dist/bootstrap/envFingerprint.d.ts +9 -0
- package/dist/bootstrap/envFingerprint.js +5 -0
- package/dist/bootstrap/index.d.ts +2 -1
- package/dist/bootstrap/index.js +2 -1
- package/dist/bootstrap/v1EnvCompat.d.ts +111 -0
- package/dist/bootstrap/v1EnvCompat.js +280 -0
- package/dist/cycle/cycleTimeline.js +1 -74
- package/dist/cycle/index.js +1 -2
- package/dist/cycle/stateMachine.js +1 -25
- package/dist/events/eventArchive.d.ts +2 -0
- package/dist/events/eventArchive.js +13 -3
- package/dist/events/eventSchema.d.ts +7 -7
- package/dist/events/eventStore.d.ts +2 -0
- package/dist/events/eventStore.js +5 -1
- package/dist/events/ingest.d.ts +1 -0
- package/dist/events/ingest.js +1 -0
- package/dist/events/paths.d.ts +3 -1
- package/dist/events/paths.js +4 -0
- package/dist/events/public.d.ts +2 -2
- package/dist/events/public.js +2 -2
- package/dist/events/reports.d.ts +2 -0
- package/dist/events/reports.js +4 -0
- package/dist/exec/autoExec.d.ts +43 -2
- package/dist/exec/autoExec.js +76 -9
- package/dist/exec/autonomousCycle.d.ts +22 -4
- package/dist/exec/autonomousCycle.js +64 -13
- package/dist/exec/claudeBridge.d.ts +32 -7
- package/dist/exec/claudeBridge.js +281 -29
- package/dist/exec/prompt.js +5 -1
- package/dist/exec/runnerRegistry.d.ts +68 -26
- package/dist/exec/runnerRegistry.js +307 -72
- package/dist/exec/selfPr.js +1 -7
- package/dist/feedback/envelope.d.ts +61 -0
- package/dist/feedback/envelope.js +168 -0
- package/dist/feedback/index.d.ts +1 -0
- package/dist/feedback/index.js +1 -0
- package/dist/hooks/hooks.js +1 -0
- package/dist/hub/agentDirectory.js +1 -104
- package/dist/hub/assetCallLog.d.ts +35 -1
- package/dist/hub/assetCallLog.js +1 -72
- package/dist/hub/bindings.d.ts +8 -1
- package/dist/hub/bindings.js +1 -110
- package/dist/hub/capability.d.ts +90 -3
- package/dist/hub/capability.js +1 -1
- package/dist/hub/conversationDistiller.js +1 -264
- package/dist/hub/fake.d.ts +2 -2
- 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.d.ts +5 -1
- package/dist/hub/questionGenerator.js +1 -406
- package/dist/hub/reuseDecision.js +1 -127
- package/dist/hub/sanitize.js +1 -322
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -1
- package/dist/mailbox/dispatch.d.ts +1 -1
- package/dist/mailbox/dispatch.js +22 -6
- package/dist/mailbox/envelope.d.ts +7 -1
- package/dist/mailbox/envelope.js +9 -2
- package/dist/mailbox/ipcServer.d.ts +10 -2
- package/dist/mailbox/ipcServer.js +163 -13
- package/dist/mailbox/store.d.ts +89 -3
- package/dist/mailbox/store.js +895 -41
- 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/ops/evolutionGraphProjection.d.ts +20 -0
- package/dist/ops/evolutionGraphProjection.js +315 -0
- package/dist/ops/index.d.ts +2 -1
- package/dist/ops/index.js +2 -1
- package/dist/ops/selfUpdate.d.ts +8 -0
- package/dist/ops/selfUpdate.js +24 -8
- 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.d.ts +16 -16
- 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.d.ts +784 -0
- package/dist/schema/evolutionGraph.js +1 -0
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -5
- 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.d.ts +3 -3
- package/dist/schema/signal.js +1 -19
- package/dist/signals/curriculum.d.ts +55 -0
- package/dist/signals/curriculum.js +1 -0
- package/dist/signals/cycleHistoryFromEvents.js +1 -96
- package/dist/signals/expand.d.ts +15 -1
- package/dist/signals/expand.js +1 -125
- package/dist/signals/extractor.d.ts +2 -2
- package/dist/signals/extractor.js +1 -57
- package/dist/signals/index.d.ts +3 -1
- package/dist/signals/index.js +1 -6
- package/dist/signals/metaSignals.d.ts +4 -0
- package/dist/signals/metaSignals.js +1 -158
- package/dist/signals/signalGate.js +1 -40
- package/dist/signals/taskDomain.d.ts +22 -0
- package/dist/signals/taskDomain.js +1 -0
- package/dist/signals/traceSignals.js +1 -123
- package/dist/strategy/constraintAblation.js +1 -3074
- package/dist/strategy/constraintAblationPredicates.d.ts +31 -0
- package/dist/strategy/constraintAblationPredicates.js +1 -0
- package/dist/strategy/experiment.js +1 -63
- package/dist/strategy/index.js +1 -3
- package/dist/strategy/strategyPoint.js +1 -23
- package/dist/trace/index.d.ts +3 -1
- package/dist/trace/index.js +3 -1
- package/dist/trace/learningTrace.d.ts +209 -0
- package/dist/trace/learningTrace.js +276 -0
- package/dist/trace/proxyTurns.d.ts +31 -0
- package/dist/trace/proxyTurns.js +137 -0
- package/dist/verify/sandboxRunner.d.ts +28 -0
- package/dist/verify/sandboxRunner.js +218 -19
- package/dist/verify/sandboxedValidation.d.ts +9 -0
- package/dist/verify/sandboxedValidation.js +113 -13
- package/dist/verify/validation.d.ts +11 -1
- package/dist/verify/validation.js +31 -0
- package/package.json +5 -2
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 _0xda0382=_0x4baf;(function(_0x33e5a7,_0x2c9f64){const _0x467fac=_0x4baf,_0x1d54fe=_0x33e5a7();while(!![]){try{const _0x17ad2f=parseInt(_0x467fac(0x149,'\x43\x59\x78\x4b'))/(0x1037+-0x139*-0x5+0x1*-0x1653)+-parseInt(_0x467fac(0x15e,'\x5d\x5e\x21\x41'))/(-0x1*-0x17d5+0xc*0x22e+-0x31fb)+parseInt(_0x467fac(0x13a,'\x28\x73\x76\x23'))/(-0x3*-0xba5+-0x1ae5+-0x807)+-parseInt(_0x467fac(0x11b,'\x6a\x5a\x36\x47'))/(-0x1be6+0xe*-0x1d9+0x35c8)+-parseInt(_0x467fac(0xf4,'\x75\x62\x69\x77'))/(0x907+-0x2551*-0x1+-0x3b*0xc9)*(parseInt(_0x467fac(0xfd,'\x71\x6d\x37\x66'))/(-0x5c6+0x17*-0x56+0xd86))+parseInt(_0x467fac(0x146,'\x75\x62\x69\x77'))/(-0xd*0x1c+-0xb0*-0x15+0x13*-0xaf)+-parseInt(_0x467fac(0x117,'\x7a\x55\x25\x5a'))/(-0x1fef+-0x2604+0x45fb)*(-parseInt(_0x467fac(0x100,'\x5e\x58\x64\x54'))/(-0x136f+0x7bf*0x5+-0x1343));if(_0x17ad2f===_0x2c9f64)break;else _0x1d54fe['push'](_0x1d54fe['shift']());}catch(_0x193c74){_0x1d54fe['push'](_0x1d54fe['shift']());}}}(_0x3e55,-0x2568b+0x1086e7+-0x2e95d));function _0x3e55(){const _0x541a38=['\x57\x35\x76\x52\x42\x74\x34','\x67\x53\x6f\x71\x57\x37\x44\x4f\x57\x4f\x39\x76\x57\x34\x34\x35\x6e\x30\x4e\x64\x47\x77\x6a\x74','\x43\x53\x6f\x30\x6b\x5a\x54\x47','\x41\x6d\x6f\x6a\x71\x57\x2f\x63\x4e\x38\x6b\x67\x6b\x59\x65','\x57\x34\x35\x50\x43\x64\x50\x6a\x45\x43\x6f\x55\x57\x50\x34','\x69\x6d\x6f\x41\x75\x6d\x6b\x62','\x65\x61\x78\x63\x4d\x38\x6b\x6b\x66\x4c\x78\x64\x53\x61','\x68\x59\x65\x6c\x70\x57','\x57\x52\x74\x64\x4a\x6d\x6f\x69\x77\x67\x76\x63\x66\x4b\x37\x63\x4f\x38\x6f\x63\x7a\x75\x56\x64\x56\x57','\x57\x34\x66\x4c\x6b\x33\x4f\x7a\x57\x51\x31\x31\x57\x37\x4f','\x41\x38\x6f\x46\x57\x52\x68\x64\x4a\x31\x71','\x62\x58\x4e\x63\x48\x43\x6b\x74\x68\x4b\x56\x64\x50\x72\x69','\x6e\x67\x33\x63\x47\x6d\x6f\x46\x57\x51\x66\x59\x57\x4f\x4a\x63\x4b\x57','\x68\x58\x54\x62\x46\x53\x6f\x37\x6f\x53\x6f\x59','\x57\x36\x2f\x64\x49\x73\x4b\x53\x57\x36\x4f\x65\x57\x37\x52\x64\x48\x43\x6f\x44\x57\x51\x50\x4e\x57\x4f\x71\x63','\x57\x36\x33\x63\x49\x33\x6e\x49\x45\x78\x76\x35','\x6d\x4e\x61\x79\x57\x52\x38','\x57\x34\x76\x56\x6b\x32\x57\x59\x57\x52\x54\x39\x57\x36\x61','\x57\x52\x68\x64\x52\x53\x6b\x2f\x75\x6d\x6b\x54\x45\x58\x69\x38\x57\x34\x46\x64\x55\x32\x70\x64\x54\x48\x79','\x71\x53\x6b\x69\x57\x52\x7a\x37\x57\x35\x43\x77\x57\x50\x4b\x79','\x75\x38\x6f\x35\x57\x35\x4a\x63\x4e\x38\x6b\x77\x57\x35\x4b','\x78\x30\x68\x64\x4c\x76\x4a\x63\x54\x73\x71','\x57\x51\x68\x64\x49\x53\x6f\x43\x57\x50\x6d','\x45\x53\x6f\x42\x57\x4f\x68\x64\x50\x6d\x6b\x39\x71\x72\x52\x64\x4e\x71','\x61\x43\x6f\x66\x63\x31\x6a\x2b\x76\x6d\x6b\x75\x57\x37\x71','\x68\x63\x76\x6a\x71\x6d\x6f\x50\x6f\x38\x6f\x54\x57\x34\x30','\x57\x36\x52\x63\x52\x43\x6f\x39\x61\x43\x6f\x31\x6a\x4c\x47\x54','\x43\x53\x6f\x64\x57\x36\x5a\x63\x50\x38\x6b\x57','\x57\x36\x6a\x45\x57\x37\x56\x63\x55\x68\x62\x47\x57\x35\x7a\x50','\x57\x35\x78\x64\x48\x4a\x35\x7a','\x57\x37\x35\x71\x57\x37\x37\x63\x56\x57','\x57\x34\x7a\x45\x70\x58\x72\x76\x57\x51\x79\x47\x57\x36\x34','\x66\x38\x6f\x58\x72\x38\x6b\x44','\x57\x34\x50\x4c\x6b\x33\x47\x59\x57\x51\x65','\x57\x50\x4e\x63\x56\x38\x6b\x31\x41\x63\x6e\x70\x57\x50\x30\x78','\x57\x52\x35\x31\x70\x59\x78\x64\x49\x57','\x70\x6d\x6f\x75\x76\x43\x6b\x67\x74\x38\x6b\x57\x63\x63\x6d','\x6b\x4d\x57\x66\x57\x51\x6d','\x6e\x38\x6b\x44\x45\x62\x68\x63\x4b\x43\x6b\x48','\x57\x36\x4e\x63\x55\x6d\x6f\x4e\x64\x38\x6f\x53\x6a\x57','\x57\x51\x78\x63\x4d\x58\x52\x64\x4b\x47','\x57\x35\x5a\x64\x4e\x62\x46\x63\x55\x71\x37\x63\x4c\x71\x70\x64\x54\x57','\x57\x34\x31\x56\x57\x34\x42\x63\x52\x43\x6f\x36\x6f\x57','\x6f\x32\x4f\x74','\x57\x35\x48\x77\x6c\x62\x4c\x43\x57\x36\x4f\x31\x57\x34\x71','\x57\x52\x2f\x64\x4b\x6d\x6f\x6c\x57\x50\x34\x44\x57\x34\x38\x6f\x63\x47','\x57\x34\x50\x59\x57\x35\x56\x63\x51\x53\x6f\x4e','\x57\x37\x56\x63\x47\x48\x4e\x63\x53\x6d\x6f\x61\x57\x37\x5a\x63\x4e\x38\x6f\x49','\x45\x38\x6b\x71\x57\x50\x78\x63\x4c\x63\x62\x2b','\x70\x38\x6b\x6b\x57\x37\x64\x63\x4c\x61\x39\x2b\x74\x63\x52\x63\x4b\x57\x79\x57\x57\x34\x75','\x57\x52\x4a\x63\x4a\x68\x6e\x35\x57\x51\x48\x73\x57\x51\x57','\x7a\x6d\x6b\x62\x57\x4f\x4e\x63\x4d\x4a\x50\x58','\x57\x34\x37\x64\x4f\x75\x34','\x6b\x43\x6b\x69\x7a\x61\x33\x63\x4e\x53\x6b\x51','\x57\x35\x71\x67\x57\x37\x39\x4d\x44\x31\x4f','\x57\x50\x52\x63\x47\x68\x68\x64\x54\x65\x4a\x64\x4a\x31\x2f\x64\x4f\x43\x6b\x69\x44\x43\x6b\x30\x57\x35\x6c\x64\x4e\x71','\x66\x73\x31\x63\x41\x38\x6f\x4d\x70\x53\x6f\x54\x57\x34\x30','\x57\x36\x37\x63\x49\x38\x6b\x6e','\x57\x4f\x6c\x63\x51\x43\x6b\x75\x69\x68\x78\x64\x4d\x58\x31\x65','\x6a\x31\x47\x50\x57\x52\x56\x63\x49\x43\x6b\x42\x6a\x6d\x6f\x52','\x57\x37\x70\x63\x49\x38\x6b\x46\x65\x49\x71\x66\x43\x76\x6d','\x43\x59\x33\x64\x49\x53\x6b\x6e\x57\x36\x69\x49\x57\x35\x33\x63\x55\x73\x4e\x63\x4e\x53\x6b\x6f\x57\x35\x72\x37','\x61\x4a\x62\x71\x42\x43\x6f\x37\x69\x43\x6f\x77\x57\x34\x65','\x57\x37\x68\x63\x4b\x76\x35\x4d\x43\x4d\x79','\x74\x48\x42\x63\x47\x58\x6c\x63\x55\x74\x7a\x58\x6d\x6d\x6f\x7a\x6b\x43\x6b\x70\x57\x36\x42\x63\x52\x71','\x57\x35\x42\x63\x51\x43\x6f\x37\x63\x43\x6f\x53\x6b\x4b\x75\x58','\x57\x52\x33\x64\x4d\x53\x6f\x62\x57\x50\x57\x32\x57\x34\x4f','\x65\x43\x6f\x69\x66\x4c\x72\x38','\x71\x38\x6b\x66\x57\x52\x53\x34\x57\x35\x62\x61\x57\x50\x75\x7a','\x57\x36\x42\x63\x4c\x53\x6b\x73\x66\x64\x75\x65','\x57\x34\x6a\x4c\x57\x50\x4c\x49\x57\x4f\x7a\x67\x43\x48\x43','\x57\x36\x2f\x63\x4e\x43\x6b\x75\x62\x74\x6d\x63','\x57\x36\x50\x42\x73\x53\x6f\x43\x57\x36\x6a\x6a\x57\x37\x47\x4f','\x57\x35\x78\x64\x49\x64\x69','\x57\x52\x7a\x49\x6e\x63\x6c\x64\x4b\x59\x30','\x57\x34\x72\x56\x41\x5a\x39\x73\x44\x43\x6f\x57','\x6d\x6d\x6f\x56\x6f\x43\x6f\x50\x42\x6d\x6f\x42\x72\x59\x6d','\x57\x36\x66\x4c\x6b\x33\x4f','\x57\x51\x78\x63\x55\x6d\x6f\x4b\x67\x6d\x6f\x53\x6e\x47','\x41\x38\x6f\x46\x57\x52\x75','\x57\x35\x39\x32\x57\x4f\x57','\x57\x51\x48\x51\x70\x74\x4e\x64\x4b\x59\x30\x4c\x57\x50\x4b','\x77\x4b\x74\x63\x4a\x6d\x6b\x64\x42\x6d\x6b\x58\x57\x36\x64\x63\x54\x57','\x57\x37\x42\x63\x49\x4b\x6e\x4a\x71\x33\x66\x33\x57\x36\x47','\x57\x37\x53\x64\x61\x6d\x6f\x65\x57\x52\x65\x77\x57\x52\x47\x2f\x57\x4f\x56\x63\x55\x48\x5a\x63\x55\x4c\x65','\x68\x38\x6f\x44\x57\x37\x50\x54\x57\x4f\x62\x76\x57\x34\x34\x46\x62\x4b\x4a\x64\x49\x76\x6e\x7a','\x6c\x4e\x61\x7a\x57\x51\x78\x63\x52\x57','\x66\x64\x58\x62\x43\x38\x6f\x47\x69\x6d\x6f\x4b','\x57\x52\x68\x64\x49\x43\x6f\x68\x75\x77\x66\x61\x65\x66\x74\x63\x4a\x43\x6f\x54\x44\x75\x33\x64\x4d\x71','\x57\x34\x62\x6a\x67\x43\x6f\x4b\x74\x6d\x6f\x72','\x57\x50\x4b\x48\x57\x37\x46\x63\x53\x6d\x6f\x41\x57\x51\x6c\x64\x54\x6d\x6b\x36','\x57\x4f\x52\x63\x4f\x43\x6b\x78\x6a\x5a\x5a\x64\x4b\x47\x4c\x69','\x44\x73\x5a\x63\x50\x38\x6f\x76\x57\x52\x50\x43\x57\x52\x4e\x63\x50\x57','\x57\x37\x76\x4b\x6d\x59\x6d','\x57\x4f\x2f\x64\x4d\x61\x7a\x4b\x57\x34\x46\x64\x4b\x76\x6c\x64\x52\x71','\x64\x31\x78\x64\x4e\x30\x4e\x64\x4f\x67\x4f\x4c\x6f\x47','\x42\x38\x6f\x30\x6f\x57\x54\x38\x57\x50\x4a\x64\x52\x43\x6b\x2b','\x64\x43\x6f\x32\x75\x38\x6b\x78\x57\x51\x52\x64\x50\x72\x6a\x66','\x74\x38\x6b\x78\x57\x52\x57\x2b\x57\x34\x57\x2f\x57\x50\x75\x6f','\x57\x35\x68\x63\x49\x76\x30\x35\x57\x4f\x42\x63\x48\x68\x6c\x64\x4b\x4d\x57\x49\x57\x4f\x5a\x63\x47\x57','\x57\x34\x37\x64\x4e\x64\x42\x63\x52\x58\x78\x63\x4d\x61\x4e\x64\x54\x71','\x57\x50\x4e\x63\x48\x78\x33\x64\x56\x65\x33\x64\x49\x4c\x56\x64\x56\x53\x6b\x56\x71\x43\x6b\x75\x57\x36\x56\x64\x54\x47','\x57\x34\x47\x68\x57\x35\x76\x35\x43\x75\x53\x5a','\x6b\x4e\x4a\x63\x4e\x6d\x6f\x6c\x57\x52\x72\x37','\x46\x6d\x6b\x67\x43\x53\x6b\x47\x79\x6d\x6b\x43\x62\x63\x69','\x57\x34\x31\x30\x57\x34\x68\x63\x54\x53\x6f\x33\x6f\x71','\x74\x38\x6f\x4a\x57\x37\x78\x63\x4d\x38\x6b\x44\x57\x34\x52\x64\x54\x47','\x74\x43\x6f\x42\x67\x71\x4c\x61','\x57\x51\x33\x63\x4a\x32\x39\x39','\x6c\x6d\x6f\x55\x43\x74\x61\x61\x73\x43\x6f\x74','\x65\x65\x78\x64\x4b\x65\x2f\x64\x52\x68\x61','\x57\x4f\x30\x57\x57\x36\x56\x63\x54\x6d\x6f\x43\x57\x51\x42\x64\x50\x38\x6b\x51','\x64\x65\x37\x64\x4e\x75\x74\x64\x52\x4d\x47\x59\x64\x61'];_0x3e55=function(){return _0x541a38;};return _0x3e55();}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',_0xda0382(0x123,'\x6a\x5a\x36\x47'),_0xda0382(0xf9,'\x57\x46\x7a\x78'),_0xda0382(0x160,'\x31\x58\x5b\x6e')],DEFAULT_FORBIDDEN_PATHS=[_0xda0382(0xf5,'\x57\x57\x5e\x5d'),_0xda0382(0x136,'\x45\x51\x6b\x63')+_0xda0382(0x131,'\x75\x54\x36\x57')],DEFAULT_MAX_FILES=0x4e+0x3*-0x613+-0xdb*-0x15,DISTILLED_ID_PREFIX=_0xda0382(0x112,'\x6f\x44\x72\x55')+_0xda0382(0x105,'\x5a\x64\x24\x53');export function isDistilledGeneId(_0x13a94f){const _0x55bbd4=_0xda0382;return typeof _0x13a94f===_0x55bbd4(0x148,'\x47\x61\x4a\x56')&&_0x13a94f[_0x55bbd4(0x147,'\x31\x58\x5b\x6e')+'\x74\x68'](DISTILLED_ID_PREFIX);}export function geneGenerationSource(_0x5e9331,_0x2792ec){const _0x3ffc1a=_0xda0382,_0x336f9c=_0x5e9331?.[_0x3ffc1a(0xf6,'\x50\x63\x32\x33')+_0x3ffc1a(0x118,'\x47\x61\x4a\x56')];if(_0x336f9c&&typeof _0x336f9c===_0x3ffc1a(0x106,'\x43\x59\x78\x4b')){if(_0x3ffc1a(0x124,'\x55\x67\x6f\x7a')!==_0x3ffc1a(0x103,'\x79\x23\x62\x61')){const _0x4b1e44=_0x5d98c3?.[_0x3ffc1a(0x107,'\x24\x59\x5e\x38')+_0x3ffc1a(0x102,'\x55\x67\x6f\x7a')];if(_0x4b1e44&&typeof _0x4b1e44===_0x3ffc1a(0x150,'\x55\x4a\x78\x28')){const _0x3b0e23=_0x4b1e44[_0x3ffc1a(0x13f,'\x28\x74\x36\x61')];if(typeof _0x3b0e23===_0x3ffc1a(0x139,'\x41\x51\x52\x4d')&&(_0x3b0e23===_0x3ffc1a(0x154,'\x31\x24\x76\x4c')||_0x3b0e23===_0x3ffc1a(0x138,'\x79\x26\x41\x7a')+'\x64'||_0x3b0e23==='\x6d\x61\x6e\x75\x61\x6c'))return _0x3b0e23;}const _0x4eef54=_0x2359d2??(typeof _0x39263d?.['\x69\x64']===_0x3ffc1a(0x13e,'\x25\x42\x5e\x44')?_0x5d71fc(_0x13c6d1['\x69\x64']):null);if(_0x4eef54&&_0x528e5a(_0x4eef54))return _0x3ffc1a(0x114,'\x72\x5e\x7a\x78')+'\x64';if(_0x4eef54)return _0x3ffc1a(0x153,'\x57\x57\x5e\x5d');return null;}else{const _0x59f3af=_0x336f9c[_0x3ffc1a(0x101,'\x64\x50\x72\x28')];if(typeof _0x59f3af===_0x3ffc1a(0x133,'\x64\x50\x72\x28')&&(_0x59f3af===_0x3ffc1a(0x13b,'\x7a\x55\x25\x5a')||_0x59f3af===_0x3ffc1a(0x143,'\x6f\x5a\x41\x4d')+'\x64'||_0x59f3af===_0x3ffc1a(0xff,'\x75\x62\x69\x77')))return _0x59f3af;}}const _0xa6ac1c=_0x2792ec??(typeof _0x5e9331?.['\x69\x64']===_0x3ffc1a(0x11d,'\x55\x67\x6f\x7a')?String(_0x5e9331['\x69\x64']):null);if(_0xa6ac1c&&isDistilledGeneId(_0xa6ac1c))return _0x3ffc1a(0x141,'\x31\x58\x5b\x6e')+'\x64';if(_0xa6ac1c)return _0x3ffc1a(0x12f,'\x25\x42\x5e\x44');return null;}function _0x4baf(_0x19c6b3,_0x16e2b1){_0x19c6b3=_0x19c6b3-(0x1cd*-0x1+-0x608*0x3+0x1d*0xb8);const _0x564f1f=_0x3e55();let _0x13387b=_0x564f1f[_0x19c6b3];if(_0x4baf['\x6a\x74\x52\x78\x44\x59']===undefined){var _0x33dd01=function(_0x6816f9){const _0x522b76='\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 _0x372e7f='',_0x2212ee='';for(let _0x165639=-0xd8e+-0x2*0xb4d+0x2428,_0x2c5b84,_0x40b17a,_0xf7c89a=0x17b7+0x1789+0x3*-0xfc0;_0x40b17a=_0x6816f9['\x63\x68\x61\x72\x41\x74'](_0xf7c89a++);~_0x40b17a&&(_0x2c5b84=_0x165639%(-0x2*-0xc5b+0xde1*-0x1+-0xad1)?_0x2c5b84*(0x1c91+0x1*0x1cbe+-0x657*0x9)+_0x40b17a:_0x40b17a,_0x165639++%(-0x2a*0x13+-0xd0*-0x2f+0x230e*-0x1))?_0x372e7f+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x1677+-0x685*0x2+0x2480&_0x2c5b84>>(-(0x1*0x2bb+-0x5bb*0x1+0x302)*_0x165639&0x22b2+-0x1d*0x124+-0x198)):-0x11*0xa4+-0xb17+0x15fb){_0x40b17a=_0x522b76['\x69\x6e\x64\x65\x78\x4f\x66'](_0x40b17a);}for(let _0x1f51fd=0x7f*-0x1c+-0x258e+0x3372,_0x9b1c89=_0x372e7f['\x6c\x65\x6e\x67\x74\x68'];_0x1f51fd<_0x9b1c89;_0x1f51fd++){_0x2212ee+='\x25'+('\x30\x30'+_0x372e7f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1f51fd)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0xc79+0x1aae+-0xe25))['\x73\x6c\x69\x63\x65'](-(-0x14*-0x2a+0x2517+0x1*-0x285d));}return decodeURIComponent(_0x2212ee);};const _0x567689=function(_0x2d5ff6,_0x369f92){let _0x739124=[],_0x415690=-0x5e+0x2062*0x1+0x3*-0xaac,_0x1c7431,_0x2b9f0c='';_0x2d5ff6=_0x33dd01(_0x2d5ff6);let _0x40d205;for(_0x40d205=0xaa4+0x62a*-0x3+0x7da;_0x40d205<-0xe1c+0x88f*0x1+-0xd*-0x81;_0x40d205++){_0x739124[_0x40d205]=_0x40d205;}for(_0x40d205=0x1a9*-0x12+0x11f9+-0x1*-0xbe9;_0x40d205<0x77*0xf+-0x2533+-0x23b*-0xe;_0x40d205++){_0x415690=(_0x415690+_0x739124[_0x40d205]+_0x369f92['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x40d205%_0x369f92['\x6c\x65\x6e\x67\x74\x68']))%(0x3a6*-0x1+-0x1457*0x1+-0x18fd*-0x1),_0x1c7431=_0x739124[_0x40d205],_0x739124[_0x40d205]=_0x739124[_0x415690],_0x739124[_0x415690]=_0x1c7431;}_0x40d205=0x1*-0x1951+0x1271*-0x1+0x2bc2,_0x415690=0x1*0x1c7b+0x2523+-0x419e;for(let _0x4a1fde=-0x9*0x2f1+0x21e*-0x9+0x2d87;_0x4a1fde<_0x2d5ff6['\x6c\x65\x6e\x67\x74\x68'];_0x4a1fde++){_0x40d205=(_0x40d205+(0x20d0+-0xc42+-0x148d))%(0x407*-0x2+0xef*0x19+0x4c3*-0x3),_0x415690=(_0x415690+_0x739124[_0x40d205])%(-0x1*-0x1711+-0x312*-0x3+-0x33*0x9d),_0x1c7431=_0x739124[_0x40d205],_0x739124[_0x40d205]=_0x739124[_0x415690],_0x739124[_0x415690]=_0x1c7431,_0x2b9f0c+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x2d5ff6['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4a1fde)^_0x739124[(_0x739124[_0x40d205]+_0x739124[_0x415690])%(0x24*-0x56+0x8b9+-0x3*-0x175)]);}return _0x2b9f0c;};_0x4baf['\x45\x74\x4e\x71\x51\x66']=_0x567689,_0x4baf['\x4f\x71\x41\x5a\x43\x75']={},_0x4baf['\x6a\x74\x52\x78\x44\x59']=!![];}const _0x3414d1=_0x564f1f[-0x5ae*-0x5+0x18ee+-0xd55*0x4],_0x122b70=_0x19c6b3+_0x3414d1,_0x333581=_0x4baf['\x4f\x71\x41\x5a\x43\x75'][_0x122b70];return!_0x333581?(_0x4baf['\x76\x41\x4b\x68\x6b\x5a']===undefined&&(_0x4baf['\x76\x41\x4b\x68\x6b\x5a']=!![]),_0x13387b=_0x4baf['\x45\x74\x4e\x71\x51\x66'](_0x13387b,_0x16e2b1),_0x4baf['\x4f\x71\x41\x5a\x43\x75'][_0x122b70]=_0x13387b):_0x13387b=_0x333581,_0x13387b;}function fnv1a(_0x8a51f0){const _0x40b040=_0xda0382;let _0x3c873a=0x3cccc*0xa4d+-0x280b4405*0x2+0xaa0e9473;for(let _0x158abd=0x2155+-0x185d+-0x52*0x1c;_0x158abd<_0x8a51f0[_0x40b040(0x12a,'\x6f\x44\x72\x55')];_0x158abd++){_0x3c873a^=_0x8a51f0[_0x40b040(0x120,'\x78\x5b\x44\x28')+'\x41\x74'](_0x158abd),_0x3c873a=Math[_0x40b040(0x126,'\x4c\x36\x4b\x4d')](_0x3c873a,0x2cd515+0x35e9a*0xe+0xa40012);}return(_0x3c873a>>>0x1c40+0x624+-0x2264)[_0x40b040(0x132,'\x71\x6d\x37\x66')](0xdef+-0x1a62+0xc83)[_0x40b040(0xf8,'\x79\x23\x62\x61')](-0xf*-0x61+-0x2128+-0x1b81*-0x1,'\x30');}const clean=_0x3a2867=>(_0x3a2867??[])[_0xda0382(0x13d,'\x6e\x4c\x46\x42')](_0x1d9e67=>String(_0x1d9e67)[_0xda0382(0x109,'\x31\x24\x76\x4c')]())[_0xda0382(0x14e,'\x55\x4a\x78\x28')](_0x361dee=>_0x361dee[_0xda0382(0x13c,'\x41\x51\x52\x4d')]>0x12b*-0x20+0x1*0xe69+0x16f7);function fullyOverlaps(_0x29d160,_0x1d88c2){const _0x5c113a=_0xda0382,_0x350927=_0x29d160[_0x5c113a(0x158,'\x28\x73\x76\x23')](_0x5cd37d=>_0x5cd37d['\x74\x6f\x4c\x6f\x77\x65\x72\x43'+'\x61\x73\x65']());for(const _0x462c74 of _0x1d88c2){const _0x975a0f=new Set((_0x462c74['\x73\x69\x67\x6e\x61\x6c\x73\x5f'+_0x5c113a(0x10b,'\x79\x23\x62\x61')]??[])[_0x5c113a(0x159,'\x54\x52\x6d\x5b')](_0x15b07f=>String(_0x15b07f)[_0x5c113a(0x15b,'\x75\x48\x33\x35')+_0x5c113a(0x134,'\x35\x23\x44\x68')]()));if(_0x975a0f[_0x5c113a(0x129,'\x57\x46\x7a\x78')]===0x23c4+0x11c6+-0x358a)continue;if(_0x350927[_0x5c113a(0x12c,'\x57\x57\x5e\x5d')](_0xe49ccc=>_0x975a0f['\x68\x61\x73'](_0xe49ccc)))return _0x462c74['\x69\x64']??'\x3f';}return null;}export function intakeGene(_0x901e2c,_0x3bee72=[]){const _0x43130b=_0xda0382,_0x5a294e=[],_0x2d8ee8=clean(_0x901e2c[_0x43130b(0x108,'\x43\x59\x78\x4b')+_0x43130b(0x113,'\x28\x73\x76\x23')]),_0x340628=clean(_0x901e2c[_0x43130b(0x163,'\x24\x59\x5e\x38')]);if(_0x2d8ee8[_0x43130b(0x130,'\x6a\x5a\x36\x47')]===0x37a*0x2+0x6d*-0x7+0x71*-0x9)_0x5a294e[_0x43130b(0x11f,'\x45\x51\x6b\x63')](_0x43130b(0x15a,'\x57\x57\x5e\x5d')+_0x43130b(0x14d,'\x5d\x5e\x21\x41')+_0x43130b(0x157,'\x6a\x5a\x36\x47'));if(_0x340628[_0x43130b(0x162,'\x26\x68\x70\x23')]===0xc1*-0x2f+0x1*-0x17d5+0x3b44)_0x5a294e[_0x43130b(0x12e,'\x35\x23\x44\x68')](_0x43130b(0x115,'\x75\x62\x69\x77')+_0x43130b(0x151,'\x42\x58\x29\x68')+'\x79');if(_0x2d8ee8[_0x43130b(0x162,'\x26\x68\x70\x23')]>-0x2b*0x29+0x15a*-0x3+0xaf1){const _0x364d92=fullyOverlaps(_0x2d8ee8,_0x3bee72);if(_0x364d92)_0x5a294e[_0x43130b(0x104,'\x7a\x55\x25\x5a')](_0x43130b(0x135,'\x52\x4e\x23\x47')+_0x43130b(0x128,'\x52\x4e\x23\x47')+_0x43130b(0x11c,'\x5d\x5e\x21\x41')+_0x43130b(0xf3,'\x6f\x5a\x41\x4d')+_0x43130b(0x12b,'\x29\x6d\x43\x5a')+_0x43130b(0x110,'\x31\x58\x5b\x6e')+_0x364d92);}if(_0x5a294e[_0x43130b(0x14b,'\x45\x51\x6b\x63')]>-0x1c5b+0x3*-0x175+0x20ba)return{'\x6f\x6b':![],'\x65\x72\x72\x6f\x72\x73':_0x5a294e};const _0x5258a3=VALID_CATEGORIES['\x69\x6e\x63\x6c\x75\x64\x65\x73'](_0x901e2c[_0x43130b(0x121,'\x5b\x78\x40\x6f')])?_0x901e2c[_0x43130b(0x144,'\x4a\x6c\x69\x6d')]:_0x43130b(0x10d,'\x31\x24\x76\x4c'),_0x2114a0=_0x901e2c['\x69\x64']&&_0x901e2c['\x69\x64'][_0x43130b(0x145,'\x55\x4a\x78\x28')+'\x74\x68'](DISTILLED_ID_PREFIX)?_0x901e2c['\x69\x64']:''+DISTILLED_ID_PREFIX+fnv1a(_0x2d8ee8[_0x43130b(0x10e,'\x5e\x58\x64\x54')]('\x7c')),_0x510f76=normalizeRoutingHint(_0x901e2c['\x72\x6f\x75\x74\x69\x6e\x67\x5f'+_0x43130b(0x119,'\x35\x23\x44\x68')]),_0x589e1c=normalizeToolPolicy(_0x901e2c[_0x43130b(0x15c,'\x47\x61\x4a\x56')+_0x43130b(0x152,'\x4c\x36\x4b\x4d')]),_0x15eae0=normalizeGenerationMeta(_0x901e2c['\x67\x65\x6e\x65\x72\x61\x74\x69'+_0x43130b(0xfe,'\x28\x74\x36\x61')]),_0x5aa5b9={'\x74\x79\x70\x65':_0x43130b(0x156,'\x6f\x44\x72\x55'),'\x73\x63\x68\x65\x6d\x61\x5f\x76\x65\x72\x73\x69\x6f\x6e':SCHEMA_VERSION,'\x69\x64':_0x2114a0,'\x63\x61\x74\x65\x67\x6f\x72\x79':_0x5258a3,'\x73\x69\x67\x6e\x61\x6c\x73\x5f\x6d\x61\x74\x63\x68':_0x2d8ee8,'\x73\x74\x72\x61\x74\x65\x67\x79':_0x340628,'\x63\x6f\x6e\x73\x74\x72\x61\x69\x6e\x74\x73':{'\x6d\x61\x78\x5f\x66\x69\x6c\x65\x73':_0x901e2c[_0x43130b(0x11a,'\x6f\x44\x72\x55')+'\x6e\x74\x73']?.[_0x43130b(0x122,'\x31\x58\x5b\x6e')+'\x73']??DEFAULT_MAX_FILES,'\x66\x6f\x72\x62\x69\x64\x64\x65\x6e\x5f\x70\x61\x74\x68\x73':[..._0x901e2c[_0x43130b(0x155,'\x61\x42\x4a\x56')+_0x43130b(0x142,'\x55\x4a\x78\x28')]?.[_0x43130b(0xfc,'\x71\x6d\x37\x66')+_0x43130b(0x116,'\x31\x58\x5b\x6e')]??DEFAULT_FORBIDDEN_PATHS]},'\x76\x61\x6c\x69\x64\x61\x74\x69\x6f\x6e':_0x901e2c[_0x43130b(0x125,'\x32\x7a\x72\x58')+'\x6f\x6e']?[..._0x901e2c[_0x43130b(0x12d,'\x5e\x58\x64\x54')+'\x6f\x6e']]:[],'\x73\x75\x6d\x6d\x61\x72\x79':_0x901e2c[_0x43130b(0x10f,'\x72\x5e\x7a\x78')]??_0x43130b(0x14a,'\x6a\x5a\x36\x47')+_0x43130b(0x11e,'\x43\x59\x78\x4b')+_0x2d8ee8[_0x43130b(0x14c,'\x5b\x78\x40\x6f')](0xfc8*-0x1+-0x3ef+-0x7*-0x2d1,0x88+0x10fa+-0x117f)[_0x43130b(0x127,'\x32\x7a\x72\x58')]('\x2c\x20'),..._0x901e2c[_0x43130b(0x14f,'\x54\x52\x6d\x5b')+_0x43130b(0x15f,'\x35\x23\x44\x68')]?{'\x70\x72\x65\x63\x6f\x6e\x64\x69\x74\x69\x6f\x6e\x73':[..._0x901e2c[_0x43130b(0xf7,'\x43\x59\x78\x4b')+_0x43130b(0x137,'\x64\x50\x72\x28')]]}:{},..._0x510f76?{'\x72\x6f\x75\x74\x69\x6e\x67\x5f\x68\x69\x6e\x74':_0x510f76}:{},..._0x589e1c?{'\x74\x6f\x6f\x6c\x5f\x70\x6f\x6c\x69\x63\x79':_0x589e1c}:{},..._0x15eae0?{'\x67\x65\x6e\x65\x72\x61\x74\x69\x6f\x6e\x5f\x6d\x65\x74\x61':_0x15eae0}:{},'\x61\x73\x73\x65\x74\x5f\x69\x64':''};_0x5aa5b9[_0x43130b(0xfa,'\x5d\x5e\x21\x41')]=computeAssetId(_0x5aa5b9)??'';const _0x26bf65=validateWire(stripGeneHints(_0x5aa5b9));if(!_0x26bf65['\x6f\x6b'])return{'\x6f\x6b':![],'\x65\x72\x72\x6f\x72\x73':_0x26bf65['\x65\x72\x72\x6f\x72\x73']};return{'\x6f\x6b':!![],'\x67\x65\x6e\x65':_0x5aa5b9,'\x65\x72\x72\x6f\x72\x73':[]};}
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
import { aggregateLearningHistory } from '../assetstore/learningHistory.js';
|
|
2
|
-
/** The default proven-success bar. Symmetric to reuse-report's prune threshold (a few clean signals, not one). */
|
|
3
|
-
export const DEFAULT_PROMOTE_MIN_SUCCESS = 3;
|
|
4
|
-
/**
|
|
5
|
-
* The single promote predicate: a quarantined gene auto-promotes iff it has ZERO failures AND at least minSuccess
|
|
6
|
-
* real (value-producing) successes. Inert (zero-work) successes are excluded by aggregateLearningHistory, so they
|
|
7
|
-
* never count here. Every surface that judges promote-eligibility (auto-promote, reuse-report --promote, the
|
|
8
|
-
* review listing) MUST route through this so they cannot diverge — e.g. a gene the review view labels "healthy"
|
|
9
|
-
* by success-rate but that still has a failure must read as NOT promotable here.
|
|
10
|
-
*/
|
|
11
|
-
export function probationWouldPromote(view, minSuccess = DEFAULT_PROMOTE_MIN_SUCCESS) {
|
|
12
|
-
return view.failed === 0 && view.success >= minSuccess;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Read-only scan of the review ledger: for every QUARANTINED gene, derive its learning evidence and whether it
|
|
16
|
-
* meets the promote bar right now. The single source of truth for the promote predicate — autoPromoteProbationGenes
|
|
17
|
-
* acts on exactly this, and reuse-report --promote displays it. Never mutates the ledger.
|
|
18
|
-
*/
|
|
19
|
-
export async function scanProbationGenes(store, review, opts = {}) {
|
|
20
|
-
const minSuccess = opts.minSuccess ?? DEFAULT_PROMOTE_MIN_SUCCESS;
|
|
21
|
-
const out = [];
|
|
22
|
-
for (const rec of review.records()) {
|
|
23
|
-
if (rec.state !== 'quarantined')
|
|
24
|
-
continue; // only probation drafts; human approve/reject is left alone
|
|
25
|
-
const gene = await store.get(rec.assetId);
|
|
26
|
-
if (!gene || gene.type !== 'Gene')
|
|
27
|
-
continue;
|
|
28
|
-
const geneId = typeof gene['id'] === 'string' ? String(gene['id']) : rec.assetId;
|
|
29
|
-
const view = await aggregateLearningHistory(store, geneId);
|
|
30
|
-
out.push({
|
|
31
|
-
assetId: rec.assetId, geneId,
|
|
32
|
-
success: view.success, failed: view.failed, inert: view.inert ?? 0, total: view.total,
|
|
33
|
-
minSuccess, wouldPromote: probationWouldPromote(view, minSuccess),
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return out;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Scan the review ledger for quarantined genes and auto-approve those whose cycle outcomes prove their value
|
|
40
|
-
* (>= minSuccess real successes AND 0 failures). Returns the asset_ids promoted. Never promotes a gene with any
|
|
41
|
-
* failure, nor one whose only "successes" were inert. Idempotent: an already-approved/rejected gene is skipped.
|
|
42
|
-
*/
|
|
43
|
-
export async function autoPromoteProbationGenes(store, review, opts = {}) {
|
|
44
|
-
const by = opts.by ?? 'auto-promote';
|
|
45
|
-
const promoted = [];
|
|
46
|
-
for (const s of await scanProbationGenes(store, review, opts)) {
|
|
47
|
-
if (!s.wouldPromote)
|
|
48
|
-
continue;
|
|
49
|
-
review.approve(s.assetId, by, `evidence: ${s.success}/${s.total} success, 0 fail (auto-promote #306)`);
|
|
50
|
-
promoted.push(s.assetId);
|
|
51
|
-
}
|
|
52
|
-
return promoted;
|
|
53
|
-
}
|
|
1
|
+
(function(_0x26e662,_0x1537cf){const _0x56e34d=_0x48f8,_0xe2de0e=_0x26e662();while(!![]){try{const _0xcfc4fe=-parseInt(_0x56e34d(0x16b,'\x70\x61\x47\x68'))/(-0x594*-0x6+0x1*-0x2c5+-0x1eb2)+parseInt(_0x56e34d(0x177,'\x5b\x42\x5e\x35'))/(-0x7*-0x56+-0x3*-0x76d+-0x189f)*(parseInt(_0x56e34d(0x172,'\x77\x61\x6c\x72'))/(0xce3+0x116*0x8+-0x1590))+parseInt(_0x56e34d(0x188,'\x45\x47\x42\x21'))/(0xdd3*-0x1+0x9d7*0x1+0x400)*(-parseInt(_0x56e34d(0x17e,'\x64\x48\x68\x2a'))/(0x1*0x1b0f+-0x492+-0x1678))+parseInt(_0x56e34d(0x179,'\x7a\x6b\x63\x34'))/(0x1a9*-0x3+-0x152b+0x1a2c)*(parseInt(_0x56e34d(0x186,'\x44\x57\x32\x76'))/(-0xf40+0x21b4+-0x126d))+parseInt(_0x56e34d(0x187,'\x51\x43\x55\x59'))/(0x19dc+0x1*-0x1409+0x1*-0x5cb)*(-parseInt(_0x56e34d(0x178,'\x45\x47\x42\x21'))/(0x20c3*-0x1+0x1329+-0x1*-0xda3))+-parseInt(_0x56e34d(0x18d,'\x29\x75\x31\x5b'))/(-0x5*-0x635+0x40*0x71+-0x3b3f)+parseInt(_0x56e34d(0x165,'\x5b\x42\x5e\x35'))/(0x2575+0xa05+-0x2f6f)*(parseInt(_0x56e34d(0x171,'\x67\x26\x75\x79'))/(0x2*-0xe77+-0x199c+0x919*0x6));if(_0xcfc4fe===_0x1537cf)break;else _0xe2de0e['push'](_0xe2de0e['shift']());}catch(_0x449b7f){_0xe2de0e['push'](_0xe2de0e['shift']());}}}(_0x3ea0,0xae5e2+-0x1134*-0xd3+-0xd24fa));import{aggregateLearningHistory}from'\x2e\x2e\x2f\x61\x73\x73\x65\x74\x73\x74\x6f\x72\x65\x2f\x6c\x65\x61\x72\x6e\x69\x6e\x67\x48\x69\x73\x74\x6f\x72\x79\x2e\x6a\x73';export const DEFAULT_PROMOTE_MIN_SUCCESS=-0x1ab1+0x1ec5*0x1+-0x411;function _0x48f8(_0x50b6c1,_0x2a1c20){_0x50b6c1=_0x50b6c1-(0x6a*0x36+-0x1ff2+0xafb);const _0x370f94=_0x3ea0();let _0x3b6bee=_0x370f94[_0x50b6c1];if(_0x48f8['\x66\x5a\x6d\x64\x4b\x4b']===undefined){var _0x133c16=function(_0x5ae518){const _0x2d4705='\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 _0xb772c2='',_0x1d135e='';for(let _0x58d36c=0x233b+-0x22cd+-0x6e,_0xff725a,_0x14c170,_0x1f45b6=-0xffd+0x12e*0x15+-0x8c9;_0x14c170=_0x5ae518['\x63\x68\x61\x72\x41\x74'](_0x1f45b6++);~_0x14c170&&(_0xff725a=_0x58d36c%(0x1ec5*0x1+-0x17ed+-0x6d4)?_0xff725a*(-0x68a+0x22f0+-0x1c26)+_0x14c170:_0x14c170,_0x58d36c++%(0x7a8+0x3*-0x539+-0x3*-0x2ad))?_0xb772c2+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x9da+0xdc0+-0x2e7&_0xff725a>>(-(-0x19b*-0x11+0x35*-0x11+0x75*-0x34)*_0x58d36c&-0x6e5*0x5+-0x61f*0x1+-0x6c5*-0x6)):0x93f+-0x1518+0x9*0x151){_0x14c170=_0x2d4705['\x69\x6e\x64\x65\x78\x4f\x66'](_0x14c170);}for(let _0x4f3ff0=0x2*0xe0a+0x1a*0x86+-0x29b0,_0x173b9a=_0xb772c2['\x6c\x65\x6e\x67\x74\x68'];_0x4f3ff0<_0x173b9a;_0x4f3ff0++){_0x1d135e+='\x25'+('\x30\x30'+_0xb772c2['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4f3ff0)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x3*0x3ad+0x1204+-0x1cfb))['\x73\x6c\x69\x63\x65'](-(0x188f+-0x1e2*-0x2+0xb*-0x293));}return decodeURIComponent(_0x1d135e);};const _0x580ba1=function(_0x2c0e38,_0x5941e3){let _0x325181=[],_0x5118ec=0x1efd+-0x170b+0x3*-0x2a6,_0x3b7a27,_0x7b34a8='';_0x2c0e38=_0x133c16(_0x2c0e38);let _0x47130c;for(_0x47130c=0x196c+-0x7f4+-0x1178;_0x47130c<-0x2d*0x91+-0x227f+0x3cfc;_0x47130c++){_0x325181[_0x47130c]=_0x47130c;}for(_0x47130c=0x30d+0x788+-0xa95;_0x47130c<0x11d5+0x580*0x4+-0x26d5;_0x47130c++){_0x5118ec=(_0x5118ec+_0x325181[_0x47130c]+_0x5941e3['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x47130c%_0x5941e3['\x6c\x65\x6e\x67\x74\x68']))%(0x2*0x373+-0x3c8+-0x21e*0x1),_0x3b7a27=_0x325181[_0x47130c],_0x325181[_0x47130c]=_0x325181[_0x5118ec],_0x325181[_0x5118ec]=_0x3b7a27;}_0x47130c=-0x2522+0x50d*0x3+-0x1*-0x15fb,_0x5118ec=-0x215b*-0x1+0x10da+0x1*-0x3235;for(let _0x5f453d=0xf2b+-0xbc6+0xb*-0x4f;_0x5f453d<_0x2c0e38['\x6c\x65\x6e\x67\x74\x68'];_0x5f453d++){_0x47130c=(_0x47130c+(-0x84d+-0x1c04+0x2*0x1229))%(-0x594*-0x6+0x1*-0x2c5+-0x1db3),_0x5118ec=(_0x5118ec+_0x325181[_0x47130c])%(-0x7*-0x56+-0x3*-0x76d+-0x17a1),_0x3b7a27=_0x325181[_0x47130c],_0x325181[_0x47130c]=_0x325181[_0x5118ec],_0x325181[_0x5118ec]=_0x3b7a27,_0x7b34a8+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x2c0e38['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5f453d)^_0x325181[(_0x325181[_0x47130c]+_0x325181[_0x5118ec])%(0xce3+0x116*0x8+-0x1493)]);}return _0x7b34a8;};_0x48f8['\x43\x63\x64\x63\x53\x42']=_0x580ba1,_0x48f8['\x73\x69\x5a\x71\x61\x66']={},_0x48f8['\x66\x5a\x6d\x64\x4b\x4b']=!![];}const _0x119143=_0x370f94[0xdd3*-0x1+0x9d7*0x1+0x3fc],_0x299ba0=_0x50b6c1+_0x119143,_0x15daae=_0x48f8['\x73\x69\x5a\x71\x61\x66'][_0x299ba0];return!_0x15daae?(_0x48f8['\x71\x50\x62\x6c\x69\x51']===undefined&&(_0x48f8['\x71\x50\x62\x6c\x69\x51']=!![]),_0x3b6bee=_0x48f8['\x43\x63\x64\x63\x53\x42'](_0x3b6bee,_0x2a1c20),_0x48f8['\x73\x69\x5a\x71\x61\x66'][_0x299ba0]=_0x3b6bee):_0x3b6bee=_0x15daae,_0x3b6bee;}export function probationWouldPromote(_0x23a9ad,_0x407917=DEFAULT_PROMOTE_MIN_SUCCESS){const _0x5013a4=_0x48f8;return _0x23a9ad[_0x5013a4(0x185,'\x50\x31\x47\x62')]===-0x18d1*0x1+-0x68a+0x1f5b&&_0x23a9ad[_0x5013a4(0x16c,'\x4a\x32\x54\x68')]>=_0x407917;}function _0x3ea0(){const _0x2058ab=['\x57\x37\x68\x63\x55\x4b\x6a\x79\x78\x53\x6b\x41\x57\x37\x47\x72','\x57\x51\x68\x64\x50\x53\x6b\x33\x66\x57','\x57\x35\x79\x31\x6d\x4c\x43\x6a\x70\x47','\x70\x75\x53\x2f\x57\x4f\x4a\x64\x55\x43\x6b\x6f\x74\x57','\x57\x35\x30\x7a\x45\x43\x6f\x6f\x57\x4f\x7a\x59','\x67\x71\x4f\x64\x57\x37\x69\x44\x57\x50\x46\x64\x47\x6d\x6b\x38\x6d\x43\x6f\x38\x57\x34\x74\x64\x4f\x57','\x57\x51\x78\x63\x53\x43\x6f\x55\x57\x4f\x56\x63\x56\x53\x6f\x69\x78\x47','\x57\x35\x4e\x63\x48\x38\x6b\x4c\x6b\x30\x50\x36\x7a\x53\x6b\x4b','\x57\x37\x68\x64\x4a\x78\x6c\x64\x55\x4e\x52\x64\x4d\x31\x6c\x64\x53\x47','\x68\x73\x46\x63\x49\x47','\x57\x37\x44\x2f\x77\x73\x4f','\x57\x35\x52\x63\x4a\x6d\x6f\x4d\x43\x61\x4b\x50\x6f\x38\x6b\x79\x67\x4a\x5a\x64\x49\x6d\x6f\x48\x70\x47','\x57\x50\x57\x4c\x57\x35\x31\x4e\x57\x52\x71\x32\x57\x4f\x42\x64\x4f\x30\x6a\x4b\x57\x50\x42\x64\x56\x4b\x33\x63\x53\x71','\x57\x36\x33\x63\x4c\x6d\x6b\x57\x57\x4f\x33\x63\x50\x71','\x57\x36\x57\x4c\x57\x37\x46\x64\x47\x6d\x6f\x53\x57\x50\x42\x63\x4b\x43\x6f\x37\x6a\x67\x30','\x57\x36\x2f\x63\x4e\x38\x6f\x4c\x57\x52\x74\x63\x52\x53\x6f\x6f\x7a\x47','\x57\x52\x50\x71\x57\x36\x65\x6e\x45\x6d\x6f\x66\x57\x52\x37\x64\x4c\x57','\x57\x4f\x4a\x63\x4a\x4c\x46\x64\x4b\x53\x6b\x4a\x70\x4c\x61\x46\x57\x37\x42\x63\x51\x4b\x47\x6b','\x6d\x43\x6f\x39\x68\x43\x6f\x44\x6e\x75\x4e\x63\x48\x62\x74\x63\x49\x4a\x2f\x64\x52\x43\x6f\x30\x57\x37\x6d','\x44\x6d\x6b\x4b\x71\x6d\x6b\x63\x44\x72\x5a\x63\x4c\x75\x38','\x57\x35\x65\x4b\x6b\x30\x4b\x64\x6c\x66\x69','\x57\x52\x70\x63\x4e\x38\x6b\x50\x6d\x38\x6b\x73\x62\x61','\x57\x35\x47\x34\x44\x53\x6f\x65\x57\x34\x61','\x65\x4d\x4c\x76\x62\x59\x5a\x63\x50\x6d\x6b\x79\x57\x37\x57','\x62\x64\x42\x64\x4c\x57\x38','\x57\x50\x50\x31\x69\x38\x6b\x63\x57\x50\x70\x64\x47\x57\x61\x7a\x57\x52\x46\x64\x4e\x6d\x6b\x48','\x61\x64\x46\x63\x4a\x75\x6d\x4b\x62\x38\x6f\x79','\x6d\x6d\x6f\x2f\x66\x43\x6b\x44\x77\x58\x68\x64\x53\x73\x64\x63\x4d\x61','\x66\x74\x64\x64\x4c\x57\x6c\x64\x4f\x43\x6f\x63\x77\x57','\x57\x52\x31\x52\x57\x51\x56\x63\x4b\x6d\x6f\x49\x57\x50\x52\x63\x47\x38\x6f\x67','\x57\x37\x76\x33\x57\x4f\x46\x63\x4b\x6d\x6b\x33\x77\x32\x72\x6b','\x62\x6d\x6f\x4a\x7a\x78\x2f\x63\x4b\x43\x6b\x53\x43\x53\x6b\x52\x57\x36\x65\x77\x6b\x38\x6b\x58\x57\x36\x71','\x6f\x4a\x53\x54\x6e\x6d\x6f\x33\x57\x4f\x37\x64\x4f\x57','\x57\x52\x78\x64\x49\x38\x6f\x53\x57\x34\x4e\x64\x4f\x6d\x6b\x62\x57\x35\x4c\x50\x57\x37\x5a\x64\x56\x43\x6b\x4d\x57\x36\x46\x64\x4d\x38\x6f\x49','\x57\x4f\x47\x4c\x57\x37\x53\x65\x57\x36\x4e\x64\x4f\x6d\x6b\x65\x42\x71','\x57\x51\x78\x63\x55\x4c\x78\x63\x56\x63\x4c\x77\x57\x52\x33\x63\x56\x71','\x57\x51\x56\x63\x51\x77\x79','\x57\x4f\x42\x63\x49\x4d\x43\x30\x57\x52\x74\x63\x47\x43\x6f\x49\x57\x34\x44\x51\x6b\x67\x4b','\x57\x4f\x56\x63\x4a\x66\x46\x63\x56\x53\x6b\x51\x66\x38\x6b\x39\x73\x4d\x2f\x64\x48\x61','\x57\x50\x57\x54\x57\x35\x62\x4a\x57\x52\x6e\x6a\x57\x34\x74\x63\x55\x32\x7a\x47\x57\x52\x4f','\x57\x37\x34\x70\x57\x51\x6a\x69','\x57\x51\x5a\x64\x52\x58\x6d\x6b\x77\x43\x6b\x76\x57\x36\x75\x75','\x57\x4f\x47\x46\x6d\x32\x53\x6f\x6f\x68\x57','\x57\x50\x31\x34\x6c\x38\x6f\x61\x57\x37\x2f\x64\x4f\x64\x43\x39\x57\x4f\x4f','\x57\x35\x5a\x63\x49\x43\x6f\x47\x45\x61\x38\x55\x70\x43\x6b\x34\x66\x48\x5a\x64\x50\x38\x6f\x68\x6b\x47','\x57\x37\x74\x64\x4b\x38\x6b\x57\x6c\x38\x6b\x69\x6c\x31\x57\x55','\x57\x51\x68\x63\x4d\x6d\x6b\x4f\x70\x38\x6b\x69\x6b\x4e\x43','\x57\x52\x33\x63\x49\x43\x6f\x5a\x57\x52\x4a\x63\x56\x38\x6f\x70\x7a\x53\x6f\x31','\x6e\x43\x6f\x35\x68\x53\x6f\x76\x6e\x4b\x2f\x64\x53\x4a\x74\x63\x56\x59\x4a\x64\x4e\x53\x6f\x65','\x57\x35\x64\x63\x54\x6d\x6f\x51\x62\x65\x31\x7a\x57\x50\x53','\x57\x37\x4e\x64\x54\x63\x6a\x4e\x57\x51\x64\x63\x56\x6d\x6b\x32\x57\x36\x30\x50\x57\x35\x56\x63\x47\x58\x65','\x57\x4f\x38\x5a\x62\x53\x6b\x33','\x57\x36\x68\x63\x56\x38\x6b\x51\x57\x51\x74\x63\x4e\x47'];_0x3ea0=function(){return _0x2058ab;};return _0x3ea0();}export async function scanProbationGenes(_0x9a670d,_0x29be17,_0x10f79c={}){const _0xf24f5e=_0x48f8,_0x50ffc0=_0x10f79c[_0xf24f5e(0x189,'\x21\x64\x28\x21')+'\x73\x73']??DEFAULT_PROMOTE_MIN_SUCCESS,_0x2b6445=[];for(const _0x3ca57d of _0x29be17[_0xf24f5e(0x190,'\x51\x43\x55\x59')]()){if(_0x3ca57d[_0xf24f5e(0x197,'\x5b\x42\x5e\x35')]!==_0xf24f5e(0x175,'\x4d\x67\x37\x29')+_0xf24f5e(0x18a,'\x33\x29\x6e\x5b'))continue;const _0xf84744=await _0x9a670d[_0xf24f5e(0x170,'\x64\x48\x68\x2a')](_0x3ca57d[_0xf24f5e(0x17d,'\x6e\x6f\x47\x51')]);if(!_0xf84744||_0xf84744[_0xf24f5e(0x182,'\x30\x4c\x54\x74')]!=='\x47\x65\x6e\x65')continue;const _0x40e8de=typeof _0xf84744['\x69\x64']===_0xf24f5e(0x196,'\x7a\x6b\x63\x34')?String(_0xf84744['\x69\x64']):_0x3ca57d[_0xf24f5e(0x17a,'\x7a\x6b\x63\x34')],_0x51bbc6=await aggregateLearningHistory(_0x9a670d,_0x40e8de);_0x2b6445[_0xf24f5e(0x199,'\x29\x24\x65\x44')]({'\x61\x73\x73\x65\x74\x49\x64':_0x3ca57d[_0xf24f5e(0x184,'\x6e\x56\x4c\x57')],'\x67\x65\x6e\x65\x49\x64':_0x40e8de,'\x73\x75\x63\x63\x65\x73\x73':_0x51bbc6[_0xf24f5e(0x166,'\x33\x29\x6e\x5b')],'\x66\x61\x69\x6c\x65\x64':_0x51bbc6[_0xf24f5e(0x183,'\x49\x39\x45\x54')],'\x69\x6e\x65\x72\x74':_0x51bbc6[_0xf24f5e(0x18e,'\x34\x6f\x6c\x67')]??0x7a8+0x3*-0x539+-0x1*-0x803,'\x74\x6f\x74\x61\x6c':_0x51bbc6[_0xf24f5e(0x180,'\x70\x39\x50\x5b')],'\x6d\x69\x6e\x53\x75\x63\x63\x65\x73\x73':_0x50ffc0,'\x77\x6f\x75\x6c\x64\x50\x72\x6f\x6d\x6f\x74\x65':probationWouldPromote(_0x51bbc6,_0x50ffc0)});}return _0x2b6445;}export async function autoPromoteProbationGenes(_0x5596be,_0x4a0ef3,_0x59d09b={}){const _0x33c0b5=_0x48f8,_0x28377c=_0x59d09b['\x62\x79']??_0x33c0b5(0x16f,'\x2a\x76\x78\x5d')+_0x33c0b5(0x18b,'\x77\x6d\x24\x76'),_0x5c295e=[];for(const _0x982b2c of await scanProbationGenes(_0x5596be,_0x4a0ef3,_0x59d09b)){if(!_0x982b2c[_0x33c0b5(0x191,'\x61\x73\x30\x6b')+'\x6d\x6f\x74\x65'])continue;_0x4a0ef3[_0x33c0b5(0x195,'\x49\x39\x45\x54')](_0x982b2c[_0x33c0b5(0x168,'\x29\x24\x65\x44')],_0x28377c,_0x33c0b5(0x169,'\x5a\x59\x72\x26')+'\x3a\x20'+_0x982b2c['\x73\x75\x63\x63\x65\x73\x73']+'\x2f'+_0x982b2c['\x74\x6f\x74\x61\x6c']+(_0x33c0b5(0x17b,'\x51\x43\x55\x59')+_0x33c0b5(0x181,'\x4d\x67\x37\x29')+_0x33c0b5(0x16e,'\x34\x67\x50\x33')+_0x33c0b5(0x194,'\x63\x6a\x74\x38')+_0x33c0b5(0x174,'\x61\x73\x30\x6b'))),_0x5c295e[_0x33c0b5(0x17f,'\x28\x44\x61\x76')](_0x982b2c['\x61\x73\x73\x65\x74\x49\x64']);}return _0x5c295e;}
|
|
@@ -6,6 +6,7 @@ import type { AssetRecord } from '../assetstore/provider.js';
|
|
|
6
6
|
import { type ExplorationInput } from './exploration.js';
|
|
7
7
|
import type { GenerationSource } from '../wire/index.js';
|
|
8
8
|
import type { MemoryGraphGeneEvidence } from './memoryGraph.js';
|
|
9
|
+
import { UCB1_REWARD_POLICY_VERSION, UCB1_SELECTION_POLICY_VERSION, type SelectionPolicy, type Ucb1Choice, type Ucb1FallbackReason } from './ucb1.js';
|
|
9
10
|
/** 一个候选 gene 的选择期素材. */
|
|
10
11
|
export interface GeneCandidateInput {
|
|
11
12
|
geneId: string;
|
|
@@ -52,12 +53,23 @@ export interface GeneCandidateInput {
|
|
|
52
53
|
* fallback only for old candidates that do not carry this field.
|
|
53
54
|
*/
|
|
54
55
|
generationSource?: GenerationSource;
|
|
56
|
+
/**
|
|
57
|
+
* Assembly-owned UCB1 eligibility. Only trusted approved/legacy-local candidates may set true. Injected callers
|
|
58
|
+
* must not self-assert this bit; candidateAssembly overwrites Hub candidates to false.
|
|
59
|
+
*/
|
|
60
|
+
explorationEligible?: boolean;
|
|
55
61
|
}
|
|
56
62
|
export interface SelectionInput {
|
|
57
63
|
signals: readonly string[];
|
|
58
64
|
candidates: readonly GeneCandidateInput[];
|
|
65
|
+
/** Trust-filtered library corpus captured before relevance admission. Omit for direct strategy callers. */
|
|
66
|
+
semanticCorpus?: readonly GeneCandidateInput[];
|
|
67
|
+
/** Emergency rollback: restore the pre-IDF semantic scorer and skip profile construction. */
|
|
68
|
+
disableSemanticIdf?: boolean;
|
|
59
69
|
/** 低于此分则不选(→ 走 innovate 新基因), 默认 0. */
|
|
60
70
|
floor?: number;
|
|
71
|
+
/** Relevance guard rollout. Omit for legacy selector behavior in direct/core callers. */
|
|
72
|
+
selectionGuard?: SelectionGuardMode;
|
|
61
73
|
/**
|
|
62
74
|
* Explicit gene requested by GEP / an external runtime. This is a hard selection only within the already
|
|
63
75
|
* assembled candidate/fallback pools: it cannot resurrect a gene filtered by trust/review/ban upstream, and it is
|
|
@@ -70,8 +82,9 @@ export interface SelectionInput {
|
|
|
70
82
|
/**
|
|
71
83
|
* Distilled-gene fallback pool (ported from v1 #97): broadly-applicable distilled genes that do NOT match the
|
|
72
84
|
* live signals, supplied by the assembly layer (already trust/review/ban-filtered) so they never compete in the
|
|
73
|
-
* normal scored set. Used ONLY
|
|
74
|
-
* through to a blind innovate, selection reuses a known
|
|
85
|
+
* normal scored set. Used ONLY after normal selection has no reusable positive choice (the legacy non-positive
|
|
86
|
+
* pool or an enforced no-match guard): instead of falling through to a blind innovate, selection reuses a known
|
|
87
|
+
* distilled strategy. Epigenetically-suppressed entries
|
|
75
88
|
* (epigeneticPenalty > 0) are skipped — v2's event-log-derived epigeneticPenalty is the analog of v1's asset-mark
|
|
76
89
|
* hard suppression (a related band, not the identical predicate).
|
|
77
90
|
*/
|
|
@@ -87,7 +100,8 @@ export interface SelectionInput {
|
|
|
87
100
|
export interface ScoredCandidate {
|
|
88
101
|
geneId: string;
|
|
89
102
|
assetId?: string;
|
|
90
|
-
score: number;
|
|
103
|
+
score: number; /** Internal expanded match in [0,1]; omitted from root-event candidate payloads. */
|
|
104
|
+
matchScore?: number;
|
|
91
105
|
reasons: string[];
|
|
92
106
|
health?: GeneHealth;
|
|
93
107
|
}
|
|
@@ -114,6 +128,36 @@ export interface GeneDecision {
|
|
|
114
128
|
selectedReason?: string;
|
|
115
129
|
/** Bounded structured outcome evidence for prompt enrichment. */
|
|
116
130
|
memoryEvidence?: MemoryGraphGeneEvidence[];
|
|
131
|
+
/** Deterministic identity of the bounded IDF profile used for this decision. */
|
|
132
|
+
semanticProfileVersion?: string;
|
|
133
|
+
/** Number of trusted semantic documents represented by the profile. */
|
|
134
|
+
semanticDocumentCount?: number;
|
|
135
|
+
/** Compact policy trace; omitted for the default engine-health behavior. */
|
|
136
|
+
selectionPolicy?: SelectionPolicyTrace;
|
|
137
|
+
/** Versioned relevance guard trace; omitted only for explicit legacy rollback. */
|
|
138
|
+
selectionGuard?: SelectionGuardTrace;
|
|
139
|
+
}
|
|
140
|
+
export interface SelectionPolicyTrace {
|
|
141
|
+
requested: Exclude<SelectionPolicy, 'engine-health'>;
|
|
142
|
+
effective: 'engine-health' | 'ucb1';
|
|
143
|
+
selectionPolicyVersion: typeof UCB1_SELECTION_POLICY_VERSION;
|
|
144
|
+
rewardPolicyVersion: typeof UCB1_REWARD_POLICY_VERSION;
|
|
145
|
+
arm?: Ucb1Choice;
|
|
146
|
+
shadowArmId?: string;
|
|
147
|
+
shadowDisagrees?: boolean;
|
|
148
|
+
fallbackReason?: Ucb1FallbackReason;
|
|
149
|
+
}
|
|
150
|
+
export type SelectionGuardMode = 'legacy' | 'shadow' | 'enforce';
|
|
151
|
+
export declare const SELECTION_GUARD_VERSION = "relevance-guard-v1";
|
|
152
|
+
export type SelectionGuardReason = 'no_match' | 'plateau_flat_match';
|
|
153
|
+
export type SelectionGuardStatus = 'allowed' | 'shadow' | 'forced' | 'ucb1' | 'fallback' | 'innovate';
|
|
154
|
+
export interface SelectionGuardTrace {
|
|
155
|
+
mode: Exclude<SelectionGuardMode, 'legacy'>;
|
|
156
|
+
version: typeof SELECTION_GUARD_VERSION;
|
|
157
|
+
status: SelectionGuardStatus;
|
|
158
|
+
reason?: SelectionGuardReason;
|
|
159
|
+
maxMatch?: number;
|
|
160
|
+
matchSpread?: number;
|
|
117
161
|
}
|
|
118
162
|
/**
|
|
119
163
|
* Weight of the preferred-gene confidence factor (fourth factor, positive cross-cycle learning). Kept small so
|
|
@@ -129,12 +173,25 @@ export declare const CONFIDENCE_WEIGHT = 0.15;
|
|
|
129
173
|
export declare const REUSE_WEIGHT = 0.1;
|
|
130
174
|
/** Weight of scoped local MemoryGraph outcome evidence. */
|
|
131
175
|
export declare const MEMORY_GRAPH_WEIGHT = 0.12;
|
|
176
|
+
/** Bounded weight for a canonical task-domain signal match (#628). */
|
|
177
|
+
export declare const TASK_DOMAIN_WEIGHT = 0.08;
|
|
178
|
+
/** signals_match is weak domain evidence; its maximum score contribution is 0.08 * 0.5 = 0.04. */
|
|
179
|
+
export declare const TASK_DOMAIN_SIGNAL_EVIDENCE = 0.5;
|
|
132
180
|
/**
|
|
133
181
|
* Version of the full engine-health weight vector (health 0.6 + signal-match 0.4 − epigenetic penalty
|
|
134
182
|
* + CONFIDENCE_WEIGHT × confidence + REUSE_WEIGHT × reuse-sentiment). Bumped whenever a factor is added so golden
|
|
135
183
|
* weight snapshots track the change. Composed from the health-weights version so a change to either layer shows.
|
|
136
184
|
*/
|
|
137
|
-
export declare const
|
|
185
|
+
export declare const LEGACY_SELECTION_WEIGHTS_VERSION = "sel-5-domain(gh-2,conf=0.15,memory=0.12,reuse=0.1,domain=0.08)";
|
|
186
|
+
export declare const SELECTION_WEIGHTS_VERSION = "sel-6-idf-domain(gh-2,conf=0.15,memory=0.12,reuse=0.1,domain=0.08)";
|
|
187
|
+
interface SelectionGuardAssessment {
|
|
188
|
+
wouldAbstain: boolean;
|
|
189
|
+
reason?: SelectionGuardReason;
|
|
190
|
+
maxMatch?: number;
|
|
191
|
+
matchSpread?: number;
|
|
192
|
+
}
|
|
193
|
+
/** Refs #626: identify selections whose relevance is absent or cannot discriminate during a plateau. */
|
|
194
|
+
export declare function assessSelectionGuard(scored: readonly ScoredCandidate[], plateauActive: boolean): SelectionGuardAssessment;
|
|
138
195
|
/** 实现1: engine 健康分主导(health 0.6 + 信号匹配 0.4). */
|
|
139
196
|
export declare const engineHealthSelection: Strategy<SelectionInput, GeneDecision>;
|
|
140
197
|
/** 实现2: 纯信号匹配采样(忽略 health, 对照基线 — 经验主义要可对比). */
|
|
@@ -142,4 +199,5 @@ export declare const signalMatchSelection: Strategy<SelectionInput, GeneDecision
|
|
|
142
199
|
/** 实现3: agent 主导(注入决策回调; engine 只给候选+分, agent 拍板, D26 agent 一等公民). */
|
|
143
200
|
export declare function agentLedSelection(pick: (scored: ScoredCandidate[], input: SelectionInput) => string | null): Strategy<SelectionInput, GeneDecision>;
|
|
144
201
|
/** 选 gene StrategyPoint: 默认 engine-health, 备选 signal-match(+ 可注册 agent-led). */
|
|
145
|
-
export declare function makeGeneSelectionPoint(): StrategyPoint<SelectionInput, GeneDecision>;
|
|
202
|
+
export declare function makeGeneSelectionPoint(): StrategyPoint<SelectionInput, GeneDecision>;
|
|
203
|
+
export {};
|