@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,119 +1 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { extensions } from '../schema/common.js';
|
|
3
|
-
/**
|
|
4
|
-
* PersonalityState = 可进化人格 (v1 src/gep/personality.js 的 v2 端口).
|
|
5
|
-
*
|
|
6
|
-
* 五维行为向量, 各 0..1, 决定进化"风格"而非"内容":
|
|
7
|
-
* - rigor 严谨度: 越高越保守/协议优先, 是高危变异的准入前提
|
|
8
|
-
* - creativity 创造性: 越高越倾向 innovate/explore, 跳出局部最优
|
|
9
|
-
* - verbosity 啰嗦度: 影响产物叙述密度 (纯 prompt 提示, 不改逻辑)
|
|
10
|
-
* - risk_tolerance 风险容忍: 越高越敢冒险, 但会被风险闸压制
|
|
11
|
-
* - obedience 服从度: 越高越贴合协议/用户指令
|
|
12
|
-
*
|
|
13
|
-
* 三条用途 (v2 必须保留语义, 见 riskGate.ts / prompt.ts / (PR-2) selection):
|
|
14
|
-
* 1. 注入每轮 GEP prompt, 决定进化风格 (prompt.ts)
|
|
15
|
-
* 2. 变异风险闸: high-risk/innovate 变异只在 rigor≥0.6 且 risk_tolerance≤0.5 放行 (riskGate.ts)
|
|
16
|
-
* 3. 自然选择 + 小步变异自调参, 成功强化/失败淘汰, 全程进事件流可审计 (PR-2)
|
|
17
|
-
*/
|
|
18
|
-
/** 五维行为轴 (顺序固定 — personalityKey / 遍历依赖它). */
|
|
19
|
-
export const PERSONALITY_AXES = ['rigor', 'creativity', 'verbosity', 'risk_tolerance', 'obedience'];
|
|
20
|
-
/** 保守默认: 协议优先、安全、低风险 (v1 defaultPersonalityState 原值). */
|
|
21
|
-
export const DEFAULT_PERSONALITY = Object.freeze({
|
|
22
|
-
rigor: 0.7,
|
|
23
|
-
creativity: 0.35,
|
|
24
|
-
verbosity: 0.25,
|
|
25
|
-
risk_tolerance: 0.4,
|
|
26
|
-
obedience: 0.85,
|
|
27
|
-
});
|
|
28
|
-
const axis01 = z.number().min(0).max(1);
|
|
29
|
-
/** 五维人格状态. type 判别标签保留 (v1/事件流互认). */
|
|
30
|
-
export const personalityState = z.object({
|
|
31
|
-
type: z.literal('PersonalityState').default('PersonalityState'),
|
|
32
|
-
rigor: axis01.default(DEFAULT_PERSONALITY.rigor),
|
|
33
|
-
creativity: axis01.default(DEFAULT_PERSONALITY.creativity),
|
|
34
|
-
verbosity: axis01.default(DEFAULT_PERSONALITY.verbosity),
|
|
35
|
-
risk_tolerance: axis01.default(DEFAULT_PERSONALITY.risk_tolerance),
|
|
36
|
-
obedience: axis01.default(DEFAULT_PERSONALITY.obedience),
|
|
37
|
-
});
|
|
38
|
-
/** 一个人格键的运行统计 (自然选择的适应度原料; PR-2 回写). */
|
|
39
|
-
export const personalityStats = z.object({
|
|
40
|
-
success: z.number().int().nonnegative().default(0),
|
|
41
|
-
fail: z.number().int().nonnegative().default(0),
|
|
42
|
-
/** 增量均值; n 为纳入均值的样本数. */
|
|
43
|
-
avgScore: z.number().min(0).max(1).default(0.5),
|
|
44
|
-
n: z.number().int().nonnegative().default(0),
|
|
45
|
-
updatedAt: z.string().datetime().nullable().default(null),
|
|
46
|
-
});
|
|
47
|
-
/** 单条人格变更历史 (可审计; 也镜像进事件流). */
|
|
48
|
-
export const personalityHistoryEntry = z.object({
|
|
49
|
-
at: z.string().datetime(),
|
|
50
|
-
key: z.string(),
|
|
51
|
-
outcome: z.string(),
|
|
52
|
-
score: z.number().min(0).max(1).nullable().default(null),
|
|
53
|
-
notes: z.string().nullable().default(null),
|
|
54
|
-
});
|
|
55
|
-
/** 持久化模型: 当前人格 + 各键统计 + 变更历史 (v1 loadPersonalityModel 的 v2 形状). */
|
|
56
|
-
export const personalityModel = z.object({
|
|
57
|
-
version: z.literal(1).default(1),
|
|
58
|
-
current: personalityState.default(() => personalityState.parse({})),
|
|
59
|
-
stats: z.record(z.string(), personalityStats).default({}),
|
|
60
|
-
history: z.array(personalityHistoryEntry).default([]),
|
|
61
|
-
updatedAt: z.string().datetime().nullable().default(null),
|
|
62
|
-
extensions,
|
|
63
|
-
});
|
|
64
|
-
/** 单个变异提案 (作用于一个轴, delta 会被 applyMutations 夹取). */
|
|
65
|
-
export const personalityMutation = z.object({
|
|
66
|
-
type: z.literal('PersonalityMutation').default('PersonalityMutation'),
|
|
67
|
-
param: z.enum(PERSONALITY_AXES),
|
|
68
|
-
delta: z.number(),
|
|
69
|
-
reason: z.string().default(''),
|
|
70
|
-
});
|
|
71
|
-
const clamp01 = (x) => {
|
|
72
|
-
const n = Number(x);
|
|
73
|
-
if (!Number.isFinite(n))
|
|
74
|
-
return 0;
|
|
75
|
-
return Math.max(0, Math.min(1, n));
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* 把任意输入夹成合法 PersonalityState (缺失/越界/非数 → 夹到 [0,1]).
|
|
79
|
-
* 注意: 与 v1 一致, 非有限值夹为 0 而非默认值 — 显式坏输入不静默"复活"成保守默认.
|
|
80
|
-
*/
|
|
81
|
-
export function normalizePersonalityState(state) {
|
|
82
|
-
const s = (state && typeof state === 'object' ? state : {});
|
|
83
|
-
return {
|
|
84
|
-
type: 'PersonalityState',
|
|
85
|
-
rigor: clamp01(s['rigor']),
|
|
86
|
-
creativity: clamp01(s['creativity']),
|
|
87
|
-
verbosity: clamp01(s['verbosity']),
|
|
88
|
-
risk_tolerance: clamp01(s['risk_tolerance']),
|
|
89
|
-
obedience: clamp01(s['obedience']),
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
/** 严格校验: type 标签对且五轴都是 [0,1] 有限数 (不做夹取, 用于信任边界). */
|
|
93
|
-
export function isValidPersonalityState(obj) {
|
|
94
|
-
return personalityState.safeParse(obj).success && obj.type === 'PersonalityState';
|
|
95
|
-
}
|
|
96
|
-
function roundToStep(x, step) {
|
|
97
|
-
if (!Number.isFinite(step) || step <= 0)
|
|
98
|
-
return x;
|
|
99
|
-
return Math.round(x / step) * step;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* 稳定桶键: 五轴各按 0.1 步长量化后拼串. 相近人格落同一桶, 统计才能积累 (v1 personalityKey).
|
|
103
|
-
* 例: "rigor=0.7|creativity=0.4|verbosity=0.2|risk_tolerance=0.4|obedience=0.9"
|
|
104
|
-
*/
|
|
105
|
-
export function personalityKey(state) {
|
|
106
|
-
const s = normalizePersonalityState(state);
|
|
107
|
-
return PERSONALITY_AXES.map((k) => `${k}=${roundToStep(s[k], 0.1).toFixed(1)}`).join('|');
|
|
108
|
-
}
|
|
109
|
-
/** 由 personalityKey 反解回 PersonalityState (未识别轴回落默认; 自然选择需要). */
|
|
110
|
-
export function parseKeyToState(key) {
|
|
111
|
-
const out = { ...DEFAULT_PERSONALITY };
|
|
112
|
-
for (const part of String(key ?? '').split('|')) {
|
|
113
|
-
const [k, v] = part.split('=').map((x) => x.trim());
|
|
114
|
-
if (k && PERSONALITY_AXES.includes(k))
|
|
115
|
-
out[k] = clamp01(v);
|
|
116
|
-
}
|
|
117
|
-
return normalizePersonalityState(out);
|
|
118
|
-
}
|
|
119
|
-
export { clamp01 };
|
|
1
|
+
const _0x56aa5a=_0x37bc;(function(_0x5058f8,_0x2c177e){const _0x41814b=_0x37bc,_0x5b941e=_0x5058f8();while(!![]){try{const _0x53443e=-parseInt(_0x41814b(0x1d7,'\x4d\x63\x6d\x74'))/(0x1ec8+0x2b4*-0xe+-0x711*-0x1)+-parseInt(_0x41814b(0x23f,'\x6e\x79\x33\x26'))/(-0x1aff+0xc3f+0xec2)+-parseInt(_0x41814b(0x211,'\x31\x41\x51\x21'))/(-0x226b+-0x4c1+-0x272f*-0x1)*(-parseInt(_0x41814b(0x1ec,'\x23\x6d\x6b\x29'))/(0x218a+-0x43*-0x49+-0x34a1))+-parseInt(_0x41814b(0x231,'\x61\x55\x30\x46'))/(-0x9*0x2bb+0xa7e+0xe1a)+-parseInt(_0x41814b(0x239,'\x76\x72\x47\x29'))/(0x207*-0xd+0xa62+-0x27*-0x69)+-parseInt(_0x41814b(0x21d,'\x76\x72\x47\x29'))/(-0x1a86*-0x1+-0x2027*0x1+0x2*0x2d4)+parseInt(_0x41814b(0x1eb,'\x41\x5d\x4d\x78'))/(0x1*-0xa9f+0x985*0x1+0x122)*(parseInt(_0x41814b(0x223,'\x72\x4b\x58\x65'))/(0x800*0x2+0xe21+-0x6b*0x48));if(_0x53443e===_0x2c177e)break;else _0x5b941e['push'](_0x5b941e['shift']());}catch(_0x195cb4){_0x5b941e['push'](_0x5b941e['shift']());}}}(_0x58d9,-0xd7cfc+-0x4ce6d*-0x2+0xd947*0x14));import{z}from'\x7a\x6f\x64';import{extensions}from'\x2e\x2e\x2f\x73\x63\x68\x65\x6d\x61\x2f\x63\x6f\x6d\x6d\x6f\x6e\x2e\x6a\x73';export const PERSONALITY_AXES=[_0x56aa5a(0x216,'\x43\x72\x46\x44'),_0x56aa5a(0x203,'\x31\x41\x51\x21')+'\x74\x79',_0x56aa5a(0x225,'\x6f\x73\x6a\x35')+'\x79',_0x56aa5a(0x230,'\x24\x59\x58\x73')+_0x56aa5a(0x1d2,'\x4f\x67\x30\x68'),'\x6f\x62\x65\x64\x69\x65\x6e\x63'+'\x65'];export const DEFAULT_PERSONALITY=Object[_0x56aa5a(0x1fd,'\x4c\x45\x74\x77')]({'\x72\x69\x67\x6f\x72':0.7,'\x63\x72\x65\x61\x74\x69\x76\x69\x74\x79':0.35,'\x76\x65\x72\x62\x6f\x73\x69\x74\x79':0.25,'\x72\x69\x73\x6b\x5f\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65':0.4,'\x6f\x62\x65\x64\x69\x65\x6e\x63\x65':0.85});const axis01=z[_0x56aa5a(0x1f5,'\x4c\x45\x74\x77')]()[_0x56aa5a(0x226,'\x43\x72\x46\x44')](0x7de+-0x37*0xa7+0x1c03*0x1)[_0x56aa5a(0x1e4,'\x26\x31\x72\x61')](0xb*-0x6f+0x1a82+-0x15bc);export const personalityState=z['\x6f\x62\x6a\x65\x63\x74']({'\x74\x79\x70\x65':z[_0x56aa5a(0x214,'\x4c\x45\x74\x77')](_0x56aa5a(0x20c,'\x39\x72\x77\x25')+_0x56aa5a(0x1f2,'\x41\x5d\x4d\x78'))[_0x56aa5a(0x1de,'\x76\x72\x47\x29')](_0x56aa5a(0x217,'\x35\x35\x7a\x70')+_0x56aa5a(0x1ee,'\x5a\x28\x39\x2a')),'\x72\x69\x67\x6f\x72':axis01['\x64\x65\x66\x61\x75\x6c\x74'](DEFAULT_PERSONALITY[_0x56aa5a(0x1ce,'\x6e\x79\x33\x26')]),'\x63\x72\x65\x61\x74\x69\x76\x69\x74\x79':axis01[_0x56aa5a(0x210,'\x6a\x68\x35\x4d')](DEFAULT_PERSONALITY[_0x56aa5a(0x23e,'\x6e\x79\x33\x26')+'\x74\x79']),'\x76\x65\x72\x62\x6f\x73\x69\x74\x79':axis01[_0x56aa5a(0x240,'\x35\x63\x29\x69')](DEFAULT_PERSONALITY[_0x56aa5a(0x1f6,'\x4d\x63\x6d\x74')+'\x79']),'\x72\x69\x73\x6b\x5f\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65':axis01[_0x56aa5a(0x215,'\x31\x73\x50\x78')](DEFAULT_PERSONALITY[_0x56aa5a(0x20a,'\x48\x4f\x65\x6c')+_0x56aa5a(0x1e6,'\x6a\x68\x35\x4d')]),'\x6f\x62\x65\x64\x69\x65\x6e\x63\x65':axis01[_0x56aa5a(0x1f7,'\x36\x34\x4c\x7a')](DEFAULT_PERSONALITY[_0x56aa5a(0x206,'\x4d\x74\x59\x4a')+'\x65'])});export const personalityStats=z['\x6f\x62\x6a\x65\x63\x74']({'\x73\x75\x63\x63\x65\x73\x73':z[_0x56aa5a(0x21a,'\x41\x5d\x4d\x78')]()[_0x56aa5a(0x1dc,'\x46\x57\x6e\x5b')]()[_0x56aa5a(0x21b,'\x31\x73\x50\x78')+_0x56aa5a(0x204,'\x23\x6d\x6b\x29')]()[_0x56aa5a(0x1fa,'\x5a\x28\x39\x2a')](0x11c5+0x203e+0xd9*-0x3b),'\x66\x61\x69\x6c':z[_0x56aa5a(0x219,'\x4d\x74\x59\x4a')]()[_0x56aa5a(0x1e7,'\x26\x31\x72\x61')]()[_0x56aa5a(0x218,'\x4d\x63\x6d\x74')+_0x56aa5a(0x20e,'\x39\x72\x77\x25')]()[_0x56aa5a(0x240,'\x35\x63\x29\x69')](0x7c6+0x2623+-0x2de9),'\x61\x76\x67\x53\x63\x6f\x72\x65':z[_0x56aa5a(0x1f3,'\x23\x6d\x6b\x29')]()[_0x56aa5a(0x20b,'\x6e\x79\x33\x26')](-0xf8b*0x1+-0xb3e+0x1*0x1ac9)[_0x56aa5a(0x22e,'\x2a\x67\x4d\x40')](0x1bb*-0x11+0x56d*0x1+0x17ff)['\x64\x65\x66\x61\x75\x6c\x74'](-0x1d*0x86+0x1*-0x1e86+0x2db4+0.5),'\x6e':z[_0x56aa5a(0x1da,'\x61\x55\x30\x46')]()['\x69\x6e\x74']()[_0x56aa5a(0x241,'\x79\x53\x67\x52')+'\x69\x76\x65']()['\x64\x65\x66\x61\x75\x6c\x74'](-0x249e*-0x1+-0xe*-0x65+-0x2a24*0x1),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':z[_0x56aa5a(0x242,'\x32\x7a\x32\x73')]()[_0x56aa5a(0x1f0,'\x72\x77\x4e\x6c')]()[_0x56aa5a(0x1ca,'\x61\x74\x74\x21')]()[_0x56aa5a(0x22d,'\x49\x28\x5e\x68')](null)});export const personalityHistoryEntry=z['\x6f\x62\x6a\x65\x63\x74']({'\x61\x74':z[_0x56aa5a(0x22c,'\x74\x74\x6c\x45')]()[_0x56aa5a(0x1f8,'\x31\x41\x51\x21')](),'\x6b\x65\x79':z[_0x56aa5a(0x222,'\x46\x57\x6e\x5b')](),'\x6f\x75\x74\x63\x6f\x6d\x65':z[_0x56aa5a(0x220,'\x4d\x63\x6d\x74')](),'\x73\x63\x6f\x72\x65':z[_0x56aa5a(0x232,'\x4c\x25\x50\x45')]()[_0x56aa5a(0x1f9,'\x6b\x52\x40\x79')](-0x1ebf+-0xce*-0x2e+-0x645*0x1)[_0x56aa5a(0x236,'\x65\x65\x73\x78')](0x13*0x1ff+0x1223*-0x2+-0x1a6)[_0x56aa5a(0x235,'\x5e\x72\x29\x48')]()[_0x56aa5a(0x1fe,'\x4f\x67\x30\x68')](null),'\x6e\x6f\x74\x65\x73':z[_0x56aa5a(0x209,'\x65\x65\x73\x78')]()[_0x56aa5a(0x1ed,'\x32\x7a\x32\x73')]()[_0x56aa5a(0x1c9,'\x6e\x79\x33\x26')](null)});export const personalityModel=z[_0x56aa5a(0x202,'\x28\x6d\x79\x4c')]({'\x76\x65\x72\x73\x69\x6f\x6e':z[_0x56aa5a(0x1df,'\x72\x34\x5d\x46')](0x1*-0x2659+0x31*0x14+-0x2286*-0x1)['\x64\x65\x66\x61\x75\x6c\x74'](-0x52*0xa+-0x5d4+0x303*0x3),'\x63\x75\x72\x72\x65\x6e\x74':personalityState[_0x56aa5a(0x20d,'\x28\x6d\x79\x4c')](()=>personalityState[_0x56aa5a(0x1e3,'\x5d\x30\x6d\x32')]({})),'\x73\x74\x61\x74\x73':z[_0x56aa5a(0x228,'\x43\x72\x46\x44')](z['\x73\x74\x72\x69\x6e\x67'](),personalityStats)[_0x56aa5a(0x23b,'\x26\x31\x72\x61')]({}),'\x68\x69\x73\x74\x6f\x72\x79':z[_0x56aa5a(0x224,'\x56\x4f\x25\x52')](personalityHistoryEntry)['\x64\x65\x66\x61\x75\x6c\x74']([]),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':z[_0x56aa5a(0x242,'\x32\x7a\x32\x73')]()[_0x56aa5a(0x22a,'\x61\x55\x30\x46')]()[_0x56aa5a(0x1d6,'\x23\x6d\x6b\x29')]()[_0x56aa5a(0x1e0,'\x29\x25\x56\x42')](null),'\x65\x78\x74\x65\x6e\x73\x69\x6f\x6e\x73':extensions});export const personalityMutation=z[_0x56aa5a(0x1d8,'\x46\x57\x6e\x5b')]({'\x74\x79\x70\x65':z[_0x56aa5a(0x1d3,'\x32\x7a\x32\x73')]('\x50\x65\x72\x73\x6f\x6e\x61\x6c'+_0x56aa5a(0x205,'\x4c\x25\x50\x45')+_0x56aa5a(0x227,'\x6e\x79\x33\x26'))['\x64\x65\x66\x61\x75\x6c\x74'](_0x56aa5a(0x1ef,'\x49\x28\x5e\x68')+_0x56aa5a(0x237,'\x62\x38\x36\x35')+_0x56aa5a(0x1c8,'\x41\x5d\x4d\x78')),'\x70\x61\x72\x61\x6d':z[_0x56aa5a(0x1cd,'\x79\x53\x67\x52')](PERSONALITY_AXES),'\x64\x65\x6c\x74\x61':z[_0x56aa5a(0x22f,'\x76\x72\x47\x29')](),'\x72\x65\x61\x73\x6f\x6e':z[_0x56aa5a(0x1d1,'\x26\x31\x72\x61')]()[_0x56aa5a(0x212,'\x4d\x63\x6d\x74')]('')});const clamp01=_0x228648=>{const _0x84387f=_0x56aa5a,_0x5a234f=Number(_0x228648);if(!Number[_0x84387f(0x1d0,'\x4d\x74\x59\x4a')](_0x5a234f))return-0x239*-0x2+0x25d0+0x4b2*-0x9;return Math[_0x84387f(0x1cf,'\x75\x4a\x6c\x5b')](-0xa37+-0x3*0x941+0x25fa,Math[_0x84387f(0x1ff,'\x47\x77\x5d\x37')](0x823+-0xb8*0x2e+0x18ee,_0x5a234f));};function _0x58d9(){const _0x31baca=['\x57\x50\x56\x63\x49\x75\x71\x71\x57\x4f\x57','\x67\x53\x6b\x67\x57\x34\x70\x64\x48\x68\x56\x64\x48\x4b\x4f','\x57\x51\x78\x63\x53\x4e\x4f\x34\x57\x52\x61\x37\x57\x4f\x53','\x57\x4f\x4a\x63\x4f\x48\x2f\x63\x4b\x6d\x6f\x73\x57\x36\x33\x64\x53\x47','\x57\x34\x69\x37\x57\x50\x58\x59\x57\x4f\x30\x7a\x62\x43\x6b\x7a','\x41\x53\x6b\x30\x57\x35\x6e\x67\x57\x37\x69','\x57\x34\x65\x37\x57\x4f\x48\x4b\x57\x52\x47','\x57\x4f\x46\x64\x4c\x53\x6f\x42','\x70\x6d\x6f\x78\x43\x43\x6f\x42\x57\x35\x52\x64\x56\x31\x7a\x75\x64\x43\x6f\x4d\x57\x37\x37\x63\x55\x43\x6f\x42','\x78\x32\x66\x4c\x64\x77\x4a\x64\x48\x61','\x57\x4f\x70\x64\x4d\x43\x6f\x78','\x57\x34\x52\x63\x55\x68\x69\x50\x57\x52\x47','\x57\x36\x52\x63\x4e\x38\x6f\x47\x57\x36\x4c\x59\x57\x51\x5a\x63\x54\x57','\x76\x49\x6c\x63\x56\x72\x7a\x6e','\x75\x77\x37\x63\x52\x38\x6f\x55\x6a\x32\x4e\x64\x4e\x57','\x7a\x38\x6f\x41\x69\x38\x6f\x58\x57\x37\x42\x63\x4b\x53\x6b\x77\x57\x51\x34\x76\x44\x57\x6d\x65','\x71\x6d\x6b\x76\x57\x52\x34\x2b\x6b\x43\x6f\x52\x57\x50\x4e\x63\x4a\x57','\x68\x43\x6f\x2f\x78\x63\x78\x63\x4c\x6d\x6f\x50\x57\x36\x56\x64\x55\x71','\x57\x51\x50\x62\x43\x43\x6b\x6b\x57\x50\x6c\x64\x50\x61\x46\x64\x56\x57','\x57\x35\x33\x63\x51\x77\x4f\x4c\x57\x52\x4a\x63\x50\x63\x79\x2b','\x57\x34\x58\x49\x57\x50\x42\x63\x54\x43\x6b\x73\x57\x37\x72\x64\x79\x47','\x61\x68\x42\x63\x55\x53\x6f\x6c\x70\x65\x33\x64\x48\x66\x79','\x6f\x38\x6b\x43\x45\x6d\x6b\x4d\x57\x51\x64\x64\x4b\x47','\x57\x34\x33\x63\x54\x73\x72\x31','\x57\x37\x64\x63\x48\x43\x6f\x6c\x57\x36\x6a\x56\x57\x52\x53','\x43\x43\x6f\x54\x57\x35\x4b\x65\x57\x35\x58\x34\x6e\x6d\x6f\x31','\x71\x38\x6b\x45\x79\x6d\x6b\x4f\x57\x35\x50\x55\x57\x52\x57','\x57\x37\x70\x63\x4b\x65\x4f\x51\x57\x34\x52\x63\x4a\x43\x6b\x6d\x57\x51\x4f','\x57\x52\x74\x63\x4f\x65\x43','\x65\x6d\x6f\x55\x71\x58\x46\x63\x4c\x43\x6f\x4b\x57\x36\x53','\x44\x43\x6b\x51\x41\x53\x6f\x37\x57\x4f\x66\x74\x57\x4f\x44\x77\x64\x6d\x6b\x46\x66\x6d\x6f\x65','\x57\x34\x33\x63\x56\x4a\x31\x39','\x57\x37\x4a\x63\x47\x53\x6f\x64\x57\x36\x76\x57\x57\x51\x57','\x73\x58\x39\x30\x66\x77\x35\x69\x57\x37\x65','\x45\x43\x6f\x41\x6a\x57','\x57\x34\x70\x63\x4f\x71\x46\x64\x4f\x38\x6f\x4a','\x57\x36\x74\x63\x53\x6d\x6f\x64\x57\x51\x47','\x46\x43\x6b\x31\x57\x34\x38\x55\x57\x34\x56\x63\x53\x47','\x57\x37\x74\x63\x47\x31\x53\x55\x57\x34\x52\x63\x4a\x43\x6b\x78\x57\x51\x79','\x70\x6d\x6b\x46\x43\x61','\x70\x77\x42\x64\x56\x6d\x6f\x30\x57\x35\x46\x63\x4b\x53\x6f\x4e\x57\x35\x71','\x57\x51\x39\x67\x61\x78\x71\x70\x57\x37\x33\x63\x47\x75\x43','\x57\x4f\x69\x32\x57\x35\x78\x64\x4b\x72\x78\x64\x53\x31\x4e\x64\x4e\x61','\x57\x52\x69\x70\x57\x51\x65','\x6d\x43\x6f\x4f\x6c\x53\x6b\x4c\x57\x35\x43\x61','\x57\x35\x74\x64\x4c\x6d\x6f\x59\x62\x72\x37\x64\x52\x53\x6f\x2f\x6c\x47','\x73\x73\x74\x63\x50\x47','\x57\x50\x66\x4e\x57\x36\x7a\x5a\x57\x36\x58\x33\x57\x52\x53\x57','\x44\x53\x6b\x59\x57\x34\x6d\x51\x57\x35\x33\x63\x51\x4e\x4f','\x57\x51\x48\x30\x57\x37\x65','\x57\x37\x46\x63\x47\x38\x6f\x47\x57\x36\x4c\x4b\x57\x51\x64\x63\x50\x38\x6b\x33','\x78\x4e\x7a\x49\x61\x4e\x37\x64\x4a\x71\x30','\x57\x51\x78\x64\x48\x77\x47\x4d\x57\x35\x4e\x63\x48\x53\x6b\x32\x57\x52\x34','\x79\x38\x6f\x54\x57\x34\x30\x68\x57\x34\x7a\x4e\x6b\x71','\x57\x52\x68\x63\x47\x5a\x44\x49\x57\x37\x58\x4e\x6c\x38\x6f\x4e','\x57\x37\x6c\x63\x4d\x43\x6f\x73\x57\x36\x76\x34\x57\x51\x4a\x63\x56\x57','\x6d\x53\x6f\x70\x57\x50\x43\x49\x57\x4f\x76\x38\x57\x35\x38','\x61\x61\x6c\x64\x53\x66\x39\x54','\x57\x36\x4e\x63\x4f\x4a\x39\x52\x57\x35\x47\x6c\x73\x6d\x6b\x31','\x41\x43\x6f\x4e\x57\x34\x75\x69\x57\x35\x7a\x53\x70\x6d\x6f\x31','\x57\x51\x35\x72\x63\x78\x69\x64\x57\x36\x4f','\x62\x33\x46\x63\x52\x53\x6f\x36\x6c\x76\x34','\x6f\x6d\x6f\x66\x57\x50\x38\x54\x57\x50\x76\x33\x57\x34\x4f\x59','\x57\x34\x6c\x63\x55\x62\x4a\x64\x4f\x43\x6f\x69\x57\x4f\x38\x63\x74\x61','\x73\x6d\x6f\x77\x57\x50\x74\x63\x4e\x64\x56\x63\x4d\x61\x4b\x50\x64\x71\x4e\x63\x4e\x64\x64\x64\x4e\x57','\x7a\x59\x42\x64\x4b\x77\x6a\x5a\x57\x36\x42\x64\x4a\x38\x6b\x2b\x57\x35\x43\x2b\x57\x51\x39\x2b\x57\x51\x33\x63\x49\x57','\x57\x52\x52\x63\x52\x4d\x30\x2b\x57\x51\x43\x50\x57\x50\x71','\x44\x6d\x6f\x38\x57\x35\x4b\x70\x57\x35\x31\x53','\x44\x38\x6b\x45\x44\x6d\x6b\x36\x57\x34\x62\x53\x57\x51\x4b\x61','\x57\x51\x33\x63\x4c\x73\x62\x56\x57\x37\x54\x4c','\x43\x4d\x57\x71\x6f\x43\x6f\x6c\x57\x37\x46\x63\x47\x43\x6b\x7a\x78\x31\x6c\x63\x4a\x48\x53\x31\x57\x51\x79','\x57\x35\x69\x30\x57\x4f\x57\x66\x57\x4f\x79','\x6d\x65\x39\x6b\x57\x4f\x54\x47\x57\x35\x54\x68\x70\x71','\x68\x57\x6c\x64\x55\x71','\x74\x73\x6c\x63\x50\x47','\x61\x61\x37\x64\x54\x66\x39\x54\x57\x36\x71','\x6c\x6d\x6f\x46\x6a\x73\x33\x64\x4d\x5a\x61\x54','\x71\x4d\x62\x31\x57\x51\x5a\x64\x4f\x58\x37\x64\x4a\x38\x6f\x4b','\x57\x51\x64\x63\x52\x33\x43\x6f\x57\x52\x79\x37\x57\x50\x70\x64\x53\x61','\x57\x51\x33\x64\x51\x73\x46\x64\x51\x31\x4c\x51','\x57\x50\x35\x62\x7a\x43\x6b\x79\x57\x4f\x4a\x64\x50\x48\x69','\x6c\x43\x6b\x4f\x57\x52\x75','\x65\x6d\x6b\x77\x57\x34\x4a\x64\x48\x32\x56\x64\x4d\x61','\x57\x34\x48\x55\x57\x50\x46\x63\x56\x6d\x6b\x49\x57\x37\x6e\x66\x45\x47','\x66\x74\x69\x35\x57\x37\x37\x63\x50\x65\x46\x64\x51\x53\x6f\x59\x6d\x65\x4a\x63\x51\x53\x6f\x30','\x6f\x4d\x46\x64\x51\x6d\x6f\x42\x57\x34\x46\x63\x4c\x61','\x6f\x78\x70\x64\x54\x71','\x57\x51\x4e\x64\x47\x53\x6b\x71\x57\x52\x79\x35\x57\x37\x33\x64\x4f\x43\x6b\x46\x57\x34\x65\x4f\x72\x53\x6f\x39\x79\x71','\x7a\x6d\x6b\x78\x6c\x6d\x6b\x6f\x57\x4f\x37\x63\x52\x57\x31\x39','\x6c\x38\x6f\x39\x6a\x61','\x72\x67\x46\x63\x47\x59\x68\x64\x51\x43\x6f\x75\x79\x38\x6b\x69','\x57\x34\x78\x63\x4f\x33\x71\x63\x57\x37\x61','\x73\x43\x6f\x72\x57\x50\x70\x63\x4b\x5a\x33\x63\x4e\x47\x57\x4f\x65\x74\x52\x63\x54\x4a\x56\x64\x4c\x47','\x43\x6d\x6b\x56\x41\x53\x6f\x35\x57\x4f\x50\x76\x57\x4f\x35\x64\x6f\x53\x6b\x61\x6a\x38\x6f\x74','\x57\x4f\x37\x64\x4b\x53\x6f\x66\x62\x75\x78\x63\x4e\x38\x6b\x7a','\x74\x43\x6f\x71\x57\x50\x33\x63\x4b\x4a\x33\x63\x4d\x4e\x79\x77\x6d\x4a\x52\x63\x55\x62\x57','\x74\x53\x6b\x76\x7a\x43\x6b\x4c\x57\x35\x50\x4d\x57\x51\x30\x46','\x72\x5a\x2f\x63\x52\x72\x4c\x44\x78\x6d\x6b\x50\x70\x47','\x65\x33\x56\x64\x56\x4b\x38\x72\x61\x43\x6b\x72\x61\x32\x53\x36\x64\x53\x6f\x2b','\x57\x51\x70\x64\x51\x38\x6f\x61\x77\x31\x46\x63\x4c\x62\x71','\x45\x47\x4b\x6f\x76\x4d\x68\x64\x56\x53\x6b\x4d\x70\x57','\x78\x43\x6b\x75\x57\x51\x61\x37\x6a\x53\x6f\x55','\x61\x67\x33\x63\x52\x71','\x71\x63\x4a\x63\x52\x48\x4c\x43\x77\x43\x6b\x52','\x57\x52\x65\x42\x57\x52\x76\x32\x72\x4d\x53\x6f\x57\x51\x38','\x57\x37\x6a\x37\x63\x67\x78\x64\x56\x4b\x6d','\x43\x43\x6b\x4c\x57\x34\x61\x51\x57\x35\x5a\x63\x52\x33\x47\x47','\x43\x71\x47\x76\x76\x71','\x76\x49\x74\x63\x52\x58\x44\x42','\x57\x36\x70\x63\x56\x53\x6f\x73','\x57\x51\x4c\x78\x69\x4e\x4b\x69\x57\x37\x68\x63\x4d\x30\x65','\x57\x50\x4e\x64\x47\x38\x6f\x72\x64\x76\x37\x63\x4c\x61','\x73\x47\x48\x5a\x67\x4e\x48\x62','\x71\x53\x6b\x6a\x57\x51\x79\x33\x6f\x53\x6f\x4f\x57\x50\x4b','\x57\x37\x64\x63\x54\x53\x6b\x73\x61\x48\x74\x64\x49\x4a\x47\x75\x69\x6d\x6b\x4f\x57\x50\x6a\x4d','\x70\x38\x6f\x7a\x57\x52\x43\x51\x57\x50\x35\x35\x57\x35\x38\x4a','\x6f\x38\x6b\x43\x45\x43\x6b\x4f\x57\x51\x74\x64\x47\x53\x6b\x39\x57\x4f\x4f','\x6d\x6d\x6b\x57\x57\x50\x39\x45\x57\x4f\x75\x35\x62\x43\x6f\x4c\x57\x35\x68\x64\x4e\x38\x6f\x4f\x70\x71','\x57\x52\x68\x63\x47\x5a\x48\x4a\x57\x37\x7a\x32','\x6f\x33\x64\x64\x52\x38\x6f\x43\x57\x34\x68\x63\x4b\x47','\x73\x68\x72\x53\x57\x51\x56\x64\x53\x47\x75','\x72\x53\x6b\x2f\x43\x58\x2f\x63\x48\x38\x6f\x51\x57\x34\x4a\x64\x52\x71','\x57\x52\x46\x63\x4a\x59\x79'];_0x58d9=function(){return _0x31baca;};return _0x58d9();}export function normalizePersonalityState(_0x1c3d3a){const _0x1ada1f=_0x56aa5a,_0x4397f2=_0x1c3d3a&&typeof _0x1c3d3a===_0x1ada1f(0x1d9,'\x4c\x25\x50\x45')?_0x1c3d3a:{};return{'\x74\x79\x70\x65':_0x1ada1f(0x221,'\x36\x34\x4c\x7a')+'\x69\x74\x79\x53\x74\x61\x74\x65','\x72\x69\x67\x6f\x72':clamp01(_0x4397f2[_0x1ada1f(0x1e2,'\x24\x59\x6c\x49')]),'\x63\x72\x65\x61\x74\x69\x76\x69\x74\x79':clamp01(_0x4397f2[_0x1ada1f(0x1cc,'\x28\x6d\x79\x4c')+'\x74\x79']),'\x76\x65\x72\x62\x6f\x73\x69\x74\x79':clamp01(_0x4397f2[_0x1ada1f(0x1f1,'\x24\x59\x58\x73')+'\x79']),'\x72\x69\x73\x6b\x5f\x74\x6f\x6c\x65\x72\x61\x6e\x63\x65':clamp01(_0x4397f2[_0x1ada1f(0x21c,'\x67\x5e\x30\x79')+_0x1ada1f(0x1cb,'\x6e\x63\x36\x55')]),'\x6f\x62\x65\x64\x69\x65\x6e\x63\x65':clamp01(_0x4397f2[_0x1ada1f(0x213,'\x46\x57\x6e\x5b')+'\x65'])};}export function isValidPersonalityState(_0x2873c4){const _0x5be747=_0x56aa5a;return personalityState[_0x5be747(0x1e1,'\x5d\x30\x6d\x32')+'\x65'](_0x2873c4)[_0x5be747(0x21f,'\x72\x34\x5d\x46')]&&_0x2873c4[_0x5be747(0x1fc,'\x35\x35\x7a\x70')]===_0x5be747(0x207,'\x7a\x51\x53\x6e')+_0x5be747(0x22b,'\x72\x34\x5d\x46');}function roundToStep(_0x56a46f,_0x51d449){const _0x1fab3c=_0x56aa5a;if(!Number[_0x1fab3c(0x20f,'\x4c\x45\x74\x77')](_0x51d449)||_0x51d449<=0x44d+-0x11*0x1f3+-0x1cd6*-0x1)return _0x56a46f;return Math[_0x1fab3c(0x1ea,'\x6e\x79\x33\x26')](_0x56a46f/_0x51d449)*_0x51d449;}export function personalityKey(_0x1ab3c4){const _0x36ae26=_0x56aa5a,_0x5823fd=normalizePersonalityState(_0x1ab3c4);return PERSONALITY_AXES[_0x36ae26(0x233,'\x4c\x25\x50\x45')](_0x1127f6=>_0x1127f6+'\x3d'+roundToStep(_0x5823fd[_0x1127f6],0x25cd+0x2*0x7a5+-0x3517+0.1)[_0x36ae26(0x1e9,'\x4c\x45\x74\x77')](-0xbc5*-0x1+-0x231+-0x81*0x13))[_0x36ae26(0x201,'\x75\x4a\x6c\x5b')]('\x7c');}function _0x37bc(_0x3ef265,_0x1a874c){_0x3ef265=_0x3ef265-(0x6*0x1b2+-0x5*0x68f+0x1*0x1867);const _0x4bf86d=_0x58d9();let _0x71830=_0x4bf86d[_0x3ef265];if(_0x37bc['\x64\x6d\x67\x72\x61\x77']===undefined){var _0xa29d11=function(_0x35a419){const _0x3199b6='\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 _0x5dfae0='',_0x36a184='';for(let _0x4661b3=0x5cc+0x1bfa+-0x21c6,_0x401c5f,_0x322329,_0x526736=-0x1d3b+-0x7d7+0x2da*0xd;_0x322329=_0x35a419['\x63\x68\x61\x72\x41\x74'](_0x526736++);~_0x322329&&(_0x401c5f=_0x4661b3%(-0x1a54+-0x24*-0xf1+-0x78c)?_0x401c5f*(0x1d*-0x18+-0x1fe4+0x22dc)+_0x322329:_0x322329,_0x4661b3++%(0x1*-0x1da5+0x2427+-0x67e))?_0x5dfae0+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x17de+-0xab2*0x2+0x17b*-0x1&_0x401c5f>>(-(-0x2500+0x39b+0x2167)*_0x4661b3&0x49*-0xe+-0x7be+0xbc2)):-0x168d+-0x1*-0x1d27+0x2*-0x34d){_0x322329=_0x3199b6['\x69\x6e\x64\x65\x78\x4f\x66'](_0x322329);}for(let _0x22ce54=0x11*-0x97+0x494*-0x2+0x132f,_0xe2e79=_0x5dfae0['\x6c\x65\x6e\x67\x74\x68'];_0x22ce54<_0xe2e79;_0x22ce54++){_0x36a184+='\x25'+('\x30\x30'+_0x5dfae0['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x22ce54)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x38+-0x2204+0x21dc*0x1))['\x73\x6c\x69\x63\x65'](-(-0x2238+0x2432+-0x6*0x54));}return decodeURIComponent(_0x36a184);};const _0x11b548=function(_0x345cd0,_0x5baa2f){let _0x30fcd5=[],_0x574a7a=0x1fd0+0x1188*-0x1+-0xe48,_0x4b7c8d,_0x5b55e6='';_0x345cd0=_0xa29d11(_0x345cd0);let _0x1aac9d;for(_0x1aac9d=0x11c2+0x1636+-0x27f8;_0x1aac9d<0xdf9+-0x1a48+-0xd4f*-0x1;_0x1aac9d++){_0x30fcd5[_0x1aac9d]=_0x1aac9d;}for(_0x1aac9d=0x182b+-0x19eb+0x1c0;_0x1aac9d<0x3*-0xcf7+-0x20*-0x11e+0x425;_0x1aac9d++){_0x574a7a=(_0x574a7a+_0x30fcd5[_0x1aac9d]+_0x5baa2f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x1aac9d%_0x5baa2f['\x6c\x65\x6e\x67\x74\x68']))%(-0x2458+0x16f*-0x17+0x2f*0x17f),_0x4b7c8d=_0x30fcd5[_0x1aac9d],_0x30fcd5[_0x1aac9d]=_0x30fcd5[_0x574a7a],_0x30fcd5[_0x574a7a]=_0x4b7c8d;}_0x1aac9d=0x1*0x121d+0x13fa+-0x2617,_0x574a7a=0x107d*0x2+-0x1385+0xd*-0x109;for(let _0x2bc72a=0xcec+0x1a0*-0x4+-0x66c;_0x2bc72a<_0x345cd0['\x6c\x65\x6e\x67\x74\x68'];_0x2bc72a++){_0x1aac9d=(_0x1aac9d+(0x8*-0x47b+-0x92*-0x34+0x631))%(-0x2d7+-0xf8b*0x1+0x1362),_0x574a7a=(_0x574a7a+_0x30fcd5[_0x1aac9d])%(0x950+0x3bd*0x3+0x1*-0x1387),_0x4b7c8d=_0x30fcd5[_0x1aac9d],_0x30fcd5[_0x1aac9d]=_0x30fcd5[_0x574a7a],_0x30fcd5[_0x574a7a]=_0x4b7c8d,_0x5b55e6+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x345cd0['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2bc72a)^_0x30fcd5[(_0x30fcd5[_0x1aac9d]+_0x30fcd5[_0x574a7a])%(0x2336+-0x139e+-0x4*0x3a6)]);}return _0x5b55e6;};_0x37bc['\x43\x73\x7a\x65\x4f\x44']=_0x11b548,_0x37bc['\x6d\x71\x41\x41\x42\x45']={},_0x37bc['\x64\x6d\x67\x72\x61\x77']=!![];}const _0x5cde0a=_0x4bf86d[0x1d58+0x2*0x28c+-0x2270*0x1],_0x2afbc1=_0x3ef265+_0x5cde0a,_0x522b59=_0x37bc['\x6d\x71\x41\x41\x42\x45'][_0x2afbc1];return!_0x522b59?(_0x37bc['\x6b\x79\x73\x73\x4b\x57']===undefined&&(_0x37bc['\x6b\x79\x73\x73\x4b\x57']=!![]),_0x71830=_0x37bc['\x43\x73\x7a\x65\x4f\x44'](_0x71830,_0x1a874c),_0x37bc['\x6d\x71\x41\x41\x42\x45'][_0x2afbc1]=_0x71830):_0x71830=_0x522b59,_0x71830;}export function parseKeyToState(_0x102487){const _0x3083f8=_0x56aa5a,_0x39f8cf={...DEFAULT_PERSONALITY};for(const _0x5623b9 of String(_0x102487??'')[_0x3083f8(0x200,'\x67\x5e\x30\x79')]('\x7c')){if(_0x3083f8(0x1dd,'\x72\x34\x5d\x46')!==_0x3083f8(0x238,'\x31\x41\x51\x21')){const _0x3f008c=_0x20249f(_0x188a80);if(!_0x4ebfee[_0x3083f8(0x1d5,'\x31\x73\x50\x78')](_0x3f008c))return-0x93d*-0x2+-0x4*-0x7e5+-0x320e;return _0x51d349[_0x3083f8(0x208,'\x61\x74\x74\x21')](0x16d1+0x7*-0xb5+-0x11de,_0xf8e799[_0x3083f8(0x1f9,'\x6b\x52\x40\x79')](0x93*0x26+-0x518*-0x1+-0x1ae9,_0x3f008c));}else{const [_0x2959ba,_0x127221]=_0x5623b9[_0x3083f8(0x1e8,'\x72\x77\x4e\x6c')]('\x3d')['\x6d\x61\x70'](_0x2f8020=>_0x2f8020[_0x3083f8(0x1f4,'\x35\x35\x7a\x70')]());if(_0x2959ba&&PERSONALITY_AXES[_0x3083f8(0x23d,'\x36\x34\x4c\x7a')](_0x2959ba))_0x39f8cf[_0x2959ba]=clamp01(_0x127221);}}return normalizePersonalityState(_0x39f8cf);}export{clamp01};
|
|
@@ -1,71 +1 @@
|
|
|
1
|
-
import { applyPersonalityMutations } from './mutate.js';
|
|
2
|
-
import { chooseBestKnownPersonality } from './stats.js';
|
|
3
|
-
import { proposeMutations, shouldTriggerPersonalityMutation } from './drift.js';
|
|
4
|
-
import { normalizePersonalityState, parseKeyToState, personalityKey, PERSONALITY_AXES, } from './schema.js';
|
|
5
|
-
/**
|
|
6
|
-
* 每轮人格选择 (v1 selectPersonalityForRun 端口): 自然选择微调 + 规则触发变异, 全在人格向量上小步演化.
|
|
7
|
-
* 说明: v1 还消费 reflection.suggested_mutations, 那是独立子系统, 不在 evolver-core personality 范围内 —— 本端口不含.
|
|
8
|
-
*/
|
|
9
|
-
/** 单周期最多落地几条变异 (v1: 防漂移, 总量封顶 4). */
|
|
10
|
-
export const MAX_MUTATIONS_PER_CYCLE = 4;
|
|
11
|
-
/** 自然选择只对差异 ≥ 此阈值的轴动手 (v1). */
|
|
12
|
-
export const NATURAL_SELECTION_MIN_DIFF = 0.05;
|
|
13
|
-
/** 自然选择每条 nudge 的夹取幅度 (v1: ±0.1). */
|
|
14
|
-
export const NATURAL_SELECTION_CLIP = 0.1;
|
|
15
|
-
/** 两状态间各轴差 (b-a), 按 |delta| 降序 (v1 getParamDeltas). */
|
|
16
|
-
export function getParamDeltas(from, to) {
|
|
17
|
-
const a = normalizePersonalityState(from);
|
|
18
|
-
const b = normalizePersonalityState(to);
|
|
19
|
-
return PERSONALITY_AXES
|
|
20
|
-
.map((param) => ({ param, delta: b[param] - a[param] }))
|
|
21
|
-
.sort((x, y) => Math.abs(y.delta) - Math.abs(x.delta));
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 纯函数: 给定 model + 上下文, 算出本轮人格 (含微调), 返回新 model + 选择结果.
|
|
25
|
-
* 不落盘 —— store-backed 包装在 applySelectForRun (见 evolveOps.ts) 里持久化.
|
|
26
|
-
* 顺序 (与 v1 一致):
|
|
27
|
-
* 1. 自然选择: 朝 best-known 桶靠拢 (最多 2 轴, 差≥0.05, 每条夹 ±0.1)
|
|
28
|
-
* 2. 触发式变异: shouldTrigger → proposeMutations → apply (总量与①合并封顶 4)
|
|
29
|
-
*/
|
|
30
|
-
export function selectPersonalityForRun(model, input = {}) {
|
|
31
|
-
let current = normalizePersonalityState(model.current);
|
|
32
|
-
const applied = [];
|
|
33
|
-
// ① 自然选择
|
|
34
|
-
const best = chooseBestKnownPersonality(model.stats);
|
|
35
|
-
if (best) {
|
|
36
|
-
const bestState = parseKeyToState(best.key);
|
|
37
|
-
const diffs = getParamDeltas(current, bestState).filter((d) => Math.abs(d.delta) >= NATURAL_SELECTION_MIN_DIFF);
|
|
38
|
-
const muts = diffs.slice(0, 2).map((d) => ({
|
|
39
|
-
type: 'PersonalityMutation',
|
|
40
|
-
param: d.param,
|
|
41
|
-
delta: Math.max(-NATURAL_SELECTION_CLIP, Math.min(NATURAL_SELECTION_CLIP, d.delta)),
|
|
42
|
-
reason: 'natural_selection',
|
|
43
|
-
}));
|
|
44
|
-
const res = applyPersonalityMutations(current, muts);
|
|
45
|
-
current = res.state;
|
|
46
|
-
applied.push(...res.applied);
|
|
47
|
-
}
|
|
48
|
-
// ② 触发式变异 (受剩余额度约束)
|
|
49
|
-
const trig = shouldTriggerPersonalityMutation({ driftEnabled: !!input.driftEnabled, recentEvents: input.recentEvents });
|
|
50
|
-
if (trig.ok && applied.length < MAX_MUTATIONS_PER_CYCLE) {
|
|
51
|
-
const proposals = proposeMutations({ baseState: current, reason: trig.reason, driftEnabled: !!input.driftEnabled, signals: input.signals });
|
|
52
|
-
const res = applyPersonalityMutations(current, proposals);
|
|
53
|
-
current = res.state;
|
|
54
|
-
applied.push(...res.applied);
|
|
55
|
-
}
|
|
56
|
-
const key = personalityKey(current);
|
|
57
|
-
const known = Boolean(model.stats[key]);
|
|
58
|
-
const nextModel = { ...model, current };
|
|
59
|
-
return {
|
|
60
|
-
model: nextModel,
|
|
61
|
-
state: current,
|
|
62
|
-
key,
|
|
63
|
-
known,
|
|
64
|
-
mutations: applied,
|
|
65
|
-
meta: {
|
|
66
|
-
bestKnownKey: best?.key ?? null,
|
|
67
|
-
bestKnownScore: best ? best.score : null,
|
|
68
|
-
triggered: trig.ok ? { reason: trig.reason } : null,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
}
|
|
1
|
+
(function(_0x57ef3e,_0x50683b){const _0x332de0=_0x5cb4,_0x41c243=_0x57ef3e();while(!![]){try{const _0x524fe8=-parseInt(_0x332de0(0xbd,'\x76\x47\x79\x6a'))/(0x1*0x1af5+0x59f+0x1*-0x2093)+parseInt(_0x332de0(0x93,'\x52\x61\x5b\x37'))/(-0x1969*-0x1+0x1ddb+0xb*-0x506)*(parseInt(_0x332de0(0x95,'\x2a\x30\x71\x5a'))/(-0x1*0x1f97+0xc3d+0x135d))+-parseInt(_0x332de0(0x87,'\x71\x4e\x62\x2a'))/(-0xf1b+-0x1c92+0x5*0x8bd)*(parseInt(_0x332de0(0xa9,'\x4f\x38\x28\x4c'))/(0x1*-0x36d+-0xc41*0x3+0x2f*0xdb))+-parseInt(_0x332de0(0x99,'\x55\x6f\x71\x64'))/(0x9ce+-0xbe2+-0x2*-0x10d)*(-parseInt(_0x332de0(0x9c,'\x59\x71\x34\x4c'))/(0xe87+-0xe85+-0x1*-0x5))+-parseInt(_0x332de0(0xad,'\x29\x4a\x52\x69'))/(-0xaa9*-0x1+-0x1d79+0x10c*0x12)+parseInt(_0x332de0(0xb7,'\x34\x77\x41\x29'))/(0x570+-0x1efd+0x28f*0xa)*(parseInt(_0x332de0(0x98,'\x33\x65\x49\x64'))/(0x2*-0xc69+0x1*-0xeb7+0xd31*0x3))+parseInt(_0x332de0(0xa0,'\x4b\x71\x31\x75'))/(-0x10f*-0xc+0x1bc2+-0x286b);if(_0x524fe8===_0x50683b)break;else _0x41c243['push'](_0x41c243['shift']());}catch(_0x274625){_0x41c243['push'](_0x41c243['shift']());}}}(_0x3a7e,-0x648f0+0x2*-0x1bcbb+0xed808));import{applyPersonalityMutations}from'\x2e\x2f\x6d\x75\x74\x61\x74\x65\x2e\x6a\x73';import{chooseBestKnownPersonality}from'\x2e\x2f\x73\x74\x61\x74\x73\x2e\x6a\x73';import{proposeMutations,shouldTriggerPersonalityMutation}from'\x2e\x2f\x64\x72\x69\x66\x74\x2e\x6a\x73';import{normalizePersonalityState,parseKeyToState,personalityKey,PERSONALITY_AXES}from'\x2e\x2f\x73\x63\x68\x65\x6d\x61\x2e\x6a\x73';function _0x5cb4(_0x18592f,_0x547c4b){_0x18592f=_0x18592f-(0x14a7*-0x1+0x11df+0x1*0x34f);const _0x45550f=_0x3a7e();let _0x3c3c67=_0x45550f[_0x18592f];if(_0x5cb4['\x4c\x64\x73\x69\x48\x47']===undefined){var _0x5dbf2f=function(_0x41dfd5){const _0x210c31='\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 _0x295c6b='',_0x3d909a='';for(let _0x113861=-0x216d+-0xbab+-0x1a*-0x1bc,_0x5bd34c,_0x57e607,_0x3adc84=0x1*0x241+0x2356+0x2597*-0x1;_0x57e607=_0x41dfd5['\x63\x68\x61\x72\x41\x74'](_0x3adc84++);~_0x57e607&&(_0x5bd34c=_0x113861%(0x137*-0x6+-0x458+0x15*0x8e)?_0x5bd34c*(-0x1*-0x13df+-0x7e2*0x2+-0x3db)+_0x57e607:_0x57e607,_0x113861++%(-0x2255+-0xf4b+0x31a4))?_0x295c6b+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x9*-0x3ef+0xa4*0x2+0x476*-0x8&_0x5bd34c>>(-(0x1dab+-0x139*-0x9+-0x1*0x28aa)*_0x113861&0x89*0x1a+-0x15b*0x9+-0x1b1*0x1)):-0x7bc+-0x13a8+0xdb2*0x2){_0x57e607=_0x210c31['\x69\x6e\x64\x65\x78\x4f\x66'](_0x57e607);}for(let _0x2cbdf8=-0xf70+0x1cd*0x2+0xbd6,_0x28176d=_0x295c6b['\x6c\x65\x6e\x67\x74\x68'];_0x2cbdf8<_0x28176d;_0x2cbdf8++){_0x3d909a+='\x25'+('\x30\x30'+_0x295c6b['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2cbdf8)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1e56+-0x10d*0x5+-0x1905))['\x73\x6c\x69\x63\x65'](-(-0x1*0x20e3+0x19*0x13d+-0x4*-0x7c));}return decodeURIComponent(_0x3d909a);};const _0x41ae90=function(_0x52ceea,_0x229177){let _0x939444=[],_0x1b24ad=-0x1d2*-0x7+0xdec+0xd55*-0x2,_0x258bdd,_0x380da8='';_0x52ceea=_0x5dbf2f(_0x52ceea);let _0x44ba32;for(_0x44ba32=-0x791+0x26f6+-0x1f65;_0x44ba32<-0x446+0xdbd*0x1+-0x877*0x1;_0x44ba32++){_0x939444[_0x44ba32]=_0x44ba32;}for(_0x44ba32=-0x2f*-0x34+-0x1f*-0x64+-0x15a8;_0x44ba32<0x210b+-0x1eab+0x4*-0x58;_0x44ba32++){_0x1b24ad=(_0x1b24ad+_0x939444[_0x44ba32]+_0x229177['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x44ba32%_0x229177['\x6c\x65\x6e\x67\x74\x68']))%(-0x322*0xc+-0x295*0x5+0x3381),_0x258bdd=_0x939444[_0x44ba32],_0x939444[_0x44ba32]=_0x939444[_0x1b24ad],_0x939444[_0x1b24ad]=_0x258bdd;}_0x44ba32=-0x3*-0xa3f+-0x880+-0x163d,_0x1b24ad=0x10f1+0x10b3+-0x21a4;for(let _0x3917ed=-0xb62+-0x2*0x80b+0x6de*0x4;_0x3917ed<_0x52ceea['\x6c\x65\x6e\x67\x74\x68'];_0x3917ed++){_0x44ba32=(_0x44ba32+(-0x5*0x51b+-0x7*-0x197+-0xe67*-0x1))%(-0x1dde*0x1+-0x25a2*-0x1+-0x6c4),_0x1b24ad=(_0x1b24ad+_0x939444[_0x44ba32])%(0x65*-0x63+0x2*0x1024+0x7c7),_0x258bdd=_0x939444[_0x44ba32],_0x939444[_0x44ba32]=_0x939444[_0x1b24ad],_0x939444[_0x1b24ad]=_0x258bdd,_0x380da8+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x52ceea['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3917ed)^_0x939444[(_0x939444[_0x44ba32]+_0x939444[_0x1b24ad])%(-0x10*-0x1a3+0x266e*0x1+-0x3f9e)]);}return _0x380da8;};_0x5cb4['\x43\x63\x4a\x47\x6d\x78']=_0x41ae90,_0x5cb4['\x48\x78\x71\x74\x79\x45']={},_0x5cb4['\x4c\x64\x73\x69\x48\x47']=!![];}const _0x1f6ee1=_0x45550f[0x11*0x6+0x1*-0x1de3+0x1d7d],_0x4bcc1b=_0x18592f+_0x1f6ee1,_0x3931b4=_0x5cb4['\x48\x78\x71\x74\x79\x45'][_0x4bcc1b];return!_0x3931b4?(_0x5cb4['\x62\x5a\x41\x4d\x6b\x57']===undefined&&(_0x5cb4['\x62\x5a\x41\x4d\x6b\x57']=!![]),_0x3c3c67=_0x5cb4['\x43\x63\x4a\x47\x6d\x78'](_0x3c3c67,_0x547c4b),_0x5cb4['\x48\x78\x71\x74\x79\x45'][_0x4bcc1b]=_0x3c3c67):_0x3c3c67=_0x3931b4,_0x3c3c67;}export const MAX_MUTATIONS_PER_CYCLE=0x1de3*-0x1+-0x17*-0x138+0x1df;export const NATURAL_SELECTION_MIN_DIFF=0x1e26*0x1+0x11bc+0x6*-0x7fb+0.05;function _0x3a7e(){const _0x188890=['\x57\x35\x33\x63\x51\x67\x7a\x64\x77\x53\x6f\x33\x57\x37\x70\x64\x49\x4c\x65','\x57\x35\x64\x64\x54\x38\x6f\x50\x64\x57','\x44\x64\x68\x64\x48\x53\x6b\x59\x41\x43\x6f\x32\x57\x36\x4f\x58','\x57\x51\x74\x64\x54\x53\x6b\x73\x57\x36\x6d\x4e\x57\x52\x79','\x57\x52\x6a\x61\x57\x50\x4f\x2f\x41\x53\x6f\x57\x45\x61','\x76\x6d\x6b\x58\x69\x43\x6f\x75\x57\x50\x6d\x79\x57\x35\x2f\x63\x4b\x47','\x57\x36\x31\x42\x57\x52\x76\x30\x68\x5a\x69\x4e\x42\x6d\x6b\x30\x57\x34\x4a\x63\x48\x4d\x75','\x57\x50\x7a\x6c\x77\x38\x6b\x4a\x57\x4f\x53\x4b','\x57\x34\x79\x30\x64\x73\x7a\x31\x45\x66\x4f\x61\x57\x35\x31\x51','\x65\x38\x6b\x56\x63\x4e\x69\x74','\x57\x36\x75\x64\x6d\x57','\x6f\x72\x56\x63\x4e\x48\x48\x75\x57\x50\x79\x62\x57\x34\x79','\x57\x35\x4f\x2f\x61\x61','\x62\x53\x6f\x32\x73\x43\x6b\x4e','\x61\x43\x6b\x54\x72\x38\x6f\x44\x57\x52\x75\x57\x57\x37\x33\x63\x51\x78\x54\x45','\x57\x51\x6a\x62\x57\x4f\x4b\x35\x41\x47','\x71\x43\x6b\x64\x75\x71\x61\x32','\x6c\x43\x6f\x56\x66\x78\x37\x64\x50\x53\x6b\x50\x57\x34\x75\x46\x68\x66\x30\x77\x57\x36\x30','\x57\x34\x71\x33\x57\x50\x43\x6a\x57\x35\x79','\x57\x4f\x4c\x62\x72\x38\x6b\x57','\x68\x53\x6f\x4d\x46\x38\x6f\x4d\x57\x50\x47\x64\x57\x36\x74\x63\x52\x31\x57','\x73\x6d\x6b\x4e\x57\x36\x72\x41\x57\x35\x33\x63\x49\x38\x6b\x45\x57\x34\x75','\x43\x38\x6b\x37\x57\x34\x4a\x63\x4d\x38\x6f\x54\x62\x38\x6b\x76\x57\x4f\x5a\x63\x55\x6d\x6f\x4f','\x6c\x43\x6f\x48\x57\x50\x61','\x72\x6d\x6f\x2f\x78\x4a\x39\x61\x73\x78\x39\x65\x57\x52\x70\x64\x4f\x30\x37\x64\x4a\x61','\x72\x53\x6f\x2f\x75\x5a\x39\x68\x73\x66\x58\x4a\x57\x51\x4a\x64\x54\x76\x52\x64\x51\x57','\x57\x52\x58\x59\x6c\x38\x6b\x53\x71\x43\x6f\x32\x74\x63\x58\x44\x57\x50\x72\x57\x69\x53\x6b\x75','\x57\x35\x74\x63\x51\x43\x6f\x2b','\x57\x35\x79\x32\x57\x4f\x53','\x64\x43\x6b\x57\x57\x34\x48\x38\x57\x37\x42\x63\x55\x38\x6b\x2b','\x57\x4f\x74\x64\x48\x6d\x6f\x76\x45\x62\x65','\x61\x73\x65\x70','\x57\x51\x43\x71\x6c\x71','\x78\x4e\x62\x63\x57\x50\x64\x63\x4d\x38\x6f\x62\x66\x6d\x6b\x48\x6c\x6d\x6b\x51\x71\x61\x74\x63\x50\x61','\x57\x36\x4b\x73\x6d\x38\x6f\x71\x42\x43\x6f\x32\x79\x71','\x57\x50\x4c\x65\x57\x52\x70\x64\x47\x67\x4a\x63\x4a\x53\x6f\x63\x57\x50\x33\x63\x49\x6d\x6f\x56','\x63\x63\x47\x74\x57\x34\x79','\x57\x4f\x70\x63\x55\x47\x43','\x57\x51\x56\x64\x51\x68\x58\x46\x57\x50\x74\x64\x52\x47','\x57\x35\x5a\x63\x56\x38\x6f\x30\x57\x34\x33\x64\x51\x43\x6f\x7a\x6f\x43\x6b\x6e','\x57\x36\x76\x59\x57\x34\x50\x70\x57\x37\x30','\x76\x6d\x6b\x39\x6b\x53\x6f\x46\x57\x50\x65\x61\x57\x34\x75','\x57\x37\x4c\x64\x7a\x71\x74\x63\x54\x38\x6f\x4e\x57\x35\x35\x7a\x79\x62\x6d','\x6e\x53\x6b\x4f\x78\x61\x6d\x54\x57\x37\x6c\x63\x48\x61','\x57\x52\x75\x6c\x57\x37\x71','\x57\x50\x35\x43\x78\x6d\x6b\x49\x57\x4f\x53\x6a\x77\x31\x61','\x57\x4f\x48\x55\x73\x53\x6f\x2b\x72\x62\x2f\x63\x4d\x43\x6b\x54\x78\x6d\x6f\x6c\x57\x4f\x56\x64\x4f\x38\x6b\x65','\x67\x6d\x6f\x32\x68\x62\x78\x64\x4d\x71','\x57\x50\x42\x64\x47\x6d\x6f\x65\x79\x62\x33\x64\x4a\x53\x6b\x33','\x63\x53\x6f\x33\x75\x57','\x57\x52\x54\x72\x57\x35\x61\x6d\x57\x36\x6a\x64\x57\x35\x4e\x64\x52\x43\x6f\x4e','\x57\x37\x4f\x6b\x57\x4f\x4b\x2b\x57\x36\x61','\x71\x38\x6b\x58\x69\x43\x6f\x66\x57\x50\x65','\x57\x4f\x6a\x56\x71\x43\x6b\x41\x68\x4b\x78\x64\x56\x43\x6b\x6e\x46\x57','\x68\x38\x6b\x78\x57\x4f\x70\x63\x4d\x72\x71','\x57\x37\x53\x64\x57\x4f\x65\x55\x57\x36\x50\x65'];_0x3a7e=function(){return _0x188890;};return _0x3a7e();}export const NATURAL_SELECTION_CLIP=0xebe+0xee6+-0x21e*0xe+0.1;export function getParamDeltas(_0x1878be,_0xbb731a){const _0x7d7872=_0x5cb4,_0x42b090=normalizePersonalityState(_0x1878be),_0x1f1a74=normalizePersonalityState(_0xbb731a);return PERSONALITY_AXES[_0x7d7872(0x89,'\x59\x71\x37\x78')](_0x5aab77=>({'\x70\x61\x72\x61\x6d':_0x5aab77,'\x64\x65\x6c\x74\x61':_0x1f1a74[_0x5aab77]-_0x42b090[_0x5aab77]}))[_0x7d7872(0x92,'\x64\x71\x4f\x5e')]((_0x25bb96,_0x5d3e48)=>Math[_0x7d7872(0x9b,'\x55\x72\x24\x43')](_0x5d3e48['\x64\x65\x6c\x74\x61'])-Math[_0x7d7872(0x9a,'\x24\x6b\x44\x47')](_0x25bb96[_0x7d7872(0xae,'\x48\x53\x50\x43')]));}export function selectPersonalityForRun(_0x4dbd60,_0x8e5d8a={}){const _0x110a77=_0x5cb4;let _0xe20d9c=normalizePersonalityState(_0x4dbd60[_0x110a77(0xbb,'\x63\x36\x6c\x42')]);const _0x24163f=[],_0x585b0d=chooseBestKnownPersonality(_0x4dbd60[_0x110a77(0xa7,'\x72\x31\x49\x73')]);if(_0x585b0d){const _0x126e26=parseKeyToState(_0x585b0d[_0x110a77(0x9e,'\x4b\x71\x31\x75')]),_0x5880f0=getParamDeltas(_0xe20d9c,_0x126e26)[_0x110a77(0xba,'\x6e\x28\x4c\x6f')](_0x23155a=>Math[_0x110a77(0x8b,'\x29\x4a\x52\x69')](_0x23155a[_0x110a77(0xb3,'\x52\x61\x5b\x37')])>=NATURAL_SELECTION_MIN_DIFF),_0x475211=_0x5880f0[_0x110a77(0xb2,'\x35\x58\x76\x7a')](-0x1*-0x242a+0x20f2+-0x2*0x228e,-0x1f84+0x1f*-0x8b+-0x305b*-0x1)[_0x110a77(0xa4,'\x34\x4d\x25\x5e')](_0x169a82=>({'\x74\x79\x70\x65':_0x110a77(0x8a,'\x61\x51\x42\x55')+_0x110a77(0xa6,'\x24\x6b\x44\x47')+_0x110a77(0xb0,'\x70\x33\x5b\x66'),'\x70\x61\x72\x61\x6d':_0x169a82[_0x110a77(0xb5,'\x75\x73\x66\x63')],'\x64\x65\x6c\x74\x61':Math[_0x110a77(0x9f,'\x4f\x38\x28\x4c')](-NATURAL_SELECTION_CLIP,Math[_0x110a77(0x96,'\x2a\x30\x71\x5a')](NATURAL_SELECTION_CLIP,_0x169a82[_0x110a77(0x88,'\x33\x65\x49\x64')])),'\x72\x65\x61\x73\x6f\x6e':'\x6e\x61\x74\x75\x72\x61\x6c\x5f'+_0x110a77(0xbc,'\x52\x61\x5b\x37')+'\x6e'})),_0x3b68d2=applyPersonalityMutations(_0xe20d9c,_0x475211);_0xe20d9c=_0x3b68d2[_0x110a77(0x9d,'\x39\x50\x47\x61')],_0x24163f[_0x110a77(0xb8,'\x77\x76\x55\x39')](..._0x3b68d2[_0x110a77(0xa1,'\x59\x71\x37\x78')]);}const _0x354c16=shouldTriggerPersonalityMutation({'\x64\x72\x69\x66\x74\x45\x6e\x61\x62\x6c\x65\x64':!!_0x8e5d8a[_0x110a77(0xac,'\x64\x71\x4f\x5e')+_0x110a77(0xa3,'\x4b\x71\x31\x75')],'\x72\x65\x63\x65\x6e\x74\x45\x76\x65\x6e\x74\x73':_0x8e5d8a[_0x110a77(0x94,'\x59\x71\x34\x4c')+_0x110a77(0x8c,'\x70\x33\x5b\x66')]});if(_0x354c16['\x6f\x6b']&&_0x24163f[_0x110a77(0xbe,'\x64\x71\x4f\x5e')]<MAX_MUTATIONS_PER_CYCLE){const _0xaae936=proposeMutations({'\x62\x61\x73\x65\x53\x74\x61\x74\x65':_0xe20d9c,'\x72\x65\x61\x73\x6f\x6e':_0x354c16[_0x110a77(0xa5,'\x70\x31\x55\x33')],'\x64\x72\x69\x66\x74\x45\x6e\x61\x62\x6c\x65\x64':!!_0x8e5d8a[_0x110a77(0xb9,'\x38\x66\x6a\x4c')+'\x62\x6c\x65\x64'],'\x73\x69\x67\x6e\x61\x6c\x73':_0x8e5d8a[_0x110a77(0xa8,'\x52\x61\x5b\x37')]}),_0x147a18=applyPersonalityMutations(_0xe20d9c,_0xaae936);_0xe20d9c=_0x147a18[_0x110a77(0x8e,'\x63\x36\x6c\x42')],_0x24163f['\x70\x75\x73\x68'](..._0x147a18[_0x110a77(0xaf,'\x39\x50\x47\x61')]);}const _0x1cac3d=personalityKey(_0xe20d9c),_0x556999=Boolean(_0x4dbd60[_0x110a77(0x8f,'\x56\x30\x5b\x42')][_0x1cac3d]),_0x459e26={..._0x4dbd60,'\x63\x75\x72\x72\x65\x6e\x74':_0xe20d9c};return{'\x6d\x6f\x64\x65\x6c':_0x459e26,'\x73\x74\x61\x74\x65':_0xe20d9c,'\x6b\x65\x79':_0x1cac3d,'\x6b\x6e\x6f\x77\x6e':_0x556999,'\x6d\x75\x74\x61\x74\x69\x6f\x6e\x73':_0x24163f,'\x6d\x65\x74\x61':{'\x62\x65\x73\x74\x4b\x6e\x6f\x77\x6e\x4b\x65\x79':_0x585b0d?.[_0x110a77(0xab,'\x76\x47\x79\x6a')]??null,'\x62\x65\x73\x74\x4b\x6e\x6f\x77\x6e\x53\x63\x6f\x72\x65':_0x585b0d?_0x585b0d[_0x110a77(0x91,'\x55\x72\x24\x43')]:null,'\x74\x72\x69\x67\x67\x65\x72\x65\x64':_0x354c16['\x6f\x6b']?{'\x72\x65\x61\x73\x6f\x6e':_0x354c16[_0x110a77(0xb6,'\x35\x58\x76\x7a')]}:null}};}
|
|
@@ -1,82 +1 @@
|
|
|
1
|
-
import { clamp01, normalizePersonalityState, personalityKey, } from './schema.js';
|
|
2
|
-
/**
|
|
3
|
-
* 人格适应度 + 统计回写 (v1 personalityScore / chooseBestKnownPersonality / updatePersonalityStats 端口).
|
|
4
|
-
* 自然选择的"适者"由这里的分数决定; 每轮结果回写到对应人格桶, 供下一轮选择.
|
|
5
|
-
*/
|
|
6
|
-
/** 一个桶要参与"最佳已知"竞争的最小样本数 (v1: total<3 不计). */
|
|
7
|
-
export const MIN_SAMPLES_FOR_BEST = 3;
|
|
8
|
-
/** 样本权重饱和点 (v1: min(1, total/8)). */
|
|
9
|
-
export const SAMPLE_WEIGHT_FULL_AT = 8;
|
|
10
|
-
/**
|
|
11
|
-
* 桶适应度分数 (v1 personalityScore):
|
|
12
|
-
* - Laplace 平滑成功率 p = (succ+1)/(total+2) → 主导 (权重 0.75)
|
|
13
|
-
* - 质量代理 q = avgScore, 但乘 sampleWeight 惩罚小样本过度自信 (权重 0.25)
|
|
14
|
-
*/
|
|
15
|
-
export function personalityScore(entry) {
|
|
16
|
-
const succ = Number(entry?.success) || 0;
|
|
17
|
-
const fail = Number(entry?.fail) || 0;
|
|
18
|
-
const total = succ + fail;
|
|
19
|
-
const p = (succ + 1) / (total + 2);
|
|
20
|
-
const sampleWeight = Math.min(1, total / SAMPLE_WEIGHT_FULL_AT);
|
|
21
|
-
const avg = entry?.avgScore;
|
|
22
|
-
const q = Number.isFinite(Number(avg)) ? clamp01(Number(avg)) : 0.5;
|
|
23
|
-
return p * 0.75 + q * 0.25 * sampleWeight;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* 选出"最佳已知"人格桶 (v1 chooseBestKnownPersonality): 只在样本≥MIN_SAMPLES_FOR_BEST 的桶里比 personalityScore.
|
|
27
|
-
* 没有够样本的桶 ⇒ null (选择阶段就不做自然选择微调).
|
|
28
|
-
*/
|
|
29
|
-
export function chooseBestKnownPersonality(stats) {
|
|
30
|
-
let best = null;
|
|
31
|
-
for (const [key, entry] of Object.entries(stats ?? {})) {
|
|
32
|
-
const total = (Number(entry?.success) || 0) + (Number(entry?.fail) || 0);
|
|
33
|
-
if (total < MIN_SAMPLES_FOR_BEST)
|
|
34
|
-
continue;
|
|
35
|
-
const score = personalityScore(entry);
|
|
36
|
-
if (!best || score > best.score)
|
|
37
|
-
best = { key, score, entry };
|
|
38
|
-
}
|
|
39
|
-
return best;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 把一轮结果回写到对应人格桶 (v1 updatePersonalityStats 的纯函数版):
|
|
43
|
-
* - success/fail 计数 +1
|
|
44
|
-
* - avgScore 增量更新 (仅当给了 score): avg += (s-avg)/n
|
|
45
|
-
* - history 追加一条 (含 outcome/score/notes)
|
|
46
|
-
* 返回新 model (不落盘 —— 调用方用 store.save 持久化, 或 applyStatsUpdate 一步到位).
|
|
47
|
-
*/
|
|
48
|
-
export function updatePersonalityStats(model, input, at) {
|
|
49
|
-
const st = normalizePersonalityState(input.personality ?? model.current);
|
|
50
|
-
const key = personalityKey(st);
|
|
51
|
-
const prev = model.stats[key];
|
|
52
|
-
const entry = prev
|
|
53
|
-
? { ...prev }
|
|
54
|
-
: { success: 0, fail: 0, avgScore: 0.5, n: 0, updatedAt: null };
|
|
55
|
-
const outcome = String(input.outcome ?? '').toLowerCase();
|
|
56
|
-
if (outcome === 'success')
|
|
57
|
-
entry.success += 1;
|
|
58
|
-
else if (outcome === 'failed')
|
|
59
|
-
entry.fail += 1;
|
|
60
|
-
const sc = input.score == null ? null : (Number.isFinite(Number(input.score)) ? clamp01(Number(input.score)) : null);
|
|
61
|
-
if (sc != null) {
|
|
62
|
-
const n = entry.n + 1;
|
|
63
|
-
entry.avgScore = entry.avgScore + (sc - entry.avgScore) / n;
|
|
64
|
-
entry.n = n;
|
|
65
|
-
}
|
|
66
|
-
entry.updatedAt = at;
|
|
67
|
-
const nextStats = { ...model.stats, [key]: entry };
|
|
68
|
-
const historyEntry = {
|
|
69
|
-
at,
|
|
70
|
-
key,
|
|
71
|
-
outcome: outcome === 'success' || outcome === 'failed' ? outcome : 'unknown',
|
|
72
|
-
score: sc,
|
|
73
|
-
notes: input.notes ? String(input.notes).slice(0, 220) : null,
|
|
74
|
-
};
|
|
75
|
-
// v1 parity: 回写只动 stats + history, 不改 model.current —— current 由 select/pivot 决定, 记账不该挪它.
|
|
76
|
-
const nextModel = {
|
|
77
|
-
...model,
|
|
78
|
-
stats: nextStats,
|
|
79
|
-
history: [...model.history, historyEntry],
|
|
80
|
-
};
|
|
81
|
-
return { model: nextModel, key, entry };
|
|
82
|
-
}
|
|
1
|
+
(function(_0x1ee4f4,_0x54fd2c){const _0x5a4557=_0x260c,_0x3e8650=_0x1ee4f4();while(!![]){try{const _0x1edd8c=-parseInt(_0x5a4557(0x1d5,'\x4f\x6e\x61\x51'))/(-0x1*-0x12ef+0x1ecb+-0x31b9)+-parseInt(_0x5a4557(0x1cc,'\x6d\x59\x39\x61'))/(0x142d+-0x13*0x20b+-0x12a6*-0x1)*(-parseInt(_0x5a4557(0x1d2,'\x6f\x40\x6b\x39'))/(0xc3+0x13e9+0x1*-0x14a9))+parseInt(_0x5a4557(0x1be,'\x25\x37\x38\x63'))/(0xdc8+-0x3*-0x57e+0xe*-0x229)*(-parseInt(_0x5a4557(0x1c4,'\x34\x30\x28\x41'))/(0x1d14+-0x5c6+-0x1749))+parseInt(_0x5a4557(0x1e6,'\x46\x49\x59\x35'))/(-0x1*0x2471+-0x1fe5+-0x222e*-0x2)*(-parseInt(_0x5a4557(0x1e5,'\x2a\x76\x6b\x29'))/(-0x6c8*-0x2+0x8*0x387+0x3*-0xdeb))+-parseInt(_0x5a4557(0x1d8,'\x66\x52\x5d\x5a'))/(-0x1de7+0x1f70+-0x5*0x4d)*(-parseInt(_0x5a4557(0x1cb,'\x4f\x42\x79\x54'))/(0x151*-0x15+-0x140d+0x2fbb))+parseInt(_0x5a4557(0x1d4,'\x77\x77\x56\x24'))/(-0x152+-0x12ef+0x144b)+-parseInt(_0x5a4557(0x1d1,'\x2a\x76\x6b\x29'))/(0x12*-0x213+0x181f+-0xd42*-0x1)*(-parseInt(_0x5a4557(0x1e7,'\x73\x54\x77\x77'))/(0x1193*-0x1+0xef0*0x2+0x1*-0xc41));if(_0x1edd8c===_0x54fd2c)break;else _0x3e8650['push'](_0x3e8650['shift']());}catch(_0x445065){_0x3e8650['push'](_0x3e8650['shift']());}}}(_0x5719,-0xbda26+0x10d9*0xa7+0xb85c4));import{clamp01,normalizePersonalityState,personalityKey}from'\x2e\x2f\x73\x63\x68\x65\x6d\x61\x2e\x6a\x73';export const MIN_SAMPLES_FOR_BEST=0x5d3+0x32*0x2d+-0xe9a;function _0x5719(){const _0x480c1c=['\x57\x36\x78\x64\x49\x43\x6b\x4f\x57\x36\x58\x59\x72\x53\x6f\x2b','\x57\x36\x6c\x64\x53\x38\x6b\x4c\x57\x34\x58\x78\x57\x36\x4a\x64\x52\x49\x4b','\x57\x35\x6c\x64\x54\x74\x53\x77\x57\x36\x53\x5a\x57\x52\x7a\x47','\x63\x6d\x6f\x50\x57\x51\x35\x53\x57\x50\x47','\x62\x75\x74\x63\x4e\x4c\x78\x64\x53\x6d\x6f\x4f\x68\x6d\x6f\x43\x6d\x6d\x6b\x4c\x6c\x74\x35\x4b','\x64\x53\x6f\x70\x67\x78\x57\x54\x57\x50\x2f\x64\x4e\x61','\x57\x50\x35\x4f\x57\x35\x2f\x63\x4b\x53\x6b\x33\x66\x75\x43\x52\x6c\x57','\x6e\x38\x6b\x32\x57\x51\x68\x63\x4e\x6d\x6b\x5a\x57\x36\x78\x64\x4d\x76\x61','\x74\x32\x4a\x63\x52\x4c\x6c\x63\x4e\x61','\x71\x62\x30\x36\x44\x43\x6b\x77','\x57\x52\x78\x63\x4c\x6d\x6b\x45\x57\x50\x4e\x63\x47\x38\x6b\x79\x78\x71','\x57\x37\x66\x6a\x6c\x66\x6a\x72\x57\x35\x44\x69\x57\x51\x57\x53\x57\x35\x75\x4c\x57\x4f\x34','\x57\x52\x47\x6c\x71\x43\x6b\x41\x69\x6d\x6b\x6e\x57\x4f\x43','\x64\x53\x6b\x4a\x6a\x30\x6d\x71\x57\x50\x64\x64\x4f\x6d\x6b\x70','\x57\x37\x76\x62\x76\x74\x61\x43\x57\x4f\x54\x47\x57\x50\x4f','\x57\x52\x79\x6a\x45\x47\x71\x73\x57\x4f\x44\x75\x57\x52\x75','\x68\x61\x78\x64\x56\x6d\x6f\x72\x6b\x4c\x6a\x58','\x57\x37\x4a\x64\x4b\x38\x6b\x2f\x57\x36\x50\x4b','\x57\x51\x50\x38\x69\x53\x6b\x32\x44\x72\x33\x64\x54\x75\x71','\x57\x35\x44\x37\x6e\x47','\x6c\x53\x6f\x6c\x57\x35\x35\x66\x57\x37\x30\x48\x76\x6d\x6f\x4f\x79\x43\x6f\x61\x57\x4f\x5a\x64\x53\x71','\x44\x67\x4e\x64\x4a\x6d\x6b\x76\x57\x34\x37\x64\x49\x63\x47\x6a','\x57\x35\x2f\x64\x4f\x74\x56\x64\x4d\x53\x6f\x63','\x57\x34\x33\x64\x56\x43\x6f\x7a\x64\x43\x6b\x6c\x57\x35\x4f','\x57\x52\x35\x39\x6f\x43\x6b\x4a\x57\x37\x39\x48\x6f\x47','\x63\x73\x56\x64\x56\x58\x70\x64\x4c\x58\x2f\x64\x4d\x33\x4e\x64\x4c\x62\x78\x63\x52\x53\x6f\x50\x57\x52\x71','\x57\x37\x47\x49\x73\x6d\x6f\x36','\x73\x43\x6b\x39\x57\x37\x71\x53\x57\x34\x39\x4f\x6e\x53\x6b\x77\x57\x35\x38\x44\x57\x50\x71','\x74\x75\x47\x69\x44\x38\x6f\x65\x57\x35\x4a\x63\x4f\x38\x6b\x47\x57\x4f\x4c\x42','\x57\x37\x5a\x64\x48\x30\x38','\x6f\x6d\x6b\x4f\x65\x74\x78\x63\x51\x53\x6f\x47\x78\x47','\x57\x4f\x53\x4b\x57\x50\x4e\x64\x48\x61\x48\x59\x69\x57','\x57\x35\x53\x54\x57\x4f\x5a\x63\x52\x43\x6b\x71','\x61\x4b\x46\x63\x4c\x66\x33\x64\x56\x6d\x6f\x50\x46\x53\x6f\x34\x6a\x6d\x6b\x39\x6a\x72\x75','\x57\x4f\x53\x4b\x42\x43\x6b\x52\x57\x51\x4e\x63\x4e\x4a\x76\x6b\x43\x53\x6b\x43','\x64\x62\x70\x64\x4f\x43\x6f\x72\x6b\x47','\x57\x34\x31\x4d\x57\x34\x52\x63\x4b\x4c\x75\x57\x79\x65\x47\x4b\x57\x50\x47\x4b\x62\x66\x71','\x45\x43\x6b\x78\x57\x34\x71\x67\x61\x38\x6b\x4d\x57\x4f\x44\x54\x73\x53\x6b\x34\x69\x43\x6b\x64','\x69\x78\x53\x2b\x57\x37\x6c\x63\x53\x57\x65\x44\x57\x50\x42\x63\x4d\x4e\x57\x63','\x57\x34\x4c\x2b\x6d\x43\x6f\x58\x57\x52\x4b','\x74\x4b\x46\x63\x56\x6d\x6b\x42\x69\x4d\x31\x6d\x57\x51\x43\x68\x7a\x57','\x57\x51\x4f\x6e\x7a\x57','\x44\x38\x6f\x73\x75\x43\x6b\x72\x57\x51\x75','\x57\x34\x78\x64\x53\x72\x6c\x64\x47\x43\x6f\x6a\x63\x53\x6f\x69\x68\x71','\x57\x4f\x58\x67\x6c\x43\x6f\x34\x57\x50\x56\x63\x4a\x58\x69','\x57\x52\x46\x64\x51\x73\x2f\x64\x4f\x6d\x6b\x42\x75\x49\x37\x63\x54\x57','\x57\x36\x6c\x63\x50\x47\x70\x64\x4f\x53\x6b\x6e\x67\x71\x46\x63\x48\x66\x72\x45','\x57\x4f\x56\x64\x48\x6d\x6f\x73\x57\x50\x57\x41\x57\x50\x46\x63\x50\x72\x76\x4a\x79\x53\x6f\x66\x69\x71','\x64\x53\x6f\x4b\x57\x51\x50\x57\x57\x50\x6a\x5a\x6e\x47'];_0x5719=function(){return _0x480c1c;};return _0x5719();}export const SAMPLE_WEIGHT_FULL_AT=0x9ff*0x1+-0x2*-0x1279+-0x2ee9;function _0x260c(_0x3917b6,_0x2536c7){_0x3917b6=_0x3917b6-(-0x3*-0xa59+0x1*0x23ad+-0x40fc);const _0x2fbda0=_0x5719();let _0x42ccc3=_0x2fbda0[_0x3917b6];if(_0x260c['\x57\x55\x57\x62\x69\x61']===undefined){var _0xc2883e=function(_0x5c814f){const _0x35ace4='\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 _0x2b9a34='',_0x86fe5f='';for(let _0x34423c=0x2b*-0x1d+-0x21b8+0x2697,_0x418508,_0x3b3bf2,_0x4cc348=-0x217e+-0x11f+0x229d;_0x3b3bf2=_0x5c814f['\x63\x68\x61\x72\x41\x74'](_0x4cc348++);~_0x3b3bf2&&(_0x418508=_0x34423c%(-0x7*-0x3b2+0x1b1*-0xa+0x11e*-0x8)?_0x418508*(-0x84b+0x922+-0x1*0x97)+_0x3b3bf2:_0x3b3bf2,_0x34423c++%(-0x24fd+-0x1fb7*0x1+0x3*0x16e8))?_0x2b9a34+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x1af*0xd+-0x10d7*-0x1+0x5b*0x11&_0x418508>>(-(0xad3+0x239*-0x2+-0x65f)*_0x34423c&0xce+0xe3*0x7+0x1*-0x6fd)):0x423+-0x3*-0xd+-0x44a){_0x3b3bf2=_0x35ace4['\x69\x6e\x64\x65\x78\x4f\x66'](_0x3b3bf2);}for(let _0x2f38ea=-0x19c8+-0x2073+-0x1369*-0x3,_0x557226=_0x2b9a34['\x6c\x65\x6e\x67\x74\x68'];_0x2f38ea<_0x557226;_0x2f38ea++){_0x86fe5f+='\x25'+('\x30\x30'+_0x2b9a34['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2f38ea)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x16ff+-0x211b+0x382a))['\x73\x6c\x69\x63\x65'](-(0x5*-0x92+0x10ba+-0xdde));}return decodeURIComponent(_0x86fe5f);};const _0x1404ce=function(_0x4279cb,_0x591a67){let _0x1bd5ce=[],_0x5d8772=0x2448+-0x44*0x12+0xc0*-0x2a,_0x14f328,_0x5cfc9d='';_0x4279cb=_0xc2883e(_0x4279cb);let _0x3c97ad;for(_0x3c97ad=0x25*0x35+0xb2*0x13+-0x14df;_0x3c97ad<0x1b67+-0x2369+-0x1*-0x902;_0x3c97ad++){_0x1bd5ce[_0x3c97ad]=_0x3c97ad;}for(_0x3c97ad=0xb*-0x340+-0x8c3*0x1+0xd7*0x35;_0x3c97ad<0x7bb*-0x5+0x9ff*0x1+0x1da8;_0x3c97ad++){_0x5d8772=(_0x5d8772+_0x1bd5ce[_0x3c97ad]+_0x591a67['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3c97ad%_0x591a67['\x6c\x65\x6e\x67\x74\x68']))%(-0x831+-0x1ad7+0x2408),_0x14f328=_0x1bd5ce[_0x3c97ad],_0x1bd5ce[_0x3c97ad]=_0x1bd5ce[_0x5d8772],_0x1bd5ce[_0x5d8772]=_0x14f328;}_0x3c97ad=0x11*0x224+-0x2*-0x5d9+-0x3016,_0x5d8772=0x1eb0+0x5dc+-0x248c;for(let _0x17a0fe=0x3*-0xa8b+0x1ccf+0x2*0x169;_0x17a0fe<_0x4279cb['\x6c\x65\x6e\x67\x74\x68'];_0x17a0fe++){_0x3c97ad=(_0x3c97ad+(0x1b95+0x9b0+0x14*-0x1dd))%(-0x3df+0x1b28+0x7*-0x32f),_0x5d8772=(_0x5d8772+_0x1bd5ce[_0x3c97ad])%(0xe9*0x19+0x3*0x6a9+-0x14de*0x2),_0x14f328=_0x1bd5ce[_0x3c97ad],_0x1bd5ce[_0x3c97ad]=_0x1bd5ce[_0x5d8772],_0x1bd5ce[_0x5d8772]=_0x14f328,_0x5cfc9d+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x4279cb['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x17a0fe)^_0x1bd5ce[(_0x1bd5ce[_0x3c97ad]+_0x1bd5ce[_0x5d8772])%(0x4*-0x59c+0x1e1d*-0x1+0x358d)]);}return _0x5cfc9d;};_0x260c['\x77\x6d\x4f\x63\x62\x76']=_0x1404ce,_0x260c['\x48\x6f\x43\x76\x6b\x65']={},_0x260c['\x57\x55\x57\x62\x69\x61']=!![];}const _0x3396fb=_0x2fbda0[0x15db*0x1+0x2*0x960+-0x483*0x9],_0x491bcc=_0x3917b6+_0x3396fb,_0x4d79c5=_0x260c['\x48\x6f\x43\x76\x6b\x65'][_0x491bcc];return!_0x4d79c5?(_0x260c['\x59\x4f\x73\x59\x5a\x59']===undefined&&(_0x260c['\x59\x4f\x73\x59\x5a\x59']=!![]),_0x42ccc3=_0x260c['\x77\x6d\x4f\x63\x62\x76'](_0x42ccc3,_0x2536c7),_0x260c['\x48\x6f\x43\x76\x6b\x65'][_0x491bcc]=_0x42ccc3):_0x42ccc3=_0x4d79c5,_0x42ccc3;}export function personalityScore(_0x5dd2e2){const _0x24abb2=_0x260c,_0x109e46=Number(_0x5dd2e2?.[_0x24abb2(0x1cf,'\x77\x77\x56\x24')])||-0x1ad7+-0x2215+0x7*0x8b4,_0x2c7115=Number(_0x5dd2e2?.['\x66\x61\x69\x6c'])||-0x9*-0x41d+0xbe4+0x1*-0x30e9,_0x50fe11=_0x109e46+_0x2c7115,_0x42e2ee=(_0x109e46+(-0x2053+-0x2548+0xa2*0x6e))/(_0x50fe11+(0x4*0x2bb+0x11*-0x208+0x179e)),_0x188b98=Math[_0x24abb2(0x1c3,'\x6f\x40\x6b\x39')](-0x1*0x123d+-0xa*-0x3e2+-0x1496,_0x50fe11/SAMPLE_WEIGHT_FULL_AT),_0x243542=_0x5dd2e2?.[_0x24abb2(0x1e3,'\x52\x6b\x71\x7a')],_0x25b9b4=Number[_0x24abb2(0x1dd,'\x68\x48\x36\x28')](Number(_0x243542))?clamp01(Number(_0x243542)):0x54*0x3f+0x355*0x3+0x1*-0x1eab+0.5;return _0x42e2ee*(0x535+-0x1bb6+0x7*0x337+0.75)+_0x25b9b4*(0x2131+0x33*0xb5+0x22a0*-0x2+0.25)*_0x188b98;}export function chooseBestKnownPersonality(_0x3bddf7){const _0x16e0be=_0x260c;let _0x328069=null;for(const [_0x13eee7,_0x59934f]of Object[_0x16e0be(0x1eb,'\x63\x44\x42\x6b')](_0x3bddf7??{})){const _0x2fabc5=(Number(_0x59934f?.[_0x16e0be(0x1c8,'\x23\x32\x31\x5e')])||-0x193*-0x7+-0x3*-0x62+0x23*-0x59)+(Number(_0x59934f?.['\x66\x61\x69\x6c'])||0xa2*-0x2e+0x332+0x2*0xcf5);if(_0x2fabc5<MIN_SAMPLES_FOR_BEST)continue;const _0x14cd22=personalityScore(_0x59934f);if(!_0x328069||_0x14cd22>_0x328069[_0x16e0be(0x1c6,'\x5a\x52\x30\x35')])_0x328069={'\x6b\x65\x79':_0x13eee7,'\x73\x63\x6f\x72\x65':_0x14cd22,'\x65\x6e\x74\x72\x79':_0x59934f};}return _0x328069;}export function updatePersonalityStats(_0x3ca494,_0x382da3,_0x134b3d){const _0x152a8a=_0x260c,_0x24d950=normalizePersonalityState(_0x382da3[_0x152a8a(0x1e2,'\x52\x6b\x4e\x5e')+_0x152a8a(0x1d9,'\x25\x37\x38\x63')]??_0x3ca494[_0x152a8a(0x1c0,'\x66\x52\x5d\x5a')]),_0x378843=personalityKey(_0x24d950),_0x3a1d44=_0x3ca494[_0x152a8a(0x1d0,'\x73\x54\x77\x77')][_0x378843],_0x5e3f89=_0x3a1d44?{..._0x3a1d44}:{'\x73\x75\x63\x63\x65\x73\x73':0x0,'\x66\x61\x69\x6c':0x0,'\x61\x76\x67\x53\x63\x6f\x72\x65':0.5,'\x6e':0x0,'\x75\x70\x64\x61\x74\x65\x64\x41\x74':null},_0x4e1a22=String(_0x382da3[_0x152a8a(0x1bc,'\x4d\x29\x65\x25')]??'')[_0x152a8a(0x1c5,'\x6f\x69\x52\x4a')+_0x152a8a(0x1cd,'\x4a\x68\x50\x54')]();if(_0x4e1a22==='\x73\x75\x63\x63\x65\x73\x73')_0x5e3f89[_0x152a8a(0x1e1,'\x26\x5e\x35\x48')]+=0x1*-0x359+0x2029*-0x1+0x2383;else{if(_0x4e1a22==='\x66\x61\x69\x6c\x65\x64')_0x5e3f89[_0x152a8a(0x1ca,'\x59\x5d\x75\x35')]+=-0x1*-0x1eef+-0x233*-0x7+0x3b*-0xc9;}const _0x551047=_0x382da3[_0x152a8a(0x1d3,'\x66\x52\x5d\x5a')]==null?null:Number[_0x152a8a(0x1db,'\x5a\x52\x30\x35')](Number(_0x382da3[_0x152a8a(0x1ea,'\x6c\x39\x47\x61')]))?clamp01(Number(_0x382da3[_0x152a8a(0x1e4,'\x4f\x42\x79\x54')])):null;if(_0x551047!=null){const _0xdeafb5=_0x5e3f89['\x6e']+(-0x13b6+-0x1f91+-0x88c*-0x6);_0x5e3f89[_0x152a8a(0x1e8,'\x57\x64\x42\x57')]=_0x5e3f89[_0x152a8a(0x1c2,'\x23\x50\x56\x7a')]+(_0x551047-_0x5e3f89['\x61\x76\x67\x53\x63\x6f\x72\x65'])/_0xdeafb5,_0x5e3f89['\x6e']=_0xdeafb5;}_0x5e3f89[_0x152a8a(0x1bf,'\x25\x37\x38\x63')+'\x74']=_0x134b3d;const _0x27e8a5={..._0x3ca494[_0x152a8a(0x1e9,'\x33\x57\x24\x6c')],[_0x378843]:_0x5e3f89},_0x43e37b={'\x61\x74':_0x134b3d,'\x6b\x65\x79':_0x378843,'\x6f\x75\x74\x63\x6f\x6d\x65':_0x4e1a22==='\x73\x75\x63\x63\x65\x73\x73'||_0x4e1a22===_0x152a8a(0x1c7,'\x32\x4e\x30\x6f')?_0x4e1a22:_0x152a8a(0x1e0,'\x4f\x42\x79\x54'),'\x73\x63\x6f\x72\x65':_0x551047,'\x6e\x6f\x74\x65\x73':_0x382da3[_0x152a8a(0x1da,'\x75\x73\x36\x61')]?String(_0x382da3[_0x152a8a(0x1c1,'\x26\x5e\x35\x48')])[_0x152a8a(0x1d7,'\x6f\x40\x6b\x39')](0x1*0x11a5+-0x2408+0x9*0x20b,-0xb7c+0x106e+-0x416):null},_0x5e479b={..._0x3ca494,'\x73\x74\x61\x74\x73':_0x27e8a5,'\x68\x69\x73\x74\x6f\x72\x79':[..._0x3ca494[_0x152a8a(0x1ce,'\x52\x75\x39\x5e')],_0x43e37b]};return{'\x6d\x6f\x64\x65\x6c':_0x5e479b,'\x6b\x65\x79':_0x378843,'\x65\x6e\x74\x72\x79':_0x5e3f89};}
|
|
@@ -1,92 +1 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname } from 'node:path';
|
|
3
|
-
import { acquireLock, releaseLock } from '../util/fileLock.js';
|
|
4
|
-
import { personalityStatePath } from '../events/paths.js';
|
|
5
|
-
import { DEFAULT_PERSONALITY, normalizePersonalityState, personalityKey, personalityModel, } from './schema.js';
|
|
6
|
-
/** history 上限 (v1 slice(-120) 同值; 防文件无界增长). */
|
|
7
|
-
export const HISTORY_LIMIT = 120;
|
|
8
|
-
/** 全新默认模型 (无持久文件时的种子). */
|
|
9
|
-
export function defaultPersonalityModel(now = Date.now) {
|
|
10
|
-
return personalityModel.parse({
|
|
11
|
-
version: 1,
|
|
12
|
-
current: { ...DEFAULT_PERSONALITY },
|
|
13
|
-
stats: {},
|
|
14
|
-
history: [],
|
|
15
|
-
updatedAt: new Date(now()).toISOString(),
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* 可进化人格模型的持久化 (v1 loadPersonalityModel / savePersonalityModel 端口).
|
|
20
|
-
* - load: 缺失/空/损坏文件 → 回落默认模型 (绝不抛; 人格是软状态, 读坏不该崩进化循环)
|
|
21
|
-
* - save: tmp+rename 原子替换, 跨进程 O_EXCL 锁串行化 (对齐 EventStore / localJsonl 的写法)
|
|
22
|
-
* current 恒被 normalize 到合法五维, stats/history 恒是合法形状.
|
|
23
|
-
*/
|
|
24
|
-
export class PersonalityStore {
|
|
25
|
-
path;
|
|
26
|
-
lockPath;
|
|
27
|
-
now;
|
|
28
|
-
constructor(opts = {}) {
|
|
29
|
-
this.path = opts.path ?? personalityStatePath();
|
|
30
|
-
this.lockPath = `${this.path}.lock`;
|
|
31
|
-
this.now = opts.now ?? Date.now;
|
|
32
|
-
}
|
|
33
|
-
/** 读模型; 任何 I/O 或校验失败都回落默认 (不抛). */
|
|
34
|
-
load() {
|
|
35
|
-
if (!existsSync(this.path))
|
|
36
|
-
return defaultPersonalityModel(this.now);
|
|
37
|
-
let raw;
|
|
38
|
-
try {
|
|
39
|
-
const text = readFileSync(this.path, 'utf8');
|
|
40
|
-
if (!text.trim())
|
|
41
|
-
return defaultPersonalityModel(this.now);
|
|
42
|
-
raw = JSON.parse(text);
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return defaultPersonalityModel(this.now);
|
|
46
|
-
}
|
|
47
|
-
const parsed = personalityModel.safeParse(raw);
|
|
48
|
-
if (parsed.success) {
|
|
49
|
-
// current 再夹一层, 防手改文件塞进越界值绕过 min/max (safeParse 已挡, 双保险).
|
|
50
|
-
return { ...parsed.data, current: normalizePersonalityState(parsed.data.current) };
|
|
51
|
-
}
|
|
52
|
-
// 部分损坏: 尽量抢救 current, 其余回默认.
|
|
53
|
-
const seed = defaultPersonalityModel(this.now);
|
|
54
|
-
const cur = raw?.current;
|
|
55
|
-
return { ...seed, current: normalizePersonalityState(cur ?? DEFAULT_PERSONALITY) };
|
|
56
|
-
}
|
|
57
|
-
/** 原子落盘 (规范化 + history 截断 + 刷 updatedAt). 返回实际写入的模型. */
|
|
58
|
-
save(model) {
|
|
59
|
-
const out = personalityModel.parse({
|
|
60
|
-
version: 1,
|
|
61
|
-
current: normalizePersonalityState(model.current),
|
|
62
|
-
stats: model.stats ?? {},
|
|
63
|
-
history: (model.history ?? []).slice(-HISTORY_LIMIT),
|
|
64
|
-
updatedAt: new Date(this.now()).toISOString(),
|
|
65
|
-
extensions: model.extensions ?? {},
|
|
66
|
-
});
|
|
67
|
-
mkdirSync(dirname(this.path), { recursive: true });
|
|
68
|
-
acquireLock(this.lockPath);
|
|
69
|
-
try {
|
|
70
|
-
const tmp = `${this.path}.tmp`;
|
|
71
|
-
writeFileSync(tmp, `${JSON.stringify(out, null, 2)}\n`, 'utf8');
|
|
72
|
-
renameSync(tmp, this.path); // atomic replace; 崩在中途原文件不动
|
|
73
|
-
}
|
|
74
|
-
finally {
|
|
75
|
-
releaseLock(this.lockPath);
|
|
76
|
-
}
|
|
77
|
-
return out;
|
|
78
|
-
}
|
|
79
|
-
/** 读当前人格 (便捷). */
|
|
80
|
-
currentState() {
|
|
81
|
-
return this.load().current;
|
|
82
|
-
}
|
|
83
|
-
/** 桶键 (便捷). */
|
|
84
|
-
currentKey() {
|
|
85
|
-
return personalityKey(this.load().current);
|
|
86
|
-
}
|
|
87
|
-
/** 当前时间的 ISO 串 (走注入时钟) —— 供进化算子给 stats/history/事件打时间戳. */
|
|
88
|
-
nowIso() {
|
|
89
|
-
return new Date(this.now()).toISOString();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
export { personalityStatePath };
|
|
1
|
+
const _0x25c086=_0x3743;function _0x3743(_0x1519cb,_0x40754b){_0x1519cb=_0x1519cb-(-0x1c59+0x1*0x1bff+0x1b0);const _0x56215b=_0x22b6();let _0x4c7065=_0x56215b[_0x1519cb];if(_0x3743['\x61\x68\x52\x76\x68\x4c']===undefined){var _0x46b523=function(_0x1a0cc1){const _0x4f0f36='\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 _0x4a9ac4='',_0x52c488='';for(let _0x168200=0x1e1b+-0x517*-0x1+-0x2332,_0x1a628a,_0xf525a4,_0x129a20=-0xd69+-0x1ac0+0x2829;_0xf525a4=_0x1a0cc1['\x63\x68\x61\x72\x41\x74'](_0x129a20++);~_0xf525a4&&(_0x1a628a=_0x168200%(0x4f7*-0x3+0xdb4*0x1+0x67*0x3)?_0x1a628a*(0x4*-0x1c1+-0x5d2*-0x5+0x2b*-0x82)+_0xf525a4:_0xf525a4,_0x168200++%(-0x10b+-0x1723*-0x1+-0x13a*0x12))?_0x4a9ac4+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x1f3d+-0x5ab+0x25e7&_0x1a628a>>(-(-0x1*0x5d1+-0x1e60+0x2433)*_0x168200&0x3b*0x95+0x1a4+-0x23f5)):0x9*-0x181+-0x83f*0x4+0x2e85){_0xf525a4=_0x4f0f36['\x69\x6e\x64\x65\x78\x4f\x66'](_0xf525a4);}for(let _0x8620ae=-0xc3c+-0x5*0x695+-0x2d25*-0x1,_0x57ed13=_0x4a9ac4['\x6c\x65\x6e\x67\x74\x68'];_0x8620ae<_0x57ed13;_0x8620ae++){_0x52c488+='\x25'+('\x30\x30'+_0x4a9ac4['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x8620ae)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1bd2+0xf80+-0x2b42))['\x73\x6c\x69\x63\x65'](-(-0x7e6+0x2042*-0x1+0x282a));}return decodeURIComponent(_0x52c488);};const _0x5085f0=function(_0x479016,_0x3e2830){let _0x1f2dd9=[],_0x169d62=-0x23a6+-0x2160+0x4506,_0x553676,_0x383974='';_0x479016=_0x46b523(_0x479016);let _0x5dc075;for(_0x5dc075=0xef2+0x31a+0x23*-0x84;_0x5dc075<-0xfd*0x17+0x88f*-0x1+0x204a;_0x5dc075++){_0x1f2dd9[_0x5dc075]=_0x5dc075;}for(_0x5dc075=-0x123a*0x1+0xed7+-0x1*-0x363;_0x5dc075<-0x18b8+0x6+0x19b2;_0x5dc075++){_0x169d62=(_0x169d62+_0x1f2dd9[_0x5dc075]+_0x3e2830['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5dc075%_0x3e2830['\x6c\x65\x6e\x67\x74\x68']))%(0x1125+0x42d*0x3+-0x1cac),_0x553676=_0x1f2dd9[_0x5dc075],_0x1f2dd9[_0x5dc075]=_0x1f2dd9[_0x169d62],_0x1f2dd9[_0x169d62]=_0x553676;}_0x5dc075=-0x51c+-0x12f+-0xb3*-0x9,_0x169d62=0x16fc+0x1e64+0x1c*-0x1e8;for(let _0x45dc74=0xf12+0x32b*-0x7+-0x1*-0x71b;_0x45dc74<_0x479016['\x6c\x65\x6e\x67\x74\x68'];_0x45dc74++){_0x5dc075=(_0x5dc075+(0x2*-0x542+-0x1633+0x20b8))%(0x67*-0x3+-0x10e2+0x1317),_0x169d62=(_0x169d62+_0x1f2dd9[_0x5dc075])%(-0x34f*-0x6+-0x559+-0xd81*0x1),_0x553676=_0x1f2dd9[_0x5dc075],_0x1f2dd9[_0x5dc075]=_0x1f2dd9[_0x169d62],_0x1f2dd9[_0x169d62]=_0x553676,_0x383974+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x479016['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x45dc74)^_0x1f2dd9[(_0x1f2dd9[_0x5dc075]+_0x1f2dd9[_0x169d62])%(-0x1d17+0x1*0x1f11+-0xfa)]);}return _0x383974;};_0x3743['\x4d\x71\x75\x54\x77\x42']=_0x5085f0,_0x3743['\x58\x53\x6b\x4c\x68\x70']={},_0x3743['\x61\x68\x52\x76\x68\x4c']=!![];}const _0x399f85=_0x56215b[-0x1*0x1f7+0x225a+-0x2063],_0xb0164=_0x1519cb+_0x399f85,_0x490ae5=_0x3743['\x58\x53\x6b\x4c\x68\x70'][_0xb0164];return!_0x490ae5?(_0x3743['\x41\x50\x4a\x48\x79\x4b']===undefined&&(_0x3743['\x41\x50\x4a\x48\x79\x4b']=!![]),_0x4c7065=_0x3743['\x4d\x71\x75\x54\x77\x42'](_0x4c7065,_0x40754b),_0x3743['\x58\x53\x6b\x4c\x68\x70'][_0xb0164]=_0x4c7065):_0x4c7065=_0x490ae5,_0x4c7065;}(function(_0x1beac8,_0x5d13f1){const _0x3d88df=_0x3743,_0x25ccf1=_0x1beac8();while(!![]){try{const _0x23cc61=parseInt(_0x3d88df(0x185,'\x73\x7a\x50\x54'))/(0x321+0x1*-0x1fac+0x1c8c)*(-parseInt(_0x3d88df(0x1a4,'\x23\x38\x67\x35'))/(0x824+-0xc*0x2a1+0x176a))+parseInt(_0x3d88df(0x1a6,'\x66\x37\x21\x48'))/(0x1*0x931+-0x699*-0x3+-0x1cf9)+parseInt(_0x3d88df(0x15c,'\x41\x64\x33\x29'))/(-0x1489+-0x1fa2+-0x1*-0x342f)+parseInt(_0x3d88df(0x163,'\x5d\x28\x31\x71'))/(-0x17+-0x1d88+0xed2*0x2)*(parseInt(_0x3d88df(0x171,'\x53\x65\x35\x51'))/(-0xf83+0x6b*-0x1e+0x1c13))+parseInt(_0x3d88df(0x193,'\x61\x61\x44\x41'))/(-0x25db*-0x1+0xc5b+-0x322f)+-parseInt(_0x3d88df(0x191,'\x78\x6f\x36\x28'))/(-0x1*-0xf71+0x2ea+0x1*-0x1253)+-parseInt(_0x3d88df(0x19b,'\x58\x26\x72\x48'))/(0x59+-0x5*-0x769+-0x255d);if(_0x23cc61===_0x5d13f1)break;else _0x25ccf1['push'](_0x25ccf1['shift']());}catch(_0x8f982a){_0x25ccf1['push'](_0x25ccf1['shift']());}}}(_0x22b6,0x8e2f1+0x1*0x4b4ce+-0x793f9));function _0x22b6(){const _0x10d1a8=['\x44\x38\x6b\x6d\x77\x53\x6b\x66\x57\x35\x4b\x70\x6c\x57','\x42\x43\x6b\x52\x57\x34\x35\x38\x57\x37\x34','\x57\x35\x76\x58\x57\x37\x56\x64\x47\x61\x52\x64\x4a\x43\x6f\x37\x57\x51\x71','\x6b\x53\x6f\x44\x6a\x53\x6b\x44\x57\x37\x2f\x64\x52\x47\x75','\x57\x37\x76\x67\x41\x43\x6f\x51\x57\x4f\x76\x35\x57\x51\x33\x63\x51\x43\x6f\x53\x7a\x75\x2f\x64\x55\x57','\x57\x4f\x53\x2b\x57\x36\x4f','\x57\x4f\x31\x46\x42\x43\x6b\x69\x74\x53\x6f\x5a','\x78\x64\x37\x63\x53\x72\x48\x4c\x57\x34\x64\x64\x4e\x57','\x73\x59\x74\x63\x49\x4a\x4c\x70\x57\x37\x33\x64\x4e\x38\x6f\x5a','\x6f\x71\x74\x64\x56\x63\x53','\x44\x53\x6b\x6c\x74\x47','\x69\x74\x64\x63\x50\x6d\x6b\x65\x57\x50\x52\x64\x55\x43\x6b\x76\x57\x4f\x50\x79\x6b\x43\x6f\x64\x57\x50\x65','\x45\x38\x6b\x33\x57\x51\x74\x64\x4d\x33\x4f','\x57\x36\x4e\x63\x4c\x57\x43','\x67\x38\x6b\x56\x57\x35\x42\x64\x51\x47','\x57\x4f\x38\x6f\x71\x43\x6f\x67\x57\x4f\x69','\x7a\x53\x6f\x49\x63\x53\x6b\x45','\x57\x50\x7a\x65\x46\x6d\x6f\x35','\x6a\x38\x6f\x68\x69\x57','\x57\x35\x76\x64\x78\x57','\x46\x53\x6f\x51\x64\x43\x6b\x63\x57\x50\x7a\x71\x57\x50\x71','\x75\x71\x4e\x63\x47\x30\x64\x64\x50\x71','\x57\x51\x35\x47\x57\x50\x44\x6f\x46\x63\x69\x33\x73\x47','\x57\x4f\x46\x63\x4f\x6d\x6b\x69\x57\x37\x30','\x57\x52\x6a\x55\x57\x4f\x7a\x77\x73\x71','\x57\x50\x70\x63\x50\x53\x6b\x4d\x64\x72\x42\x64\x47\x64\x52\x64\x52\x61','\x6b\x71\x52\x64\x47\x72\x4e\x63\x4c\x63\x6c\x63\x4f\x53\x6b\x59','\x6a\x43\x6f\x68\x6e\x43\x6b\x6c','\x57\x51\x57\x44\x62\x38\x6b\x77','\x62\x38\x6f\x32\x57\x50\x6a\x6b\x64\x62\x2f\x63\x4d\x61\x79','\x42\x43\x6b\x57\x70\x71\x4f','\x62\x43\x6b\x48\x57\x35\x75','\x76\x4e\x74\x63\x56\x53\x6b\x5a\x69\x49\x35\x79\x57\x50\x68\x63\x53\x53\x6b\x4e\x46\x76\x56\x63\x53\x47','\x45\x4d\x4e\x64\x54\x53\x6f\x7a\x57\x37\x2f\x63\x51\x6d\x6b\x6d\x57\x4f\x43','\x57\x51\x70\x63\x4e\x78\x56\x63\x54\x63\x74\x63\x4f\x47\x58\x61\x57\x52\x4e\x64\x54\x43\x6b\x4b\x57\x36\x50\x4c','\x57\x50\x62\x65\x45\x38\x6b\x31\x74\x47','\x57\x36\x48\x44\x61\x38\x6f\x65','\x69\x57\x61\x41\x75\x71','\x57\x37\x53\x56\x57\x50\x69\x7a','\x57\x37\x71\x2f\x76\x33\x53\x6a\x72\x43\x6f\x35\x57\x51\x30','\x42\x53\x6b\x4d\x57\x35\x6e\x33','\x66\x5a\x78\x64\x55\x53\x6f\x53\x46\x33\x57\x66\x57\x4f\x75','\x57\x37\x35\x43\x66\x38\x6b\x6f\x57\x4f\x69\x6c\x57\x34\x30','\x72\x59\x71\x46\x43\x53\x6f\x37\x42\x53\x6f\x4f','\x57\x34\x53\x4c\x57\x37\x61\x57','\x72\x4c\x68\x63\x48\x4a\x5a\x64\x53\x53\x6b\x44\x57\x52\x61','\x57\x4f\x7a\x6e\x57\x4f\x48\x48\x77\x43\x6f\x47\x57\x35\x42\x63\x4e\x67\x5a\x64\x50\x74\x57\x33\x57\x50\x71','\x6b\x75\x33\x64\x56\x61','\x66\x66\x6e\x51\x57\x52\x5a\x63\x54\x61','\x57\x37\x46\x63\x50\x67\x4f','\x78\x6d\x6b\x71\x78\x43\x6b\x44\x57\x37\x71','\x76\x5a\x61\x6c\x7a\x43\x6f\x6f\x79\x43\x6f\x55\x57\x35\x79','\x7a\x43\x6f\x33\x68\x38\x6b\x63\x57\x4f\x4f','\x57\x50\x65\x57\x57\x36\x4b\x4c','\x57\x50\x38\x54\x57\x34\x4f\x6d','\x46\x47\x6a\x34\x57\x4f\x42\x63\x4f\x43\x6b\x6b\x43\x53\x6b\x4e','\x7a\x43\x6b\x2b\x6b\x61\x38','\x57\x51\x54\x50\x62\x59\x6a\x55\x66\x53\x6b\x31\x57\x4f\x65\x47\x6d\x53\x6b\x48\x44\x71\x34','\x77\x6d\x6b\x41\x57\x35\x52\x63\x4d\x38\x6b\x38\x57\x34\x46\x63\x52\x73\x79','\x6f\x38\x6f\x4b\x46\x31\x30\x50\x71\x63\x57\x55\x74\x59\x74\x64\x55\x53\x6f\x65\x44\x47','\x7a\x4d\x46\x64\x4f\x43\x6f\x41','\x69\x31\x42\x64\x51\x75\x34\x55\x57\x36\x48\x77\x57\x36\x30','\x6b\x62\x68\x64\x52\x4e\x69','\x57\x52\x4e\x63\x55\x53\x6b\x41\x57\x35\x46\x64\x56\x57','\x64\x57\x74\x63\x4e\x4c\x64\x64\x51\x57','\x57\x35\x39\x79\x73\x53\x6b\x6e\x6b\x53\x6f\x6f\x6a\x61','\x45\x6d\x6f\x53\x63\x71','\x62\x53\x6f\x33\x57\x36\x30\x7a\x45\x33\x52\x64\x4a\x62\x4f\x41\x57\x52\x47\x66\x41\x4e\x69','\x6b\x75\x76\x59','\x57\x52\x61\x72\x6b\x43\x6b\x33','\x64\x53\x6b\x48\x61\x43\x6b\x43\x57\x50\x6c\x63\x4a\x72\x53','\x57\x36\x4e\x63\x51\x4d\x4c\x4d','\x57\x35\x37\x64\x4f\x6d\x6f\x66\x57\x51\x46\x64\x47\x4e\x4c\x7a\x68\x61','\x57\x51\x57\x46\x70\x53\x6b\x30\x57\x36\x6d\x53\x57\x52\x74\x63\x4f\x61','\x62\x31\x56\x63\x4c\x64\x75','\x57\x52\x71\x63\x6e\x6d\x6b\x59','\x57\x4f\x62\x53\x57\x50\x72\x6d\x57\x36\x72\x62\x57\x51\x75\x51\x76\x6d\x6f\x65\x77\x62\x52\x64\x51\x47','\x73\x4a\x34\x41','\x57\x51\x4a\x64\x53\x59\x53\x2f\x44\x76\x46\x63\x4e\x59\x30\x71\x79\x31\x78\x63\x53\x38\x6f\x42','\x57\x34\x37\x64\x55\x43\x6b\x42','\x57\x36\x6d\x53\x57\x35\x71\x59\x57\x51\x61','\x42\x38\x6b\x65\x78\x43\x6b\x7a','\x57\x37\x79\x2f\x71\x57','\x6e\x48\x4b\x41\x78\x61\x52\x63\x51\x48\x64\x64\x52\x71','\x71\x53\x6b\x61\x57\x34\x38'];_0x22b6=function(){return _0x10d1a8;};return _0x22b6();}import{existsSync,mkdirSync,readFileSync,renameSync,writeFileSync}from'\x6e\x6f\x64\x65\x3a\x66\x73';import{dirname}from'\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68';import{acquireLock,releaseLock}from'\x2e\x2e\x2f\x75\x74\x69\x6c\x2f\x66\x69\x6c\x65\x4c\x6f\x63\x6b\x2e\x6a\x73';import{personalityStatePath}from'\x2e\x2e\x2f\x65\x76\x65\x6e\x74\x73\x2f\x70\x61\x74\x68\x73\x2e\x6a\x73';import{DEFAULT_PERSONALITY,normalizePersonalityState,personalityKey,personalityModel}from'\x2e\x2f\x73\x63\x68\x65\x6d\x61\x2e\x6a\x73';export const HISTORY_LIMIT=-0x419*0x5+0x1*-0x1d17+0x320c;export function defaultPersonalityModel(_0x490ae5=Date[_0x25c086(0x15d,'\x62\x79\x34\x28')]){const _0x439c32=_0x25c086;return personalityModel[_0x439c32(0x167,'\x36\x5d\x6a\x70')]({'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x63\x75\x72\x72\x65\x6e\x74':{...DEFAULT_PERSONALITY},'\x73\x74\x61\x74\x73':{},'\x68\x69\x73\x74\x6f\x72\x79':[],'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new Date(_0x490ae5())['\x74\x6f\x49\x53\x4f\x53\x74\x72'+_0x439c32(0x157,'\x74\x39\x6f\x68')]()});}export class PersonalityStore{[_0x25c086(0x19f,'\x66\x37\x21\x48')];[_0x25c086(0x17f,'\x78\x6f\x36\x28')];[_0x25c086(0x1aa,'\x78\x6f\x36\x28')];constructor(_0x5085f0={}){const _0x533473=_0x25c086;this[_0x533473(0x180,'\x54\x71\x6c\x37')]=_0x5085f0[_0x533473(0x174,'\x73\x6d\x32\x23')]??personalityStatePath(),this['\x6c\x6f\x63\x6b\x50\x61\x74\x68']=this[_0x533473(0x17d,'\x65\x76\x4a\x2a')]+_0x533473(0x16d,'\x62\x67\x64\x4a'),this[_0x533473(0x1aa,'\x78\x6f\x36\x28')]=_0x5085f0[_0x533473(0x189,'\x66\x37\x21\x48')]??Date[_0x533473(0x1a7,'\x53\x65\x35\x51')];}[_0x25c086(0x173,'\x63\x5b\x53\x48')](){const _0x1764c1=_0x25c086;if(!existsSync(this[_0x1764c1(0x1a2,'\x73\x7a\x50\x54')]))return defaultPersonalityModel(this[_0x1764c1(0x16a,'\x63\x5b\x53\x48')]);let _0x1a0cc1;try{const _0x168200=readFileSync(this[_0x1764c1(0x166,'\x6a\x37\x43\x4b')],_0x1764c1(0x169,'\x4b\x73\x5a\x51'));if(!_0x168200[_0x1764c1(0x1a3,'\x41\x64\x33\x29')]())return defaultPersonalityModel(this['\x6e\x6f\x77']);_0x1a0cc1=JSON[_0x1764c1(0x188,'\x41\x25\x64\x36')](_0x168200);}catch{return defaultPersonalityModel(this[_0x1764c1(0x1a5,'\x33\x5d\x50\x25')]);}const _0x4f0f36=personalityModel[_0x1764c1(0x18b,'\x33\x5d\x50\x25')+'\x65'](_0x1a0cc1);if(_0x4f0f36['\x73\x75\x63\x63\x65\x73\x73'])return _0x1764c1(0x18a,'\x5e\x41\x36\x47')===_0x1764c1(0x164,'\x40\x50\x56\x56')?{..._0x4f0f36[_0x1764c1(0x176,'\x61\x61\x44\x41')],'\x63\x75\x72\x72\x65\x6e\x74':normalizePersonalityState(_0x4f0f36[_0x1764c1(0x161,'\x7a\x45\x4b\x6f')][_0x1764c1(0x15f,'\x5b\x5a\x47\x53')])}:_0x2e3a7a[_0x1764c1(0x198,'\x62\x67\x64\x4a')]({'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x63\x75\x72\x72\x65\x6e\x74':{..._0x89dc1e},'\x73\x74\x61\x74\x73':{},'\x68\x69\x73\x74\x6f\x72\x79':[],'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new _0x13c14c(_0x1d82a6())[_0x1764c1(0x172,'\x7a\x45\x4b\x6f')+_0x1764c1(0x19c,'\x72\x5a\x79\x7a')]()});const _0x4a9ac4=defaultPersonalityModel(this[_0x1764c1(0x19a,'\x5a\x77\x4d\x6b')]),_0x52c488=_0x1a0cc1?.[_0x1764c1(0x199,'\x4f\x39\x54\x5e')];return{..._0x4a9ac4,'\x63\x75\x72\x72\x65\x6e\x74':normalizePersonalityState(_0x52c488??DEFAULT_PERSONALITY)};}['\x73\x61\x76\x65'](_0xf525a4){const _0x1815fe=_0x25c086,_0x129a20=personalityModel['\x70\x61\x72\x73\x65']({'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x63\x75\x72\x72\x65\x6e\x74':normalizePersonalityState(_0xf525a4[_0x1815fe(0x182,'\x55\x73\x6e\x63')]),'\x73\x74\x61\x74\x73':_0xf525a4[_0x1815fe(0x18c,'\x5a\x77\x4d\x6b')]??{},'\x68\x69\x73\x74\x6f\x72\x79':(_0xf525a4[_0x1815fe(0x16c,'\x5a\x77\x4d\x6b')]??[])[_0x1815fe(0x159,'\x54\x71\x6c\x37')](-HISTORY_LIMIT),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new Date(this['\x6e\x6f\x77']())[_0x1815fe(0x160,'\x5b\x5a\x47\x53')+_0x1815fe(0x162,'\x5e\x41\x36\x47')](),'\x65\x78\x74\x65\x6e\x73\x69\x6f\x6e\x73':_0xf525a4[_0x1815fe(0x18f,'\x68\x53\x57\x64')+'\x6e\x73']??{}});mkdirSync(dirname(this[_0x1815fe(0x168,'\x5a\x77\x4d\x6b')]),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]}),acquireLock(this[_0x1815fe(0x1a1,'\x41\x64\x33\x29')]);try{const _0x8620ae=this[_0x1815fe(0x19d,'\x41\x64\x33\x29')]+_0x1815fe(0x184,'\x62\x79\x34\x28');writeFileSync(_0x8620ae,JSON[_0x1815fe(0x181,'\x74\x63\x4e\x69')+'\x79'](_0x129a20,null,-0x1*0x1f7+0x225a+-0x2061)+'\x0a',_0x1815fe(0x196,'\x7a\x45\x4b\x6f')),renameSync(_0x8620ae,this['\x70\x61\x74\x68']);}finally{if(_0x1815fe(0x1a8,'\x23\x38\x67\x35')!==_0x1815fe(0x197,'\x36\x78\x43\x33')){const _0x479016=_0x45700f[_0x1815fe(0x170,'\x77\x41\x46\x48')]({'\x76\x65\x72\x73\x69\x6f\x6e':0x1,'\x63\x75\x72\x72\x65\x6e\x74':_0x419a41(_0x13f188[_0x1815fe(0x183,'\x33\x5d\x50\x25')]),'\x73\x74\x61\x74\x73':_0x253d91[_0x1815fe(0x17b,'\x4b\x73\x5a\x51')]??{},'\x68\x69\x73\x74\x6f\x72\x79':(_0x573fc9[_0x1815fe(0x158,'\x5e\x41\x36\x47')]??[])['\x73\x6c\x69\x63\x65'](-_0x16a2fc),'\x75\x70\x64\x61\x74\x65\x64\x41\x74':new _0x424220(this[_0x1815fe(0x165,'\x57\x53\x34\x76')]())['\x74\x6f\x49\x53\x4f\x53\x74\x72'+_0x1815fe(0x187,'\x44\x40\x6b\x72')](),'\x65\x78\x74\x65\x6e\x73\x69\x6f\x6e\x73':_0x55c7e4[_0x1815fe(0x156,'\x65\x76\x4a\x2a')+'\x6e\x73']??{}});_0xd98311(_0x1970d4(this[_0x1815fe(0x194,'\x5d\x28\x31\x71')]),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]}),_0x41cc90(this[_0x1815fe(0x179,'\x5d\x28\x31\x71')]);try{const _0x3e2830=this[_0x1815fe(0x17e,'\x40\x63\x38\x61')]+_0x1815fe(0x18e,'\x23\x38\x67\x35');_0x295a16(_0x3e2830,_0x118485[_0x1815fe(0x192,'\x74\x39\x6f\x68')+'\x79'](_0x479016,null,0xa9*-0x21+0x1*0xdbd+0x80e)+'\x0a',_0x1815fe(0x17c,'\x55\x73\x6e\x63')),_0x2fb80d(_0x3e2830,this[_0x1815fe(0x1a9,'\x5e\x41\x36\x47')]);}finally{_0x1febd9(this[_0x1815fe(0x1a0,'\x55\x57\x53\x4a')]);}return _0x479016;}else releaseLock(this[_0x1815fe(0x16e,'\x77\x41\x46\x48')]);}return _0x129a20;}[_0x25c086(0x195,'\x44\x40\x6b\x72')+_0x25c086(0x18d,'\x62\x79\x34\x28')](){const _0x468038=_0x25c086;return this[_0x468038(0x190,'\x61\x61\x44\x41')]()[_0x468038(0x15f,'\x5b\x5a\x47\x53')];}[_0x25c086(0x15a,'\x76\x66\x67\x50')+'\x65\x79'](){const _0x4522d2=_0x25c086;return personalityKey(this[_0x4522d2(0x16f,'\x36\x78\x43\x33')]()[_0x4522d2(0x15b,'\x63\x5b\x53\x48')]);}[_0x25c086(0x15e,'\x4b\x73\x5a\x51')](){const _0x2e3a88=_0x25c086;return new Date(this[_0x2e3a88(0x177,'\x6a\x37\x43\x4b')]())['\x74\x6f\x49\x53\x4f\x53\x74\x72'+_0x2e3a88(0x16b,'\x4f\x39\x54\x5e')]();}}export{personalityStatePath};
|
package/dist/schema/common.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
import { z }
|
|
2
|
-
/** evolver-core 内部 domain schema 版本 (与 gep-sdk SCHEMA_VERSION 解耦). */
|
|
3
|
-
export const DOMAIN_SCHEMA_VERSION = '1.0.0';
|
|
4
|
-
/** ULID (26 char Crockford base32). */
|
|
5
|
-
export const ulid = z.string().regex(/^[0-9A-HJKMNP-TV-Z]{26}$/, 'invalid ULID');
|
|
6
|
-
export const sha256Hash = z.string().regex(/^sha256:[a-f0-9]{64}$/, 'invalid sha256');
|
|
7
|
-
/** 防过早冻结的扩展字段 (军杰 §11). */
|
|
8
|
-
export const extensions = z.record(z.string(), z.unknown()).default({});
|
|
9
|
-
/** 大对象走 artifact 引用. */
|
|
10
|
-
export const artifactRef = z.object({
|
|
11
|
-
path: z.string(),
|
|
12
|
-
sha256: z.string(),
|
|
13
|
-
size: z.number().int().nonnegative(),
|
|
14
|
-
});
|
|
15
|
-
/** runtime 来源 (D11). 'generic-chat' = 任何输出标准 OpenAI/Anthropic messages 的 AI(经 genericChatAdapter 接入). */
|
|
16
|
-
export const sourceAgent = z.enum(['claude-code', 'codex', 'cursor', 'gemini', 'antigravity', 'kimi', 'kiro', 'opencode', 'generic-chat']);
|
|
17
|
-
export const blastRadius = z.enum(['file', 'module', 'package', 'system']);
|
|
1
|
+
function _0x5689(){const _0x3b5185=['\x57\x35\x35\x4a\x66\x64\x70\x63\x4c\x53\x6f\x65\x77\x61','\x6d\x58\x46\x64\x56\x43\x6b\x68\x6a\x38\x6f\x33\x57\x34\x4a\x64\x55\x53\x6f\x65\x64\x31\x71','\x63\x53\x6b\x4f\x57\x35\x56\x63\x55\x57','\x77\x30\x57\x68\x73\x38\x6b\x79\x57\x34\x61','\x73\x57\x74\x63\x4a\x32\x43\x7a\x61\x53\x6f\x58','\x57\x50\x66\x76\x57\x50\x72\x50\x57\x36\x76\x79\x57\x4f\x47\x64\x6d\x6d\x6f\x44\x71\x47\x71','\x57\x52\x68\x64\x48\x6d\x6b\x59','\x65\x77\x4b\x6f\x71\x74\x68\x64\x4c\x4b\x33\x63\x4b\x38\x6f\x58\x57\x50\x34\x4c\x44\x47','\x41\x32\x35\x76\x57\x34\x4f\x75\x73\x61','\x45\x6d\x6b\x48\x57\x4f\x2f\x64\x53\x43\x6b\x2f\x78\x62\x74\x63\x56\x6d\x6b\x46\x57\x36\x52\x63\x53\x47','\x57\x34\x53\x44\x57\x51\x58\x72\x43\x57','\x6a\x38\x6f\x34\x57\x34\x64\x63\x50\x6d\x6f\x4e\x7a\x62\x70\x64\x4e\x57','\x73\x71\x42\x64\x4f\x53\x6f\x62\x66\x5a\x64\x64\x50\x38\x6b\x59\x75\x31\x61\x33','\x57\x51\x4f\x56\x76\x64\x35\x58\x57\x51\x4e\x63\x4c\x67\x46\x63\x52\x31\x33\x64\x51\x6d\x6f\x6d','\x57\x52\x65\x65\x57\x34\x48\x52\x70\x65\x74\x63\x51\x6d\x6f\x6a','\x57\x52\x71\x63\x57\x35\x72\x51','\x57\x34\x43\x77\x57\x51\x30','\x63\x38\x6b\x37\x74\x43\x6b\x63\x63\x78\x54\x51','\x57\x4f\x64\x63\x4d\x53\x6f\x78\x67\x71','\x7a\x53\x6f\x2f\x57\x35\x6c\x63\x50\x75\x7a\x6f\x6d\x53\x6b\x6e\x41\x53\x6b\x64\x57\x51\x65','\x57\x50\x4f\x62\x6e\x57\x64\x64\x55\x61\x4f','\x69\x6d\x6f\x4a\x57\x35\x56\x63\x50\x38\x6f\x55\x46\x57','\x75\x73\x4c\x70\x67\x32\x52\x63\x47\x71','\x57\x37\x70\x64\x4b\x76\x37\x63\x4e\x62\x4f\x63','\x70\x75\x33\x64\x56\x47','\x68\x74\x4e\x63\x50\x38\x6b\x46\x6a\x53\x6f\x71\x6e\x43\x6b\x7a','\x57\x36\x6c\x63\x55\x6d\x6b\x57\x57\x51\x48\x6c\x77\x71','\x42\x43\x6f\x30\x57\x35\x64\x63\x52\x75\x65\x72\x68\x38\x6b\x5a\x75\x53\x6b\x4a\x57\x4f\x6e\x59','\x57\x35\x61\x79\x78\x76\x6c\x64\x47\x6d\x6b\x42\x41\x71\x38\x4c\x44\x32\x46\x63\x56\x47','\x42\x38\x6f\x69\x57\x36\x76\x34\x79\x57','\x73\x71\x46\x64\x52\x6d\x6f\x65\x65\x73\x52\x64\x4c\x43\x6b\x57\x7a\x68\x30\x6c','\x77\x4c\x30\x77\x74\x43\x6b\x65\x57\x34\x6d','\x57\x50\x35\x65\x57\x37\x38\x66\x6f\x43\x6b\x77\x57\x36\x62\x4e\x57\x51\x79\x68\x62\x71','\x57\x35\x44\x52\x57\x36\x37\x64\x48\x58\x62\x44\x44\x43\x6b\x49','\x78\x47\x56\x63\x4d\x77\x65','\x74\x48\x37\x64\x50\x43\x6f\x45\x66\x71','\x6b\x73\x71\x46\x57\x4f\x39\x65\x65\x61\x33\x64\x49\x4d\x48\x72\x77\x62\x34','\x57\x34\x65\x67\x57\x52\x65','\x57\x50\x5a\x63\x4c\x74\x4e\x63\x54\x6d\x6f\x36\x57\x50\x4f\x73\x57\x4f\x6d','\x57\x36\x37\x63\x54\x6d\x6b\x57\x57\x51\x47','\x45\x38\x6f\x55\x57\x34\x34\x6c','\x42\x53\x6f\x7a\x57\x37\x62\x30\x44\x43\x6b\x79','\x76\x6d\x6b\x36\x6c\x76\x56\x63\x4a\x6d\x6f\x73','\x57\x35\x4f\x43\x57\x36\x72\x64\x57\x37\x68\x64\x4d\x6d\x6b\x65','\x57\x36\x7a\x44\x57\x50\x75\x59\x42\x72\x42\x63\x4e\x6d\x6f\x74\x57\x37\x53\x6e\x57\x50\x46\x63\x56\x47','\x57\x35\x53\x67\x57\x52\x50\x44\x7a\x43\x6b\x36'];_0x5689=function(){return _0x3b5185;};return _0x5689();}const _0x5d7959=_0x13e8;(function(_0x100f9c,_0x3c7bc9){const _0x48b7dc=_0x13e8,_0x3bfa60=_0x100f9c();while(!![]){try{const _0x1eb6d7=-parseInt(_0x48b7dc(0x1e2,'\x23\x53\x52\x23'))/(0x11d7*-0x2+-0xee*0x10+0x328f)+parseInt(_0x48b7dc(0x202,'\x36\x41\x25\x6b'))/(-0x1567+-0x232f*0x1+0x2*0x1c4c)+-parseInt(_0x48b7dc(0x1f3,'\x66\x46\x6c\x23'))/(-0x2*0xf95+-0x13d8+0x3305)+-parseInt(_0x48b7dc(0x1db,'\x4d\x50\x5e\x63'))/(0x1762+-0x236a+0xc0c)+parseInt(_0x48b7dc(0x1fb,'\x33\x51\x55\x5d'))/(0x25af+0x246d+-0x4a17)+parseInt(_0x48b7dc(0x1dc,'\x46\x57\x74\x24'))/(-0x4fd*0x1+-0x1c*0x81+-0x5*-0x3d3)*(-parseInt(_0x48b7dc(0x1fd,'\x40\x35\x54\x72'))/(0xa86+0x1e4c+-0x3b*0xb1))+parseInt(_0x48b7dc(0x1ed,'\x4d\x50\x5e\x63'))/(-0x17c3*0x1+0x65b*-0x6+-0x53*-0xbf);if(_0x1eb6d7===_0x3c7bc9)break;else _0x3bfa60['push'](_0x3bfa60['shift']());}catch(_0x1952cd){_0x3bfa60['push'](_0x3bfa60['shift']());}}}(_0x5689,-0x291ad+0x122c*0x4+0x293*0x1a5));function _0x13e8(_0x12b89b,_0x2a3169){_0x12b89b=_0x12b89b-(-0x69*0x30+-0xffd*0x1+-0x71*-0x55);const _0x5ec3ac=_0x5689();let _0x2c11b=_0x5ec3ac[_0x12b89b];if(_0x13e8['\x66\x63\x6e\x59\x72\x6b']===undefined){var _0x296106=function(_0x131229){const _0x38b853='\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 _0x4bcdaf='',_0x1a1e6a='';for(let _0x404780=0x9c7+0x12f2+-0x9*0x331,_0x35fbf5,_0x2215fd,_0xf1fa2f=-0x28d+0x1d7c+-0x1aef;_0x2215fd=_0x131229['\x63\x68\x61\x72\x41\x74'](_0xf1fa2f++);~_0x2215fd&&(_0x35fbf5=_0x404780%(-0x182d+0xe5f*-0x2+0x34ef)?_0x35fbf5*(-0xac*0x1f+0x18e+0x9c3*0x2)+_0x2215fd:_0x2215fd,_0x404780++%(-0x1f95+-0x2f*-0x5b+-0x772*-0x2))?_0x4bcdaf+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xb7c+0x1f*0xcb+0x1*-0x2312&_0x35fbf5>>(-(-0x1301+-0x21*-0xa3+-0x200*0x1)*_0x404780&0xf6b+0x2081+0x17f3*-0x2)):-0x1*0x104e+-0x1e72*-0x1+-0xe24){_0x2215fd=_0x38b853['\x69\x6e\x64\x65\x78\x4f\x66'](_0x2215fd);}for(let _0x3ea32c=-0x218d+0x1855*0x1+0x938,_0x24457c=_0x4bcdaf['\x6c\x65\x6e\x67\x74\x68'];_0x3ea32c<_0x24457c;_0x3ea32c++){_0x1a1e6a+='\x25'+('\x30\x30'+_0x4bcdaf['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3ea32c)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1ec9+0x11d7*-0x2+-0x8d*-0x9))['\x73\x6c\x69\x63\x65'](-(-0x1dc5+-0x1567+-0x1997*-0x2));}return decodeURIComponent(_0x1a1e6a);};const _0x18810b=function(_0x48e13a,_0x536082){let _0x28e14e=[],_0x346147=0xb49+0x701+-0x2*0x925,_0x2a47d9,_0x53940a='';_0x48e13a=_0x296106(_0x48e13a);let _0x584576;for(_0x584576=-0x89c*0x3+-0xf5f+0x2933;_0x584576<-0x1*0xf1+0x25af+-0x23be;_0x584576++){_0x28e14e[_0x584576]=_0x584576;}for(_0x584576=-0x4fd*0x1+-0x1c*0x81+-0x1*-0x1319;_0x584576<0xa86+0x1e4c+-0x6*0x6a3;_0x584576++){_0x346147=(_0x346147+_0x28e14e[_0x584576]+_0x536082['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x584576%_0x536082['\x6c\x65\x6e\x67\x74\x68']))%(-0x17c3*0x1+0x65b*-0x6+-0x3*-0x14f7),_0x2a47d9=_0x28e14e[_0x584576],_0x28e14e[_0x584576]=_0x28e14e[_0x346147],_0x28e14e[_0x346147]=_0x2a47d9;}_0x584576=-0x19c1+0xf3*0x3+0x2dd*0x8,_0x346147=-0x1f*0xd6+0xa7c+0x32*0x4f;for(let _0x14a267=0x2*0x585+0x1*0x1746+-0xf4*0x24;_0x14a267<_0x48e13a['\x6c\x65\x6e\x67\x74\x68'];_0x14a267++){_0x584576=(_0x584576+(-0x187f+-0x52*-0x2b+0x1*0xaba))%(-0x14d2+-0xd01*-0x1+-0x3d*-0x25),_0x346147=(_0x346147+_0x28e14e[_0x584576])%(-0xf8+0xdc*0x1f+-0x18ac),_0x2a47d9=_0x28e14e[_0x584576],_0x28e14e[_0x584576]=_0x28e14e[_0x346147],_0x28e14e[_0x346147]=_0x2a47d9,_0x53940a+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x48e13a['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x14a267)^_0x28e14e[(_0x28e14e[_0x584576]+_0x28e14e[_0x346147])%(0x1ce7+-0x791+-0x1456)]);}return _0x53940a;};_0x13e8['\x42\x52\x70\x47\x53\x79']=_0x18810b,_0x13e8['\x63\x6d\x67\x68\x4f\x64']={},_0x13e8['\x66\x63\x6e\x59\x72\x6b']=!![];}const _0x1bed6=_0x5ec3ac[0x1*-0x553+-0x22e6+0x1*0x2839],_0x3fe252=_0x12b89b+_0x1bed6,_0x336998=_0x13e8['\x63\x6d\x67\x68\x4f\x64'][_0x3fe252];return!_0x336998?(_0x13e8['\x77\x6a\x69\x76\x45\x58']===undefined&&(_0x13e8['\x77\x6a\x69\x76\x45\x58']=!![]),_0x2c11b=_0x13e8['\x42\x52\x70\x47\x53\x79'](_0x2c11b,_0x2a3169),_0x13e8['\x63\x6d\x67\x68\x4f\x64'][_0x3fe252]=_0x2c11b):_0x2c11b=_0x336998,_0x2c11b;}import{z}from'\x7a\x6f\x64';export const DOMAIN_SCHEMA_VERSION=_0x5d7959(0x1f2,'\x4d\x50\x5e\x63');export const ulid=z[_0x5d7959(0x200,'\x36\x71\x33\x52')]()['\x72\x65\x67\x65\x78'](/^[0-9A-HJKMNP-TV-Z]{26}$/,_0x5d7959(0x1e8,'\x5a\x6e\x36\x4b')+_0x5d7959(0x1f7,'\x41\x73\x31\x44'));export const sha256Hash=z[_0x5d7959(0x1e5,'\x34\x38\x58\x26')]()[_0x5d7959(0x1ec,'\x57\x33\x4b\x7a')](/^sha256:[a-f0-9]{64}$/,_0x5d7959(0x1da,'\x30\x4b\x71\x6c')+_0x5d7959(0x1f9,'\x59\x39\x7a\x4c'));export const extensions=z[_0x5d7959(0x1ee,'\x36\x71\x33\x52')](z['\x73\x74\x72\x69\x6e\x67'](),z['\x75\x6e\x6b\x6e\x6f\x77\x6e']())[_0x5d7959(0x1fa,'\x25\x55\x54\x2a')]({});export const artifactRef=z[_0x5d7959(0x1e6,'\x21\x26\x79\x73')]({'\x70\x61\x74\x68':z[_0x5d7959(0x1f8,'\x57\x33\x4b\x7a')](),'\x73\x68\x61\x32\x35\x36':z[_0x5d7959(0x1fc,'\x50\x46\x41\x41')](),'\x73\x69\x7a\x65':z[_0x5d7959(0x1e4,'\x30\x4b\x71\x6c')]()[_0x5d7959(0x203,'\x45\x6c\x75\x67')]()[_0x5d7959(0x1dd,'\x33\x51\x55\x5d')+_0x5d7959(0x1e7,'\x51\x36\x6f\x5e')]()});export const sourceAgent=z[_0x5d7959(0x1f1,'\x4a\x46\x64\x50')]([_0x5d7959(0x1f0,'\x75\x39\x29\x64')+_0x5d7959(0x1df,'\x50\x46\x41\x41'),_0x5d7959(0x1d9,'\x50\x46\x41\x41'),_0x5d7959(0x1e3,'\x36\x48\x37\x71'),_0x5d7959(0x1e9,'\x68\x35\x47\x26'),'\x61\x6e\x74\x69\x67\x72\x61\x76'+_0x5d7959(0x1f4,'\x50\x46\x41\x41'),_0x5d7959(0x1f6,'\x68\x35\x47\x26'),_0x5d7959(0x1de,'\x33\x51\x55\x5d'),_0x5d7959(0x1f5,'\x4a\x66\x5b\x5d'),'\x67\x65\x6e\x65\x72\x69\x63\x2d'+'\x63\x68\x61\x74']);export const blastRadius=z[_0x5d7959(0x1e1,'\x64\x44\x24\x35')]([_0x5d7959(0x1ff,'\x54\x71\x40\x2a'),'\x6d\x6f\x64\x75\x6c\x65',_0x5d7959(0x201,'\x4a\x46\x64\x50'),_0x5d7959(0x205,'\x66\x46\x6c\x23')]);
|