@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
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V1 → V2 environment variable compatibility layer (#698).
|
|
3
|
+
*
|
|
4
|
+
* Evolver V1 used several env var names that are no longer recognized by V2
|
|
5
|
+
* resolvers. When operators upgrade from V1 to V2 without updating their env
|
|
6
|
+
* files, these legacy names silently do nothing. This module detects the
|
|
7
|
+
* presence of deprecated V1 env vars and emits structured warnings so
|
|
8
|
+
* operators know which knobs to migrate.
|
|
9
|
+
*
|
|
10
|
+
* ## Migration map
|
|
11
|
+
*
|
|
12
|
+
* | V1 name | V2 equivalent | Notes |
|
|
13
|
+
* |---|---|---|
|
|
14
|
+
* | `OPENCLAW_WORKSPACE` | *(manual)* | Partial V2 support does not preserve V1 workspace and bridge semantics |
|
|
15
|
+
* | `EVOLVER_NO_PARENT_GIT` | *(none)* | V2 uses `EVOLVER_REPO_ROOT` or nearest Git root |
|
|
16
|
+
* | `EVOLVER_VERBOSE` | *(none)* | V2 has no global switch; opt in to feature-specific diagnostics manually |
|
|
17
|
+
* | `EVOLVER_AUTO_ISSUE` | *(none)* | V2 creates local drafts; submit requires explicit approval-gated flow |
|
|
18
|
+
* | `EVOLVER_ROLLBACK_MODE` | *(none)* | V2 uses worktree/snapshot/recovery policy |
|
|
19
|
+
* | `WORKER_ENABLED` | *(none)* | No merchant-worker resolver in V2 |
|
|
20
|
+
* | `WORKER_DOMAINS` | *(none)* | No merchant-worker resolver in V2 |
|
|
21
|
+
* | `WORKER_MAX_LOAD` | *(none)* | No merchant-worker resolver in V2 |
|
|
22
|
+
* | `EVOLVER_MEMORY_GRAPH_AUTO_ROTATE` | *(none)* | V2 LocalMemoryGraph always performs bounded maintenance |
|
|
23
|
+
* | `EVOLVER_MEMORY_GRAPH_MAX_SIZE_MB` | *(none)* | V2 LocalMemoryGraph uses a fixed 4 MiB active-file limit |
|
|
24
|
+
* | `EVOLVER_MEMORY_GRAPH_RETENTION_COUNT` | *(none)* | V2 LocalMemoryGraph retains three archives by default |
|
|
25
|
+
* | `GITHUB_TOKEN` | `GITHUB_TOKEN` | Already supported by V2 issue reporter and PR tooling |
|
|
26
|
+
*
|
|
27
|
+
* GITHUB_TOKEN is NOT deprecated — it's actively used. We only note its
|
|
28
|
+
* presence for observability.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The canonical table of V1 → V2 env var deprecations.
|
|
32
|
+
*
|
|
33
|
+
* Order matters for deterministic output; the scan iterates this list
|
|
34
|
+
* and checks each entry against the provided `env` object.
|
|
35
|
+
*/
|
|
36
|
+
export const V1_DEPRECATION_TABLE = [
|
|
37
|
+
{
|
|
38
|
+
v1Name: 'OPENCLAW_WORKSPACE',
|
|
39
|
+
v2Equivalent: null,
|
|
40
|
+
migrationAction: 'manual',
|
|
41
|
+
guidance: 'OPENCLAW_WORKSPACE is still read directly by the pending-signals resolver. ' +
|
|
42
|
+
'Do not copy it verbatim: identify the Git repo root before setting EVOLVER_REPO_ROOT, ' +
|
|
43
|
+
'and migrate V1 bridge behavior separately.',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
v1Name: 'EVOLVER_NO_PARENT_GIT',
|
|
47
|
+
v2Equivalent: null,
|
|
48
|
+
migrationAction: 'remove',
|
|
49
|
+
guidance: 'V2 uses EVOLVER_REPO_ROOT or the nearest Git root for workspace detection. ' +
|
|
50
|
+
'Prefer EVOLVER_REPO_ROOT; EVOLVER_NO_PARENT_GIT has no V2 effect.',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
v1Name: 'EVOLVER_VERBOSE',
|
|
54
|
+
v2Equivalent: null,
|
|
55
|
+
migrationAction: 'remove',
|
|
56
|
+
guidance: 'V2 has no global verbose switch. Remove this variable and opt in to a ' +
|
|
57
|
+
'feature-specific flag such as EVOLVER_HOOK_VERBOSE=1 only when hook diagnostics are needed.',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
v1Name: 'EVOLVER_AUTO_ISSUE',
|
|
61
|
+
v2Equivalent: null,
|
|
62
|
+
migrationAction: 'remove',
|
|
63
|
+
guidance: 'V2 does not auto-submit issues. It creates local drafts and requires ' +
|
|
64
|
+
'explicit approval-gated submission via `evolver issue-report submit`.',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
v1Name: 'EVOLVER_ROLLBACK_MODE',
|
|
68
|
+
v2Equivalent: null,
|
|
69
|
+
migrationAction: 'remove',
|
|
70
|
+
guidance: 'V2 uses worktree, snapshot, and recovery policy instead of legacy hard-reset. ' +
|
|
71
|
+
'Remove this variable; it has no effect.',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
v1Name: 'WORKER_ENABLED',
|
|
75
|
+
v2Equivalent: null,
|
|
76
|
+
migrationAction: 'remove',
|
|
77
|
+
guidance: 'V2 has no merchant-worker resolver. Remove this variable; it has no effect.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
v1Name: 'WORKER_DOMAINS',
|
|
81
|
+
v2Equivalent: null,
|
|
82
|
+
migrationAction: 'remove',
|
|
83
|
+
guidance: 'V2 has no merchant-worker resolver. Remove this variable; it has no effect.',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
v1Name: 'WORKER_MAX_LOAD',
|
|
87
|
+
v2Equivalent: null,
|
|
88
|
+
migrationAction: 'remove',
|
|
89
|
+
guidance: 'V2 has no merchant-worker resolver. Remove this variable; it has no effect.',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
v1Name: 'EVOLVER_MEMORY_GRAPH_AUTO_ROTATE',
|
|
93
|
+
v2Equivalent: null,
|
|
94
|
+
migrationAction: 'remove',
|
|
95
|
+
guidance: 'V2 LocalMemoryGraph always rotates and compacts automatically at its bounded defaults. ' +
|
|
96
|
+
'There is no environment override; remove this variable.',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
v1Name: 'EVOLVER_MEMORY_GRAPH_MAX_SIZE_MB',
|
|
100
|
+
v2Equivalent: null,
|
|
101
|
+
migrationAction: 'remove',
|
|
102
|
+
guidance: 'V2 LocalMemoryGraph uses a fixed 4 MiB active-file limit before rotation and compaction. ' +
|
|
103
|
+
'There is no environment override; remove this variable.',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
v1Name: 'EVOLVER_MEMORY_GRAPH_RETENTION_COUNT',
|
|
107
|
+
v2Equivalent: null,
|
|
108
|
+
migrationAction: 'remove',
|
|
109
|
+
guidance: 'V2 LocalMemoryGraph retains three archives by default and prunes older archives automatically. ' +
|
|
110
|
+
'There is no environment override; remove this variable.',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
v1Name: 'EVOLVER_ATP',
|
|
114
|
+
v2Equivalent: null,
|
|
115
|
+
migrationAction: 'manual',
|
|
116
|
+
guidance: 'V1 auto/on/off controlled merchant/provider lifecycle, which has no one-to-one V2 resolver. '
|
|
117
|
+
+ 'Review the missing merchant workflow before removing this key. Do not map it to `evolver atp enable` '
|
|
118
|
+
+ 'or EVOLVER_ATP_AUTOBUY; those controls authorize autonomous buyer spending. If V1 off meant no '
|
|
119
|
+
+ 'provider or delivery activity, set EVOLVER_ATP_AUTODELIVER=off explicitly as hardening, not as an equivalent mapping.',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
v1Name: 'EVOLVER_SESSION_SOURCE',
|
|
123
|
+
v2Equivalent: null,
|
|
124
|
+
migrationAction: 'manual',
|
|
125
|
+
guidance: 'V1 auto/cursor/openclaw/merge selected session collectors, which has no one-to-one V2 resolver. '
|
|
126
|
+
+ 'Review the workload before removing this key. Supported trajectory export requires explicit runtime '
|
|
127
|
+
+ 'discovery or transcript-directory controls; setting another aggregate key does not restore OpenClaw collection.',
|
|
128
|
+
},
|
|
129
|
+
];
|
|
130
|
+
/**
|
|
131
|
+
* Scan the provided environment for deprecated V1 env vars and return
|
|
132
|
+
* structured results. This function is purely read-only and never mutates
|
|
133
|
+
* the `env` object.
|
|
134
|
+
*
|
|
135
|
+
* @param env The environment to scan (defaults to `process.env`).
|
|
136
|
+
* @returns Structured scan results including detected deprecations.
|
|
137
|
+
*/
|
|
138
|
+
export function scanV1EnvCompat(env = typeof process !== 'undefined' ? process.env : {}) {
|
|
139
|
+
const detected = [];
|
|
140
|
+
for (const entry of V1_DEPRECATION_TABLE) {
|
|
141
|
+
const value = env[entry.v1Name];
|
|
142
|
+
if (value !== undefined && value.trim() !== '') {
|
|
143
|
+
detected.push(entry);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const githubTokenPresent = (env['GITHUB_TOKEN'] !== undefined && env['GITHUB_TOKEN'].trim() !== '') ||
|
|
147
|
+
(env['GH_TOKEN'] !== undefined && env['GH_TOKEN'].trim() !== '');
|
|
148
|
+
return { detected, githubTokenPresent };
|
|
149
|
+
}
|
|
150
|
+
/** Resolve the migration action while preserving compatibility with pre-action table entries. */
|
|
151
|
+
export function resolveV1EnvMigrationAction(entry) {
|
|
152
|
+
return entry.migrationAction ?? (entry.v2Equivalent ? 'map' : 'remove');
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Emit deprecation warnings to the provided logger for all detected
|
|
156
|
+
* deprecated V1 env vars. This is the primary integration point for
|
|
157
|
+
* entrypoints that want human-readable console output.
|
|
158
|
+
*
|
|
159
|
+
* @param result The scan result from `scanV1EnvCompat`.
|
|
160
|
+
* @param warn Logger function (defaults to `console.warn`).
|
|
161
|
+
*/
|
|
162
|
+
export function emitV1DeprecationWarnings(result, warn = (msg) => console.warn(msg)) {
|
|
163
|
+
for (const dep of result.detected) {
|
|
164
|
+
const action = resolveV1EnvMigrationAction(dep);
|
|
165
|
+
const v2Hint = action === 'map' && dep.v2Equivalent
|
|
166
|
+
? ` Use ${dep.v2Equivalent} instead.`
|
|
167
|
+
: '';
|
|
168
|
+
const lead = action === 'manual'
|
|
169
|
+
? `Deprecated env var ${dep.v1Name} is set and requires manual migration.`
|
|
170
|
+
: action === 'map'
|
|
171
|
+
? `Deprecated env var ${dep.v1Name} is set.`
|
|
172
|
+
: `Deprecated env var ${dep.v1Name} is set but has no V2 resolver.`;
|
|
173
|
+
warn(`[evolver:v1-compat] ${lead}${v2Hint} ${dep.guidance}`);
|
|
174
|
+
}
|
|
175
|
+
// githubTokenPresent is intentionally not warned: GITHUB_TOKEN/GH_TOKEN remain
|
|
176
|
+
// supported by V2 issue reporter / PR tooling. Flag retained for callers/tests.
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Convenience function: scan + emit in one call. Intended for early
|
|
180
|
+
* bootstrap in CLI/proxy/MCP entrypoints.
|
|
181
|
+
*
|
|
182
|
+
* @param env The environment to scan.
|
|
183
|
+
* @param warn Logger function.
|
|
184
|
+
* @returns The scan result (useful for programmatic inspection).
|
|
185
|
+
*/
|
|
186
|
+
export function checkV1EnvCompat(env = typeof process !== 'undefined' ? process.env : {}, warn) {
|
|
187
|
+
const result = scanV1EnvCompat(env);
|
|
188
|
+
if (result.detected.length > 0) {
|
|
189
|
+
emitV1DeprecationWarnings(result, warn);
|
|
190
|
+
}
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
const V1_IMPLICIT_DEFAULT_CAVEATS = [
|
|
194
|
+
'V1 treated unset EVOLVER_ATP and EVOLVER_SESSION_SOURCE as auto. A clean key scan therefore does not prove '
|
|
195
|
+
+ 'merchant/provider or session-collection workflow parity; audit both before cutover.',
|
|
196
|
+
];
|
|
197
|
+
/**
|
|
198
|
+
* Build an offline V1→V2 env translation report.
|
|
199
|
+
* Does not write files; callers decide how to present or apply suggestions.
|
|
200
|
+
* Raw values are retained only as v2Value for mappable non-secret keys.
|
|
201
|
+
* GITHUB_TOKEN and GH_TOKEN are reported as keep without retaining their values.
|
|
202
|
+
*/
|
|
203
|
+
export function translateV1Env(env = typeof process !== 'undefined' ? process.env : {}) {
|
|
204
|
+
const suggestions = [];
|
|
205
|
+
for (const entry of V1_DEPRECATION_TABLE) {
|
|
206
|
+
const raw = env[entry.v1Name];
|
|
207
|
+
if (raw === undefined || raw.trim() === '')
|
|
208
|
+
continue;
|
|
209
|
+
const action = resolveV1EnvMigrationAction(entry);
|
|
210
|
+
if (action === 'map') {
|
|
211
|
+
if (!entry.v2Equivalent)
|
|
212
|
+
throw new Error(`missing V2 equivalent for ${entry.v1Name}`);
|
|
213
|
+
suggestions.push({
|
|
214
|
+
v1Name: entry.v1Name,
|
|
215
|
+
action: 'map',
|
|
216
|
+
v2Name: entry.v2Equivalent,
|
|
217
|
+
v2Value: raw,
|
|
218
|
+
guidance: entry.guidance,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
suggestions.push({
|
|
223
|
+
v1Name: entry.v1Name,
|
|
224
|
+
action,
|
|
225
|
+
guidance: entry.guidance,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
const githubTokenPresent = (env['GITHUB_TOKEN'] !== undefined && env['GITHUB_TOKEN'].trim() !== '') ||
|
|
230
|
+
(env['GH_TOKEN'] !== undefined && env['GH_TOKEN'].trim() !== '');
|
|
231
|
+
if (githubTokenPresent) {
|
|
232
|
+
const key = env['GITHUB_TOKEN']?.trim() ? 'GITHUB_TOKEN' : 'GH_TOKEN';
|
|
233
|
+
suggestions.push({
|
|
234
|
+
v1Name: key,
|
|
235
|
+
action: 'keep',
|
|
236
|
+
v2Name: key,
|
|
237
|
+
guidance: 'GITHUB_TOKEN/GH_TOKEN remain valid for issue submit and gh-based PR tooling. ' +
|
|
238
|
+
'Prefer GH_TOKEN when using the GitHub CLI.',
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
return {
|
|
242
|
+
suggestions,
|
|
243
|
+
detectedCount: suggestions.filter((s) => s.action !== 'keep').length,
|
|
244
|
+
mappableCount: suggestions.filter((s) => s.action === 'map').length,
|
|
245
|
+
manualCount: suggestions.filter((s) => s.action === 'manual').length,
|
|
246
|
+
removableCount: suggestions.filter((s) => s.action === 'remove').length,
|
|
247
|
+
githubTokenPresent,
|
|
248
|
+
caveats: V1_IMPLICIT_DEFAULT_CAVEATS,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/** Human-readable report (never prints secret-looking values; only key names + actions). */
|
|
252
|
+
export function formatV1EnvTranslationReport(report) {
|
|
253
|
+
const lines = [
|
|
254
|
+
'V1 → V2 env translation (offline, no writes):',
|
|
255
|
+
` detected_deprecated=${report.detectedCount} map=${report.mappableCount} manual=${report.manualCount} remove=${report.removableCount} github_token=${report.githubTokenPresent ? 'present' : 'absent'}`,
|
|
256
|
+
];
|
|
257
|
+
for (const caveat of report.caveats ?? [])
|
|
258
|
+
lines.push(` caveat: ${caveat}`);
|
|
259
|
+
if (report.suggestions.length === 0) {
|
|
260
|
+
lines.push(' (no explicit V1-only knobs detected)');
|
|
261
|
+
return `${lines.join('\n')}\n`;
|
|
262
|
+
}
|
|
263
|
+
for (const s of report.suggestions) {
|
|
264
|
+
if (s.action === 'map') {
|
|
265
|
+
lines.push(` map ${s.v1Name} → ${s.v2Name}`);
|
|
266
|
+
}
|
|
267
|
+
else if (s.action === 'manual') {
|
|
268
|
+
lines.push(` review ${s.v1Name} (manual migration required)`);
|
|
269
|
+
}
|
|
270
|
+
else if (s.action === 'remove') {
|
|
271
|
+
lines.push(` drop ${s.v1Name} (no V2 resolver)`);
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
lines.push(` keep ${s.v1Name} (still valid in V2)`);
|
|
275
|
+
}
|
|
276
|
+
lines.push(` ${s.guidance}`);
|
|
277
|
+
}
|
|
278
|
+
lines.push(' See docs/migration-guide.md and docs/config-env.md § V1 变量不再是 V2 的有效配置.');
|
|
279
|
+
return `${lines.join('\n')}\n`;
|
|
280
|
+
}
|
|
@@ -1,74 +1 @@
|
|
|
1
|
-
import { TERMINAL, stageForEventType, canTransition } from './stateMachine.js';
|
|
2
|
-
import { HOST_SUPPRESS_CLASSES } from '../algo/cycleFailureClassifier.js';
|
|
3
|
-
function newRecord(cycleId) {
|
|
4
|
-
return {
|
|
5
|
-
cycleId, stage: 'none', startedAt: null, endedAt: null, decisionWhy: null,
|
|
6
|
-
geneId: null, mutationId: null, capsuleId: null, outcome: null, failureClass: null, failureSuppressed: false,
|
|
7
|
-
signalCount: 0, eventSeqs: [], illegalTransitions: [],
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function applyFields(rec, e, to) {
|
|
11
|
-
const p = (e.payload ?? {});
|
|
12
|
-
const r = { ...rec, stage: to, eventSeqs: [...rec.eventSeqs, e.seq] };
|
|
13
|
-
if (to === 'started')
|
|
14
|
-
r.startedAt = e.ts;
|
|
15
|
-
if (TERMINAL.has(to))
|
|
16
|
-
r.endedAt = e.ts;
|
|
17
|
-
if (to === 'gene_selected') {
|
|
18
|
-
r.decisionWhy = e.human.why ?? null;
|
|
19
|
-
r.geneId = p.geneId ?? null;
|
|
20
|
-
}
|
|
21
|
-
if (to === 'mutation_built')
|
|
22
|
-
r.mutationId = p.mutationId ?? null;
|
|
23
|
-
if (to === 'signals_collected')
|
|
24
|
-
r.signalCount = p.signalCount ?? rec.signalCount;
|
|
25
|
-
if (to === 'solidified') {
|
|
26
|
-
r.capsuleId = p.capsuleId ?? null;
|
|
27
|
-
r.outcome = p.outcome ?? null;
|
|
28
|
-
}
|
|
29
|
-
if (to === 'failed' || to === 'aborted')
|
|
30
|
-
r.outcome = p.outcome ?? rec.outcome;
|
|
31
|
-
if (to === 'failed' && typeof p.failure_class === 'string') {
|
|
32
|
-
const failureClass = p.failure_class;
|
|
33
|
-
r.failureClass = failureClass;
|
|
34
|
-
r.failureSuppressed = HOST_SUPPRESS_CLASSES.has(failureClass);
|
|
35
|
-
}
|
|
36
|
-
return r;
|
|
37
|
-
}
|
|
38
|
-
/** cycle timeline MV (军杰§9.3). 每 cycle 一条记录, 状态机校验非法转移. */
|
|
39
|
-
export const cycleTimelineProjector = {
|
|
40
|
-
name: 'cycle_timeline',
|
|
41
|
-
initial: () => ({ cycles: {}, order: [] }),
|
|
42
|
-
reduce: (state, e) => {
|
|
43
|
-
const p = (e.payload ?? {});
|
|
44
|
-
const cycleId = p.cycleId;
|
|
45
|
-
if (!cycleId)
|
|
46
|
-
return state;
|
|
47
|
-
const exists = cycleId in state.cycles;
|
|
48
|
-
const rec = state.cycles[cycleId] ?? newRecord(cycleId);
|
|
49
|
-
const to = stageForEventType(e.type);
|
|
50
|
-
let next;
|
|
51
|
-
if (to === null) {
|
|
52
|
-
next = { ...rec, eventSeqs: [...rec.eventSeqs, e.seq] }; // cycle 内非 stage 事件: 仅记 seq
|
|
53
|
-
}
|
|
54
|
-
else if (!canTransition(rec.stage, to)) {
|
|
55
|
-
next = { ...rec, eventSeqs: [...rec.eventSeqs, e.seq], illegalTransitions: [...rec.illegalTransitions, { from: rec.stage, eventType: e.type, seq: e.seq }] };
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
next = applyFields(rec, e, to);
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
cycles: { ...state.cycles, [cycleId]: next },
|
|
62
|
-
order: exists ? state.order : [...state.order, cycleId],
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
export function liveCycles(mv) {
|
|
67
|
-
return mv.order.map((id) => mv.cycles[id]).filter((c) => !TERMINAL.has(c.stage));
|
|
68
|
-
}
|
|
69
|
-
export function latestCycles(mv, n = 10) {
|
|
70
|
-
return mv.order.slice(-n).map((id) => mv.cycles[id]);
|
|
71
|
-
}
|
|
72
|
-
export function historicalCycles(mv) {
|
|
73
|
-
return mv.order.map((id) => mv.cycles[id]);
|
|
74
|
-
}
|
|
1
|
+
const _0x23fe78=_0x5431;(function(_0x2c8d97,_0x4b970c){const _0x5ae41a=_0x5431,_0x53cf5c=_0x2c8d97();while(!![]){try{const _0x4fd7e5=parseInt(_0x5ae41a(0x1c6,'\x25\x33\x66\x28'))/(0x1a5*0x14+0x50+-0x2133)*(parseInt(_0x5ae41a(0x18f,'\x58\x75\x78\x5d'))/(0x243d*-0x1+-0x2056+0x4495))+-parseInt(_0x5ae41a(0x185,'\x37\x46\x26\x54'))/(0x2499+0x38a+0xd60*-0x3)+parseInt(_0x5ae41a(0x1bd,'\x49\x2a\x4e\x23'))/(0x8c1*-0x1+-0x2*-0x18a+-0x2f*-0x1f)+-parseInt(_0x5ae41a(0x19a,'\x5e\x55\x5e\x42'))/(0x17b9+0xf9*-0xa+-0x6fd*0x2)+parseInt(_0x5ae41a(0x1c8,'\x2a\x7a\x25\x73'))/(0x4*-0xa3+-0x3*-0xa3d+-0x5*0x5a1)*(-parseInt(_0x5ae41a(0x1af,'\x4b\x39\x66\x67'))/(0x71c+-0x1e32+0x61*0x3d))+parseInt(_0x5ae41a(0x1b3,'\x64\x7a\x53\x76'))/(0x25f2+0x1*-0xbef+-0x19fb)+parseInt(_0x5ae41a(0x1d1,'\x4a\x63\x5b\x25'))/(-0x1e61+0x4e4+-0x6*-0x441)*(-parseInt(_0x5ae41a(0x1d7,'\x34\x6c\x7a\x5b'))/(-0x929*0x2+-0x4d8+0x1734));if(_0x4fd7e5===_0x4b970c)break;else _0x53cf5c['push'](_0x53cf5c['shift']());}catch(_0x584e66){_0x53cf5c['push'](_0x53cf5c['shift']());}}}(_0x1a87,0x22355*-0x1+0x17410*-0x2+-0x5971*-0x18));import{TERMINAL,stageForEventType,canTransition}from'\x2e\x2f\x73\x74\x61\x74\x65\x4d\x61\x63\x68\x69\x6e\x65\x2e\x6a\x73';function _0x5431(_0x23147c,_0x36fcbc){_0x23147c=_0x23147c-(-0x19fe+-0x5*-0x75+0x1933*0x1);const _0x2267ae=_0x1a87();let _0x5edb64=_0x2267ae[_0x23147c];if(_0x5431['\x63\x68\x53\x7a\x7a\x4f']===undefined){var _0x55e15b=function(_0x350314){const _0x1e3bda='\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 _0x37ace1='',_0x42d21d='';for(let _0x1e1afa=-0x2090+-0x149d*-0x1+0xbf3,_0x354224,_0x5cd5e8,_0x141e71=-0x1f0+0x109d*-0x1+-0x1*-0x128d;_0x5cd5e8=_0x350314['\x63\x68\x61\x72\x41\x74'](_0x141e71++);~_0x5cd5e8&&(_0x354224=_0x1e1afa%(-0x1145+0x19f3+-0x455*0x2)?_0x354224*(0xd5b+-0x17a3+-0x544*-0x2)+_0x5cd5e8:_0x5cd5e8,_0x1e1afa++%(0x4c8+-0x4*-0x6f1+0x4*-0x822))?_0x37ace1+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x19*0x10f+0x2451+-0x8db&_0x354224>>(-(0x24bf+0x8d*-0x35+0x3*-0x284)*_0x1e1afa&0x1*0x811+0x64+-0x86f)):0xf1d+0x2489+-0x16*0x259){_0x5cd5e8=_0x1e3bda['\x69\x6e\x64\x65\x78\x4f\x66'](_0x5cd5e8);}for(let _0x505609=-0x13f*-0x5+-0x1db5+0x1*0x177a,_0x7953d5=_0x37ace1['\x6c\x65\x6e\x67\x74\x68'];_0x505609<_0x7953d5;_0x505609++){_0x42d21d+='\x25'+('\x30\x30'+_0x37ace1['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x505609)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0xf41+0x9*0x11f+0xdf*0x6))['\x73\x6c\x69\x63\x65'](-(0x2e1+0x243*-0x1+0xd*-0xc));}return decodeURIComponent(_0x42d21d);};const _0x16fa1b=function(_0x44359d,_0x17a2dd){let _0x380d6e=[],_0x5dac70=0x2*0x7+0xd18*0x1+0x3*-0x462,_0x5ec7bb,_0x17d703='';_0x44359d=_0x55e15b(_0x44359d);let _0xddc79f;for(_0xddc79f=-0x2289+0x119a+0x10ef;_0xddc79f<0x195c+-0x1621+-0x23b*0x1;_0xddc79f++){_0x380d6e[_0xddc79f]=_0xddc79f;}for(_0xddc79f=-0x1647+0xc*0x217+-0x2cd;_0xddc79f<0xeff+0x22f7+0x2*-0x187b;_0xddc79f++){_0x5dac70=(_0x5dac70+_0x380d6e[_0xddc79f]+_0x17a2dd['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xddc79f%_0x17a2dd['\x6c\x65\x6e\x67\x74\x68']))%(0x88*-0x11+-0x243d+0x2e45),_0x5ec7bb=_0x380d6e[_0xddc79f],_0x380d6e[_0xddc79f]=_0x380d6e[_0x5dac70],_0x380d6e[_0x5dac70]=_0x5ec7bb;}_0xddc79f=-0xdbc+-0x12*-0x5e+0x10*0x72,_0x5dac70=-0x14b*0xa+-0x53*-0x9+0xb*0xe9;for(let _0x67448=0x12a*0x14+-0xf9e+0x6d*-0x12;_0x67448<_0x44359d['\x6c\x65\x6e\x67\x74\x68'];_0x67448++){_0xddc79f=(_0xddc79f+(0x18ba+-0xc44+-0xc75))%(-0xea8+0x467+0x1*0xb41),_0x5dac70=(_0x5dac70+_0x380d6e[_0xddc79f])%(-0xaf0+-0x19e1+0x15*0x1cd),_0x5ec7bb=_0x380d6e[_0xddc79f],_0x380d6e[_0xddc79f]=_0x380d6e[_0x5dac70],_0x380d6e[_0x5dac70]=_0x5ec7bb,_0x17d703+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x44359d['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x67448)^_0x380d6e[(_0x380d6e[_0xddc79f]+_0x380d6e[_0x5dac70])%(-0x16e7+-0x948+0x212f)]);}return _0x17d703;};_0x5431['\x47\x6f\x54\x6b\x55\x6b']=_0x16fa1b,_0x5431['\x51\x4b\x72\x68\x62\x70']={},_0x5431['\x63\x68\x53\x7a\x7a\x4f']=!![];}const _0x33e74c=_0x2267ae[-0xc37+-0x262c+-0x3263*-0x1],_0x429088=_0x23147c+_0x33e74c,_0x253a6a=_0x5431['\x51\x4b\x72\x68\x62\x70'][_0x429088];return!_0x253a6a?(_0x5431['\x77\x58\x45\x6f\x64\x4b']===undefined&&(_0x5431['\x77\x58\x45\x6f\x64\x4b']=!![]),_0x5edb64=_0x5431['\x47\x6f\x54\x6b\x55\x6b'](_0x5edb64,_0x36fcbc),_0x5431['\x51\x4b\x72\x68\x62\x70'][_0x429088]=_0x5edb64):_0x5edb64=_0x253a6a,_0x5edb64;}import{HOST_SUPPRESS_CLASSES}from'\x2e\x2e\x2f\x61\x6c\x67\x6f\x2f\x63\x79\x63\x6c\x65\x46\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73\x69\x66\x69\x65\x72\x2e\x6a\x73';function newRecord(_0x222e52){const _0x1fccce=_0x5431;return{'\x63\x79\x63\x6c\x65\x49\x64':_0x222e52,'\x73\x74\x61\x67\x65':_0x1fccce(0x1a8,'\x6f\x68\x73\x39'),'\x73\x74\x61\x72\x74\x65\x64\x41\x74':null,'\x65\x6e\x64\x65\x64\x41\x74':null,'\x64\x65\x63\x69\x73\x69\x6f\x6e\x57\x68\x79':null,'\x67\x65\x6e\x65\x49\x64':null,'\x6d\x75\x74\x61\x74\x69\x6f\x6e\x49\x64':null,'\x63\x61\x70\x73\x75\x6c\x65\x49\x64':null,'\x6f\x75\x74\x63\x6f\x6d\x65':null,'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':null,'\x66\x61\x69\x6c\x75\x72\x65\x53\x75\x70\x70\x72\x65\x73\x73\x65\x64':![],'\x73\x69\x67\x6e\x61\x6c\x43\x6f\x75\x6e\x74':0x0,'\x65\x76\x65\x6e\x74\x53\x65\x71\x73':[],'\x69\x6c\x6c\x65\x67\x61\x6c\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x73':[]};}function _0x1a87(){const _0x43f147=['\x57\x51\x70\x63\x4c\x59\x6e\x37\x67\x65\x61','\x7a\x4c\x46\x64\x55\x4a\x64\x63\x53\x43\x6b\x6b\x68\x43\x6b\x72','\x57\x34\x7a\x66\x57\x4f\x66\x63\x57\x34\x69','\x57\x35\x42\x64\x47\x43\x6b\x41\x71\x47\x30\x44\x57\x4f\x4f\x58','\x57\x52\x44\x59\x57\x37\x4c\x67\x57\x52\x6d','\x57\x50\x53\x70\x57\x35\x71\x76\x57\x4f\x70\x63\x4f\x43\x6f\x61\x57\x35\x6d\x4a\x42\x43\x6b\x4b\x76\x62\x75','\x57\x35\x72\x63\x45\x57\x6d\x53\x57\x36\x52\x64\x48\x65\x4f','\x61\x6d\x6f\x44\x72\x53\x6b\x31\x71\x30\x4e\x64\x4d\x68\x30\x38\x77\x53\x6f\x43\x57\x37\x6d','\x57\x4f\x33\x64\x4c\x73\x68\x63\x4f\x43\x6b\x46\x57\x52\x38\x38\x41\x57','\x57\x4f\x30\x72\x79\x47','\x42\x32\x52\x63\x4d\x53\x6f\x6a\x74\x71\x74\x64\x4f\x38\x6f\x69','\x6c\x6d\x6f\x35\x57\x4f\x75\x4d','\x57\x35\x4a\x64\x4d\x43\x6b\x30\x57\x51\x57\x4b\x65\x67\x66\x46','\x57\x36\x37\x63\x51\x74\x70\x63\x47\x48\x30\x4c\x57\x36\x53\x57','\x70\x72\x64\x64\x50\x5a\x64\x63\x52\x6d\x6b\x56\x66\x61','\x57\x37\x68\x64\x4e\x33\x43\x56\x74\x47\x68\x63\x56\x62\x4e\x64\x55\x64\x33\x64\x53\x53\x6f\x2f\x6f\x57','\x79\x66\x78\x63\x51\x32\x6c\x64\x53\x53\x6f\x31\x65\x6d\x6b\x52\x45\x75\x31\x6b\x73\x71','\x57\x52\x53\x6a\x6f\x57\x68\x64\x49\x61','\x73\x53\x6f\x42\x69\x53\x6f\x2b\x57\x52\x61\x47','\x57\x34\x56\x63\x56\x53\x6f\x59\x64\x6d\x6b\x79','\x57\x34\x6c\x64\x4d\x38\x6b\x47\x57\x52\x53\x5a','\x57\x4f\x31\x78\x68\x78\x74\x64\x50\x48\x30','\x67\x71\x4a\x64\x49\x38\x6f\x38\x68\x73\x2f\x63\x48\x6d\x6f\x4e','\x57\x51\x33\x63\x4a\x5a\x61','\x57\x52\x2f\x64\x55\x68\x56\x64\x47\x66\x4c\x2b\x57\x36\x38\x69\x57\x35\x44\x4d\x76\x78\x43','\x65\x53\x6f\x77\x57\x4f\x34','\x73\x43\x6b\x43\x41\x43\x6f\x66\x63\x33\x4e\x63\x4d\x67\x2f\x63\x52\x32\x68\x64\x53\x57','\x6f\x53\x6f\x66\x43\x53\x6f\x51\x61\x74\x72\x62','\x6a\x53\x6f\x65\x44\x6d\x6f\x47\x61\x64\x34','\x57\x37\x6c\x63\x4d\x53\x6f\x59\x57\x34\x44\x4e\x7a\x61','\x73\x47\x4a\x63\x4a\x73\x42\x63\x48\x6d\x6b\x61\x75\x30\x30','\x57\x4f\x37\x64\x52\x47\x37\x64\x51\x33\x47','\x57\x4f\x2f\x64\x47\x43\x6b\x2f\x57\x4f\x5a\x64\x54\x43\x6f\x49\x57\x50\x52\x63\x48\x66\x7a\x6a\x62\x53\x6b\x2b','\x57\x51\x44\x2f\x57\x37\x54\x6e\x57\x52\x70\x63\x55\x6d\x6b\x45\x57\x37\x61','\x69\x71\x58\x76\x57\x35\x70\x64\x4b\x33\x4f\x4c\x76\x61','\x79\x66\x53\x63\x57\x37\x4a\x64\x51\x75\x47\x6f\x43\x4d\x4b','\x6e\x71\x58\x73\x57\x34\x5a\x64\x4a\x33\x57\x50\x7a\x61','\x57\x51\x66\x4c\x57\x36\x58\x65\x57\x52\x69','\x57\x37\x4a\x63\x50\x4a\x43','\x68\x53\x6f\x73\x57\x50\x37\x63\x4d\x38\x6b\x38\x57\x51\x78\x64\x49\x58\x57','\x57\x36\x6c\x63\x55\x43\x6b\x50\x72\x6d\x6b\x47\x57\x52\x38','\x57\x35\x66\x65\x69\x76\x72\x56\x57\x50\x6c\x64\x47\x4b\x4c\x65\x69\x43\x6b\x73\x57\x52\x75','\x57\x51\x4a\x63\x56\x53\x6b\x61\x57\x50\x57','\x42\x33\x68\x63\x4c\x38\x6f\x68\x74\x61','\x57\x51\x64\x63\x55\x6d\x6b\x63\x57\x4f\x33\x63\x55\x43\x6f\x4f','\x57\x51\x44\x2f\x57\x37\x54\x6e\x57\x52\x70\x63\x4c\x61','\x76\x38\x6f\x63\x6a\x53\x6b\x4c\x57\x50\x78\x63\x54\x71','\x43\x43\x6b\x50\x57\x34\x66\x54\x57\x51\x70\x64\x4f\x78\x34\x79\x68\x77\x70\x63\x4e\x4d\x61\x34','\x57\x51\x4c\x65\x75\x61\x4e\x64\x51\x57\x56\x64\x48\x61','\x76\x67\x33\x64\x51\x53\x6b\x44\x57\x51\x53\x41','\x57\x37\x6e\x66\x76\x5a\x53\x41','\x6c\x5a\x74\x64\x48\x53\x6b\x73\x65\x66\x74\x64\x47\x43\x6f\x6d\x6f\x6d\x6f\x48\x75\x6d\x6b\x66','\x57\x34\x66\x2b\x73\x71','\x57\x35\x46\x63\x55\x43\x6b\x4e\x6a\x43\x6f\x66\x7a\x43\x6f\x6b\x45\x47','\x41\x74\x75\x53\x70\x53\x6f\x57\x57\x52\x34','\x44\x48\x42\x63\x55\x38\x6b\x72\x45\x53\x6f\x59\x65\x53\x6f\x36\x79\x74\x52\x63\x4a\x4b\x33\x64\x4e\x71','\x69\x57\x58\x63\x57\x34\x5a\x64\x4c\x77\x38\x4f','\x57\x37\x56\x64\x49\x38\x6b\x66\x76\x63\x65','\x57\x52\x43\x78\x70\x48\x46\x64\x49\x71','\x67\x6d\x6f\x43\x6d\x38\x6b\x43\x76\x4b\x6c\x63\x51\x71','\x69\x4b\x2f\x64\x4f\x38\x6f\x70\x6c\x6d\x6b\x4b','\x41\x71\x61\x56\x46\x61\x5a\x64\x4e\x38\x6b\x76','\x6e\x43\x6f\x6c\x6d\x5a\x33\x64\x48\x38\x6f\x7a\x43\x43\x6b\x44','\x57\x52\x33\x63\x4e\x4e\x2f\x64\x49\x6d\x6b\x6b\x57\x36\x38','\x68\x71\x6c\x64\x49\x43\x6f\x31\x6a\x5a\x2f\x63\x4c\x43\x6f\x55','\x6a\x53\x6f\x35\x57\x50\x38\x35\x57\x36\x78\x63\x4f\x73\x38\x50','\x41\x74\x65\x57','\x57\x34\x6c\x63\x4a\x43\x6f\x5a\x57\x34\x31\x4b\x46\x71\x79','\x44\x5a\x4b\x4e\x6f\x43\x6f\x2f\x57\x52\x44\x70\x73\x61','\x57\x35\x50\x64\x57\x4f\x72\x76\x57\x34\x74\x64\x54\x53\x6b\x43\x57\x36\x69','\x57\x4f\x39\x43\x41\x6d\x6f\x4c\x57\x37\x64\x63\x48\x32\x4f\x70','\x70\x6d\x6f\x43\x41\x53\x6f\x53\x63\x74\x48\x69\x57\x35\x38','\x62\x38\x6f\x79\x72\x43\x6b\x59\x72\x4b\x5a\x64\x4d\x32\x57\x64\x41\x6d\x6f\x4b\x57\x34\x38','\x57\x37\x74\x64\x51\x6d\x6f\x78\x57\x34\x5a\x64\x50\x6d\x6f\x4f\x74\x43\x6b\x50\x57\x37\x68\x63\x4b\x6d\x6f\x74','\x77\x53\x6f\x77\x69\x6d\x6f\x31\x57\x52\x61','\x57\x50\x50\x78\x64\x4e\x30','\x6f\x53\x6f\x74\x45\x57\x78\x64\x4d\x6d\x6f\x6f\x6f\x57','\x65\x38\x6f\x65\x69\x57','\x6f\x58\x56\x64\x56\x78\x53\x49','\x57\x35\x37\x63\x4b\x4e\x74\x64\x56\x6d\x6f\x46\x57\x35\x4b\x57\x71\x30\x50\x2f\x57\x34\x4a\x64\x56\x47','\x57\x50\x31\x6c\x64\x57','\x57\x50\x74\x64\x53\x48\x34','\x6a\x43\x6f\x32\x57\x50\x69\x57\x57\x37\x74\x63\x4b\x4a\x34','\x57\x34\x56\x63\x4f\x53\x6b\x4b\x6c\x53\x6f\x77','\x45\x38\x6f\x35\x46\x61','\x68\x43\x6f\x71\x61\x38\x6f\x4e\x57\x50\x71\x46\x57\x4f\x53','\x70\x61\x46\x64\x4f\x75\x71','\x57\x4f\x78\x64\x4c\x4a\x64\x63\x52\x53\x6b\x46\x57\x4f\x75\x32\x44\x61','\x65\x48\x6c\x64\x49\x53\x6f\x58\x66\x47','\x6d\x71\x74\x64\x52\x4c\x69\x46','\x57\x37\x44\x49\x7a\x53\x6f\x4c\x78\x38\x6f\x45\x57\x51\x43\x35\x42\x57','\x57\x37\x6c\x63\x48\x33\x57\x65\x57\x35\x4e\x64\x4b\x57\x47'];_0x1a87=function(){return _0x43f147;};return _0x1a87();}function applyFields(_0x2b1e42,_0x94db7,_0x4a0a27){const _0x3aa8ed=_0x5431,_0x4f008e=_0x94db7[_0x3aa8ed(0x18a,'\x4a\x63\x5b\x25')]??{},_0x2431d8={..._0x2b1e42,'\x73\x74\x61\x67\x65':_0x4a0a27,'\x65\x76\x65\x6e\x74\x53\x65\x71\x73':[..._0x2b1e42['\x65\x76\x65\x6e\x74\x53\x65\x71'+'\x73'],_0x94db7[_0x3aa8ed(0x1a2,'\x52\x5a\x34\x45')]]};if(_0x4a0a27==='\x73\x74\x61\x72\x74\x65\x64')_0x2431d8[_0x3aa8ed(0x197,'\x64\x7a\x53\x76')+'\x74']=_0x94db7['\x74\x73'];if(TERMINAL[_0x3aa8ed(0x19f,'\x2a\x7a\x25\x73')](_0x4a0a27))_0x2431d8[_0x3aa8ed(0x1a4,'\x24\x7a\x69\x24')]=_0x94db7['\x74\x73'];_0x4a0a27===_0x3aa8ed(0x192,'\x40\x38\x74\x24')+_0x3aa8ed(0x1d3,'\x21\x31\x24\x45')&&(_0x2431d8[_0x3aa8ed(0x1d5,'\x74\x63\x52\x73')+'\x57\x68\x79']=_0x94db7[_0x3aa8ed(0x1aa,'\x40\x38\x74\x24')][_0x3aa8ed(0x1a6,'\x21\x28\x69\x4f')]??null,_0x2431d8[_0x3aa8ed(0x191,'\x48\x72\x6d\x2a')]=_0x4f008e[_0x3aa8ed(0x183,'\x32\x51\x4d\x40')]??null);if(_0x4a0a27==='\x6d\x75\x74\x61\x74\x69\x6f\x6e'+_0x3aa8ed(0x1cb,'\x33\x49\x26\x79'))_0x2431d8[_0x3aa8ed(0x1a9,'\x65\x69\x38\x45')+'\x49\x64']=_0x4f008e[_0x3aa8ed(0x198,'\x36\x6d\x6f\x52')+'\x49\x64']??null;if(_0x4a0a27===_0x3aa8ed(0x196,'\x47\x6d\x26\x73')+_0x3aa8ed(0x1c4,'\x40\x38\x74\x24')+'\x64')_0x2431d8['\x73\x69\x67\x6e\x61\x6c\x43\x6f'+_0x3aa8ed(0x1d4,'\x25\x33\x66\x28')]=_0x4f008e[_0x3aa8ed(0x187,'\x28\x62\x33\x6f')+_0x3aa8ed(0x1a3,'\x5a\x51\x6f\x5a')]??_0x2b1e42['\x73\x69\x67\x6e\x61\x6c\x43\x6f'+'\x75\x6e\x74'];_0x4a0a27===_0x3aa8ed(0x1b8,'\x37\x46\x26\x54')+'\x65\x64'&&(_0x3aa8ed(0x184,'\x62\x4d\x23\x41')!=='\x5a\x5a\x6d\x68\x61'?_0x3dc600=_0x4672eb(_0x13bcae,_0x245c9e,_0x18f5aa):(_0x2431d8['\x63\x61\x70\x73\x75\x6c\x65\x49'+'\x64']=_0x4f008e[_0x3aa8ed(0x1bb,'\x25\x33\x66\x28')+'\x64']??null,_0x2431d8[_0x3aa8ed(0x182,'\x61\x2a\x6c\x4f')]=_0x4f008e[_0x3aa8ed(0x1c9,'\x64\x68\x79\x4f')]??null));if(_0x4a0a27===_0x3aa8ed(0x180,'\x5d\x37\x74\x45')||_0x4a0a27==='\x61\x62\x6f\x72\x74\x65\x64')_0x2431d8[_0x3aa8ed(0x195,'\x33\x49\x26\x79')]=_0x4f008e[_0x3aa8ed(0x19e,'\x59\x23\x26\x28')]??_0x2b1e42[_0x3aa8ed(0x1bc,'\x4b\x39\x66\x67')];if(_0x4a0a27===_0x3aa8ed(0x18e,'\x36\x6b\x38\x76')&&typeof _0x4f008e[_0x3aa8ed(0x193,'\x24\x7a\x69\x24')+_0x3aa8ed(0x1ab,'\x6f\x68\x73\x39')]===_0x3aa8ed(0x1ca,'\x64\x68\x79\x4f')){if('\x4e\x6b\x6f\x65\x59'===_0x3aa8ed(0x18b,'\x77\x71\x52\x5d')){const _0x155af3=_0x4f008e[_0x3aa8ed(0x1d2,'\x4a\x63\x5b\x25')+_0x3aa8ed(0x18c,'\x74\x62\x6f\x66')];_0x2431d8[_0x3aa8ed(0x190,'\x68\x30\x36\x62')+_0x3aa8ed(0x1b9,'\x24\x7a\x69\x24')]=_0x155af3,_0x2431d8[_0x3aa8ed(0x1cc,'\x28\x32\x69\x74')+_0x3aa8ed(0x1ba,'\x58\x21\x58\x62')+'\x64']=HOST_SUPPRESS_CLASSES[_0x3aa8ed(0x1c7,'\x74\x63\x52\x73')](_0x155af3);}else return{'\x63\x79\x63\x6c\x65\x49\x64':_0x93e651,'\x73\x74\x61\x67\x65':_0x3aa8ed(0x1d8,'\x44\x21\x45\x6f'),'\x73\x74\x61\x72\x74\x65\x64\x41\x74':null,'\x65\x6e\x64\x65\x64\x41\x74':null,'\x64\x65\x63\x69\x73\x69\x6f\x6e\x57\x68\x79':null,'\x67\x65\x6e\x65\x49\x64':null,'\x6d\x75\x74\x61\x74\x69\x6f\x6e\x49\x64':null,'\x63\x61\x70\x73\x75\x6c\x65\x49\x64':null,'\x6f\x75\x74\x63\x6f\x6d\x65':null,'\x66\x61\x69\x6c\x75\x72\x65\x43\x6c\x61\x73\x73':null,'\x66\x61\x69\x6c\x75\x72\x65\x53\x75\x70\x70\x72\x65\x73\x73\x65\x64':![],'\x73\x69\x67\x6e\x61\x6c\x43\x6f\x75\x6e\x74':0x0,'\x65\x76\x65\x6e\x74\x53\x65\x71\x73':[],'\x69\x6c\x6c\x65\x67\x61\x6c\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x73':[]};}return _0x2431d8;}export const cycleTimelineProjector={'\x6e\x61\x6d\x65':_0x23fe78(0x1cf,'\x21\x31\x24\x45')+_0x23fe78(0x188,'\x47\x6d\x26\x73'),'\x69\x6e\x69\x74\x69\x61\x6c':()=>({'\x63\x79\x63\x6c\x65\x73':{},'\x6f\x72\x64\x65\x72':[]}),'\x72\x65\x64\x75\x63\x65':(_0x34d410,_0x5409a8)=>{const _0x51c621=_0x23fe78,_0x5bc86a=_0x5409a8[_0x51c621(0x1ad,'\x2a\x4a\x63\x74')]??{},_0x143e7d=_0x5bc86a[_0x51c621(0x18d,'\x2a\x7a\x25\x73')];if(!_0x143e7d)return _0x34d410;const _0x2063a9=_0x143e7d in _0x34d410['\x63\x79\x63\x6c\x65\x73'],_0x298ec8=_0x34d410[_0x51c621(0x1c3,'\x52\x5a\x34\x45')][_0x143e7d]??newRecord(_0x143e7d),_0x5931b4=stageForEventType(_0x5409a8['\x74\x79\x70\x65']);let _0x458f76;if(_0x5931b4===null)_0x458f76={..._0x298ec8,'\x65\x76\x65\x6e\x74\x53\x65\x71\x73':[..._0x298ec8['\x65\x76\x65\x6e\x74\x53\x65\x71'+'\x73'],_0x5409a8['\x73\x65\x71']]};else!canTransition(_0x298ec8[_0x51c621(0x1d9,'\x37\x46\x26\x54')],_0x5931b4)?_0x458f76={..._0x298ec8,'\x65\x76\x65\x6e\x74\x53\x65\x71\x73':[..._0x298ec8[_0x51c621(0x1b6,'\x65\x69\x38\x45')+'\x73'],_0x5409a8['\x73\x65\x71']],'\x69\x6c\x6c\x65\x67\x61\x6c\x54\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x73':[..._0x298ec8[_0x51c621(0x199,'\x64\x68\x79\x4f')+_0x51c621(0x1d0,'\x4a\x63\x5b\x25')+'\x6e\x73'],{'\x66\x72\x6f\x6d':_0x298ec8[_0x51c621(0x19c,'\x5a\x35\x38\x4f')],'\x65\x76\x65\x6e\x74\x54\x79\x70\x65':_0x5409a8[_0x51c621(0x19d,'\x52\x5a\x34\x45')],'\x73\x65\x71':_0x5409a8['\x73\x65\x71']}]}:_0x51c621(0x1a0,'\x6f\x68\x73\x39')==='\x69\x73\x72\x5a\x4e'?_0x458f76=applyFields(_0x298ec8,_0x5409a8,_0x5931b4):(_0x1d1271[_0x51c621(0x1b1,'\x77\x71\x52\x5d')+'\x64']=_0x3c0092[_0x51c621(0x1bb,'\x25\x33\x66\x28')+'\x64']??null,_0x14a301['\x6f\x75\x74\x63\x6f\x6d\x65']=_0x5a04b6[_0x51c621(0x1bc,'\x4b\x39\x66\x67')]??null);return{'\x63\x79\x63\x6c\x65\x73':{..._0x34d410[_0x51c621(0x1d6,'\x5e\x56\x5e\x4e')],[_0x143e7d]:_0x458f76},'\x6f\x72\x64\x65\x72':_0x2063a9?_0x34d410[_0x51c621(0x1cd,'\x5a\x51\x6f\x5a')]:[..._0x34d410[_0x51c621(0x1b0,'\x64\x7a\x53\x76')],_0x143e7d]};}};export function liveCycles(_0x157c28){const _0xe0173d=_0x23fe78;return _0x157c28[_0xe0173d(0x1c2,'\x58\x21\x58\x62')][_0xe0173d(0x1b7,'\x34\x6c\x7a\x5b')](_0x269834=>_0x157c28[_0xe0173d(0x1c0,'\x5a\x35\x38\x4f')][_0x269834])[_0xe0173d(0x17e,'\x44\x21\x45\x6f')](_0x707b32=>!TERMINAL[_0xe0173d(0x186,'\x62\x4d\x23\x41')](_0x707b32[_0xe0173d(0x1b2,'\x21\x31\x24\x45')]));}export function latestCycles(_0x54a690,_0xc0bc93=-0x6*0x1c+-0x1*-0xd85+-0xcd3){const _0x33dafa=_0x23fe78;return _0x54a690[_0x33dafa(0x1a5,'\x28\x62\x33\x6f')][_0x33dafa(0x1c1,'\x31\x34\x76\x59')](-_0xc0bc93)[_0x33dafa(0x1c5,'\x49\x2a\x4e\x23')](_0x3b64fa=>_0x54a690[_0x33dafa(0x1ae,'\x49\x2a\x4e\x23')][_0x3b64fa]);}export function historicalCycles(_0x32f3a9){const _0x57daa0=_0x23fe78;return _0x32f3a9[_0x57daa0(0x1bf,'\x74\x62\x6f\x66')][_0x57daa0(0x194,'\x47\x6d\x26\x73')](_0x3ad93a=>_0x32f3a9[_0x57daa0(0x17f,'\x21\x31\x24\x45')][_0x3ad93a]);}
|
package/dist/cycle/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './cycleTimeline.js';
|
|
1
|
+
(function(_0x436d32,_0x4e0a0b){var _0x411c7b=_0x1d65,_0x106de5=_0x436d32();while(!![]){try{var _0x5b3c88=parseInt(_0x411c7b(0x136,'\x32\x4b\x58\x64'))/(-0x1*-0xfa3+0x1fa6*0x1+0x59*-0x88)*(-parseInt(_0x411c7b(0x12c,'\x6f\x55\x32\x6f'))/(-0x2ec+0x368*-0x6+0x175e))+-parseInt(_0x411c7b(0x137,'\x34\x71\x61\x6b'))/(0xe*-0xb1+0x107d+-0x122*0x6)*(-parseInt(_0x411c7b(0x128,'\x35\x40\x54\x69'))/(-0x5f3+0xaf6+-0x1*0x4ff))+parseInt(_0x411c7b(0x12e,'\x62\x73\x53\x58'))/(-0xeb1*0x1+0x2*-0x665+0x1b80)*(parseInt(_0x411c7b(0x12a,'\x32\x29\x25\x78'))/(0x1e05+0x1d*-0xd3+-0x618))+-parseInt(_0x411c7b(0x130,'\x25\x38\x48\x4b'))/(0x1*-0x116b+-0xab3+0x5a1*0x5)+-parseInt(_0x411c7b(0x129,'\x54\x56\x5d\x4d'))/(-0x1b*-0x35+0xc2*-0x2+0x73*-0x9)+parseInt(_0x411c7b(0x135,'\x67\x65\x21\x50'))/(-0x20a2+0x5c1*-0x1+0x266c)*(parseInt(_0x411c7b(0x133,'\x32\x29\x25\x78'))/(-0x1*-0xf0d+0x185a+-0x275d))+parseInt(_0x411c7b(0x12b,'\x28\x71\x77\x36'))/(0x1e*0x124+0x1a5*0x16+-0x7*0xa0d);if(_0x5b3c88===_0x4e0a0b)break;else _0x106de5['push'](_0x106de5['shift']());}catch(_0x44a002){_0x106de5['push'](_0x106de5['shift']());}}}(_0x4247,0x35e55+0x3c4b5+-0x3659e));function _0x1d65(_0x5b3c88,_0x44a002){_0x5b3c88=_0x5b3c88-(-0x2*-0x869+0x4bb+-0x1467*0x1);var _0x45ce71=_0x4247();var _0x1002d8=_0x45ce71[_0x5b3c88];if(_0x1d65['\x72\x51\x47\x72\x44\x6e']===undefined){var _0x2a3101=function(_0x161656){var _0x4437d0='\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';var _0x5e0587='',_0x37b051='';for(var _0x284f57=-0xc9*-0x9+-0x3bb+0x3d*-0xe,_0x23b3a0,_0x1280df,_0x59397c=0x81b*-0x1+0x1093*-0x2+0x2941;_0x1280df=_0x161656['\x63\x68\x61\x72\x41\x74'](_0x59397c++);~_0x1280df&&(_0x23b3a0=_0x284f57%(0x93a+0x198f+0x81*-0x45)?_0x23b3a0*(-0xafc+-0x19ca+0x2506)+_0x1280df:_0x1280df,_0x284f57++%(-0x772+0xab5+0x33f*-0x1))?_0x5e0587+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x16d*-0x17+0x73*0x17+0x1*0x1775&_0x23b3a0>>(-(-0x36e+-0x5*0x259+0xf2d)*_0x284f57&-0x1732+0x153c+0x1fc)):0x9d7+-0x1*0xb53+0x17c){_0x1280df=_0x4437d0['\x69\x6e\x64\x65\x78\x4f\x66'](_0x1280df);}for(var _0x3ac2fd=-0x1409+-0x1*0x2bd+0x16c6,_0x2ea01a=_0x5e0587['\x6c\x65\x6e\x67\x74\x68'];_0x3ac2fd<_0x2ea01a;_0x3ac2fd++){_0x37b051+='\x25'+('\x30\x30'+_0x5e0587['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3ac2fd)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1*0x46c+-0x5b9*0x5+0x1841))['\x73\x6c\x69\x63\x65'](-(0xe15+0x1622*0x1+-0x1*0x2435));}return decodeURIComponent(_0x37b051);};var _0x2c3673=function(_0x2502f3,_0xa486b9){var _0x2f1926=[],_0xf1c6b1=0x104e+-0x1da*0xa+0x236*0x1,_0x3093fd,_0xaa8bca='';_0x2502f3=_0x2a3101(_0x2502f3);var _0xa2ca11;for(_0xa2ca11=0x1*0x5e6+0x207*0x1+-0x1*0x7ed;_0xa2ca11<0x11*0xe9+0x1eea+-0x2d63;_0xa2ca11++){_0x2f1926[_0xa2ca11]=_0xa2ca11;}for(_0xa2ca11=-0x1*0x26b9+0x7cc+0xd*0x261;_0xa2ca11<-0x6e3*-0x2+-0x1ad0+-0x1*-0xe0a;_0xa2ca11++){_0xf1c6b1=(_0xf1c6b1+_0x2f1926[_0xa2ca11]+_0xa486b9['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xa2ca11%_0xa486b9['\x6c\x65\x6e\x67\x74\x68']))%(-0x11e5+0x1881+-0x59c),_0x3093fd=_0x2f1926[_0xa2ca11],_0x2f1926[_0xa2ca11]=_0x2f1926[_0xf1c6b1],_0x2f1926[_0xf1c6b1]=_0x3093fd;}_0xa2ca11=0x1a*0x175+-0x2277+-0x23*0x19,_0xf1c6b1=-0x15*0x15a+0x13d7+0x88b;for(var _0x60f958=0x21bb+0x346*0x1+-0x1*0x2501;_0x60f958<_0x2502f3['\x6c\x65\x6e\x67\x74\x68'];_0x60f958++){_0xa2ca11=(_0xa2ca11+(0x475*0x2+0x515*-0x3+0x656))%(0x5c1*-0x1+-0x20f4+0x6b*0x5f),_0xf1c6b1=(_0xf1c6b1+_0x2f1926[_0xa2ca11])%(0x1ce6+-0x785+0x1461*-0x1),_0x3093fd=_0x2f1926[_0xa2ca11],_0x2f1926[_0xa2ca11]=_0x2f1926[_0xf1c6b1],_0x2f1926[_0xf1c6b1]=_0x3093fd,_0xaa8bca+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x2502f3['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x60f958)^_0x2f1926[(_0x2f1926[_0xa2ca11]+_0x2f1926[_0xf1c6b1])%(0x4eb*0x2+-0x1*-0xeb4+0x83*-0x2e)]);}return _0xaa8bca;};_0x1d65['\x4f\x69\x70\x6d\x66\x43']=_0x2c3673,_0x1d65['\x6e\x4e\x43\x48\x58\x6b']={},_0x1d65['\x72\x51\x47\x72\x44\x6e']=!![];}var _0x285ab4=_0x45ce71[-0x2403+0x71*-0x31+0x39a4],_0x499279=_0x5b3c88+_0x285ab4,_0x20212d=_0x1d65['\x6e\x4e\x43\x48\x58\x6b'][_0x499279];return!_0x20212d?(_0x1d65['\x70\x52\x74\x56\x57\x48']===undefined&&(_0x1d65['\x70\x52\x74\x56\x57\x48']=!![]),_0x1002d8=_0x1d65['\x4f\x69\x70\x6d\x66\x43'](_0x1002d8,_0x44a002),_0x1d65['\x6e\x4e\x43\x48\x58\x6b'][_0x499279]=_0x1002d8):_0x1002d8=_0x20212d,_0x1002d8;}export*from'\x2e\x2f\x73\x74\x61\x74\x65\x4d\x61\x63\x68\x69\x6e\x65\x2e\x6a\x73';function _0x4247(){var _0x2879fe=['\x62\x38\x6b\x6c\x57\x35\x6d\x7a\x77\x38\x6b\x78\x57\x51\x31\x61\x57\x35\x54\x73\x72\x38\x6b\x50\x57\x35\x30','\x65\x43\x6f\x57\x6a\x43\x6f\x5a\x78\x43\x6f\x50\x57\x35\x70\x63\x55\x68\x4a\x64\x52\x38\x6b\x54\x73\x48\x47','\x6b\x53\x6f\x46\x44\x43\x6f\x43\x45\x47\x6c\x64\x4f\x6d\x6f\x73\x57\x37\x56\x64\x50\x68\x4b','\x67\x62\x64\x63\x51\x75\x74\x64\x4e\x53\x6f\x64\x57\x36\x46\x63\x48\x71','\x43\x62\x47\x43\x68\x6d\x6f\x58\x79\x43\x6b\x37\x57\x34\x66\x6e\x77\x71\x74\x64\x52\x6d\x6f\x71','\x46\x49\x46\x63\x56\x59\x4a\x63\x4c\x47\x72\x37','\x57\x51\x75\x73\x57\x37\x47\x4f\x57\x51\x5a\x63\x55\x53\x6f\x4b\x57\x50\x54\x67\x57\x36\x37\x63\x4a\x67\x70\x63\x4b\x71','\x68\x48\x79\x64\x6c\x53\x6f\x74\x57\x37\x4b\x35\x79\x57','\x57\x37\x6d\x53\x57\x35\x52\x63\x49\x53\x6f\x39\x65\x68\x5a\x63\x4b\x53\x6b\x72\x57\x50\x65\x4b\x66\x74\x53','\x57\x37\x74\x64\x47\x43\x6f\x57\x57\x52\x4b\x68\x57\x35\x46\x64\x4f\x33\x2f\x64\x49\x38\x6b\x47\x46\x47','\x57\x37\x4c\x49\x57\x50\x6e\x52\x57\x35\x4b\x4f\x57\x35\x5a\x63\x4d\x66\x75','\x44\x72\x4b\x44\x67\x6d\x6f\x57\x7a\x43\x6f\x49\x57\x36\x4c\x49\x42\x73\x70\x64\x47\x57','\x6c\x43\x6f\x43\x6e\x6d\x6b\x6e\x68\x48\x52\x64\x50\x38\x6f\x37','\x57\x51\x68\x64\x52\x43\x6f\x6d\x64\x33\x64\x63\x51\x6d\x6f\x38\x6c\x77\x68\x64\x56\x38\x6b\x68\x57\x50\x47','\x57\x51\x2f\x64\x47\x53\x6f\x4c\x57\x50\x69\x42\x76\x53\x6f\x55\x57\x34\x31\x4b\x57\x36\x50\x43\x72\x61','\x57\x37\x69\x54\x57\x35\x6c\x63\x48\x53\x6f\x36\x66\x4a\x46\x63\x50\x6d\x6b\x63\x57\x51\x79\x6d\x67\x57','\x67\x62\x31\x61\x6d\x38\x6f\x6b\x57\x36\x6d\x47\x73\x30\x69','\x6f\x58\x5a\x64\x55\x5a\x44\x4d\x62\x72\x34','\x66\x63\x37\x64\x4c\x72\x33\x64\x4b\x6d\x6b\x52\x66\x38\x6b\x72\x57\x35\x31\x2b','\x79\x66\x70\x64\x4f\x31\x4f\x6c\x57\x36\x56\x64\x4f\x43\x6b\x6f','\x43\x59\x48\x79\x57\x36\x7a\x31\x57\x51\x46\x64\x4d\x72\x53\x64\x76\x68\x42\x63\x56\x78\x6d'];_0x4247=function(){return _0x2879fe;};return _0x4247();}export*from'\x2e\x2f\x63\x79\x63\x6c\x65\x54\x69\x6d\x65\x6c\x69\x6e\x65\x2e\x6a\x73';
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
export const TERMINAL = new Set(['solidified', 'failed', 'aborted']);
|
|
2
|
-
const ALLOWED = {
|
|
3
|
-
none: ['started'],
|
|
4
|
-
started: ['signals_collected', 'gene_selected', 'failed', 'aborted'],
|
|
5
|
-
signals_collected: ['gene_selected', 'failed', 'aborted'],
|
|
6
|
-
gene_selected: ['mutation_built', 'solidified', 'failed', 'aborted'],
|
|
7
|
-
mutation_built: ['solidified', 'failed', 'aborted'],
|
|
8
|
-
solidified: [], failed: [], aborted: [],
|
|
9
|
-
};
|
|
10
|
-
/** 事件类型 → 它把 cycle 推进到的 stage (非 stage 事件返回 null). */
|
|
11
|
-
export function stageForEventType(type) {
|
|
12
|
-
switch (type) {
|
|
13
|
-
case 'cycle.started': return 'started';
|
|
14
|
-
case 'cycle.signals_collected': return 'signals_collected';
|
|
15
|
-
case 'decision.gene_selected': return 'gene_selected';
|
|
16
|
-
case 'mutation.built': return 'mutation_built';
|
|
17
|
-
case 'cycle.solidified': return 'solidified';
|
|
18
|
-
case 'cycle.failed': return 'failed';
|
|
19
|
-
case 'cycle.aborted': return 'aborted';
|
|
20
|
-
default: return null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export function canTransition(from, to) {
|
|
24
|
-
return ALLOWED[from].includes(to);
|
|
25
|
-
}
|
|
1
|
+
function _0x1dca(_0x34c6f6,_0xef48d8){_0x34c6f6=_0x34c6f6-(-0xa*-0x106+-0x1b76+0x11aa);const _0x31b254=_0x4e57();let _0x2c45a8=_0x31b254[_0x34c6f6];if(_0x1dca['\x57\x75\x45\x72\x7a\x53']===undefined){var _0x403447=function(_0x27fbfc){const _0x357337='\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 _0x3a5805='',_0x32907f='';for(let _0x5d26e9=0x163f+0x25e3*-0x1+0xfa4,_0x1f117a,_0x47423f,_0x415eeb=-0x2d*0xa7+0x1e2+-0x1b79*-0x1;_0x47423f=_0x27fbfc['\x63\x68\x61\x72\x41\x74'](_0x415eeb++);~_0x47423f&&(_0x1f117a=_0x5d26e9%(0x1*-0x2329+0x20be+0x59*0x7)?_0x1f117a*(0x76a*0x1+-0x2c8*0xb+0x2*0xbb7)+_0x47423f:_0x47423f,_0x5d26e9++%(0x10dc+0x19d4+-0x4*0xaab))?_0x3a5805+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x21b3+0x1*0xc6d+0x1645&_0x1f117a>>(-(0x11f4+0x78e*0x1+-0x10*0x198)*_0x5d26e9&0x8a5+-0x104b+-0x1eb*-0x4)):-0x37*0x6b+-0x1*0x1b71+-0x50b*-0xa){_0x47423f=_0x357337['\x69\x6e\x64\x65\x78\x4f\x66'](_0x47423f);}for(let _0x13683d=-0x1ba7+-0x1243+0x2dea,_0x29cef5=_0x3a5805['\x6c\x65\x6e\x67\x74\x68'];_0x13683d<_0x29cef5;_0x13683d++){_0x32907f+='\x25'+('\x30\x30'+_0x3a5805['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x13683d)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x13*0x1f5+-0x13f*-0x11+0x36e*-0x11))['\x73\x6c\x69\x63\x65'](-(-0x3d*0x9e+-0x12a*0x1e+0x4894));}return decodeURIComponent(_0x32907f);};const _0x50a62a=function(_0x1e17da,_0x208212){let _0x57cde0=[],_0x529bd5=-0x3c1*-0x1+0x1*0x7b2+-0x3*0x3d1,_0x369976,_0x3370b8='';_0x1e17da=_0x403447(_0x1e17da);let _0x3c5a06;for(_0x3c5a06=0x3*0xa03+-0x18*0x19e+0x8c7;_0x3c5a06<-0x1485+0x639+-0x59*-0x2c;_0x3c5a06++){_0x57cde0[_0x3c5a06]=_0x3c5a06;}for(_0x3c5a06=-0x1bae+0xcbe+0x4*0x3bc;_0x3c5a06<0x76d+0x245a+-0x2ac7;_0x3c5a06++){_0x529bd5=(_0x529bd5+_0x57cde0[_0x3c5a06]+_0x208212['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3c5a06%_0x208212['\x6c\x65\x6e\x67\x74\x68']))%(0x32*0x1+0x2b*0x92+-0x17b8),_0x369976=_0x57cde0[_0x3c5a06],_0x57cde0[_0x3c5a06]=_0x57cde0[_0x529bd5],_0x57cde0[_0x529bd5]=_0x369976;}_0x3c5a06=-0x6*0x4f1+0xaca*-0x3+0xa56*0x6,_0x529bd5=0x15db+0x1c1*0x11+0x19d6*-0x2;for(let _0xda75a5=-0x284+-0x226+-0x255*-0x2;_0xda75a5<_0x1e17da['\x6c\x65\x6e\x67\x74\x68'];_0xda75a5++){_0x3c5a06=(_0x3c5a06+(0x1f8a+-0xe5e+-0x125*0xf))%(-0x2*0x122c+0x748+0x250*0xd),_0x529bd5=(_0x529bd5+_0x57cde0[_0x3c5a06])%(0x2f+0x1238+0x9*-0x1ef),_0x369976=_0x57cde0[_0x3c5a06],_0x57cde0[_0x3c5a06]=_0x57cde0[_0x529bd5],_0x57cde0[_0x529bd5]=_0x369976,_0x3370b8+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x1e17da['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xda75a5)^_0x57cde0[(_0x57cde0[_0x3c5a06]+_0x57cde0[_0x529bd5])%(-0x1eb*-0x6+-0x1*0x257+0x1*-0x82b)]);}return _0x3370b8;};_0x1dca['\x4a\x48\x46\x62\x6a\x67']=_0x50a62a,_0x1dca['\x59\x56\x50\x55\x44\x77']={},_0x1dca['\x57\x75\x45\x72\x7a\x53']=!![];}const _0x348933=_0x31b254[-0x1*-0x1cc7+0x23b2+-0x5*0xce5],_0x4d11d2=_0x34c6f6+_0x348933,_0x5c5923=_0x1dca['\x59\x56\x50\x55\x44\x77'][_0x4d11d2];return!_0x5c5923?(_0x1dca['\x77\x6f\x55\x68\x65\x55']===undefined&&(_0x1dca['\x77\x6f\x55\x68\x65\x55']=!![]),_0x2c45a8=_0x1dca['\x4a\x48\x46\x62\x6a\x67'](_0x2c45a8,_0xef48d8),_0x1dca['\x59\x56\x50\x55\x44\x77'][_0x4d11d2]=_0x2c45a8):_0x2c45a8=_0x5c5923,_0x2c45a8;}const _0x3afd0a=_0x1dca;(function(_0x208212,_0x57cde0){const _0x1abaf4=_0x1dca,_0x529bd5=_0x208212();while(!![]){try{const _0x369976=parseInt(_0x1abaf4(0x94,'\x72\x5d\x6b\x31'))/(0x13b3*0x1+0x7d4+-0x1b86)*(parseInt(_0x1abaf4(0xa7,'\x77\x42\x69\x21'))/(0x69*-0x2+0x2*0x19+-0x12*-0x9))+-parseInt(_0x1abaf4(0xa6,'\x38\x6f\x51\x26'))/(-0x6*0x4f1+0xaca*-0x3+0x3e07*0x1)*(parseInt(_0x1abaf4(0x9e,'\x5d\x49\x48\x63'))/(0x15db+0x1c1*0x11+0x1c8*-0x1d))+parseInt(_0x1abaf4(0x81,'\x24\x31\x4f\x62'))/(-0x284+-0x226+-0x4af*-0x1)*(parseInt(_0x1abaf4(0x87,'\x31\x4e\x47\x58'))/(0x1f8a+-0xe5e+-0x1b7*0xa))+parseInt(_0x1abaf4(0x88,'\x76\x4a\x78\x28'))/(-0x2*0x122c+0x748+0x1d17*0x1)*(parseInt(_0x1abaf4(0x90,'\x44\x65\x24\x4a'))/(0x2f+0x1238+0x1*-0x125f))+parseInt(_0x1abaf4(0x9c,'\x58\x5e\x61\x25'))/(-0x1eb*-0x6+-0x1*0x257+0x1*-0x922)+-parseInt(_0x1abaf4(0xa0,'\x32\x53\x25\x63'))/(-0x1*-0x1cc7+0x23b2+-0x5*0xce3)+-parseInt(_0x1abaf4(0x71,'\x76\x4a\x78\x28'))/(-0x42b*-0x1+0x1*-0x1ad2+0xb59*0x2)*(-parseInt(_0x1abaf4(0x7b,'\x6a\x36\x46\x5b'))/(0x1*0x1b01+-0x2506*0x1+0xa11));if(_0x369976===_0x57cde0)break;else _0x529bd5['push'](_0x529bd5['shift']());}catch(_0x3370b8){_0x529bd5['push'](_0x529bd5['shift']());}}}(_0x4e57,-0x158a2c+0x8cf34+0x189b75));export const TERMINAL=new Set(['\x73\x6f\x6c\x69\x64\x69\x66\x69'+'\x65\x64',_0x3afd0a(0x80,'\x52\x77\x74\x52'),_0x3afd0a(0xab,'\x62\x6e\x4f\x64')]);const ALLOWED={'\x6e\x6f\x6e\x65':['\x73\x74\x61\x72\x74\x65\x64'],'\x73\x74\x61\x72\x74\x65\x64':[_0x3afd0a(0x7e,'\x76\x4a\x78\x28')+_0x3afd0a(0xa2,'\x30\x40\x58\x41')+'\x64',_0x3afd0a(0x9d,'\x58\x5e\x61\x25')+_0x3afd0a(0xa4,'\x49\x47\x78\x56'),_0x3afd0a(0x99,'\x74\x68\x6f\x25'),_0x3afd0a(0x97,'\x62\x42\x6c\x69')],'\x73\x69\x67\x6e\x61\x6c\x73\x5f\x63\x6f\x6c\x6c\x65\x63\x74\x65\x64':[_0x3afd0a(0x85,'\x6a\x36\x46\x5b')+_0x3afd0a(0x70,'\x4c\x33\x24\x42'),'\x66\x61\x69\x6c\x65\x64',_0x3afd0a(0x9b,'\x5d\x49\x48\x63')],'\x67\x65\x6e\x65\x5f\x73\x65\x6c\x65\x63\x74\x65\x64':['\x6d\x75\x74\x61\x74\x69\x6f\x6e'+_0x3afd0a(0x84,'\x46\x71\x55\x24'),_0x3afd0a(0x93,'\x31\x59\x5d\x72')+'\x65\x64',_0x3afd0a(0x9a,'\x5d\x49\x48\x63'),_0x3afd0a(0x8f,'\x5e\x63\x30\x52')],'\x6d\x75\x74\x61\x74\x69\x6f\x6e\x5f\x62\x75\x69\x6c\x74':[_0x3afd0a(0xa8,'\x46\x71\x55\x24')+'\x65\x64','\x66\x61\x69\x6c\x65\x64','\x61\x62\x6f\x72\x74\x65\x64'],'\x73\x6f\x6c\x69\x64\x69\x66\x69\x65\x64':[],'\x66\x61\x69\x6c\x65\x64':[],'\x61\x62\x6f\x72\x74\x65\x64':[]};function _0x4e57(){const _0x4df080=['\x66\x4d\x4e\x63\x55\x77\x4c\x78','\x57\x51\x70\x64\x55\x53\x6f\x57\x57\x50\x64\x64\x4c\x57\x44\x6b\x73\x63\x52\x64\x4e\x67\x58\x32','\x67\x6d\x6b\x58\x42\x31\x35\x54\x6a\x4d\x74\x64\x54\x38\x6b\x6f\x57\x36\x6d\x69','\x41\x63\x74\x63\x4c\x63\x71\x4b\x57\x35\x74\x64\x52\x6d\x6f\x45','\x57\x51\x78\x63\x4c\x38\x6b\x31\x68\x4e\x2f\x64\x48\x53\x6b\x33\x57\x34\x6d','\x64\x43\x6f\x48\x57\x51\x4b\x32\x78\x58\x44\x2b','\x57\x50\x57\x75\x57\x4f\x37\x64\x4d\x53\x6b\x47\x57\x34\x4b\x38\x57\x36\x6d','\x57\x51\x42\x63\x4d\x6d\x6b\x6a\x57\x37\x57\x54','\x57\x50\x76\x5a\x63\x30\x4b\x33\x57\x36\x56\x63\x4b\x67\x71','\x61\x6d\x6b\x35\x57\x52\x34\x2f\x57\x36\x79\x39\x78\x57','\x57\x52\x48\x50\x62\x43\x6b\x2b\x57\x36\x52\x63\x49\x6d\x6f\x6e\x6f\x38\x6b\x56','\x57\x50\x37\x63\x4c\x53\x6f\x32\x57\x50\x46\x64\x49\x67\x4b\x5a\x78\x61','\x57\x34\x69\x78\x57\x36\x44\x4e\x57\x35\x6c\x64\x51\x59\x4f\x2f\x64\x6d\x6f\x4c\x6a\x38\x6f\x55','\x57\x51\x72\x36\x73\x61\x48\x6b\x65\x4a\x30\x44','\x6e\x4d\x6c\x64\x4c\x68\x62\x50\x57\x35\x4e\x64\x49\x53\x6f\x75\x43\x5a\x43\x56','\x57\x34\x6d\x42\x6b\x6d\x6b\x74\x57\x35\x66\x4a\x6b\x48\x37\x64\x53\x53\x6b\x79\x6b\x57','\x57\x36\x50\x68\x57\x4f\x56\x63\x54\x64\x79\x33\x57\x51\x61','\x57\x4f\x4a\x64\x49\x30\x6c\x63\x55\x61\x56\x63\x49\x43\x6f\x30','\x57\x50\x6a\x6e\x43\x6d\x6f\x69\x57\x50\x50\x56\x69\x73\x75','\x57\x37\x70\x64\x49\x38\x6f\x76\x71\x77\x4f\x4a','\x57\x50\x76\x61\x57\x52\x57\x5a\x57\x4f\x42\x63\x56\x61','\x57\x50\x6a\x64\x57\x52\x4f\x54\x57\x50\x46\x63\x56\x74\x4f','\x57\x34\x71\x38\x78\x72\x58\x49\x57\x37\x78\x64\x4c\x4b\x56\x63\x50\x58\x37\x63\x4e\x63\x69\x6a','\x57\x50\x66\x56\x62\x4b\x61\x6e\x57\x52\x42\x63\x48\x4d\x65','\x57\x34\x43\x72\x57\x52\x38\x30\x57\x4f\x56\x63\x49\x73\x34\x32','\x57\x35\x65\x6b\x57\x4f\x4a\x64\x4d\x6d\x6b\x47\x57\x52\x47\x38\x57\x36\x4b','\x57\x52\x35\x46\x57\x52\x6d\x71\x61\x47\x75\x50\x62\x31\x6e\x63\x57\x50\x4b\x46\x57\x37\x50\x43','\x57\x37\x2f\x63\x54\x38\x6b\x38\x57\x34\x4e\x63\x4d\x31\x48\x69\x76\x57','\x57\x34\x57\x79\x57\x50\x74\x64\x48\x33\x4b\x32\x7a\x47\x65','\x62\x53\x6f\x4f\x57\x51\x69\x57\x44\x61\x66\x2f\x57\x50\x4b','\x57\x50\x4f\x6f\x57\x50\x4e\x64\x4b\x38\x6b\x48','\x57\x34\x71\x42\x6b\x43\x6b\x43\x57\x35\x65\x67\x6c\x5a\x56\x64\x55\x43\x6b\x32\x62\x38\x6f\x42','\x6f\x6d\x6b\x32\x57\x37\x62\x41\x71\x43\x6f\x67\x57\x37\x76\x2b\x57\x52\x6c\x64\x49\x77\x71\x5a','\x45\x43\x6f\x53\x6e\x6d\x6f\x58\x66\x53\x6f\x30\x57\x37\x47','\x6a\x68\x71\x4f\x57\x36\x65\x47\x57\x37\x53\x49\x57\x36\x47','\x71\x75\x42\x63\x49\x33\x58\x49\x77\x6d\x6b\x53','\x57\x50\x4b\x68\x6e\x38\x6f\x32\x72\x58\x52\x63\x53\x33\x79','\x57\x51\x46\x63\x4a\x6d\x6b\x35\x61\x67\x37\x63\x4a\x43\x6b\x31','\x6f\x33\x31\x4c\x57\x50\x30\x74\x57\x4f\x46\x64\x4c\x68\x53\x73','\x6e\x58\x69\x4f\x6e\x53\x6b\x46','\x68\x38\x6b\x34\x6a\x72\x47\x34\x6d\x67\x37\x64\x48\x57','\x57\x37\x39\x33\x74\x74\x78\x64\x56\x30\x56\x64\x48\x57','\x64\x53\x6f\x64\x75\x53\x6b\x76\x57\x4f\x50\x2b\x71\x38\x6b\x61','\x41\x38\x6b\x70\x57\x50\x56\x64\x50\x4a\x30\x77\x57\x37\x61\x78','\x57\x36\x79\x4e\x66\x76\x47\x46\x74\x77\x35\x65\x57\x34\x4e\x64\x4f\x4b\x70\x64\x4d\x66\x43\x77','\x57\x51\x5a\x63\x4e\x76\x46\x64\x4d\x6d\x6f\x4b\x6a\x4b\x47\x67','\x74\x77\x44\x37\x57\x52\x5a\x64\x4c\x4d\x53','\x42\x53\x6b\x62\x57\x50\x37\x64\x50\x4a\x30\x72','\x57\x36\x75\x4e\x79\x71\x64\x63\x53\x77\x58\x41\x57\x52\x72\x70\x42\x73\x68\x64\x51\x6d\x6b\x71','\x43\x6d\x6f\x79\x57\x52\x35\x34\x6d\x6d\x6f\x45\x72\x32\x74\x63\x50\x61\x6e\x77','\x57\x36\x64\x63\x52\x59\x39\x69\x70\x38\x6b\x37\x57\x52\x44\x76\x41\x6d\x6f\x46\x78\x43\x6f\x39\x57\x34\x30','\x57\x37\x42\x63\x50\x38\x6b\x52\x57\x34\x68\x63\x4e\x66\x48\x69\x76\x57','\x57\x37\x52\x64\x4d\x6d\x6f\x69\x73\x67\x53','\x78\x43\x6f\x47\x6d\x71\x43\x30\x67\x78\x2f\x64\x56\x61','\x57\x34\x5a\x64\x4e\x53\x6f\x4d\x57\x4f\x52\x64\x47\x61\x69\x57\x77\x47','\x66\x77\x56\x63\x50\x67\x62\x77\x7a\x61','\x57\x36\x69\x55\x79\x75\x46\x64\x4a\x5a\x43\x61\x57\x50\x48\x6e','\x6f\x38\x6b\x32\x57\x37\x44\x42\x71\x6d\x6f\x66\x57\x52\x72\x2b\x57\x50\x42\x64\x4a\x4c\x75\x5a\x73\x57','\x57\x51\x68\x63\x4f\x53\x6b\x2b\x64\x4b\x6c\x63\x51\x30\x30\x31\x70\x57','\x63\x68\x4b\x58\x57\x36\x65\x4f\x57\x36\x79','\x57\x52\x68\x64\x53\x4e\x71\x44\x75\x53\x6f\x35\x57\x36\x62\x37'];_0x4e57=function(){return _0x4df080;};return _0x4e57();}export function stageForEventType(_0x3ca5ad){const _0x157320=_0x3afd0a;switch(_0x3ca5ad){case _0x157320(0x73,'\x29\x4d\x62\x21')+_0x157320(0x8d,'\x38\x24\x4f\x63'):return _0x157320(0x72,'\x6e\x4c\x49\x78');case _0x157320(0x8e,'\x58\x5e\x61\x25')+_0x157320(0x98,'\x6e\x65\x51\x6e')+_0x157320(0x8b,'\x79\x47\x4a\x4b'):return _0x157320(0xaa,'\x34\x70\x7a\x26')+_0x157320(0x74,'\x29\x59\x6c\x73')+'\x64';case _0x157320(0x7c,'\x31\x4e\x47\x58')+_0x157320(0x9f,'\x49\x47\x78\x56')+'\x6c\x65\x63\x74\x65\x64':return _0x157320(0xa3,'\x79\x47\x4a\x4b')+_0x157320(0x86,'\x52\x77\x74\x52');case _0x157320(0x89,'\x72\x5d\x6b\x31')+'\x2e\x62\x75\x69\x6c\x74':return _0x157320(0xa1,'\x31\x4e\x47\x58')+_0x157320(0x77,'\x33\x61\x43\x25');case _0x157320(0x8c,'\x49\x47\x78\x56')+_0x157320(0x76,'\x5a\x5b\x26\x79'):return _0x157320(0x93,'\x31\x59\x5d\x72')+'\x65\x64';case _0x157320(0x8a,'\x62\x6e\x4f\x64')+'\x69\x6c\x65\x64':return _0x157320(0x78,'\x29\x59\x6c\x73');case _0x157320(0x91,'\x23\x71\x4e\x55')+_0x157320(0x7d,'\x74\x68\x6f\x25'):return _0x157320(0x96,'\x78\x34\x23\x69');default:return null;}}export function canTransition(_0x4c6933,_0x57a617){return ALLOWED[_0x4c6933]['\x69\x6e\x63\x6c\x75\x64\x65\x73'](_0x57a617);}
|
|
@@ -61,5 +61,7 @@ export declare function rootEventArchiveSegmentName(firstSeq: number, lastSeq: n
|
|
|
61
61
|
export declare function planRootEventArchive(opts: RootEventArchiveOptions): RootEventArchivePlan;
|
|
62
62
|
export declare function archiveRootEvents(opts: RootEventArchiveOptions): RootEventArchiveResult;
|
|
63
63
|
export declare function readRootEventHistory(path: string, archiveDir?: string): RootEvent[];
|
|
64
|
+
/** Strict replay for control-plane decisions that must fail closed on partial or conflicting history. */
|
|
65
|
+
export declare function readRootEventHistoryStrict(path: string): RootEvent[];
|
|
64
66
|
export declare function validateRootEventHistory(path: string): void;
|
|
65
67
|
export declare function inspectRootEventArchive(path: string): RootEventArchiveStats;
|
|
@@ -131,6 +131,9 @@ export function archiveRootEvents(opts) {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
export function readRootEventHistory(path, archiveDir = rootEventArchiveDir(path)) {
|
|
134
|
+
// Snapshot active first. Writers publish archive segments before replacing active, so this prevents a reader
|
|
135
|
+
// from combining an old archive inventory with the new active tail and temporarily dropping the rotated prefix.
|
|
136
|
+
const active = readEventsLenient(path);
|
|
134
137
|
const bySeq = new Map();
|
|
135
138
|
for (const file of archiveSegmentFiles(archiveDir)) {
|
|
136
139
|
for (const event of readEventsLenient(join(archiveDir, file))) {
|
|
@@ -143,13 +146,20 @@ export function readRootEventHistory(path, archiveDir = rootEventArchiveDir(path
|
|
|
143
146
|
}
|
|
144
147
|
// Preserve the pre-archive fail-soft behavior for routine commands. The active log is the current writer
|
|
145
148
|
// source, so it deterministically wins an active/archive conflict without crashing status/report readers.
|
|
146
|
-
for (const event of
|
|
149
|
+
for (const event of active)
|
|
147
150
|
bySeq.set(event.seq, event);
|
|
148
151
|
return [...bySeq.values()].sort((a, b) => a.seq - b.seq);
|
|
149
152
|
}
|
|
150
|
-
|
|
153
|
+
/** Strict replay for control-plane decisions that must fail closed on partial or conflicting history. */
|
|
154
|
+
export function readRootEventHistoryStrict(path) {
|
|
151
155
|
const active = readActiveStrict(path);
|
|
152
|
-
readValidatedArchive(path, active);
|
|
156
|
+
const bySeq = readValidatedArchive(path, active);
|
|
157
|
+
for (const line of active)
|
|
158
|
+
bySeq.set(line.event.seq, line.event);
|
|
159
|
+
return [...bySeq.values()].sort((left, right) => left.seq - right.seq);
|
|
160
|
+
}
|
|
161
|
+
export function validateRootEventHistory(path) {
|
|
162
|
+
void readRootEventHistoryStrict(path);
|
|
153
163
|
}
|
|
154
164
|
export function inspectRootEventArchive(path) {
|
|
155
165
|
const archiveDir = rootEventArchiveDir(path);
|
|
@@ -81,6 +81,11 @@ export declare const rootEvent: z.ZodObject<{
|
|
|
81
81
|
}>>;
|
|
82
82
|
}, "strip", z.ZodTypeAny, {
|
|
83
83
|
type: string;
|
|
84
|
+
actor: {
|
|
85
|
+
kind: "machine" | "human";
|
|
86
|
+
id?: string | undefined;
|
|
87
|
+
};
|
|
88
|
+
schemaVersion: string;
|
|
84
89
|
ts: string;
|
|
85
90
|
human: {
|
|
86
91
|
severity: "warn" | "info" | "notice" | "error";
|
|
@@ -92,12 +97,7 @@ export declare const rootEvent: z.ZodObject<{
|
|
|
92
97
|
};
|
|
93
98
|
seq: number;
|
|
94
99
|
eventId: string;
|
|
95
|
-
schemaVersion: string;
|
|
96
100
|
replayability: "deterministic" | "stochastic_recorded" | "stochastic_unreproducible";
|
|
97
|
-
actor: {
|
|
98
|
-
kind: "machine" | "human";
|
|
99
|
-
id?: string | undefined;
|
|
100
|
-
};
|
|
101
101
|
payload?: unknown;
|
|
102
102
|
}, {
|
|
103
103
|
type: string;
|
|
@@ -113,12 +113,12 @@ export declare const rootEvent: z.ZodObject<{
|
|
|
113
113
|
seq: number;
|
|
114
114
|
eventId: string;
|
|
115
115
|
payload?: unknown;
|
|
116
|
-
schemaVersion?: string | undefined;
|
|
117
|
-
replayability?: "deterministic" | "stochastic_recorded" | "stochastic_unreproducible" | undefined;
|
|
118
116
|
actor?: {
|
|
119
117
|
kind?: "machine" | "human" | undefined;
|
|
120
118
|
id?: string | undefined;
|
|
121
119
|
} | undefined;
|
|
120
|
+
schemaVersion?: string | undefined;
|
|
121
|
+
replayability?: "deterministic" | "stochastic_recorded" | "stochastic_unreproducible" | undefined;
|
|
122
122
|
}>;
|
|
123
123
|
export type RootEvent = z.infer<typeof rootEvent>;
|
|
124
124
|
/** append 入参: seq/eventId/ts 由 store 生成. */
|
|
@@ -22,6 +22,8 @@ export declare class EventStore {
|
|
|
22
22
|
private appendLocked;
|
|
23
23
|
/** 读全部事件 (跳过尾部半行/损坏行). */
|
|
24
24
|
readAll(): RootEvent[];
|
|
25
|
+
/** Fail-closed replay for decision policies that cannot safely consume a partial history. */
|
|
26
|
+
readAllStrict(): RootEvent[];
|
|
25
27
|
iterate(fromSeq?: number): Generator<RootEvent>;
|
|
26
28
|
tail(n?: number): RootEvent[];
|
|
27
29
|
/** 截断尾部半行 (崩溃恢复). */
|
|
@@ -2,7 +2,7 @@ import { openSync, writeSync, fsyncSync, closeSync, statSync, readSync, mkdirSyn
|
|
|
2
2
|
import { dirname } from 'node:path';
|
|
3
3
|
import { monotonicFactory } from 'ulid';
|
|
4
4
|
import { acquireLock, releaseLock } from '../util/fileLock.js';
|
|
5
|
-
import { readRootEventHistory } from './eventArchive.js';
|
|
5
|
+
import { readRootEventHistory, readRootEventHistoryStrict } from './eventArchive.js';
|
|
6
6
|
// Monotonic ULIDs: plain ulid() randomizes the low 80 bits, so two ids minted in the SAME millisecond can sort
|
|
7
7
|
// out of order — the event log wants time-sortable eventIds (and a flaky CI test proved it). The monotonic
|
|
8
8
|
// factory increments within a millisecond, guaranteeing each successive eventId is strictly greater.
|
|
@@ -76,6 +76,10 @@ export class EventStore {
|
|
|
76
76
|
readAll() {
|
|
77
77
|
return readRootEventHistory(this.path);
|
|
78
78
|
}
|
|
79
|
+
/** Fail-closed replay for decision policies that cannot safely consume a partial history. */
|
|
80
|
+
readAllStrict() {
|
|
81
|
+
return readRootEventHistoryStrict(this.path);
|
|
82
|
+
}
|
|
79
83
|
*iterate(fromSeq = 0) {
|
|
80
84
|
for (const e of this.readAll())
|
|
81
85
|
if (e.seq >= fromSeq)
|
package/dist/events/ingest.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare class Ingestor {
|
|
|
25
25
|
constructor(opts: IngestorOptions);
|
|
26
26
|
ingest(raw: RawEvent): Promise<RootEvent>;
|
|
27
27
|
readAll(): RootEvent[];
|
|
28
|
+
readAllStrict(): RootEvent[];
|
|
28
29
|
iterate(fromSeq?: number): Generator<RootEvent>;
|
|
29
30
|
tail(n?: number): RootEvent[];
|
|
30
31
|
recover(): {
|
package/dist/events/ingest.js
CHANGED
|
@@ -63,6 +63,7 @@ export class Ingestor {
|
|
|
63
63
|
}
|
|
64
64
|
// 读 passthrough (写只能经 ingest)
|
|
65
65
|
readAll() { return this.store.readAll(); }
|
|
66
|
+
readAllStrict() { return this.store.readAllStrict(); }
|
|
66
67
|
iterate(fromSeq = 0) { return this.store.iterate(fromSeq); }
|
|
67
68
|
tail(n = 1) { return this.store.tail(n); }
|
|
68
69
|
recover() { return this.store.recover(); }
|
package/dist/events/paths.d.ts
CHANGED
|
@@ -19,4 +19,6 @@ export declare function tracesDir(env?: Readonly<Record<string, string | undefin
|
|
|
19
19
|
* reads it. Defaults to the evomap home root, beside assets/ + evolution/.
|
|
20
20
|
* NOTE(reuse/#234): confirm this matches where the proxy/RecallHistory reads — best-effort append, so a path
|
|
21
21
|
* mismatch degrades the audit line, never the reuse write itself. */
|
|
22
|
-
export declare function assetCallLogPath(env?: Readonly<Record<string, string | undefined>>): string;
|
|
22
|
+
export declare function assetCallLogPath(env?: Readonly<Record<string, string | undefined>>): string;
|
|
23
|
+
/** Learning Ops local output dir: per-run LearningPacket drafts + trace-event JSONL (hub upload is a later slice). */
|
|
24
|
+
export declare function learningTraceDir(env?: Readonly<Record<string, string | undefined>>): string;
|
package/dist/events/paths.js
CHANGED
|
@@ -41,4 +41,8 @@ export function tracesDir(env = process.env) {
|
|
|
41
41
|
* mismatch degrades the audit line, never the reuse write itself. */
|
|
42
42
|
export function assetCallLogPath(env = process.env) {
|
|
43
43
|
return join(evomapHome(env), 'asset_call_log.jsonl');
|
|
44
|
+
}
|
|
45
|
+
/** Learning Ops local output dir: per-run LearningPacket drafts + trace-event JSONL (hub upload is a later slice). */
|
|
46
|
+
export function learningTraceDir(env = process.env) {
|
|
47
|
+
return env['EVOLVER_LEARNING_TRACE_DIR'] ?? join(evomapHome(env), 'evolution', 'learning-trace');
|
|
44
48
|
}
|
package/dist/events/public.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export type { EventCountsMV } from './projectors.js';
|
|
|
7
7
|
export { LineTooLargeError, MAX_LINE_BYTES } from './eventStore.js';
|
|
8
8
|
export { ArchiveSegmentConflictError, InvalidRootEventArchiveError, InvalidRootEventLogError, RootEventHistoryGapError, archiveRootEvents, inspectRootEventArchive, planRootEventArchive, readRootEventHistory, rootEventArchiveDir, rootEventArchiveSegmentName, validateRootEventHistory, ROOT_EVENT_ARCHIVE_DEFAULT_KEEP_EVENTS, } from './eventArchive.js';
|
|
9
9
|
export type { RootEventArchiveOptions, RootEventArchivePlan, RootEventArchiveResult, RootEventArchiveStats, } from './eventArchive.js';
|
|
10
|
-
export { rootEventsPath, evomapHome, mvDir, personalityStatePath, assetsDir, materialDir, materialStorePath, materialWatermarkPath, tracesDir, assetCallLogPath } from './paths.js';
|
|
10
|
+
export { rootEventsPath, evomapHome, mvDir, personalityStatePath, assetsDir, materialDir, materialStorePath, materialWatermarkPath, tracesDir, assetCallLogPath, learningTraceDir } from './paths.js';
|
|
11
11
|
export { EVENT_SCHEMA_VERSION } from './eventSchema.js';
|
|
12
12
|
export type { RootEvent, RawEvent, HumanNarrative, Actor, Replayability } from './eventSchema.js';
|
|
13
|
-
export { readEvents, statusReport, listCycles, showCycle, listTriggers, dailySummary, buildNarrativeSnapshot, NARRATIVE_DEFAULT_LIMIT, NARRATIVE_MAX_LIMIT, } from './reports.js';
|
|
13
|
+
export { readEvents, statusReport, listCycles, showCycle, listTriggers, dailySummary, dailyCapsuleCount, buildNarrativeSnapshot, NARRATIVE_DEFAULT_LIMIT, NARRATIVE_MAX_LIMIT, } from './reports.js';
|
|
14
14
|
export { buildRetentionReport, defaultMaterialCursorPath, defaultMaterialCursorPaths, RETENTION_DEFAULT_MAX_MATERIAL_BYTES, RETENTION_DEFAULT_MAX_MATERIAL_RECORDS, RETENTION_DEFAULT_MAX_ROOT_BYTES, RETENTION_DEFAULT_MAX_ROOT_EVENTS, RETENTION_DEFAULT_ROOT_TAIL_EVENTS, RETENTION_DEFAULT_WATCH_RATIO, } from './retention.js';
|
|
15
15
|
export type { ReportEvent, StatusReport, CycleSummary, CycleTimeline, TriggerRow, DailySummary, NarrativeEntry, NarrativeOutcome, NarrativeSnapshot, NarrativeSnapshotOptions, } from './reports.js';
|
|
16
16
|
export type { MaterialRetentionSnapshot, RetentionReport, RetentionReportOptions, RetentionState, RetentionThresholds, RootRetentionSnapshot, } from './retention.js';
|