@agent-e/core 1.5.8 → 1.5.10
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/README.md +1 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -173,7 +173,6 @@ Each principle returns either `{ violated: false }` or a full violation with sev
|
|
|
173
173
|
## Links
|
|
174
174
|
|
|
175
175
|
- [npm](https://www.npmjs.com/package/@agent-e/core)
|
|
176
|
-
- [GitHub](https://github.com/AE-Vault/AgentE)
|
|
177
176
|
|
|
178
177
|
## License
|
|
179
178
|
|
|
@@ -181,4 +180,4 @@ MIT
|
|
|
181
180
|
|
|
182
181
|
---
|
|
183
182
|
|
|
184
|
-
**Built by
|
|
183
|
+
**Built by Mohamed AbdelKhalek × Claude — Animoca Labs**
|
package/dist/index.d.mts
CHANGED
|
@@ -149,8 +149,8 @@ interface EconomyMetrics {
|
|
|
149
149
|
newUserDependency: number;
|
|
150
150
|
smokeTestRatio: number;
|
|
151
151
|
currencyInsulation: number;
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
cyclicalPeaks: number[];
|
|
153
|
+
cyclicalValleys: number[];
|
|
154
154
|
eventCompletionRate: number;
|
|
155
155
|
arbitrageIndexByCurrency: Record<string, number>;
|
|
156
156
|
arbitrageIndex: number;
|
|
@@ -292,8 +292,8 @@ interface Thresholds {
|
|
|
292
292
|
timeBudgetRatio: number;
|
|
293
293
|
payPowerRatioMax: number;
|
|
294
294
|
payPowerRatioTarget: number;
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
cyclicalPeakDecay: number;
|
|
296
|
+
cyclicalValleyDecay: number;
|
|
297
297
|
eventCompletionMin: number;
|
|
298
298
|
eventCompletionMax: number;
|
|
299
299
|
lagMultiplierMin: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -149,8 +149,8 @@ interface EconomyMetrics {
|
|
|
149
149
|
newUserDependency: number;
|
|
150
150
|
smokeTestRatio: number;
|
|
151
151
|
currencyInsulation: number;
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
cyclicalPeaks: number[];
|
|
153
|
+
cyclicalValleys: number[];
|
|
154
154
|
eventCompletionRate: number;
|
|
155
155
|
arbitrageIndexByCurrency: Record<string, number>;
|
|
156
156
|
arbitrageIndex: number;
|
|
@@ -292,8 +292,8 @@ interface Thresholds {
|
|
|
292
292
|
timeBudgetRatio: number;
|
|
293
293
|
payPowerRatioMax: number;
|
|
294
294
|
payPowerRatioTarget: number;
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
cyclicalPeakDecay: number;
|
|
296
|
+
cyclicalValleyDecay: number;
|
|
297
297
|
eventCompletionMin: number;
|
|
298
298
|
eventCompletionMax: number;
|
|
299
299
|
lagMultiplierMin: number;
|
package/dist/index.js
CHANGED
|
@@ -133,8 +133,8 @@ var DEFAULT_THRESHOLDS = {
|
|
|
133
133
|
payPowerRatioMax: 2,
|
|
134
134
|
payPowerRatioTarget: 1.5,
|
|
135
135
|
// Operations (P51, P53)
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
cyclicalPeakDecay: 0.95,
|
|
137
|
+
cyclicalValleyDecay: 0.9,
|
|
138
138
|
eventCompletionMin: 0.4,
|
|
139
139
|
eventCompletionMax: 0.8,
|
|
140
140
|
// System Dynamics (P39, P44)
|
|
@@ -566,8 +566,8 @@ var Observer = class {
|
|
|
566
566
|
avgSatisfaction,
|
|
567
567
|
blockedAgentCount,
|
|
568
568
|
timeToValue,
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
cyclicalPeaks: this.previousMetrics?.cyclicalPeaks ?? [],
|
|
570
|
+
cyclicalValleys: this.previousMetrics?.cyclicalValleys ?? [],
|
|
571
571
|
eventCompletionRate: 0,
|
|
572
572
|
contentDropAge,
|
|
573
573
|
systems: state.systems ?? [],
|
|
@@ -718,8 +718,8 @@ function emptyMetrics(tick = 0) {
|
|
|
718
718
|
avgSatisfaction: 100,
|
|
719
719
|
blockedAgentCount: 0,
|
|
720
720
|
timeToValue: 0,
|
|
721
|
-
|
|
722
|
-
|
|
721
|
+
cyclicalPeaks: [],
|
|
722
|
+
cyclicalValleys: [],
|
|
723
723
|
eventCompletionRate: 0,
|
|
724
724
|
contentDropAge: 0,
|
|
725
725
|
systems: [],
|
|
@@ -2673,11 +2673,11 @@ var P51_CyclicalEngagement = {
|
|
|
2673
2673
|
category: "operations",
|
|
2674
2674
|
description: "Each activity peak should be >=95% of the previous peak. If peaks are shrinking (cyclical engagement becoming flat), activity fatigue is setting in. If valleys are deepening, the off-activity economy is failing to sustain engagement.",
|
|
2675
2675
|
check(metrics, thresholds) {
|
|
2676
|
-
const {
|
|
2677
|
-
if (
|
|
2678
|
-
const lastPeak =
|
|
2679
|
-
const prevPeak =
|
|
2680
|
-
if (prevPeak > 0 && lastPeak / prevPeak < thresholds.
|
|
2676
|
+
const { cyclicalPeaks, cyclicalValleys } = metrics;
|
|
2677
|
+
if (cyclicalPeaks.length < 2) return { violated: false };
|
|
2678
|
+
const lastPeak = cyclicalPeaks[cyclicalPeaks.length - 1] ?? 0;
|
|
2679
|
+
const prevPeak = cyclicalPeaks[cyclicalPeaks.length - 2] ?? 0;
|
|
2680
|
+
if (prevPeak > 0 && lastPeak / prevPeak < thresholds.cyclicalPeakDecay) {
|
|
2681
2681
|
return {
|
|
2682
2682
|
violated: true,
|
|
2683
2683
|
severity: 5,
|
|
@@ -2685,22 +2685,22 @@ var P51_CyclicalEngagement = {
|
|
|
2685
2685
|
lastPeak,
|
|
2686
2686
|
prevPeak,
|
|
2687
2687
|
ratio: lastPeak / prevPeak,
|
|
2688
|
-
threshold: thresholds.
|
|
2688
|
+
threshold: thresholds.cyclicalPeakDecay
|
|
2689
2689
|
},
|
|
2690
2690
|
suggestedAction: {
|
|
2691
2691
|
parameterType: "reward",
|
|
2692
2692
|
direction: "increase",
|
|
2693
2693
|
magnitude: 0.1,
|
|
2694
|
-
reasoning: `Peak engagement dropped to ${(lastPeak / prevPeak * 100).toFixed(0)}% of previous peak (threshold: ${(thresholds.
|
|
2694
|
+
reasoning: `Peak engagement dropped to ${(lastPeak / prevPeak * 100).toFixed(0)}% of previous peak (threshold: ${(thresholds.cyclicalPeakDecay * 100).toFixed(0)}%). Activity fatigue detected. Boost activity rewards to restore peak engagement.`
|
|
2695
2695
|
},
|
|
2696
2696
|
confidence: 0.75,
|
|
2697
2697
|
estimatedLag: 30
|
|
2698
2698
|
};
|
|
2699
2699
|
}
|
|
2700
|
-
if (
|
|
2701
|
-
const lastValley =
|
|
2702
|
-
const prevValley =
|
|
2703
|
-
if (prevValley > 0 && lastValley / prevValley < thresholds.
|
|
2700
|
+
if (cyclicalValleys.length >= 2) {
|
|
2701
|
+
const lastValley = cyclicalValleys[cyclicalValleys.length - 1] ?? 0;
|
|
2702
|
+
const prevValley = cyclicalValleys[cyclicalValleys.length - 2] ?? 0;
|
|
2703
|
+
if (prevValley > 0 && lastValley / prevValley < thresholds.cyclicalValleyDecay) {
|
|
2704
2704
|
return {
|
|
2705
2705
|
violated: true,
|
|
2706
2706
|
severity: 4,
|