@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.js
CHANGED
|
@@ -3685,10 +3685,11 @@ var PersonaTracker = class {
|
|
|
3685
3685
|
return latest?.totalHoldings ?? 0;
|
|
3686
3686
|
}).sort((a, b) => a - b);
|
|
3687
3687
|
const whaleThreshold = percentile(holdings, 1 - this.config.whalePercentile);
|
|
3688
|
-
const
|
|
3688
|
+
const txRatesUnsorted = agentIds.map((id) => {
|
|
3689
3689
|
const rec = this.agents.get(id);
|
|
3690
3690
|
return rec.snapshots.reduce((s, sn) => s + sn.txCount, 0) / Math.max(1, rec.snapshots.length);
|
|
3691
|
-
})
|
|
3691
|
+
});
|
|
3692
|
+
const txRates = [...txRatesUnsorted].sort((a, b) => a - b);
|
|
3692
3693
|
const activeTraderThreshold = percentile(txRates, 1 - this.config.activeTraderPercentile);
|
|
3693
3694
|
const medianTxRate = percentile(txRates, 0.5);
|
|
3694
3695
|
const counts = {};
|
|
@@ -3699,7 +3700,7 @@ var PersonaTracker = class {
|
|
|
3699
3700
|
const snaps = rec.snapshots;
|
|
3700
3701
|
if (snaps.length === 0) continue;
|
|
3701
3702
|
const latestHoldings = snaps[snaps.length - 1].totalHoldings;
|
|
3702
|
-
const agentTxRate =
|
|
3703
|
+
const agentTxRate = txRatesUnsorted[i];
|
|
3703
3704
|
const ticksSinceFirst = currentTick - rec.firstSeen;
|
|
3704
3705
|
const ticksSinceActive = currentTick - rec.lastActive;
|
|
3705
3706
|
const halfIdx = Math.floor(snaps.length / 2);
|