@agent-e/core 1.5.10 → 1.5.12
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/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3569,10 +3569,11 @@ var PersonaTracker = class {
|
|
|
3569
3569
|
return latest?.totalHoldings ?? 0;
|
|
3570
3570
|
}).sort((a, b) => a - b);
|
|
3571
3571
|
const whaleThreshold = percentile(holdings, 1 - this.config.whalePercentile);
|
|
3572
|
-
const
|
|
3572
|
+
const txRatesUnsorted = agentIds.map((id) => {
|
|
3573
3573
|
const rec = this.agents.get(id);
|
|
3574
3574
|
return rec.snapshots.reduce((s, sn) => s + sn.txCount, 0) / Math.max(1, rec.snapshots.length);
|
|
3575
|
-
})
|
|
3575
|
+
});
|
|
3576
|
+
const txRates = [...txRatesUnsorted].sort((a, b) => a - b);
|
|
3576
3577
|
const activeTraderThreshold = percentile(txRates, 1 - this.config.activeTraderPercentile);
|
|
3577
3578
|
const medianTxRate = percentile(txRates, 0.5);
|
|
3578
3579
|
const counts = {};
|
|
@@ -3583,7 +3584,7 @@ var PersonaTracker = class {
|
|
|
3583
3584
|
const snaps = rec.snapshots;
|
|
3584
3585
|
if (snaps.length === 0) continue;
|
|
3585
3586
|
const latestHoldings = snaps[snaps.length - 1].totalHoldings;
|
|
3586
|
-
const agentTxRate =
|
|
3587
|
+
const agentTxRate = txRatesUnsorted[i];
|
|
3587
3588
|
const ticksSinceFirst = currentTick - rec.firstSeen;
|
|
3588
3589
|
const ticksSinceActive = currentTick - rec.lastActive;
|
|
3589
3590
|
const halfIdx = Math.floor(snaps.length / 2);
|