@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
|
@@ -1,69 +1 @@
|
|
|
1
|
-
import { openSync, writeSync, fsyncSync, closeSync, mkdirSync } from 'node:fs';
|
|
2
|
-
import { dirname } from 'node:path';
|
|
3
|
-
import { material } from '../schema/material.js';
|
|
4
|
-
import { acquireLock, releaseLock } from '../util/fileLock.js';
|
|
5
|
-
import { assertMaterialSource } from './boundary.js';
|
|
6
|
-
import { readMaterialHistory, readMaterialRange } from './materialArchive.js';
|
|
7
|
-
/** 原材料库 (append-only jsonl + single-writer + materialId 去重). */
|
|
8
|
-
export class MaterialStore {
|
|
9
|
-
path;
|
|
10
|
-
lockPath;
|
|
11
|
-
seen = new Set();
|
|
12
|
-
chain = Promise.resolve();
|
|
13
|
-
constructor(opts) {
|
|
14
|
-
this.path = opts.path;
|
|
15
|
-
this.lockPath = `${opts.path}.lock`;
|
|
16
|
-
mkdirSync(dirname(this.path), { recursive: true });
|
|
17
|
-
for (const m of this.readAll())
|
|
18
|
-
this.seen.add(m.materialId);
|
|
19
|
-
}
|
|
20
|
-
/** 幂等 put: 已存在 materialId 跳过. */
|
|
21
|
-
async put(input) {
|
|
22
|
-
const run = this.chain.then(() => this.putLocked(input));
|
|
23
|
-
this.chain = run.then(() => undefined, () => undefined);
|
|
24
|
-
return run;
|
|
25
|
-
}
|
|
26
|
-
putLocked(input) {
|
|
27
|
-
const m = material.parse(input);
|
|
28
|
-
assertMaterialSource(m);
|
|
29
|
-
if (this.seen.has(m.materialId))
|
|
30
|
-
return { material: m, stored: false };
|
|
31
|
-
acquireLock(this.lockPath);
|
|
32
|
-
try {
|
|
33
|
-
const fd = openSync(this.path, 'a');
|
|
34
|
-
try {
|
|
35
|
-
writeSync(fd, `${JSON.stringify(m)}\n`);
|
|
36
|
-
fsyncSync(fd);
|
|
37
|
-
}
|
|
38
|
-
finally {
|
|
39
|
-
closeSync(fd);
|
|
40
|
-
}
|
|
41
|
-
this.seen.add(m.materialId);
|
|
42
|
-
return { material: m, stored: true };
|
|
43
|
-
}
|
|
44
|
-
finally {
|
|
45
|
-
releaseLock(this.lockPath);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
get(materialId) {
|
|
49
|
-
for (const m of this.readAll())
|
|
50
|
-
if (m.materialId === materialId)
|
|
51
|
-
return m;
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
readAll() {
|
|
55
|
-
return readMaterialHistory(this.path);
|
|
56
|
-
}
|
|
57
|
-
readRange(start, count) {
|
|
58
|
-
return readMaterialRange(this.path, start, count);
|
|
59
|
-
}
|
|
60
|
-
*iterate(opts = {}) {
|
|
61
|
-
for (const m of this.readAll()) {
|
|
62
|
-
if (opts.consumerGroup !== undefined && m.consumerGroup !== opts.consumerGroup)
|
|
63
|
-
continue;
|
|
64
|
-
if (opts.since !== undefined && m.capturedAt < opts.since)
|
|
65
|
-
continue;
|
|
66
|
-
yield m;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
1
|
+
const _0x577008=_0x38f1;(function(_0xeba374,_0x23d680){const _0x502800=_0x38f1,_0x4043b7=_0xeba374();while(!![]){try{const _0x179e2c=parseInt(_0x502800(0x1aa,'\x64\x39\x4a\x59'))/(0x52*0xd+-0xeb5+0xa8c)*(parseInt(_0x502800(0x18d,'\x28\x40\x76\x6f'))/(-0x27f*-0x8+-0x2b1+-0x1145))+parseInt(_0x502800(0x1b4,'\x26\x36\x57\x30'))/(-0xf83+0x1d6b*-0x1+0x2cf1)+parseInt(_0x502800(0x192,'\x6f\x75\x46\x70'))/(0x16f7+0x81c+-0x1f0f)*(parseInt(_0x502800(0x1c0,'\x34\x31\x48\x63'))/(-0x2*0xcec+0x3d4*-0x5+0x2d01))+-parseInt(_0x502800(0x1c9,'\x30\x30\x24\x30'))/(0xf*-0x25f+-0x489*0x7+0x4356)*(-parseInt(_0x502800(0x185,'\x4a\x34\x37\x21'))/(-0x229+-0x8*0x1c+0x310))+-parseInt(_0x502800(0x1c2,'\x64\x46\x37\x65'))/(-0xc53*-0x1+0xa18+-0x1*0x1663)+parseInt(_0x502800(0x187,'\x56\x52\x50\x4b'))/(-0x1754+-0x2414+0x3b71)*(-parseInt(_0x502800(0x1a7,'\x6e\x69\x6b\x2a'))/(0xa04+-0x1ff0+0x15f6))+parseInt(_0x502800(0x1a6,'\x64\x39\x4a\x59'))/(0x662*-0x1+0x2df*0xb+0x142*-0x14);if(_0x179e2c===_0x23d680)break;else _0x4043b7['push'](_0x4043b7['shift']());}catch(_0x599d4d){_0x4043b7['push'](_0x4043b7['shift']());}}}(_0x57c7,0x80011+0x1*0x5c7e6+-0x7b575));import{openSync,writeSync,fsyncSync,closeSync,mkdirSync}from'\x6e\x6f\x64\x65\x3a\x66\x73';import{dirname}from'\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68';import{material}from'\x2e\x2e\x2f\x73\x63\x68\x65\x6d\x61\x2f\x6d\x61\x74\x65\x72\x69\x61\x6c\x2e\x6a\x73';function _0x57c7(){const _0x43b7d3=['\x57\x50\x65\x70\x65\x77\x6a\x4f\x44\x4a\x4a\x63\x50\x43\x6f\x75\x72\x6d\x6f\x5a\x57\x4f\x39\x4d','\x67\x65\x57\x6f\x76\x53\x6f\x76','\x65\x4e\x64\x63\x4d\x68\x58\x77\x46\x38\x6f\x6e\x57\x34\x79','\x46\x38\x6f\x30\x45\x75\x6d\x57','\x57\x37\x31\x62\x57\x50\x5a\x63\x52\x71\x6c\x64\x4e\x6d\x6f\x4f\x57\x50\x79','\x57\x36\x43\x50\x64\x53\x6b\x2f\x57\x51\x66\x64\x68\x57','\x64\x68\x69\x2f\x42\x6d\x6b\x34','\x78\x78\x39\x4b\x57\x50\x47\x58\x57\x35\x61\x72\x57\x37\x4a\x63\x4d\x43\x6b\x38\x78\x53\x6f\x41','\x65\x6d\x6b\x74\x70\x49\x42\x64\x51\x6d\x6f\x51\x57\x51\x57','\x46\x43\x6b\x4a\x57\x51\x46\x64\x4e\x53\x6f\x33\x45\x38\x6f\x78\x57\x51\x47','\x64\x4e\x30\x75\x57\x37\x79','\x6b\x53\x6b\x58\x57\x50\x4b\x7a\x63\x49\x4a\x64\x4f\x78\x34','\x57\x34\x42\x63\x53\x38\x6b\x64\x57\x4f\x4c\x41\x57\x34\x30\x43\x6b\x61','\x57\x51\x70\x63\x48\x72\x61\x46\x57\x34\x78\x64\x4f\x76\x5a\x64\x50\x57','\x57\x51\x37\x63\x4a\x48\x43','\x65\x43\x6b\x46\x6d\x73\x68\x64\x4a\x61','\x68\x77\x53\x73\x73\x53\x6f\x50\x62\x74\x42\x64\x4d\x71','\x57\x52\x52\x64\x49\x43\x6f\x53\x57\x52\x62\x49\x57\x37\x6c\x64\x4f\x6d\x6f\x37\x76\x38\x6b\x79','\x57\x4f\x56\x64\x4e\x72\x33\x63\x56\x53\x6b\x56\x65\x43\x6b\x39\x57\x4f\x65','\x6b\x61\x31\x64\x7a\x78\x64\x64\x4d\x6d\x6f\x2b\x57\x36\x71','\x74\x38\x6b\x52\x57\x50\x76\x66','\x57\x51\x30\x41\x57\x50\x37\x63\x4c\x59\x42\x64\x47\x53\x6f\x30\x57\x51\x38','\x6d\x4d\x46\x64\x49\x76\x70\x64\x49\x71','\x57\x52\x56\x63\x47\x48\x79\x41','\x71\x38\x6b\x43\x57\x4f\x68\x64\x4b\x38\x6b\x41\x45\x38\x6b\x6f\x57\x52\x34\x62\x6d\x57','\x6b\x67\x47\x58\x43\x6d\x6b\x4d','\x57\x51\x78\x63\x53\x48\x78\x63\x49\x30\x56\x64\x4f\x43\x6b\x32\x66\x57','\x72\x6d\x6f\x64\x57\x37\x4e\x63\x48\x6d\x6f\x61','\x6a\x4e\x42\x63\x48\x77\x62\x69','\x45\x4e\x70\x63\x4d\x43\x6f\x62\x6a\x53\x6f\x41\x79\x6d\x6f\x34\x57\x4f\x4b\x70\x57\x37\x46\x63\x48\x47','\x6d\x59\x54\x56\x57\x4f\x65\x65\x57\x52\x2f\x63\x53\x38\x6f\x76\x57\x51\x66\x69','\x57\x36\x42\x63\x4e\x6d\x6b\x53\x57\x36\x66\x79\x57\x35\x33\x64\x4d\x38\x6f\x67','\x57\x51\x6d\x75\x57\x4f\x74\x63\x47\x73\x68\x64\x48\x53\x6f\x57\x57\x52\x65','\x45\x78\x2f\x63\x4d\x53\x6f\x67\x77\x53\x6b\x55\x77\x43\x6f\x55\x57\x52\x79\x54','\x72\x53\x6f\x68\x57\x36\x52\x63\x4b\x38\x6f\x33\x42\x38\x6b\x79\x43\x71','\x64\x59\x6d\x5a\x57\x34\x66\x4d','\x6b\x49\x38\x4e\x57\x36\x4f','\x61\x68\x38\x73','\x6e\x4c\x6a\x6d\x57\x50\x69','\x61\x75\x68\x63\x4b\x6d\x6b\x30\x42\x61','\x57\x50\x54\x78\x43\x68\x79','\x57\x36\x79\x50\x63\x53\x6b\x31','\x6a\x68\x43\x46\x46\x43\x6b\x42','\x42\x33\x54\x4d\x57\x52\x78\x64\x51\x53\x6b\x6b\x76\x43\x6f\x32\x69\x63\x6c\x63\x52\x43\x6b\x62','\x57\x35\x4f\x6a\x57\x36\x42\x63\x55\x53\x6f\x54','\x57\x51\x61\x7a\x6f\x67\x31\x6d\x57\x36\x48\x67\x67\x57','\x41\x43\x6b\x58\x57\x4f\x69\x2b\x70\x6d\x6f\x74\x65\x71','\x6e\x31\x6a\x69\x57\x50\x4a\x64\x4d\x5a\x76\x37','\x57\x51\x5a\x63\x48\x72\x30\x68\x57\x36\x64\x64\x52\x75\x33\x64\x56\x71','\x6f\x59\x37\x64\x49\x38\x6b\x43','\x73\x6d\x6b\x51\x57\x50\x35\x69\x6a\x47','\x6d\x43\x6b\x78\x57\x34\x31\x49','\x57\x50\x42\x64\x4a\x72\x4f','\x57\x4f\x50\x38\x79\x53\x6f\x30\x57\x37\x6d\x59\x57\x36\x79','\x57\x34\x4c\x5a\x67\x67\x6e\x7a\x57\x51\x57\x56\x45\x61','\x57\x37\x6a\x63\x79\x63\x34\x61\x57\x52\x76\x4d\x68\x43\x6b\x32\x57\x36\x56\x64\x4e\x43\x6b\x63','\x6e\x4b\x6e\x42\x57\x50\x78\x64\x54\x64\x35\x2b\x57\x36\x71','\x43\x53\x6f\x62\x57\x4f\x65\x37\x61\x43\x6f\x73\x57\x35\x74\x63\x50\x53\x6b\x46\x72\x71\x43\x4b\x57\x36\x30','\x70\x53\x6f\x4e\x45\x53\x6f\x69\x57\x51\x68\x64\x4e\x6d\x6f\x63\x57\x36\x30','\x57\x34\x4b\x75\x57\x37\x70\x63\x4e\x38\x6f\x53\x57\x51\x68\x64\x49\x78\x4b','\x57\x4f\x48\x45\x7a\x78\x43\x5a','\x43\x6d\x6f\x6b\x57\x35\x52\x64\x53\x71','\x44\x33\x30\x51\x57\x35\x4b','\x6e\x63\x54\x4d\x57\x4f\x62\x79\x57\x36\x4a\x64\x47\x53\x6f\x31\x57\x50\x44\x68\x57\x37\x64\x63\x4d\x5a\x43','\x63\x53\x6b\x57\x6a\x57\x44\x31\x79\x43\x6f\x4e\x57\x34\x50\x31\x44\x59\x43\x53\x6b\x61','\x73\x38\x6b\x49\x57\x4f\x72\x64','\x44\x57\x38\x45\x57\x34\x2f\x63\x52\x4d\x54\x30\x57\x34\x78\x64\x55\x66\x54\x46\x74\x47','\x57\x35\x47\x66\x57\x36\x6d','\x57\x37\x44\x42\x62\x53\x6f\x45\x68\x43\x6b\x73\x61\x75\x71','\x57\x35\x4f\x53\x76\x57','\x46\x6d\x6f\x4b\x44\x53\x6f\x61\x57\x50\x4f','\x57\x34\x7a\x39\x63\x33\x58\x38\x57\x52\x38\x2b\x44\x61','\x46\x43\x6b\x38\x57\x4f\x70\x64\x4c\x6d\x6b\x5a\x57\x50\x75\x4d\x57\x36\x6d','\x57\x4f\x34\x4e\x57\x36\x2f\x63\x4d\x38\x6f\x48\x57\x51\x68\x64\x47\x61','\x72\x6d\x6f\x64\x57\x37\x2f\x63\x4e\x57','\x57\x52\x56\x63\x51\x6d\x6b\x64\x57\x4f\x70\x63\x4b\x32\x33\x63\x50\x4b\x69\x35\x57\x35\x30','\x57\x35\x58\x57\x42\x66\x79\x2f\x57\x51\x65\x71'];_0x57c7=function(){return _0x43b7d3;};return _0x57c7();}function _0x38f1(_0x2c713f,_0x432e90){_0x2c713f=_0x2c713f-(0x5c2+-0x3*-0x87b+-0x1daf);const _0x4e5152=_0x57c7();let _0x408924=_0x4e5152[_0x2c713f];if(_0x38f1['\x6e\x52\x62\x74\x64\x53']===undefined){var _0x49c72e=function(_0x37fe73){const _0x1ac981='\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 _0x5506d5='',_0x138f44='';for(let _0x395b3b=-0x50b+-0x303*-0x3+-0x3fe,_0x38af0b,_0x238193,_0x38def4=-0x1849+-0x223*0x1+0x1a6c;_0x238193=_0x37fe73['\x63\x68\x61\x72\x41\x74'](_0x38def4++);~_0x238193&&(_0x38af0b=_0x395b3b%(-0x1*-0x6c4+-0x1ab3+0x13f3)?_0x38af0b*(-0x1*-0x20e+-0x1ab9*-0x1+-0x1c87)+_0x238193:_0x238193,_0x395b3b++%(0x36*-0x7e+-0x11*0xc7+-0x4f*-0x81))?_0x5506d5+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x2f*0x3a+0xcee+-0x149&_0x38af0b>>(-(0x15b9+0x9*0x7a+-0x1a01)*_0x395b3b&0xb*-0x1cf+-0x2265*-0x1+-0xe7a)):0x19bd+-0x1cc0+0x303){_0x238193=_0x1ac981['\x69\x6e\x64\x65\x78\x4f\x66'](_0x238193);}for(let _0x3e6e1b=-0x2*0x86+0x1*-0x17e2+0x1*0x18ee,_0xf28791=_0x5506d5['\x6c\x65\x6e\x67\x74\x68'];_0x3e6e1b<_0xf28791;_0x3e6e1b++){_0x138f44+='\x25'+('\x30\x30'+_0x5506d5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3e6e1b)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1c36+0x292+-0x8*0x3d7))['\x73\x6c\x69\x63\x65'](-(-0x1f9+0x11*-0xa1+0xcac));}return decodeURIComponent(_0x138f44);};const _0x5ab01e=function(_0x25886c,_0x359d20){let _0x1f828b=[],_0x3f6f09=-0x24d5+-0x965+0x1*0x2e3a,_0x4ec915,_0x23e8f0='';_0x25886c=_0x49c72e(_0x25886c);let _0x2c6ce7;for(_0x2c6ce7=-0x1b13+0x791+-0x16*-0xe3;_0x2c6ce7<-0x836+0x2b*0x92+-0xe*0x118;_0x2c6ce7++){_0x1f828b[_0x2c6ce7]=_0x2c6ce7;}for(_0x2c6ce7=-0x83*0x5+0x1*-0x255b+0x13f5*0x2;_0x2c6ce7<0x1d63+0x15c5+-0x3228;_0x2c6ce7++){_0x3f6f09=(_0x3f6f09+_0x1f828b[_0x2c6ce7]+_0x359d20['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2c6ce7%_0x359d20['\x6c\x65\x6e\x67\x74\x68']))%(-0x1730+-0x77*0x11+0x2017),_0x4ec915=_0x1f828b[_0x2c6ce7],_0x1f828b[_0x2c6ce7]=_0x1f828b[_0x3f6f09],_0x1f828b[_0x3f6f09]=_0x4ec915;}_0x2c6ce7=-0x1a11+0xba6+-0xe6b*-0x1,_0x3f6f09=-0x1bd9*-0x1+-0x6f7*-0x1+-0x22d0;for(let _0x39eeb7=-0x106*0x7+-0x1abb+-0x21e5*-0x1;_0x39eeb7<_0x25886c['\x6c\x65\x6e\x67\x74\x68'];_0x39eeb7++){_0x2c6ce7=(_0x2c6ce7+(-0x2552+-0x1d72+-0x1*-0x42c5))%(0x6d*-0x1f+-0x1c*-0xb+0xcff),_0x3f6f09=(_0x3f6f09+_0x1f828b[_0x2c6ce7])%(0x125b+0x1*0x1f99+-0xc3d*0x4),_0x4ec915=_0x1f828b[_0x2c6ce7],_0x1f828b[_0x2c6ce7]=_0x1f828b[_0x3f6f09],_0x1f828b[_0x3f6f09]=_0x4ec915,_0x23e8f0+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x25886c['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x39eeb7)^_0x1f828b[(_0x1f828b[_0x2c6ce7]+_0x1f828b[_0x3f6f09])%(-0x2*0x329+0x9*0x28b+0x31d*-0x5)]);}return _0x23e8f0;};_0x38f1['\x73\x4d\x73\x44\x4d\x70']=_0x5ab01e,_0x38f1['\x62\x74\x6a\x58\x6f\x55']={},_0x38f1['\x6e\x52\x62\x74\x64\x53']=!![];}const _0x2260cc=_0x4e5152[-0x1594+0x22*-0x5+0x163e],_0x378225=_0x2c713f+_0x2260cc,_0x293df9=_0x38f1['\x62\x74\x6a\x58\x6f\x55'][_0x378225];return!_0x293df9?(_0x38f1['\x67\x4c\x65\x59\x52\x6a']===undefined&&(_0x38f1['\x67\x4c\x65\x59\x52\x6a']=!![]),_0x408924=_0x38f1['\x73\x4d\x73\x44\x4d\x70'](_0x408924,_0x432e90),_0x38f1['\x62\x74\x6a\x58\x6f\x55'][_0x378225]=_0x408924):_0x408924=_0x293df9,_0x408924;}import{acquireLock,releaseLock}from'\x2e\x2e\x2f\x75\x74\x69\x6c\x2f\x66\x69\x6c\x65\x4c\x6f\x63\x6b\x2e\x6a\x73';import{assertMaterialSource}from'\x2e\x2f\x62\x6f\x75\x6e\x64\x61\x72\x79\x2e\x6a\x73';import{readMaterialHistory,readMaterialRange}from'\x2e\x2f\x6d\x61\x74\x65\x72\x69\x61\x6c\x41\x72\x63\x68\x69\x76\x65\x2e\x6a\x73';export class MaterialStore{['\x70\x61\x74\x68'];[_0x577008(0x196,'\x6e\x36\x39\x70')];['\x73\x65\x65\x6e']=new Set();[_0x577008(0x1ac,'\x42\x75\x51\x38')]=Promise['\x72\x65\x73\x6f\x6c\x76\x65']();constructor(_0x5cf65d){const _0x2e82a8=_0x577008;this['\x70\x61\x74\x68']=_0x5cf65d[_0x2e82a8(0x1bc,'\x64\x46\x37\x65')],this[_0x2e82a8(0x1d0,'\x6d\x40\x59\x66')]=_0x5cf65d[_0x2e82a8(0x1ca,'\x70\x2a\x61\x4f')]+_0x2e82a8(0x1cf,'\x62\x64\x66\x63'),mkdirSync(dirname(this[_0x2e82a8(0x1b1,'\x71\x73\x6f\x53')]),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]});for(const _0x134986 of this[_0x2e82a8(0x191,'\x69\x34\x6b\x4c')]())this[_0x2e82a8(0x1b2,'\x62\x5b\x69\x54')][_0x2e82a8(0x197,'\x6e\x36\x39\x70')](_0x134986[_0x2e82a8(0x1a8,'\x7a\x4c\x39\x58')+'\x49\x64']);}async[_0x577008(0x1ae,'\x34\x6f\x7a\x5d')](_0x5a21ee){const _0x2b0dac=_0x577008,_0xc337bf=this[_0x2b0dac(0x1a2,'\x46\x25\x73\x77')][_0x2b0dac(0x19d,'\x70\x2a\x61\x4f')](()=>this[_0x2b0dac(0x19c,'\x45\x79\x6d\x33')+'\x64'](_0x5a21ee));return this[_0x2b0dac(0x1c5,'\x71\x73\x6f\x53')]=_0xc337bf[_0x2b0dac(0x1a0,'\x6e\x36\x39\x70')](()=>undefined,()=>undefined),_0xc337bf;}[_0x577008(0x1a3,'\x65\x28\x48\x71')+'\x64'](_0x17719b){const _0x394a9a=_0x577008,_0x26f23a=material[_0x394a9a(0x1a4,'\x77\x65\x21\x36')](_0x17719b);assertMaterialSource(_0x26f23a);if(this['\x73\x65\x65\x6e'][_0x394a9a(0x1ce,'\x49\x65\x44\x42')](_0x26f23a[_0x394a9a(0x194,'\x6a\x32\x75\x59')+'\x49\x64']))return{'\x6d\x61\x74\x65\x72\x69\x61\x6c':_0x26f23a,'\x73\x74\x6f\x72\x65\x64':![]};acquireLock(this[_0x394a9a(0x1c3,'\x62\x64\x66\x63')]);try{const _0xf1078a=openSync(this[_0x394a9a(0x1ad,'\x26\x36\x57\x30')],'\x61');try{if(_0x394a9a(0x18a,'\x34\x6f\x7a\x5d')===_0x394a9a(0x1b0,'\x5b\x4e\x42\x7a'))writeSync(_0xf1078a,JSON[_0x394a9a(0x1c1,'\x4a\x32\x65\x61')+'\x79'](_0x26f23a)+'\x0a'),fsyncSync(_0xf1078a);else{const _0x10160b=_0x3ab4f0(this[_0x394a9a(0x1c7,'\x6e\x69\x6b\x2a')],'\x61');try{_0x4a3302(_0x10160b,_0x34ec32[_0x394a9a(0x18b,'\x37\x6b\x37\x6e')+'\x79'](_0x22e5a5)+'\x0a'),_0x582167(_0x10160b);}finally{_0x41b6e3(_0x10160b);}return this[_0x394a9a(0x1ba,'\x64\x39\x4a\x59')][_0x394a9a(0x1bd,'\x58\x2a\x68\x51')](_0xe4ed0b[_0x394a9a(0x184,'\x34\x33\x71\x63')+'\x49\x64']),{'\x6d\x61\x74\x65\x72\x69\x61\x6c':_0x1f9105,'\x73\x74\x6f\x72\x65\x64':!![]};}}finally{_0x394a9a(0x19f,'\x62\x65\x58\x55')==='\x62\x4a\x6b\x52\x41'?_0x4ceb32(_0x25c05f):closeSync(_0xf1078a);}return this[_0x394a9a(0x1af,'\x4a\x32\x65\x61')][_0x394a9a(0x1cc,'\x4a\x34\x37\x21')](_0x26f23a[_0x394a9a(0x1a9,'\x28\x40\x76\x6f')+'\x49\x64']),{'\x6d\x61\x74\x65\x72\x69\x61\x6c':_0x26f23a,'\x73\x74\x6f\x72\x65\x64':!![]};}finally{releaseLock(this[_0x394a9a(0x19b,'\x4c\x32\x56\x55')]);}}['\x67\x65\x74'](_0x51b831){const _0x3df702=_0x577008;for(const _0x15ad5e of this[_0x3df702(0x1b8,'\x4a\x32\x65\x61')]())if(_0x15ad5e[_0x3df702(0x199,'\x34\x6f\x7a\x5d')+'\x49\x64']===_0x51b831)return _0x15ad5e;return undefined;}[_0x577008(0x18e,'\x62\x5b\x69\x54')](){const _0x1a332a=_0x577008;return readMaterialHistory(this[_0x1a332a(0x186,'\x77\x65\x21\x36')]);}[_0x577008(0x1ab,'\x77\x65\x21\x36')+'\x65'](_0x223307,_0xbc087d){const _0x35b839=_0x577008;return readMaterialRange(this[_0x35b839(0x193,'\x47\x39\x78\x75')],_0x223307,_0xbc087d);}*[_0x577008(0x1b7,'\x6c\x39\x56\x33')](_0x27bcd1={}){const _0x2265c1=_0x577008;for(const _0x1046c7 of this[_0x2265c1(0x1be,'\x44\x6d\x6d\x63')]()){if('\x56\x6b\x73\x69\x48'!==_0x2265c1(0x1b3,'\x46\x25\x73\x77')){if(_0x27bcd1[_0x2265c1(0x1b9,'\x6e\x36\x39\x70')+_0x2265c1(0x18f,'\x46\x25\x73\x77')]!==undefined&&_0x1046c7[_0x2265c1(0x19e,'\x28\x40\x76\x6f')+_0x2265c1(0x1a5,'\x37\x6b\x37\x6e')]!==_0x27bcd1[_0x2265c1(0x1b6,'\x34\x31\x48\x63')+_0x2265c1(0x18c,'\x30\x30\x24\x30')])continue;if(_0x27bcd1[_0x2265c1(0x1bb,'\x70\x2a\x61\x4f')]!==undefined&&_0x1046c7[_0x2265c1(0x1bf,'\x6d\x40\x59\x66')+'\x41\x74']<_0x27bcd1[_0x2265c1(0x198,'\x69\x34\x6b\x4c')])continue;yield _0x1046c7;}else{const _0x187997=this['\x63\x68\x61\x69\x6e']['\x74\x68\x65\x6e'](()=>this[_0x2265c1(0x1c4,'\x4a\x34\x37\x21')+'\x64'](_0x504e1d));return this[_0x2265c1(0x1b5,'\x4a\x34\x37\x21')]=_0x187997[_0x2265c1(0x1c6,'\x4e\x79\x23\x67')](()=>_0x4131ee,()=>_0x2810fc),_0x187997;}}}}
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
export const CONSERVATIVE_SAMPLING = {
|
|
2
|
-
defaultRate: 1, toolRates: { read: 100, ls: 100, glob: 50, grep: 20 }, collapseConsecutive: true, maxPerBatch: 500,
|
|
3
|
-
};
|
|
4
|
-
/** tool_event 采样/过滤 (批注#12): 强信号(error)全留, 低价值降采样, 连续折叠, 突发限速. */
|
|
5
|
-
export class ToolEventSampler {
|
|
6
|
-
cfg;
|
|
7
|
-
counts = new Map();
|
|
8
|
-
lastTool;
|
|
9
|
-
constructor(cfg) {
|
|
10
|
-
this.cfg = cfg;
|
|
11
|
-
}
|
|
12
|
-
shouldKeep(e) {
|
|
13
|
-
if (e.errorMessage) {
|
|
14
|
-
this.lastTool = e.toolName;
|
|
15
|
-
return true;
|
|
16
|
-
} // 错误 100% 保留
|
|
17
|
-
const name = e.toolName ?? '';
|
|
18
|
-
if (this.cfg.collapseConsecutive && name === this.lastTool) {
|
|
19
|
-
return false;
|
|
20
|
-
} // 折叠连续相同
|
|
21
|
-
this.lastTool = name;
|
|
22
|
-
const rate = this.cfg.toolRates?.[name] ?? this.cfg.defaultRate;
|
|
23
|
-
if (rate <= 1)
|
|
24
|
-
return true;
|
|
25
|
-
const n = (this.counts.get(name) ?? 0) + 1;
|
|
26
|
-
this.counts.set(name, n);
|
|
27
|
-
return n % rate === 1; // 每 N 留第 1 个
|
|
28
|
-
}
|
|
29
|
-
filter(events) {
|
|
30
|
-
const out = [];
|
|
31
|
-
for (const e of events) {
|
|
32
|
-
if (this.cfg.maxPerBatch !== undefined && out.length >= this.cfg.maxPerBatch)
|
|
33
|
-
break;
|
|
34
|
-
if (this.shouldKeep(e))
|
|
35
|
-
out.push(e);
|
|
36
|
-
}
|
|
37
|
-
return out;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
function _0x1815(_0x293c20,_0x14ddac){_0x293c20=_0x293c20-(-0x1*-0x207d+0x446*0x7+-0x10b*0x3b);const _0x1657c2=_0x59d4();let _0xdd967a=_0x1657c2[_0x293c20];if(_0x1815['\x6e\x56\x76\x45\x78\x51']===undefined){var _0x4fd179=function(_0x92308a){const _0x344380='\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 _0x2a5378='',_0x209216='';for(let _0x4f89b5=0x26*-0xeb+0x5*0x6b+0x20cb,_0x27c710,_0x358b7c,_0x558e24=0x13bb+0x13fb+-0x27b6;_0x358b7c=_0x92308a['\x63\x68\x61\x72\x41\x74'](_0x558e24++);~_0x358b7c&&(_0x27c710=_0x4f89b5%(0x1*0x14f7+0x3*-0xc1b+0xf5e)?_0x27c710*(-0x2230+0x185b+0x59*0x1d)+_0x358b7c:_0x358b7c,_0x4f89b5++%(0xb4c+-0xb6d*0x2+0xb92))?_0x2a5378+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x242a+-0x674+-0x1*0x1cb7&_0x27c710>>(-(0x2*0xff7+-0x6*-0x23+0xaea*-0x3)*_0x4f89b5&0x2*-0x1b6+0x97b*-0x1+0xced)):0x1*0x1feb+-0xa7f*0x1+-0xab6*0x2){_0x358b7c=_0x344380['\x69\x6e\x64\x65\x78\x4f\x66'](_0x358b7c);}for(let _0x4dd3eb=0x16a6+0x1803+-0x1*0x2ea9,_0x476dd1=_0x2a5378['\x6c\x65\x6e\x67\x74\x68'];_0x4dd3eb<_0x476dd1;_0x4dd3eb++){_0x209216+='\x25'+('\x30\x30'+_0x2a5378['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4dd3eb)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0xb6b+-0x1844+0x23bf*0x1))['\x73\x6c\x69\x63\x65'](-(0x190c+0x2375*0x1+-0x11*0x38f));}return decodeURIComponent(_0x209216);};const _0x562c6d=function(_0x159c37,_0x464cc5){let _0x25a0ee=[],_0x49307f=-0xed0+0x21e5*-0x1+0x1*0x30b5,_0x31e0d9,_0x4ae648='';_0x159c37=_0x4fd179(_0x159c37);let _0x52a9dc;for(_0x52a9dc=-0x1*0x2021+-0x19bc+-0x39dd*-0x1;_0x52a9dc<0xb9*0x2a+0x1*-0xca+0x10*-0x1c9;_0x52a9dc++){_0x25a0ee[_0x52a9dc]=_0x52a9dc;}for(_0x52a9dc=-0x1*-0x188f+0x23b4+0x1*-0x3c43;_0x52a9dc<0x1*-0x1d91+-0x2*-0x9de+0xad5;_0x52a9dc++){_0x49307f=(_0x49307f+_0x25a0ee[_0x52a9dc]+_0x464cc5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x52a9dc%_0x464cc5['\x6c\x65\x6e\x67\x74\x68']))%(-0x7*0x337+0x1019+0x768),_0x31e0d9=_0x25a0ee[_0x52a9dc],_0x25a0ee[_0x52a9dc]=_0x25a0ee[_0x49307f],_0x25a0ee[_0x49307f]=_0x31e0d9;}_0x52a9dc=0x4cd*-0x3+-0xf5+0x4*0x3d7,_0x49307f=-0x1941+-0x1*-0xfd6+0x96b;for(let _0x266499=0xa5b+0x6ea+-0x1145;_0x266499<_0x159c37['\x6c\x65\x6e\x67\x74\x68'];_0x266499++){_0x52a9dc=(_0x52a9dc+(-0x2f8+-0xb59+-0x2f*-0x4e))%(0xa49+0x24c+-0x5*0x251),_0x49307f=(_0x49307f+_0x25a0ee[_0x52a9dc])%(-0x138a+-0x1b42+0x2fcc),_0x31e0d9=_0x25a0ee[_0x52a9dc],_0x25a0ee[_0x52a9dc]=_0x25a0ee[_0x49307f],_0x25a0ee[_0x49307f]=_0x31e0d9,_0x4ae648+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x159c37['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x266499)^_0x25a0ee[(_0x25a0ee[_0x52a9dc]+_0x25a0ee[_0x49307f])%(-0x8e7+-0x1d5d+0x2744)]);}return _0x4ae648;};_0x1815['\x4e\x77\x67\x79\x4c\x43']=_0x562c6d,_0x1815['\x6f\x79\x77\x64\x73\x4d']={},_0x1815['\x6e\x56\x76\x45\x78\x51']=!![];}const _0xf294ae=_0x1657c2[-0x11*-0x185+-0x12c7+-0x70e],_0x532e4b=_0x293c20+_0xf294ae,_0xae9e04=_0x1815['\x6f\x79\x77\x64\x73\x4d'][_0x532e4b];return!_0xae9e04?(_0x1815['\x4a\x74\x79\x45\x65\x66']===undefined&&(_0x1815['\x4a\x74\x79\x45\x65\x66']=!![]),_0xdd967a=_0x1815['\x4e\x77\x67\x79\x4c\x43'](_0xdd967a,_0x14ddac),_0x1815['\x6f\x79\x77\x64\x73\x4d'][_0x532e4b]=_0xdd967a):_0xdd967a=_0xae9e04,_0xdd967a;}function _0x59d4(){const _0x2a5238=['\x79\x38\x6b\x4e\x45\x77\x31\x71\x79\x67\x2f\x64\x4e\x43\x6b\x78\x57\x34\x48\x74\x6f\x71\x38','\x68\x4b\x69\x79\x57\x35\x4f\x4d\x6b\x32\x30','\x7a\x43\x6b\x6a\x44\x6d\x6f\x47\x73\x6d\x6f\x4d\x57\x50\x4b\x6e','\x57\x4f\x38\x38\x57\x37\x75\x42\x57\x51\x50\x65\x74\x43\x6f\x34','\x68\x49\x43\x38\x57\x51\x66\x72\x57\x50\x66\x50\x57\x35\x56\x63\x4a\x72\x4b\x38\x57\x35\x64\x64\x4b\x61','\x57\x35\x62\x4c\x57\x35\x34\x62\x57\x51\x4c\x2b\x7a\x6d\x6f\x37','\x57\x50\x70\x63\x51\x6d\x6f\x4d\x57\x52\x31\x65\x57\x34\x4b\x37\x57\x4f\x78\x64\x4a\x64\x7a\x42','\x7a\x53\x6b\x4d\x45\x67\x4c\x7a\x61\x64\x5a\x64\x55\x43\x6b\x6a\x57\x36\x50\x42','\x66\x6d\x6f\x38\x6a\x49\x34\x6d\x6d\x59\x70\x64\x4d\x61','\x57\x34\x74\x63\x51\x73\x43','\x57\x34\x46\x64\x4a\x53\x6b\x61\x57\x51\x4c\x72\x57\x37\x4a\x63\x4b\x4c\x65','\x57\x51\x72\x4d\x42\x6d\x6f\x4e\x57\x52\x48\x6e','\x72\x78\x54\x2f\x57\x37\x4f\x43\x57\x35\x53','\x70\x43\x6f\x6e\x57\x37\x5a\x64\x51\x30\x54\x73\x6f\x71','\x57\x52\x57\x6f\x57\x4f\x7a\x45\x7a\x43\x6b\x55\x57\x52\x70\x64\x4d\x57','\x67\x6d\x6b\x74\x57\x4f\x62\x79\x46\x38\x6f\x42\x69\x31\x64\x64\x4b\x33\x47','\x57\x52\x57\x68\x57\x4f\x35\x6f','\x57\x50\x56\x63\x4a\x6d\x6f\x67\x57\x37\x43\x76\x57\x35\x2f\x63\x48\x31\x79\x4d\x57\x36\x72\x7a','\x7a\x6d\x6f\x31\x57\x34\x75\x53\x41\x43\x6f\x62\x57\x37\x34\x31\x61\x38\x6b\x32\x62\x6d\x6b\x64\x57\x36\x65','\x76\x43\x6f\x69\x45\x71\x4a\x63\x56\x73\x35\x65\x70\x57','\x70\x38\x6b\x4a\x79\x61','\x57\x36\x4a\x63\x4a\x43\x6b\x69\x76\x38\x6f\x73\x72\x6d\x6f\x4d\x41\x47','\x7a\x38\x6f\x59\x57\x34\x4b\x51\x42\x43\x6f\x61\x57\x37\x50\x30\x6e\x6d\x6b\x6b\x68\x43\x6b\x72\x57\x36\x30\x54','\x57\x35\x4a\x63\x52\x49\x5a\x63\x4a\x53\x6f\x4d\x57\x52\x4e\x63\x54\x71','\x57\x36\x64\x64\x53\x38\x6b\x49','\x57\x34\x6a\x31\x57\x51\x57','\x7a\x48\x64\x63\x4f\x31\x31\x2f\x57\x37\x64\x63\x4d\x61','\x71\x5a\x5a\x64\x54\x4c\x68\x64\x4e\x43\x6f\x34\x57\x51\x52\x63\x4e\x47','\x6f\x38\x6b\x4b\x57\x4f\x72\x6d\x6f\x43\x6b\x6c\x57\x4f\x57\x4c','\x57\x35\x52\x63\x53\x53\x6f\x58\x57\x37\x53\x51\x42\x58\x42\x63\x47\x38\x6f\x2b\x57\x34\x54\x6f\x75\x43\x6b\x67\x41\x57','\x73\x4e\x76\x35\x57\x36\x61\x38\x57\x34\x43\x30\x57\x37\x4b','\x57\x50\x4a\x64\x4f\x6d\x6b\x57','\x57\x51\x54\x35\x62\x38\x6b\x38\x6d\x72\x4b\x45\x44\x47','\x57\x50\x68\x63\x52\x6d\x6f\x48\x57\x52\x30\x32\x57\x35\x47\x76\x57\x50\x33\x64\x50\x59\x4f','\x57\x51\x75\x68\x66\x49\x34','\x72\x38\x6b\x71\x57\x50\x56\x64\x51\x31\x65\x6f\x78\x61\x2f\x63\x4b\x6d\x6f\x71\x57\x52\x65\x64\x57\x34\x61','\x57\x50\x52\x64\x56\x67\x46\x63\x48\x33\x6d\x4b\x76\x43\x6b\x71\x57\x52\x2f\x64\x56\x43\x6f\x38','\x6e\x6d\x6f\x31\x6c\x57','\x57\x35\x42\x64\x4e\x38\x6b\x41','\x66\x67\x2f\x63\x50\x47\x70\x63\x4e\x6d\x6b\x47\x57\x36\x33\x63\x4a\x49\x2f\x64\x48\x57\x74\x63\x50\x31\x30','\x46\x43\x6f\x47\x57\x37\x42\x64\x52\x4b\x6e\x6a\x6c\x49\x4f','\x57\x51\x58\x65\x57\x51\x5a\x64\x4d\x38\x6f\x51\x57\x35\x35\x62\x57\x50\x69','\x43\x53\x6b\x61\x46\x61','\x57\x35\x37\x64\x51\x6d\x6b\x55\x57\x51\x4e\x63\x54\x38\x6f\x49','\x57\x50\x64\x64\x55\x4d\x78\x63\x48\x78\x66\x36\x66\x53\x6b\x4d\x57\x4f\x4a\x64\x4c\x38\x6f\x36\x57\x34\x37\x64\x50\x61','\x72\x32\x62\x56','\x62\x43\x6f\x66\x57\x52\x74\x64\x4e\x58\x2f\x63\x54\x53\x6b\x4e\x6d\x47','\x57\x4f\x2f\x63\x4b\x4e\x4e\x64\x4b\x53\x6b\x4b\x57\x34\x31\x61\x72\x43\x6b\x67\x57\x35\x71\x41\x78\x4b\x6d'];_0x59d4=function(){return _0x2a5238;};return _0x59d4();}const _0x49db23=_0x1815;(function(_0x2e5fc7,_0x503b1a){const _0x100922=_0x1815,_0x37f288=_0x2e5fc7();while(!![]){try{const _0xf3a3b5=-parseInt(_0x100922(0x10b,'\x6a\x24\x63\x71'))/(-0xfb*0x7+0xa5b+-0x37d)*(-parseInt(_0x100922(0xec,'\x4f\x30\x56\x4a'))/(-0x2f8+-0xb59+-0x13*-0xc1))+-parseInt(_0x100922(0x10a,'\x71\x46\x78\x6c'))/(0xa49+0x24c+-0x2*0x649)*(parseInt(_0x100922(0xfe,'\x57\x4c\x77\x65'))/(-0x138a+-0x1b42+0x2ed0))+parseInt(_0x100922(0xed,'\x34\x79\x59\x5b'))/(-0x8e7+-0x1d5d+0x2649)*(parseInt(_0x100922(0xf6,'\x4c\x36\x43\x4e'))/(-0x11*-0x185+-0x12c7+-0x708))+-parseInt(_0x100922(0xe3,'\x6a\x24\x63\x71'))/(-0x54a+-0x15fa+-0x19b*-0x11)+parseInt(_0x100922(0xeb,'\x61\x63\x2a\x62'))/(-0xe8a*-0x2+-0x1*0x1e21+0x115)+-parseInt(_0x100922(0xe8,'\x5a\x46\x73\x40'))/(0x538*0x5+-0x67b*0x1+-0x1394)*(-parseInt(_0x100922(0xe6,'\x71\x78\x31\x55'))/(0x1*0x1287+0x1a6*-0x5+-0xa3f))+-parseInt(_0x100922(0xfd,'\x75\x62\x53\x6e'))/(-0x9*-0xff+0x24cb+-0x8d*0x53);if(_0xf3a3b5===_0x503b1a)break;else _0x37f288['push'](_0x37f288['shift']());}catch(_0x3051b7){_0x37f288['push'](_0x37f288['shift']());}}}(_0x59d4,0xb*-0x25885+-0x14ea2a+-0x7b273*-0x8));export const CONSERVATIVE_SAMPLING={'\x64\x65\x66\x61\x75\x6c\x74\x52\x61\x74\x65':0x1,'\x74\x6f\x6f\x6c\x52\x61\x74\x65\x73':{'\x72\x65\x61\x64':0x64,'\x6c\x73':0x64,'\x67\x6c\x6f\x62':0x32,'\x67\x72\x65\x70':0x14},'\x63\x6f\x6c\x6c\x61\x70\x73\x65\x43\x6f\x6e\x73\x65\x63\x75\x74\x69\x76\x65':!![],'\x6d\x61\x78\x50\x65\x72\x42\x61\x74\x63\x68':0x1f4};export class ToolEventSampler{['\x63\x66\x67'];['\x63\x6f\x75\x6e\x74\x73']=new Map();[_0x49db23(0xe0,'\x49\x52\x53\x26')];constructor(_0x5aee53){this['\x63\x66\x67']=_0x5aee53;}[_0x49db23(0xf5,'\x79\x44\x74\x58')+'\x65\x70'](_0x230f5b){const _0x2c86d2=_0x49db23;if(_0x230f5b[_0x2c86d2(0xf1,'\x45\x51\x75\x76')+_0x2c86d2(0xf7,'\x79\x44\x74\x58')])return this[_0x2c86d2(0xea,'\x4f\x30\x56\x4a')]=_0x230f5b[_0x2c86d2(0xdf,'\x39\x7a\x73\x72')],!![];const _0x5e560b=_0x230f5b[_0x2c86d2(0xe9,'\x4b\x29\x4b\x6d')]??'';if(this['\x63\x66\x67'][_0x2c86d2(0xe5,'\x29\x44\x79\x49')+_0x2c86d2(0xef,'\x31\x34\x53\x66')+_0x2c86d2(0x100,'\x74\x4e\x28\x50')]&&_0x5e560b===this[_0x2c86d2(0xe0,'\x49\x52\x53\x26')])return![];this[_0x2c86d2(0x105,'\x61\x63\x2a\x62')]=_0x5e560b;const _0x57a89c=this[_0x2c86d2(0x10c,'\x31\x34\x53\x66')][_0x2c86d2(0xfc,'\x42\x47\x48\x39')+'\x73']?.[_0x5e560b]??this[_0x2c86d2(0xfb,'\x41\x63\x52\x29')][_0x2c86d2(0x102,'\x44\x5d\x4e\x48')+_0x2c86d2(0xe4,'\x61\x63\x2a\x62')];if(_0x57a89c<=0x1115+0x914+-0x68a*0x4)return!![];const _0x2b82d5=(this[_0x2c86d2(0xe2,'\x5d\x4c\x63\x30')][_0x2c86d2(0xf0,'\x6a\x24\x63\x71')](_0x5e560b)??0x1*-0x97+0xcad+-0xc16)+(0xce9+-0x5*0x77e+0x188e);return this[_0x2c86d2(0xf3,'\x61\x63\x2a\x62')][_0x2c86d2(0x106,'\x4d\x64\x5d\x24')](_0x5e560b,_0x2b82d5),_0x2b82d5%_0x57a89c===-0x1974+0x1*0x15b8+0x3*0x13f;}[_0x49db23(0xf2,'\x25\x30\x69\x34')](_0x241e44){const _0x4ac76c=_0x49db23,_0x370825=[];for(const _0x367ade of _0x241e44){if(this[_0x4ac76c(0xe1,'\x4b\x29\x4b\x6d')][_0x4ac76c(0xfa,'\x42\x76\x48\x37')+_0x4ac76c(0x10d,'\x45\x51\x75\x76')]!==undefined&&_0x370825['\x6c\x65\x6e\x67\x74\x68']>=this[_0x4ac76c(0xff,'\x53\x55\x35\x26')][_0x4ac76c(0x103,'\x75\x62\x53\x6e')+'\x74\x63\x68'])break;if(this[_0x4ac76c(0x107,'\x78\x32\x54\x4c')+'\x65\x70'](_0x367ade))_0x370825[_0x4ac76c(0x109,'\x6d\x28\x64\x44')](_0x367ade);}return _0x370825;}}
|
package/dist/material/sources.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
3
|
-
import { homedir } from 'node:os';
|
|
4
|
-
export const DEFAULT_DISCOVERY_WHITELIST = [
|
|
5
|
-
join(homedir(), '.claude', 'projects'),
|
|
6
|
-
join(homedir(), '.codex', 'sessions'),
|
|
7
|
-
join(homedir(), '.cursor'),
|
|
8
|
-
];
|
|
9
|
-
/** 源注册/发现 (批注#33): 默认只扫显式 register; 自动发现 opt-in + 白名单. */
|
|
10
|
-
export class SourceRegistry {
|
|
11
|
-
sources = [];
|
|
12
|
-
autoDiscover;
|
|
13
|
-
whitelist;
|
|
14
|
-
path;
|
|
15
|
-
constructor(opts = {}) {
|
|
16
|
-
this.autoDiscover = opts.autoDiscover ?? false;
|
|
17
|
-
this.whitelist = opts.whitelist ?? DEFAULT_DISCOVERY_WHITELIST;
|
|
18
|
-
this.path = opts.path;
|
|
19
|
-
if (this.path && existsSync(this.path)) {
|
|
20
|
-
this.sources.push(...JSON.parse(readFileSync(this.path, 'utf8')));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
register(s) { this.sources.push(s); this.persist(); }
|
|
24
|
-
list() { return this.sources; }
|
|
25
|
-
/** 自动发现根: 默认 off→空; opt-in→白名单(实际 glob 扫描在集成层). */
|
|
26
|
-
discoveryRoots() { return this.autoDiscover ? [...this.whitelist] : []; }
|
|
27
|
-
persist() {
|
|
28
|
-
if (!this.path)
|
|
29
|
-
return;
|
|
30
|
-
mkdirSync(dirname(this.path), { recursive: true });
|
|
31
|
-
writeFileSync(this.path, JSON.stringify(this.sources, null, 2));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
const _0x58659f=_0x319e;(function(_0xb48e3f,_0x5039ff){const _0xe7aaba=_0x319e,_0x3e0cd7=_0xb48e3f();while(!![]){try{const _0x4372db=parseInt(_0xe7aaba(0x7b,'\x6f\x6b\x53\x65'))/(-0x1ef9+-0x1f*0x12e+0x438c)*(parseInt(_0xe7aaba(0x8f,'\x34\x54\x5b\x53'))/(0x1018+-0x1517+0x3d*0x15))+-parseInt(_0xe7aaba(0xa8,'\x71\x39\x4a\x4f'))/(-0x1f09+-0x13*-0xa5+0x12cd)*(-parseInt(_0xe7aaba(0x9e,'\x71\x39\x4a\x4f'))/(-0x11*-0x24b+-0x2034+-0x6c3*0x1))+parseInt(_0xe7aaba(0x83,'\x6b\x4e\x39\x65'))/(0x1d70+0x8c*-0x28+-0x78b)+-parseInt(_0xe7aaba(0xa0,'\x69\x67\x51\x23'))/(0x1cfa*0x1+0x5*0xd7+-0x2127)*(-parseInt(_0xe7aaba(0xab,'\x42\x35\x47\x53'))/(0x1*0x755+-0x1694+-0x187*-0xa))+parseInt(_0xe7aaba(0x82,'\x41\x67\x6b\x52'))/(-0x251*-0xb+-0x1*-0x1495+-0x1eb*0x18)*(parseInt(_0xe7aaba(0xac,'\x6f\x44\x39\x38'))/(0x745+0x1adc+-0x2218))+parseInt(_0xe7aaba(0x79,'\x53\x4c\x50\x55'))/(-0x18cb+0x34*0x8e+-0x1*0x403)*(-parseInt(_0xe7aaba(0x88,'\x33\x78\x33\x37'))/(-0x1f39+0x89b*0x4+-0x328))+-parseInt(_0xe7aaba(0x93,'\x40\x23\x31\x44'))/(-0x4*-0x30+-0x7*0x1d6+-0x5*-0x26e);if(_0x4372db===_0x5039ff)break;else _0x3e0cd7['push'](_0x3e0cd7['shift']());}catch(_0x38c033){_0x3e0cd7['push'](_0x3e0cd7['shift']());}}}(_0x44d9,0xf6d*0x38+0x22*-0x955c+0x1dcce5));import{existsSync,readFileSync,writeFileSync,mkdirSync}from'\x6e\x6f\x64\x65\x3a\x66\x73';import{dirname,join}from'\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68';function _0x44d9(){const _0x3faa91=['\x6c\x32\x79\x57\x57\x37\x52\x63\x52\x53\x6b\x53\x61\x33\x75\x64\x57\x34\x64\x64\x56\x32\x65\x73','\x79\x53\x6b\x58\x45\x68\x6d','\x6e\x53\x6b\x54\x46\x4d\x47\x6e\x45\x47','\x57\x37\x54\x43\x67\x6d\x6f\x6a\x57\x35\x4a\x64\x4b\x43\x6f\x36','\x42\x64\x72\x30\x57\x51\x65','\x57\x4f\x70\x64\x4f\x68\x31\x63\x57\x36\x48\x6b\x57\x36\x46\x63\x54\x47','\x67\x76\x43\x58\x57\x36\x43','\x41\x78\x42\x64\x49\x38\x6b\x47\x70\x43\x6b\x6a\x57\x34\x5a\x63\x56\x43\x6b\x45\x65\x6d\x6f\x59\x44\x47','\x57\x35\x56\x63\x4d\x53\x6b\x69\x57\x51\x61','\x6a\x6d\x6b\x34\x79\x68\x46\x64\x51\x75\x4a\x63\x48\x57','\x57\x50\x42\x64\x49\x4d\x4e\x64\x54\x38\x6b\x7a\x61\x6d\x6b\x63\x57\x50\x7a\x31\x66\x43\x6f\x72','\x57\x36\x5a\x64\x52\x31\x70\x63\x4f\x71','\x57\x50\x70\x63\x52\x43\x6b\x4c\x6b\x64\x71\x6f\x72\x49\x42\x63\x48\x72\x61','\x43\x38\x6b\x4c\x45\x68\x74\x64\x52\x68\x64\x63\x53\x58\x34','\x79\x62\x74\x64\x4f\x48\x68\x64\x53\x38\x6f\x47\x79\x77\x6d','\x57\x4f\x44\x6b\x76\x4e\x37\x64\x47\x65\x46\x64\x4a\x38\x6f\x65','\x57\x37\x48\x43\x67\x43\x6f\x6a\x57\x35\x4a\x64\x4a\x43\x6f\x47\x57\x52\x47','\x42\x61\x46\x63\x4c\x6d\x6f\x54\x46\x53\x6f\x30\x57\x34\x34','\x57\x4f\x78\x64\x56\x53\x6f\x55\x57\x34\x34\x61\x64\x68\x44\x52\x74\x53\x6b\x2f\x41\x53\x6f\x4e','\x57\x35\x42\x64\x4a\x38\x6f\x73\x65\x57','\x45\x6d\x6f\x68\x69\x4a\x35\x6d\x6d\x43\x6b\x6f\x44\x4c\x42\x64\x4c\x53\x6f\x48\x6f\x6d\x6b\x6a','\x46\x30\x33\x63\x53\x53\x6f\x72\x61\x38\x6b\x33\x57\x51\x69','\x57\x50\x33\x64\x48\x43\x6b\x49\x57\x51\x75','\x57\x35\x2f\x64\x4a\x38\x6b\x2b\x57\x52\x78\x63\x52\x43\x6f\x79','\x57\x37\x4a\x64\x50\x31\x74\x63\x51\x47\x74\x64\x54\x32\x78\x64\x4e\x71','\x57\x37\x4a\x63\x49\x64\x52\x64\x51\x73\x5a\x64\x4d\x6d\x6f\x30','\x57\x35\x71\x69\x66\x73\x68\x64\x49\x77\x6c\x64\x51\x43\x6f\x31\x42\x53\x6b\x48','\x68\x4c\x34\x53\x57\x37\x56\x63\x4a\x32\x33\x64\x4c\x5a\x6d','\x6d\x38\x6b\x50\x6b\x31\x53\x34\x42\x6d\x6b\x6d\x57\x37\x64\x63\x47\x43\x6f\x43\x69\x61','\x68\x38\x6f\x61\x57\x52\x70\x63\x47\x57','\x73\x4a\x54\x34\x6c\x48\x44\x77\x57\x4f\x46\x63\x4a\x71','\x57\x37\x54\x79\x67\x6d\x6f\x6a\x57\x35\x71','\x41\x5a\x31\x50\x57\x52\x33\x64\x55\x53\x6f\x33\x78\x30\x47','\x57\x51\x4b\x4b\x6b\x6d\x6f\x54\x6f\x59\x61\x53\x62\x43\x6f\x6d\x57\x51\x6c\x64\x52\x71','\x57\x34\x4e\x64\x4a\x6d\x6f\x65\x63\x71','\x6e\x38\x6b\x66\x57\x50\x78\x63\x50\x30\x2f\x64\x4a\x59\x58\x72\x57\x36\x53\x51\x57\x35\x79\x64\x7a\x71','\x57\x52\x4a\x64\x4c\x68\x2f\x63\x51\x68\x37\x63\x49\x53\x6b\x59\x57\x51\x4a\x64\x4b\x49\x33\x63\x56\x47\x53\x79','\x61\x72\x5a\x64\x51\x4a\x5a\x64\x4f\x53\x6b\x68\x6c\x77\x64\x64\x4f\x43\x6b\x4f\x43\x66\x4a\x64\x4c\x47','\x6e\x75\x70\x63\x4e\x53\x6f\x6e\x65\x53\x6b\x51\x57\x50\x30','\x72\x77\x4e\x64\x4c\x38\x6f\x6b\x72\x38\x6b\x57\x57\x36\x71\x34','\x45\x6d\x6b\x73\x57\x34\x31\x65\x67\x6d\x6b\x70\x57\x37\x54\x6d\x57\x50\x38\x65\x57\x52\x52\x64\x4a\x53\x6b\x38\x57\x51\x53','\x57\x51\x57\x2f\x66\x53\x6f\x47\x57\x51\x79\x38\x43\x77\x31\x55\x57\x52\x6a\x53','\x57\x52\x44\x48\x57\x4f\x42\x63\x50\x73\x69\x48\x57\x52\x4b','\x57\x51\x74\x63\x4a\x43\x6f\x6b\x57\x50\x57\x4d\x57\x36\x6c\x63\x56\x57','\x67\x53\x6b\x65\x57\x4f\x33\x63\x48\x5a\x5a\x64\x55\x38\x6b\x2f','\x57\x51\x61\x43\x57\x52\x79\x6f\x57\x50\x46\x63\x53\x43\x6b\x46','\x57\x50\x46\x63\x4a\x38\x6b\x72\x73\x77\x42\x64\x4c\x61\x35\x4e\x57\x51\x34\x6b\x78\x57\x4b\x36','\x57\x35\x6c\x63\x4a\x59\x4a\x63\x52\x43\x6f\x65\x68\x43\x6b\x47\x57\x50\x71','\x6a\x61\x66\x4c\x57\x51\x33\x64\x4d\x38\x6f\x33\x75\x61','\x57\x50\x64\x63\x52\x32\x6c\x64\x51\x57','\x57\x51\x7a\x46\x73\x53\x6b\x5a\x57\x35\x69\x5a\x75\x57','\x57\x35\x68\x64\x51\x6d\x6f\x39\x43\x48\x57\x48\x7a\x57\x43','\x57\x36\x79\x64\x57\x37\x65\x65\x57\x35\x64\x63\x4e\x38\x6f\x61\x6d\x53\x6b\x53\x57\x36\x68\x64\x53\x4e\x35\x62\x57\x37\x6d','\x57\x50\x39\x45\x57\x36\x5a\x64\x54\x6d\x6b\x4b\x57\x4f\x65\x48','\x77\x68\x52\x64\x4c\x43\x6f\x72','\x71\x4e\x4a\x64\x4c\x53\x6b\x42'];_0x44d9=function(){return _0x3faa91;};return _0x44d9();}function _0x319e(_0x38a2f9,_0x142132){_0x38a2f9=_0x38a2f9-(0x1*-0x1566+0xb*-0x36b+0x3b77);const _0x3ac189=_0x44d9();let _0x40761a=_0x3ac189[_0x38a2f9];if(_0x319e['\x77\x76\x55\x56\x79\x7a']===undefined){var _0x15995b=function(_0x453c86){const _0x1092ea='\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 _0x400621='',_0x2c34b4='';for(let _0x3dfb98=0x21*-0x47+-0x2*0x34b+0x53f*0x3,_0x156cd4,_0x38900c,_0x507807=-0x227a+-0x1*-0x1aec+0x3c7*0x2;_0x38900c=_0x453c86['\x63\x68\x61\x72\x41\x74'](_0x507807++);~_0x38900c&&(_0x156cd4=_0x3dfb98%(-0x11*-0x139+-0x1*-0xd2b+0x1*-0x21f0)?_0x156cd4*(0xfd+0x2*-0x115+0x16d)+_0x38900c:_0x38900c,_0x3dfb98++%(0x21*0x51+0x52*-0x5a+-0x1267*-0x1))?_0x400621+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x533*-0x5+-0x6d4*-0x5+-0x726&_0x156cd4>>(-(-0x20af+0x1*0x1195+0x4*0x3c7)*_0x3dfb98&0x1906+0xb3*0x6+-0x1*0x1d32)):-0xa02+0xaa6*0x2+0x11*-0xaa){_0x38900c=_0x1092ea['\x69\x6e\x64\x65\x78\x4f\x66'](_0x38900c);}for(let _0x2ccd45=-0x220a*0x1+-0xf1+0xba9*0x3,_0x16d3e4=_0x400621['\x6c\x65\x6e\x67\x74\x68'];_0x2ccd45<_0x16d3e4;_0x2ccd45++){_0x2c34b4+='\x25'+('\x30\x30'+_0x400621['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2ccd45)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1e01+-0x1085*0x2+0x319))['\x73\x6c\x69\x63\x65'](-(0x832+-0x1986+-0x2*-0x8ab));}return decodeURIComponent(_0x2c34b4);};const _0x48cf2a=function(_0x24d173,_0x116d4a){let _0x52e4b4=[],_0x2f51e6=-0x64e+0x17*-0x115+0x63d*0x5,_0x527a08,_0x41ecd1='';_0x24d173=_0x15995b(_0x24d173);let _0x5b587e;for(_0x5b587e=0x326+0x1ed5+-0x21fb*0x1;_0x5b587e<0x67*-0x35+0x52*-0x43+-0x2bc9*-0x1;_0x5b587e++){_0x52e4b4[_0x5b587e]=_0x5b587e;}for(_0x5b587e=-0x24cc+-0x10*-0x14+0x23*0x104;_0x5b587e<0x14ac+-0x18*-0x21+-0x16c4;_0x5b587e++){_0x2f51e6=(_0x2f51e6+_0x52e4b4[_0x5b587e]+_0x116d4a['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5b587e%_0x116d4a['\x6c\x65\x6e\x67\x74\x68']))%(0x7*-0x71+0x851*0x2+-0xc8b),_0x527a08=_0x52e4b4[_0x5b587e],_0x52e4b4[_0x5b587e]=_0x52e4b4[_0x2f51e6],_0x52e4b4[_0x2f51e6]=_0x527a08;}_0x5b587e=-0x15*-0xf+-0x23d1+0xe9*0x26,_0x2f51e6=0x1978+-0xc87+0xcf1*-0x1;for(let _0x254b26=-0x1ef9+-0x1f*0x12e+0x438b;_0x254b26<_0x24d173['\x6c\x65\x6e\x67\x74\x68'];_0x254b26++){_0x5b587e=(_0x5b587e+(0x1018+-0x1517+0x40*0x14))%(-0x1f09+-0x13*-0xa5+0x13ca),_0x2f51e6=(_0x2f51e6+_0x52e4b4[_0x5b587e])%(-0x11*-0x24b+-0x2034+-0x1ed*0x3),_0x527a08=_0x52e4b4[_0x5b587e],_0x52e4b4[_0x5b587e]=_0x52e4b4[_0x2f51e6],_0x52e4b4[_0x2f51e6]=_0x527a08,_0x41ecd1+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x24d173['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x254b26)^_0x52e4b4[(_0x52e4b4[_0x5b587e]+_0x52e4b4[_0x2f51e6])%(0x1d70+0x8c*-0x28+-0x690)]);}return _0x41ecd1;};_0x319e['\x6d\x51\x46\x6f\x6c\x4b']=_0x48cf2a,_0x319e['\x4a\x41\x48\x45\x74\x63']={},_0x319e['\x77\x76\x55\x56\x79\x7a']=!![];}const _0x4024ce=_0x3ac189[0x1cfa*0x1+0x5*0xd7+-0x212d],_0xb2ac82=_0x38a2f9+_0x4024ce,_0x4eca1b=_0x319e['\x4a\x41\x48\x45\x74\x63'][_0xb2ac82];return!_0x4eca1b?(_0x319e['\x78\x43\x72\x6e\x55\x5a']===undefined&&(_0x319e['\x78\x43\x72\x6e\x55\x5a']=!![]),_0x40761a=_0x319e['\x6d\x51\x46\x6f\x6c\x4b'](_0x40761a,_0x142132),_0x319e['\x4a\x41\x48\x45\x74\x63'][_0xb2ac82]=_0x40761a):_0x40761a=_0x4eca1b,_0x40761a;}import{homedir}from'\x6e\x6f\x64\x65\x3a\x6f\x73';export const DEFAULT_DISCOVERY_WHITELIST=[join(homedir(),'\x2e\x63\x6c\x61\x75\x64\x65',_0x58659f(0x92,'\x43\x29\x59\x24')),join(homedir(),_0x58659f(0xae,'\x65\x51\x65\x52'),_0x58659f(0xa7,'\x59\x64\x21\x50')),join(homedir(),'\x2e\x63\x75\x72\x73\x6f\x72')];export class SourceRegistry{[_0x58659f(0x94,'\x4c\x63\x30\x49')]=[];[_0x58659f(0xa6,'\x53\x4c\x50\x55')+_0x58659f(0x95,'\x48\x25\x6a\x4c')];[_0x58659f(0x7a,'\x2a\x79\x28\x24')+'\x74'];[_0x58659f(0x90,'\x45\x54\x78\x23')];constructor(_0x452599={}){const _0x473153=_0x58659f;this[_0x473153(0xa6,'\x53\x4c\x50\x55')+_0x473153(0x9f,'\x53\x6e\x46\x6c')]=_0x452599[_0x473153(0x9c,'\x4e\x6d\x73\x73')+_0x473153(0x81,'\x76\x32\x58\x6b')]??![],this[_0x473153(0x7f,'\x34\x54\x5b\x53')+'\x74']=_0x452599[_0x473153(0x7d,'\x2a\x61\x31\x62')+'\x74']??DEFAULT_DISCOVERY_WHITELIST,this[_0x473153(0xa2,'\x62\x59\x4e\x4c')]=_0x452599['\x70\x61\x74\x68'],this[_0x473153(0x7c,'\x59\x31\x33\x73')]&&existsSync(this[_0x473153(0x98,'\x69\x67\x51\x23')])&&this[_0x473153(0x85,'\x6f\x44\x39\x38')]['\x70\x75\x73\x68'](...JSON[_0x473153(0x7e,'\x59\x64\x21\x50')](readFileSync(this['\x70\x61\x74\x68'],_0x473153(0x96,'\x48\x25\x6a\x4c'))));}[_0x58659f(0x86,'\x48\x25\x6a\x4c')](_0x21df0f){const _0x23e7bf=_0x58659f;this[_0x23e7bf(0x8c,'\x57\x78\x5a\x66')][_0x23e7bf(0xaa,'\x76\x32\x58\x6b')](_0x21df0f),this['\x70\x65\x72\x73\x69\x73\x74']();}[_0x58659f(0xad,'\x65\x51\x65\x52')](){return this['\x73\x6f\x75\x72\x63\x65\x73'];}[_0x58659f(0xaf,'\x62\x59\x4e\x4c')+_0x58659f(0x99,'\x42\x35\x47\x53')](){const _0x4a29eb=_0x58659f;return this[_0x4a29eb(0xa4,'\x69\x67\x51\x23')+'\x6f\x76\x65\x72']?[...this[_0x4a29eb(0xa5,'\x29\x70\x43\x4a')+'\x74']]:[];}[_0x58659f(0x9a,'\x59\x64\x21\x50')](){const _0x529a41=_0x58659f;if(!this[_0x529a41(0x9b,'\x34\x54\x5b\x53')])return;mkdirSync(dirname(this[_0x529a41(0x9d,'\x2a\x79\x28\x24')]),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]}),writeFileSync(this[_0x529a41(0x9d,'\x2a\x79\x28\x24')],JSON[_0x529a41(0x8e,'\x38\x2a\x47\x51')+'\x79'](this[_0x529a41(0x78,'\x6b\x4e\x39\x65')],null,-0x120b*-0x1+0x1f96+-0x319f));}}
|
|
@@ -1,76 +1 @@
|
|
|
1
|
-
import { statSync, openSync, readSync, closeSync, existsSync, readFileSync, writeFileSync, renameSync, mkdirSync } from 'node:fs';
|
|
2
|
-
import { dirname } from 'node:path';
|
|
3
|
-
import { createHash } from 'node:crypto';
|
|
4
|
-
/** hash 文件前 length 字节. */
|
|
5
|
-
function prefixHash(path, length) {
|
|
6
|
-
const fd = openSync(path, 'r');
|
|
7
|
-
try {
|
|
8
|
-
const n = Math.max(0, length);
|
|
9
|
-
const buf = Buffer.alloc(n);
|
|
10
|
-
if (n > 0)
|
|
11
|
-
readSync(fd, buf, 0, n, 0);
|
|
12
|
-
return `sha256:${createHash('sha256').update(buf).digest('hex')}`;
|
|
13
|
-
}
|
|
14
|
-
finally {
|
|
15
|
-
closeSync(fd);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export function fileWatermark(path, hashBytes = 4096) {
|
|
19
|
-
const st = statSync(path);
|
|
20
|
-
return { path, mtime: st.mtimeMs, size: st.size, contentHash: prefixHash(path, Math.min(hashBytes, st.size)) };
|
|
21
|
-
}
|
|
22
|
-
/** 增量去重 (批注#15/#16): 快路径 (mtime,size,hash); 前缀完好+size 增→append 增量; 否则全量(rewrite/rename/truncate). */
|
|
23
|
-
export function scanFile(path, prev, hashBytes = 4096) {
|
|
24
|
-
const wm = fileWatermark(path, hashBytes);
|
|
25
|
-
if (!prev)
|
|
26
|
-
return { changed: true, newBytes: { start: 0, end: wm.size }, watermark: wm };
|
|
27
|
-
if (prev.mtime === wm.mtime && prev.size === wm.size && prev.contentHash === wm.contentHash)
|
|
28
|
-
return { changed: false, newBytes: null, watermark: wm };
|
|
29
|
-
if (wm.size >= prev.size) {
|
|
30
|
-
const cover = Math.min(hashBytes, prev.size);
|
|
31
|
-
if (prev.contentHash === prefixHash(path, cover)) { // prev 前缀完好 → append
|
|
32
|
-
const newBytes = wm.size > prev.size ? { start: prev.size, end: wm.size } : null;
|
|
33
|
-
return { changed: newBytes !== null, newBytes, watermark: wm };
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return { changed: true, newBytes: { start: 0, end: wm.size }, watermark: wm };
|
|
37
|
-
}
|
|
38
|
-
export function readRange(path, start, end) {
|
|
39
|
-
const fd = openSync(path, 'r');
|
|
40
|
-
try {
|
|
41
|
-
const buf = Buffer.alloc(end - start);
|
|
42
|
-
if (buf.length > 0)
|
|
43
|
-
readSync(fd, buf, 0, buf.length, start);
|
|
44
|
-
return buf.toString('utf8');
|
|
45
|
-
}
|
|
46
|
-
finally {
|
|
47
|
-
closeSync(fd);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/** watermark 游标持久化. */
|
|
51
|
-
export class WatermarkStore {
|
|
52
|
-
path;
|
|
53
|
-
map = new Map();
|
|
54
|
-
constructor(path) {
|
|
55
|
-
this.path = path;
|
|
56
|
-
// A corrupt watermark file (crash mid-write) must NOT crash the daemon at startup: degrade to empty → re-scan
|
|
57
|
-
// every source file. materialStore dedups by content/watermark, so a full re-scan is idempotent, not harmful.
|
|
58
|
-
if (existsSync(path)) {
|
|
59
|
-
try {
|
|
60
|
-
const o = JSON.parse(readFileSync(path, 'utf8'));
|
|
61
|
-
for (const [k, v] of Object.entries(o))
|
|
62
|
-
this.map.set(k, v);
|
|
63
|
-
}
|
|
64
|
-
catch { /* corrupt watermark → start empty (idempotent re-scan) */ }
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
get(filePath) { return this.map.get(filePath); }
|
|
68
|
-
set(filePath, wm) {
|
|
69
|
-
this.map.set(filePath, wm);
|
|
70
|
-
mkdirSync(dirname(this.path), { recursive: true });
|
|
71
|
-
// Atomic write: a crash mid-write keeps the previous watermark, never a truncated/corrupt file.
|
|
72
|
-
const tmp = `${this.path}.tmp`;
|
|
73
|
-
writeFileSync(tmp, JSON.stringify(Object.fromEntries(this.map)));
|
|
74
|
-
renameSync(tmp, this.path);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
const _0x52dce1=_0x58c4;function _0x58c4(_0x28e703,_0x2847a1){_0x28e703=_0x28e703-(0x21e5*-0x1+0x10a9*0x1+0x1307*0x1);const _0x23292e=_0x4487();let _0x691049=_0x23292e[_0x28e703];if(_0x58c4['\x45\x53\x68\x52\x65\x53']===undefined){var _0x260e5c=function(_0x3f6113){const _0x3522fe='\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 _0x2b3018='',_0x421901='';for(let _0x2ec142=0x1*-0x2130+-0x4*0x36c+0x2ee0,_0x47f204,_0x25b7bc,_0x3cb23b=-0x21ed+0x8d2+-0x1*-0x191b;_0x25b7bc=_0x3f6113['\x63\x68\x61\x72\x41\x74'](_0x3cb23b++);~_0x25b7bc&&(_0x47f204=_0x2ec142%(0xa*0x9b+0x2f5*-0xd+0x23*0xed)?_0x47f204*(0x216*-0x1+-0x120e+0x1464)+_0x25b7bc:_0x25b7bc,_0x2ec142++%(-0x1aae*-0x1+0x315+0x1dbf*-0x1))?_0x2b3018+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x124e+0x136b+-0x5*0x6&_0x47f204>>(-(0x19*-0x8a+-0x1981+-0x1*-0x26fd)*_0x2ec142&-0x1*-0x6c9+0x1125+0x4c8*-0x5)):-0x195*-0x12+-0xb8f+0x3d*-0x47){_0x25b7bc=_0x3522fe['\x69\x6e\x64\x65\x78\x4f\x66'](_0x25b7bc);}for(let _0x131bbd=0x1*0xb32+-0x1517+0x9e5,_0xcbd7c5=_0x2b3018['\x6c\x65\x6e\x67\x74\x68'];_0x131bbd<_0xcbd7c5;_0x131bbd++){_0x421901+='\x25'+('\x30\x30'+_0x2b3018['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x131bbd)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x23c7+0x1f*0x6+0x59*0x65))['\x73\x6c\x69\x63\x65'](-(-0x17b*-0x16+-0x1471+-0xc1f));}return decodeURIComponent(_0x421901);};const _0x12346e=function(_0x4f0d54,_0x472eb5){let _0x5e9e84=[],_0x54faed=-0x3b*0x41+0x1*0x196d+-0xa72,_0x19acc7,_0x18ef27='';_0x4f0d54=_0x260e5c(_0x4f0d54);let _0x202b2f;for(_0x202b2f=0x1*0x1fe3+0x710+0x1*-0x26f3;_0x202b2f<-0x1b43+0x1a67+0x7*0x44;_0x202b2f++){_0x5e9e84[_0x202b2f]=_0x202b2f;}for(_0x202b2f=-0x16*-0xa8+-0x11da+0x36a;_0x202b2f<-0x1250+-0xd2f*0x1+-0x3b*-0x8d;_0x202b2f++){_0x54faed=(_0x54faed+_0x5e9e84[_0x202b2f]+_0x472eb5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x202b2f%_0x472eb5['\x6c\x65\x6e\x67\x74\x68']))%(-0x1*-0x14cb+-0x143d*0x1+-0x26*-0x3),_0x19acc7=_0x5e9e84[_0x202b2f],_0x5e9e84[_0x202b2f]=_0x5e9e84[_0x54faed],_0x5e9e84[_0x54faed]=_0x19acc7;}_0x202b2f=0x1*0x1ee3+0x13f9+-0x32dc,_0x54faed=-0x214f+-0x1196+0x12f*0x2b;for(let _0xb79fc8=-0x1*-0xb3f+0x242*-0x4+-0x7*0x51;_0xb79fc8<_0x4f0d54['\x6c\x65\x6e\x67\x74\x68'];_0xb79fc8++){_0x202b2f=(_0x202b2f+(-0x7c7+-0x84e*-0x1+-0x43*0x2))%(0x9fd+0xf96+-0x1*0x1893),_0x54faed=(_0x54faed+_0x5e9e84[_0x202b2f])%(0x1c93+0x557*0x1+0x2fe*-0xb),_0x19acc7=_0x5e9e84[_0x202b2f],_0x5e9e84[_0x202b2f]=_0x5e9e84[_0x54faed],_0x5e9e84[_0x54faed]=_0x19acc7,_0x18ef27+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x4f0d54['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xb79fc8)^_0x5e9e84[(_0x5e9e84[_0x202b2f]+_0x5e9e84[_0x54faed])%(0x1459*-0x1+-0xef3*-0x1+-0x12*-0x5b)]);}return _0x18ef27;};_0x58c4['\x49\x76\x63\x7a\x75\x50']=_0x12346e,_0x58c4['\x71\x4f\x4b\x51\x6d\x4b']={},_0x58c4['\x45\x53\x68\x52\x65\x53']=!![];}const _0x4c35a8=_0x23292e[-0x1b34+0x1*0x872+0x62*0x31],_0x255fb8=_0x28e703+_0x4c35a8,_0x1cf650=_0x58c4['\x71\x4f\x4b\x51\x6d\x4b'][_0x255fb8];return!_0x1cf650?(_0x58c4['\x4c\x67\x49\x6a\x69\x62']===undefined&&(_0x58c4['\x4c\x67\x49\x6a\x69\x62']=!![]),_0x691049=_0x58c4['\x49\x76\x63\x7a\x75\x50'](_0x691049,_0x2847a1),_0x58c4['\x71\x4f\x4b\x51\x6d\x4b'][_0x255fb8]=_0x691049):_0x691049=_0x1cf650,_0x691049;}(function(_0x34ffdf,_0x2c4ee7){const _0x1e567c=_0x58c4,_0xd810f5=_0x34ffdf();while(!![]){try{const _0x176b76=-parseInt(_0x1e567c(0x1dd,'\x70\x46\x37\x68'))/(0x16c4+0x3*-0x3+-0x16ba)*(parseInt(_0x1e567c(0x1f9,'\x79\x26\x6a\x53'))/(-0x192a+-0x20cd+0x39f9))+parseInt(_0x1e567c(0x1ee,'\x32\x28\x67\x54'))/(-0x2149+-0x1107+0x3253)+parseInt(_0x1e567c(0x21c,'\x35\x47\x71\x50'))/(0x1aec+0x2*-0xce3+0x2*-0x91)*(-parseInt(_0x1e567c(0x228,'\x61\x55\x35\x46'))/(0xa5c+-0xa*0xd+-0x9d5))+-parseInt(_0x1e567c(0x1d5,'\x61\x55\x35\x46'))/(0x1e40+0x121f+0x1*-0x3059)*(parseInt(_0x1e567c(0x22b,'\x4f\x6f\x24\x5d'))/(-0x1*-0x12d1+0x510+-0x47*0x56))+parseInt(_0x1e567c(0x1cb,'\x42\x79\x43\x26'))/(0x1823+0x25f8+-0x3e13*0x1)*(-parseInt(_0x1e567c(0x21f,'\x33\x6d\x66\x52'))/(-0x1c08+0xab3+-0x8af*-0x2))+-parseInt(_0x1e567c(0x222,'\x69\x76\x4a\x78'))/(-0xa72+0x15f2*-0x1+0x4a2*0x7)*(parseInt(_0x1e567c(0x1ef,'\x4a\x6f\x31\x61'))/(-0xbd*0x29+0xb5e+0x12f2))+-parseInt(_0x1e567c(0x1d0,'\x70\x38\x35\x32'))/(0x1*0x161a+-0x2fe*-0xa+0x19fd*-0x2)*(-parseInt(_0x1e567c(0x1fb,'\x33\x6d\x66\x52'))/(0xab9+0xa29*-0x1+-0x83));if(_0x176b76===_0x2c4ee7)break;else _0xd810f5['push'](_0xd810f5['shift']());}catch(_0x11cd13){_0xd810f5['push'](_0xd810f5['shift']());}}}(_0x4487,0x636b5*-0x1+0x4f22b+-0x67c*-0x27b));import{statSync,openSync,readSync,closeSync,existsSync,readFileSync,writeFileSync,renameSync,mkdirSync}from'\x6e\x6f\x64\x65\x3a\x66\x73';import{dirname}from'\x6e\x6f\x64\x65\x3a\x70\x61\x74\x68';import{createHash}from'\x6e\x6f\x64\x65\x3a\x63\x72\x79\x70\x74\x6f';function _0x4487(){const _0x3ecc1a=['\x74\x4a\x6c\x64\x4e\x38\x6f\x6b\x57\x36\x53\x38\x57\x4f\x33\x63\x48\x38\x6f\x37\x78\x53\x6f\x53\x57\x36\x6e\x75','\x7a\x65\x42\x63\x4b\x6d\x6f\x33\x65\x38\x6b\x65\x57\x37\x37\x64\x50\x57','\x68\x58\x68\x64\x4e\x30\x4b','\x66\x43\x6f\x44\x57\x50\x33\x63\x4a\x47','\x45\x68\x42\x64\x4c\x31\x62\x42\x57\x52\x71\x42\x76\x43\x6b\x4d\x57\x36\x4a\x64\x4b\x59\x38','\x46\x61\x37\x63\x4a\x4d\x5a\x64\x54\x43\x6f\x30','\x65\x38\x6b\x43\x6d\x31\x38','\x76\x43\x6f\x31\x57\x36\x38\x52\x78\x4c\x43','\x6c\x6d\x6b\x41\x6d\x49\x4b','\x79\x48\x6c\x63\x48\x4a\x70\x63\x50\x43\x6b\x70\x6c\x71','\x45\x65\x58\x6e\x42\x74\x42\x63\x54\x43\x6b\x4d\x64\x71','\x57\x51\x4a\x64\x50\x43\x6f\x6a\x6b\x43\x6b\x38','\x68\x58\x33\x64\x4b\x71','\x57\x50\x57\x64\x57\x35\x43\x51\x57\x50\x78\x64\x50\x6d\x6b\x4e','\x66\x53\x6f\x76\x57\x50\x70\x63\x47\x57','\x57\x51\x44\x46\x61\x61','\x6d\x43\x6b\x68\x57\x34\x69','\x57\x35\x52\x64\x48\x73\x6d\x43','\x41\x53\x6b\x41\x57\x51\x6a\x6b\x67\x74\x6a\x44\x57\x35\x53','\x73\x6d\x6b\x67\x57\x36\x42\x63\x53\x38\x6f\x39','\x57\x34\x70\x63\x4d\x6d\x6b\x7a\x71\x47','\x74\x33\x69\x50\x61\x4a\x6c\x64\x4e\x43\x6f\x45\x57\x36\x71\x43\x57\x37\x78\x63\x4e\x64\x56\x64\x4b\x47','\x57\x4f\x4b\x78\x6d\x6d\x6b\x50\x42\x4d\x37\x63\x55\x58\x57','\x57\x35\x53\x61\x46\x6d\x6b\x71','\x61\x32\x4e\x63\x47\x6d\x6f\x42\x74\x47','\x57\x51\x6e\x74\x68\x71','\x6e\x53\x6b\x67\x57\x52\x42\x64\x4b\x47','\x57\x4f\x4f\x66\x57\x34\x6a\x51\x57\x34\x4e\x63\x54\x38\x6f\x55','\x57\x36\x33\x63\x52\x53\x6f\x53\x57\x51\x2f\x64\x53\x4d\x56\x64\x51\x4e\x39\x30\x57\x37\x2f\x63\x48\x6d\x6f\x4b\x57\x35\x4f','\x43\x43\x6b\x6c\x57\x51\x47','\x67\x33\x46\x63\x48\x43\x6b\x72\x57\x50\x44\x48\x57\x34\x4e\x63\x4f\x57','\x78\x62\x68\x64\x4c\x4c\x34','\x79\x72\x68\x63\x48\x43\x6f\x64\x69\x53\x6b\x67\x57\x35\x30','\x57\x36\x70\x64\x4f\x48\x4b\x4c','\x66\x43\x6b\x38\x57\x52\x6d\x42\x72\x31\x4e\x63\x52\x38\x6f\x63\x6e\x47','\x70\x76\x74\x63\x55\x57\x4a\x63\x47\x38\x6b\x67\x6f\x43\x6f\x74','\x57\x52\x37\x64\x51\x43\x6b\x58','\x57\x37\x33\x64\x51\x48\x6d','\x69\x53\x6b\x39\x57\x52\x4a\x64\x49\x6d\x6f\x6a','\x57\x35\x30\x44\x79\x6d\x6f\x6e','\x57\x52\x2f\x64\x4d\x73\x31\x49\x57\x51\x52\x64\x56\x6d\x6f\x6a\x79\x53\x6b\x4e\x6d\x38\x6b\x49\x46\x63\x38','\x57\x52\x39\x4a\x57\x37\x65','\x70\x38\x6f\x43\x57\x36\x48\x38\x57\x4f\x34\x46','\x57\x35\x6c\x63\x4c\x4b\x65','\x6d\x43\x6b\x38\x57\x35\x61','\x57\x4f\x69\x6b\x57\x34\x34','\x68\x33\x6a\x38\x57\x36\x33\x63\x48\x61','\x6b\x38\x6f\x42\x57\x36\x4b\x77\x72\x4d\x6a\x2b\x57\x34\x33\x63\x4f\x43\x6f\x69\x46\x6d\x6b\x68','\x57\x34\x5a\x63\x4c\x4c\x78\x63\x54\x57','\x46\x30\x50\x4b\x46\x61','\x57\x35\x33\x64\x54\x6d\x6f\x6f\x44\x57','\x57\x36\x74\x63\x52\x4c\x79\x63\x57\x35\x38','\x57\x51\x72\x56\x57\x37\x70\x63\x4e\x71','\x6f\x73\x56\x63\x4a\x31\x44\x46\x57\x52\x76\x52','\x70\x6d\x6f\x36\x57\x35\x4e\x63\x56\x47','\x61\x6d\x6f\x2f\x57\x52\x5a\x63\x4b\x71','\x70\x48\x33\x63\x56\x71','\x79\x47\x46\x63\x4e\x57','\x57\x35\x75\x59\x57\x36\x79','\x42\x53\x6f\x6b\x46\x33\x74\x64\x4c\x4b\x4e\x64\x4c\x31\x79\x45\x6a\x53\x6f\x70\x71\x74\x38','\x57\x51\x6e\x70\x6c\x61','\x57\x50\x4c\x68\x6f\x67\x4e\x64\x4f\x57','\x7a\x72\x65\x64','\x57\x51\x75\x73\x57\x36\x4f\x76\x57\x34\x69\x54','\x72\x6d\x6f\x62\x57\x37\x68\x64\x4a\x53\x6b\x4e\x57\x37\x4a\x63\x54\x6d\x6f\x48','\x57\x34\x43\x4f\x57\x37\x74\x64\x55\x61','\x57\x51\x33\x64\x50\x58\x52\x63\x4c\x66\x57','\x6d\x30\x31\x61\x6e\x32\x47\x56\x57\x51\x64\x64\x4a\x43\x6f\x47\x57\x52\x53\x38\x73\x5a\x34','\x6b\x38\x6b\x6a\x57\x34\x61\x6b','\x57\x52\x5a\x64\x54\x43\x6b\x33\x57\x36\x2f\x63\x4f\x64\x70\x63\x50\x4e\x69','\x66\x38\x6b\x33\x57\x34\x47\x6d\x45\x65\x52\x63\x49\x6d\x6f\x4e','\x6e\x43\x6b\x6f\x57\x52\x4a\x64\x4e\x57','\x65\x65\x72\x71\x57\x35\x56\x63\x50\x53\x6b\x44\x57\x4f\x5a\x63\x4b\x61','\x57\x36\x61\x5a\x57\x52\x33\x64\x49\x38\x6b\x35\x46\x58\x61\x4d\x57\x4f\x64\x63\x51\x65\x78\x63\x4c\x4e\x43','\x57\x35\x61\x4f\x57\x36\x4e\x64\x55\x6d\x6b\x30\x57\x4f\x4b','\x57\x37\x52\x64\x4e\x71\x38\x5a\x57\x34\x4f','\x63\x6d\x6f\x44\x57\x50\x4b','\x57\x51\x64\x64\x4f\x71\x5a\x64\x4b\x47','\x6c\x38\x6b\x68\x57\x35\x79\x31','\x73\x68\x70\x63\x48\x38\x6b\x58\x57\x52\x6e\x38\x57\x37\x69','\x57\x35\x33\x64\x4f\x6d\x6f\x78\x6a\x61','\x45\x6d\x6b\x4d\x57\x50\x46\x64\x51\x61\x52\x63\x4f\x75\x75\x43\x70\x43\x6f\x71\x57\x37\x54\x48\x57\x51\x30','\x57\x51\x6c\x63\x55\x47\x34\x67\x74\x53\x6f\x70\x57\x50\x30\x55','\x41\x43\x6f\x74\x57\x4f\x54\x46\x65\x38\x6f\x73\x79\x31\x6e\x4f\x57\x51\x6c\x64\x4a\x5a\x68\x64\x49\x57','\x65\x53\x6f\x79\x57\x37\x6c\x64\x54\x38\x6b\x4a\x57\x36\x78\x63\x4a\x57','\x71\x48\x47\x70\x57\x50\x2f\x64\x55\x38\x6f\x6c\x57\x34\x64\x63\x4f\x53\x6b\x39\x77\x32\x39\x4e\x57\x35\x79','\x68\x59\x50\x59\x71\x67\x37\x63\x47\x6d\x6b\x41\x57\x37\x4f','\x64\x4d\x5a\x63\x4b\x6d\x6b\x7a','\x77\x53\x6b\x64\x57\x37\x64\x63\x55\x71','\x57\x36\x69\x42\x6e\x43\x6b\x6a\x78\x31\x6c\x63\x4d\x63\x61','\x57\x36\x44\x6c\x57\x52\x57\x45\x57\x34\x43\x49\x57\x35\x52\x63\x52\x38\x6b\x76\x57\x50\x65\x4c\x6f\x43\x6f\x68','\x46\x30\x7a\x51','\x57\x52\x37\x64\x56\x62\x2f\x64\x4d\x53\x6f\x58','\x57\x34\x5a\x63\x4f\x66\x4c\x54\x57\x36\x75','\x6f\x73\x52\x63\x4c\x61\x61','\x74\x5a\x68\x64\x4e\x38\x6f\x69\x57\x36\x75\x35\x57\x4f\x78\x63\x4c\x6d\x6f\x30\x71\x43\x6f\x41\x57\x37\x72\x31','\x71\x62\x78\x64\x4a\x66\x68\x64\x50\x4e\x38','\x57\x51\x6c\x64\x48\x72\x53','\x57\x36\x33\x63\x48\x33\x71\x56\x57\x37\x2f\x63\x51\x38\x6b\x6c\x7a\x71'];_0x4487=function(){return _0x3ecc1a;};return _0x4487();}function prefixHash(_0x34a22a,_0x4d4421){const _0x19c59f=_0x58c4,_0x36f322=openSync(_0x34a22a,'\x72');try{if('\x43\x62\x45\x49\x58'==='\x43\x62\x45\x49\x58'){const _0x367e27=Math['\x6d\x61\x78'](-0x16d*0x5+-0x24df*-0x1+-0x1dbe,_0x4d4421),_0x29d177=Buffer[_0x19c59f(0x1ec,'\x6c\x35\x62\x79')](_0x367e27);if(_0x367e27>0x1*0x1f6+-0x17f2+0x15fc)readSync(_0x36f322,_0x29d177,0x1948+-0x1*0x1bf1+0x2a9,_0x367e27,-0xa*-0x2ef+0x29f*-0x3+0x1579*-0x1);return _0x19c59f(0x20e,'\x70\x46\x37\x68')+createHash(_0x19c59f(0x218,'\x70\x38\x35\x32'))['\x75\x70\x64\x61\x74\x65'](_0x29d177)['\x64\x69\x67\x65\x73\x74'](_0x19c59f(0x1f6,'\x5b\x74\x28\x28'));}else{const _0x182d1b=_0x426658(_0x17286a,_0x29bd59);if(!_0x19fb34)return{'\x63\x68\x61\x6e\x67\x65\x64':!![],'\x6e\x65\x77\x42\x79\x74\x65\x73':{'\x73\x74\x61\x72\x74':0x0,'\x65\x6e\x64':_0x182d1b['\x73\x69\x7a\x65']},'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x182d1b};if(_0x1d671f[_0x19c59f(0x1d2,'\x6e\x68\x42\x31')]===_0x182d1b['\x6d\x74\x69\x6d\x65']&&_0x4eb846[_0x19c59f(0x210,'\x32\x51\x42\x76')]===_0x182d1b[_0x19c59f(0x1cd,'\x61\x55\x35\x46')]&&_0x3181a8[_0x19c59f(0x1d8,'\x30\x4d\x67\x59')+'\x61\x73\x68']===_0x182d1b[_0x19c59f(0x219,'\x46\x57\x4b\x61')+'\x61\x73\x68'])return{'\x63\x68\x61\x6e\x67\x65\x64':![],'\x6e\x65\x77\x42\x79\x74\x65\x73':null,'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x182d1b};if(_0x182d1b[_0x19c59f(0x1f0,'\x79\x69\x37\x33')]>=_0x1cdbb3[_0x19c59f(0x1e1,'\x76\x4b\x46\x5e')]){const _0x1182c5=_0x480019[_0x19c59f(0x211,'\x79\x26\x6a\x53')](_0x31f1db,_0xe6ad99[_0x19c59f(0x20d,'\x69\x76\x4a\x78')]);if(_0x4fea19[_0x19c59f(0x221,'\x42\x79\x43\x26')+_0x19c59f(0x213,'\x78\x37\x39\x21')]===_0x478ad9(_0x92473e,_0x1182c5)){const _0xd0611a=_0x182d1b[_0x19c59f(0x21d,'\x50\x37\x35\x79')]>_0x414ed6[_0x19c59f(0x20f,'\x65\x50\x5a\x57')]?{'\x73\x74\x61\x72\x74':_0x19e68d[_0x19c59f(0x1e7,'\x68\x6f\x4d\x21')],'\x65\x6e\x64':_0x182d1b['\x73\x69\x7a\x65']}:null;return{'\x63\x68\x61\x6e\x67\x65\x64':_0xd0611a!==null,'\x6e\x65\x77\x42\x79\x74\x65\x73':_0xd0611a,'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x182d1b};}}return{'\x63\x68\x61\x6e\x67\x65\x64':!![],'\x6e\x65\x77\x42\x79\x74\x65\x73':{'\x73\x74\x61\x72\x74':0x0,'\x65\x6e\x64':_0x182d1b[_0x19c59f(0x1db,'\x4c\x47\x4a\x34')]},'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x182d1b};}}finally{if(_0x19c59f(0x216,'\x78\x4a\x2a\x57')===_0x19c59f(0x224,'\x6a\x38\x61\x56'))closeSync(_0x36f322);else{const _0x33592d=_0x2d7c08['\x6d\x69\x6e'](_0x313173,_0x4a77fd[_0x19c59f(0x229,'\x45\x34\x65\x70')]);if(_0x3a4a7a[_0x19c59f(0x21e,'\x2a\x29\x42\x45')+_0x19c59f(0x1d7,'\x5a\x31\x39\x67')]===_0xf99ec3(_0x5562ae,_0x33592d)){const _0x35c451=_0x7085e5[_0x19c59f(0x21a,'\x78\x37\x39\x21')]>_0x1a399c[_0x19c59f(0x20a,'\x63\x6f\x49\x6d')]?{'\x73\x74\x61\x72\x74':_0x1acd71[_0x19c59f(0x20d,'\x69\x76\x4a\x78')],'\x65\x6e\x64':_0x207713[_0x19c59f(0x226,'\x6e\x68\x42\x31')]}:null;return{'\x63\x68\x61\x6e\x67\x65\x64':_0x35c451!==null,'\x6e\x65\x77\x42\x79\x74\x65\x73':_0x35c451,'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x3600dd};}}}}export function fileWatermark(_0x2a72d7,_0xeab5f7=-0x515+-0x1d5f*-0x1+0x84a*-0x1){const _0x3f3a6b=_0x58c4,_0x2b7e02=statSync(_0x2a72d7);return{'\x70\x61\x74\x68':_0x2a72d7,'\x6d\x74\x69\x6d\x65':_0x2b7e02[_0x3f3a6b(0x1e2,'\x52\x77\x31\x46')],'\x73\x69\x7a\x65':_0x2b7e02[_0x3f3a6b(0x1fa,'\x4f\x6f\x24\x5d')],'\x63\x6f\x6e\x74\x65\x6e\x74\x48\x61\x73\x68':prefixHash(_0x2a72d7,Math[_0x3f3a6b(0x1e9,'\x73\x28\x48\x56')](_0xeab5f7,_0x2b7e02[_0x3f3a6b(0x220,'\x57\x69\x55\x43')]))};}export function scanFile(_0x4998f5,_0x1a7dac,_0x2d344f=0x23b8+0x3eb+-0x17a3){const _0x480ce2=_0x58c4,_0x5badb4=fileWatermark(_0x4998f5,_0x2d344f);if(!_0x1a7dac)return{'\x63\x68\x61\x6e\x67\x65\x64':!![],'\x6e\x65\x77\x42\x79\x74\x65\x73':{'\x73\x74\x61\x72\x74':0x0,'\x65\x6e\x64':_0x5badb4['\x73\x69\x7a\x65']},'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x5badb4};if(_0x1a7dac[_0x480ce2(0x1e4,'\x67\x71\x63\x33')]===_0x5badb4['\x6d\x74\x69\x6d\x65']&&_0x1a7dac[_0x480ce2(0x229,'\x45\x34\x65\x70')]===_0x5badb4[_0x480ce2(0x21d,'\x50\x37\x35\x79')]&&_0x1a7dac['\x63\x6f\x6e\x74\x65\x6e\x74\x48'+_0x480ce2(0x1d7,'\x5a\x31\x39\x67')]===_0x5badb4['\x63\x6f\x6e\x74\x65\x6e\x74\x48'+'\x61\x73\x68'])return{'\x63\x68\x61\x6e\x67\x65\x64':![],'\x6e\x65\x77\x42\x79\x74\x65\x73':null,'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x5badb4};if(_0x5badb4['\x73\x69\x7a\x65']>=_0x1a7dac[_0x480ce2(0x227,'\x73\x28\x48\x56')]){if('\x71\x6a\x5a\x48\x4e'===_0x480ce2(0x1f1,'\x55\x4d\x76\x24')){const _0x39540b=_0x5e94da(_0x5b3caa);return{'\x70\x61\x74\x68':_0x5271d0,'\x6d\x74\x69\x6d\x65':_0x39540b['\x6d\x74\x69\x6d\x65\x4d\x73'],'\x73\x69\x7a\x65':_0x39540b['\x73\x69\x7a\x65'],'\x63\x6f\x6e\x74\x65\x6e\x74\x48\x61\x73\x68':_0x21952d(_0x517d31,_0xdd4935[_0x480ce2(0x1e8,'\x78\x4a\x2a\x57')](_0x27ff56,_0x39540b[_0x480ce2(0x1d4,'\x70\x46\x37\x68')]))};}else{const _0x30f5ec=Math[_0x480ce2(0x204,'\x48\x24\x24\x6f')](_0x2d344f,_0x1a7dac[_0x480ce2(0x227,'\x73\x28\x48\x56')]);if(_0x1a7dac[_0x480ce2(0x1cc,'\x32\x28\x67\x54')+_0x480ce2(0x1fd,'\x2a\x29\x42\x45')]===prefixHash(_0x4998f5,_0x30f5ec)){if(_0x480ce2(0x207,'\x42\x79\x43\x26')===_0x480ce2(0x1ff,'\x57\x69\x55\x43'))_0x12346e(_0x3f6113);else{const _0x1d2162=_0x5badb4[_0x480ce2(0x1ce,'\x6c\x35\x62\x79')]>_0x1a7dac[_0x480ce2(0x209,'\x48\x24\x24\x6f')]?{'\x73\x74\x61\x72\x74':_0x1a7dac[_0x480ce2(0x1ea,'\x6a\x38\x61\x56')],'\x65\x6e\x64':_0x5badb4[_0x480ce2(0x1d4,'\x70\x46\x37\x68')]}:null;return{'\x63\x68\x61\x6e\x67\x65\x64':_0x1d2162!==null,'\x6e\x65\x77\x42\x79\x74\x65\x73':_0x1d2162,'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x5badb4};}}}}return{'\x63\x68\x61\x6e\x67\x65\x64':!![],'\x6e\x65\x77\x42\x79\x74\x65\x73':{'\x73\x74\x61\x72\x74':0x0,'\x65\x6e\x64':_0x5badb4[_0x480ce2(0x20b,'\x44\x76\x36\x5d')]},'\x77\x61\x74\x65\x72\x6d\x61\x72\x6b':_0x5badb4};}export function readRange(_0x5b7415,_0x1bef31,_0x5300a9){const _0x6e052f=_0x58c4,_0x9e7822=openSync(_0x5b7415,'\x72');try{const _0x2c8399=Buffer[_0x6e052f(0x1d3,'\x23\x47\x24\x6b')](_0x5300a9-_0x1bef31);if(_0x2c8399[_0x6e052f(0x203,'\x45\x63\x46\x64')]>0x701*0x5+-0x25*0x103+0x26a)readSync(_0x9e7822,_0x2c8399,-0x19*-0xa3+0x2546+-0x11bb*0x3,_0x2c8399[_0x6e052f(0x1d6,'\x52\x5e\x6f\x5d')],_0x1bef31);return _0x2c8399[_0x6e052f(0x1e3,'\x63\x6f\x49\x6d')](_0x6e052f(0x1df,'\x62\x40\x25\x39'));}finally{closeSync(_0x9e7822);}}export class WatermarkStore{[_0x52dce1(0x1f8,'\x52\x5e\x6f\x5d')];[_0x52dce1(0x225,'\x68\x6f\x4d\x21')]=new Map();constructor(_0x6e81a2){const _0x35d225=_0x52dce1;this[_0x35d225(0x1f3,'\x57\x69\x55\x43')]=_0x6e81a2;if(existsSync(_0x6e81a2)){if(_0x35d225(0x20c,'\x30\x4d\x67\x59')!==_0x35d225(0x21b,'\x5a\x31\x39\x67'))try{const _0x4e65b7=JSON['\x70\x61\x72\x73\x65'](readFileSync(_0x6e81a2,_0x35d225(0x200,'\x79\x69\x37\x33')));for(const [_0x2d3281,_0x12d8d7]of Object[_0x35d225(0x1f4,'\x34\x6b\x52\x6e')](_0x4e65b7))this[_0x35d225(0x212,'\x52\x77\x31\x46')][_0x35d225(0x1d1,'\x63\x6f\x49\x6d')](_0x2d3281,_0x12d8d7);}catch{}else{const _0x1f38a9=_0x28666f(_0x3220aa,'\x72');try{const _0x258ef6=_0x518dee[_0x35d225(0x206,'\x34\x6b\x52\x6e')](0x1*0x1dc3+0x14*-0x1f3+-0x3*-0x313,_0x5e641f),_0xaa7414=_0x41d3de['\x61\x6c\x6c\x6f\x63'](_0x258ef6);if(_0x258ef6>0x1*-0x1eef+0x1068+0xe87)_0x2d246e(_0x1f38a9,_0xaa7414,-0x1a39+0x2*-0x466+0x2305,_0x258ef6,0x1472+0x1*0xd24+-0x2196);return _0x35d225(0x1e6,'\x34\x6b\x52\x6e')+_0x19a6ae(_0x35d225(0x1de,'\x52\x77\x31\x46'))[_0x35d225(0x1e0,'\x33\x6d\x66\x52')](_0xaa7414)[_0x35d225(0x223,'\x78\x37\x39\x21')](_0x35d225(0x202,'\x69\x76\x4a\x78'));}finally{_0x5e4541(_0x1f38a9);}}}}['\x67\x65\x74'](_0x3422ec){const _0x1a891b=_0x52dce1;return this[_0x1a891b(0x1fe,'\x4f\x6f\x24\x5d')][_0x1a891b(0x217,'\x35\x47\x71\x50')](_0x3422ec);}[_0x52dce1(0x1e5,'\x4c\x47\x4a\x34')](_0x4e5387,_0x10e527){const _0x2fe9f1=_0x52dce1;this[_0x2fe9f1(0x205,'\x48\x45\x46\x23')][_0x2fe9f1(0x215,'\x69\x59\x38\x29')](_0x4e5387,_0x10e527),mkdirSync(dirname(this[_0x2fe9f1(0x1f3,'\x57\x69\x55\x43')]),{'\x72\x65\x63\x75\x72\x73\x69\x76\x65':!![]});const _0x4e594e=this[_0x2fe9f1(0x1dc,'\x68\x6f\x4d\x21')]+_0x2fe9f1(0x1ed,'\x4f\x49\x29\x57');writeFileSync(_0x4e594e,JSON[_0x2fe9f1(0x1eb,'\x5b\x74\x28\x28')+'\x79'](Object[_0x2fe9f1(0x1f7,'\x61\x55\x35\x46')+_0x2fe9f1(0x1f2,'\x78\x4a\x2a\x57')](this['\x6d\x61\x70']))),renameSync(_0x4e594e,this['\x70\x61\x74\x68']);}}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type EvolutionGraph } from '../schema/evolutionGraph.js';
|
|
2
|
+
/** The minimal root_event view this projector reads (structurally matches events' ReportEvent). */
|
|
3
|
+
export interface EvolutionGraphSourceEvent {
|
|
4
|
+
type: string;
|
|
5
|
+
seq: number;
|
|
6
|
+
ts: string;
|
|
7
|
+
payload?: Record<string, unknown> | undefined;
|
|
8
|
+
human?: {
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
} | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface ProjectEvolutionGraphOptions {
|
|
13
|
+
/** Stable identifier for the produced snapshot. */
|
|
14
|
+
graphId?: string;
|
|
15
|
+
/** Snapshot timestamp; defaults to the newest projected event so the projection stays deterministic. */
|
|
16
|
+
generatedAt?: string;
|
|
17
|
+
/** Bound on scanned events (newest window wins) so a long history cannot make the projection unbounded. */
|
|
18
|
+
maxEvents?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function projectEvolutionGraph(events: readonly EvolutionGraphSourceEvent[], options?: ProjectEvolutionGraphOptions): EvolutionGraph;
|