@agent-e/core 1.6.6 → 1.6.8
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.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +112 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +112 -86
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -321,6 +321,7 @@ interface Thresholds {
|
|
|
321
321
|
priceDiscoveryWindowTicks: number;
|
|
322
322
|
giftTradeFilterRatio: number;
|
|
323
323
|
disposalTradeWeightDiscount: number;
|
|
324
|
+
dominantRoles: string[];
|
|
324
325
|
}
|
|
325
326
|
interface TickConfig {
|
|
326
327
|
/** How many real-world units one tick represents. Default: 1 */
|
|
@@ -525,7 +526,7 @@ declare class Observer {
|
|
|
525
526
|
private tickConfig;
|
|
526
527
|
constructor(tickConfig?: Partial<TickConfig>);
|
|
527
528
|
registerCustomMetric(name: string, fn: (state: EconomyState) => number): void;
|
|
528
|
-
compute(state: EconomyState, recentEvents: EconomicEvent[]): EconomyMetrics;
|
|
529
|
+
compute(state: EconomyState, recentEvents: EconomicEvent[], personaDistribution?: Record<string, number>): EconomyMetrics;
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
declare class Simulator {
|
|
@@ -627,10 +628,14 @@ interface PersonaConfig {
|
|
|
627
628
|
powerUserMinSystems: number;
|
|
628
629
|
/** Rolling history window size (ticks). Default: 50 */
|
|
629
630
|
historyWindow: number;
|
|
631
|
+
/** Ticks between full reclassification. Default: 10 */
|
|
632
|
+
reclassifyInterval: number;
|
|
630
633
|
}
|
|
631
634
|
declare class PersonaTracker {
|
|
632
635
|
private agents;
|
|
633
636
|
private config;
|
|
637
|
+
private cachedDistribution;
|
|
638
|
+
private lastClassifiedTick;
|
|
634
639
|
constructor(config?: Partial<PersonaConfig>);
|
|
635
640
|
/**
|
|
636
641
|
* Ingest a state snapshot + events and update per-agent signals.
|
|
@@ -640,8 +645,10 @@ declare class PersonaTracker {
|
|
|
640
645
|
/**
|
|
641
646
|
* Classify all tracked agents and return the population distribution.
|
|
642
647
|
* Returns { Whale: 0.05, ActiveTrader: 0.18, Passive: 0.42, ... }
|
|
648
|
+
* Caches results and only reclassifies at `reclassifyInterval` boundaries.
|
|
643
649
|
*/
|
|
644
|
-
getDistribution(): Record<string, number>;
|
|
650
|
+
getDistribution(currentTick?: number): Record<string, number>;
|
|
651
|
+
private _classify;
|
|
645
652
|
}
|
|
646
653
|
|
|
647
654
|
/**
|
|
@@ -724,7 +731,7 @@ declare const FEEDBACK_LOOP_PRINCIPLES: Principle[];
|
|
|
724
731
|
declare const P25_CorrectLeversForCorrectProblems: Principle;
|
|
725
732
|
declare const P26_ContinuousPressureBeatsThresholdCuts: Principle;
|
|
726
733
|
declare const P27_AdjustmentsNeedCooldowns: Principle;
|
|
727
|
-
|
|
734
|
+
|
|
728
735
|
declare const P38_CommunicationPreventsRevolt: Principle;
|
|
729
736
|
declare const REGULATOR_PRINCIPLES: Principle[];
|
|
730
737
|
|
|
@@ -774,4 +781,4 @@ declare const OPERATIONS_PRINCIPLES: Principle[];
|
|
|
774
781
|
/** All 60 built-in principles in priority order (supply chain → operations) */
|
|
775
782
|
declare const ALL_PRINCIPLES: Principle[];
|
|
776
783
|
|
|
777
|
-
export { ALL_PRINCIPLES, type ActionPlan, AgentE, type AgentEConfig, type AgentEMode, BOOTSTRAP_PRINCIPLES, CURRENCY_FLOW_PRINCIPLES, DEFAULT_THRESHOLDS, type DecisionEntry, DecisionLog, type DecisionResult, Diagnoser, type Diagnosis, type EconomicEvent, type EconomicEventType, type EconomyAdapter, type EconomyMetrics, type EconomyState, type ExecutionResult, Executor, FEEDBACK_LOOP_PRINCIPLES, type FlowImpact, INCENTIVE_PRINCIPLES, MARKET_DYNAMICS_PRINCIPLES, MEASUREMENT_PRINCIPLES, type MetricQuery, type MetricQueryResult, type MetricResolution, MetricStore, OPEN_ECONOMY_PRINCIPLES, OPERATIONS_PRINCIPLES, Observer, P10_EntryWeightingUsesInversePopulation, P11_TwoTierPressure, P12_OnePrimaryFaucet, P13_PotsAreZeroSumAndSelfRegulate, P14_TrackActualInjection, P15_PoolsNeedCapAndDecay, P16_WithdrawalPenaltyScales, P17_GracePeriodBeforeIntervention, P18_FirstProducerNeedsStartingInventory, P19_StartingSupplyExceedsDemand, P1_ProductionMatchesConsumption, P20_DecayPreventsAccumulation, P21_PriceFromGlobalSupply, P22_MarketAwarenessPreventsSurplus, P23_ProfitabilityFactorsFeasibility, P24_BlockedAgentsDecayFaster, P25_CorrectLeversForCorrectProblems, P26_ContinuousPressureBeatsThresholdCuts, P27_AdjustmentsNeedCooldowns, P28_StructuralDominanceIsNotPathological, P29_BottleneckDetection, P2_ClosedLoopsNeedDirectHandoff, P30_DynamicBottleneckRotation, P31_AnchorValueTracking, P32_VelocityAboveSupply, P33_FairNotEqual, P34_ExtractionRatio, P35_DestructionCreatesValue, P36_MechanicFrictionDetector, P37_LatecommerProblem, P38_CommunicationPreventsRevolt, P39_TheLagPrinciple, P3_BootstrapCapitalCoversFirstTransaction, P40_ReplacementRate, P41_MultiResolutionMonitoring, P42_TheMedianPrinciple, P43_SimulationMinimum, P44_ComplexityBudget, P45_TimeBudget, P46_PersonaDiversity, P47_SmokeTest, P48_CurrencyInsulation, P49_IdleAssetTax, P4_MaterialsFlowFasterThanCooldown, P50_PayPowerRatio, P51_CyclicalEngagement, P52_EndowmentEffect, P53_EventCompletionRate, P54_OperationalCadence, P55_ArbitrageThermometer, P56_SupplyShockAbsorption, P57_CombinatorialPriceSpace, P58_NoNaturalNumeraire, P59_GiftEconomyNoise, P5_ProfitabilityIsRelative, P60_SurplusDisposalAsymmetry, P6_CrowdingMultiplierOnAllRoles, P7_NonSpecialistsSubsidiseSpecialists, P8_RegulatorCannotFightDesign, P9_RoleSwitchingNeedsFriction, PARTICIPANT_EXPERIENCE_PRINCIPLES, PERSONA_HEALTHY_RANGES, POPULATION_PRINCIPLES, ParameterRegistry, type ParameterScope, type ParameterType, type PersonaConfig, type PersonaProfile, PersonaTracker, type PersonaType, type PinchPointStatus, Planner, type Principle, type PrincipleCategory, type PrincipleOk, type PrincipleResult, type PrincipleViolation, REGULATOR_PRINCIPLES, RESOURCE_MGMT_PRINCIPLES, type RegisteredParameter, type RegistryValidationResult, type RollbackCondition, STATISTICAL_PRINCIPLES, SUPPLY_CHAIN_PRINCIPLES, SYSTEM_DYNAMICS_PRINCIPLES, type SimulationConfig, type SimulationOutcome, type SimulationResult, Simulator, type SuggestedAction, type Thresholds, type TickConfig, type ValidationError, type ValidationResult, type ValidationWarning, emptyMetrics, findWorstSystem, validateEconomyState };
|
|
784
|
+
export { ALL_PRINCIPLES, type ActionPlan, AgentE, type AgentEConfig, type AgentEMode, BOOTSTRAP_PRINCIPLES, CURRENCY_FLOW_PRINCIPLES, DEFAULT_THRESHOLDS, type DecisionEntry, DecisionLog, type DecisionResult, Diagnoser, type Diagnosis, type EconomicEvent, type EconomicEventType, type EconomyAdapter, type EconomyMetrics, type EconomyState, type ExecutionResult, Executor, FEEDBACK_LOOP_PRINCIPLES, type FlowImpact, INCENTIVE_PRINCIPLES, MARKET_DYNAMICS_PRINCIPLES, MEASUREMENT_PRINCIPLES, type MetricQuery, type MetricQueryResult, type MetricResolution, MetricStore, OPEN_ECONOMY_PRINCIPLES, OPERATIONS_PRINCIPLES, Observer, P10_EntryWeightingUsesInversePopulation, P11_TwoTierPressure, P12_OnePrimaryFaucet, P13_PotsAreZeroSumAndSelfRegulate, P14_TrackActualInjection, P15_PoolsNeedCapAndDecay, P16_WithdrawalPenaltyScales, P17_GracePeriodBeforeIntervention, P18_FirstProducerNeedsStartingInventory, P19_StartingSupplyExceedsDemand, P1_ProductionMatchesConsumption, P20_DecayPreventsAccumulation, P21_PriceFromGlobalSupply, P22_MarketAwarenessPreventsSurplus, P23_ProfitabilityFactorsFeasibility, P24_BlockedAgentsDecayFaster, P25_CorrectLeversForCorrectProblems, P26_ContinuousPressureBeatsThresholdCuts, P27_AdjustmentsNeedCooldowns, P8_RegulatorCannotFightDesign as P28_StructuralDominanceIsNotPathological, P29_BottleneckDetection, P2_ClosedLoopsNeedDirectHandoff, P30_DynamicBottleneckRotation, P31_AnchorValueTracking, P32_VelocityAboveSupply, P33_FairNotEqual, P34_ExtractionRatio, P35_DestructionCreatesValue, P36_MechanicFrictionDetector, P37_LatecommerProblem, P38_CommunicationPreventsRevolt, P39_TheLagPrinciple, P3_BootstrapCapitalCoversFirstTransaction, P40_ReplacementRate, P41_MultiResolutionMonitoring, P42_TheMedianPrinciple, P43_SimulationMinimum, P44_ComplexityBudget, P45_TimeBudget, P46_PersonaDiversity, P47_SmokeTest, P48_CurrencyInsulation, P49_IdleAssetTax, P4_MaterialsFlowFasterThanCooldown, P50_PayPowerRatio, P51_CyclicalEngagement, P52_EndowmentEffect, P53_EventCompletionRate, P54_OperationalCadence, P55_ArbitrageThermometer, P56_SupplyShockAbsorption, P57_CombinatorialPriceSpace, P58_NoNaturalNumeraire, P59_GiftEconomyNoise, P5_ProfitabilityIsRelative, P60_SurplusDisposalAsymmetry, P6_CrowdingMultiplierOnAllRoles, P7_NonSpecialistsSubsidiseSpecialists, P8_RegulatorCannotFightDesign, P9_RoleSwitchingNeedsFriction, PARTICIPANT_EXPERIENCE_PRINCIPLES, PERSONA_HEALTHY_RANGES, POPULATION_PRINCIPLES, ParameterRegistry, type ParameterScope, type ParameterType, type PersonaConfig, type PersonaProfile, PersonaTracker, type PersonaType, type PinchPointStatus, Planner, type Principle, type PrincipleCategory, type PrincipleOk, type PrincipleResult, type PrincipleViolation, REGULATOR_PRINCIPLES, RESOURCE_MGMT_PRINCIPLES, type RegisteredParameter, type RegistryValidationResult, type RollbackCondition, STATISTICAL_PRINCIPLES, SUPPLY_CHAIN_PRINCIPLES, SYSTEM_DYNAMICS_PRINCIPLES, type SimulationConfig, type SimulationOutcome, type SimulationResult, Simulator, type SuggestedAction, type Thresholds, type TickConfig, type ValidationError, type ValidationResult, type ValidationWarning, emptyMetrics, findWorstSystem, validateEconomyState };
|
package/dist/index.d.ts
CHANGED
|
@@ -321,6 +321,7 @@ interface Thresholds {
|
|
|
321
321
|
priceDiscoveryWindowTicks: number;
|
|
322
322
|
giftTradeFilterRatio: number;
|
|
323
323
|
disposalTradeWeightDiscount: number;
|
|
324
|
+
dominantRoles: string[];
|
|
324
325
|
}
|
|
325
326
|
interface TickConfig {
|
|
326
327
|
/** How many real-world units one tick represents. Default: 1 */
|
|
@@ -525,7 +526,7 @@ declare class Observer {
|
|
|
525
526
|
private tickConfig;
|
|
526
527
|
constructor(tickConfig?: Partial<TickConfig>);
|
|
527
528
|
registerCustomMetric(name: string, fn: (state: EconomyState) => number): void;
|
|
528
|
-
compute(state: EconomyState, recentEvents: EconomicEvent[]): EconomyMetrics;
|
|
529
|
+
compute(state: EconomyState, recentEvents: EconomicEvent[], personaDistribution?: Record<string, number>): EconomyMetrics;
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
declare class Simulator {
|
|
@@ -627,10 +628,14 @@ interface PersonaConfig {
|
|
|
627
628
|
powerUserMinSystems: number;
|
|
628
629
|
/** Rolling history window size (ticks). Default: 50 */
|
|
629
630
|
historyWindow: number;
|
|
631
|
+
/** Ticks between full reclassification. Default: 10 */
|
|
632
|
+
reclassifyInterval: number;
|
|
630
633
|
}
|
|
631
634
|
declare class PersonaTracker {
|
|
632
635
|
private agents;
|
|
633
636
|
private config;
|
|
637
|
+
private cachedDistribution;
|
|
638
|
+
private lastClassifiedTick;
|
|
634
639
|
constructor(config?: Partial<PersonaConfig>);
|
|
635
640
|
/**
|
|
636
641
|
* Ingest a state snapshot + events and update per-agent signals.
|
|
@@ -640,8 +645,10 @@ declare class PersonaTracker {
|
|
|
640
645
|
/**
|
|
641
646
|
* Classify all tracked agents and return the population distribution.
|
|
642
647
|
* Returns { Whale: 0.05, ActiveTrader: 0.18, Passive: 0.42, ... }
|
|
648
|
+
* Caches results and only reclassifies at `reclassifyInterval` boundaries.
|
|
643
649
|
*/
|
|
644
|
-
getDistribution(): Record<string, number>;
|
|
650
|
+
getDistribution(currentTick?: number): Record<string, number>;
|
|
651
|
+
private _classify;
|
|
645
652
|
}
|
|
646
653
|
|
|
647
654
|
/**
|
|
@@ -724,7 +731,7 @@ declare const FEEDBACK_LOOP_PRINCIPLES: Principle[];
|
|
|
724
731
|
declare const P25_CorrectLeversForCorrectProblems: Principle;
|
|
725
732
|
declare const P26_ContinuousPressureBeatsThresholdCuts: Principle;
|
|
726
733
|
declare const P27_AdjustmentsNeedCooldowns: Principle;
|
|
727
|
-
|
|
734
|
+
|
|
728
735
|
declare const P38_CommunicationPreventsRevolt: Principle;
|
|
729
736
|
declare const REGULATOR_PRINCIPLES: Principle[];
|
|
730
737
|
|
|
@@ -774,4 +781,4 @@ declare const OPERATIONS_PRINCIPLES: Principle[];
|
|
|
774
781
|
/** All 60 built-in principles in priority order (supply chain → operations) */
|
|
775
782
|
declare const ALL_PRINCIPLES: Principle[];
|
|
776
783
|
|
|
777
|
-
export { ALL_PRINCIPLES, type ActionPlan, AgentE, type AgentEConfig, type AgentEMode, BOOTSTRAP_PRINCIPLES, CURRENCY_FLOW_PRINCIPLES, DEFAULT_THRESHOLDS, type DecisionEntry, DecisionLog, type DecisionResult, Diagnoser, type Diagnosis, type EconomicEvent, type EconomicEventType, type EconomyAdapter, type EconomyMetrics, type EconomyState, type ExecutionResult, Executor, FEEDBACK_LOOP_PRINCIPLES, type FlowImpact, INCENTIVE_PRINCIPLES, MARKET_DYNAMICS_PRINCIPLES, MEASUREMENT_PRINCIPLES, type MetricQuery, type MetricQueryResult, type MetricResolution, MetricStore, OPEN_ECONOMY_PRINCIPLES, OPERATIONS_PRINCIPLES, Observer, P10_EntryWeightingUsesInversePopulation, P11_TwoTierPressure, P12_OnePrimaryFaucet, P13_PotsAreZeroSumAndSelfRegulate, P14_TrackActualInjection, P15_PoolsNeedCapAndDecay, P16_WithdrawalPenaltyScales, P17_GracePeriodBeforeIntervention, P18_FirstProducerNeedsStartingInventory, P19_StartingSupplyExceedsDemand, P1_ProductionMatchesConsumption, P20_DecayPreventsAccumulation, P21_PriceFromGlobalSupply, P22_MarketAwarenessPreventsSurplus, P23_ProfitabilityFactorsFeasibility, P24_BlockedAgentsDecayFaster, P25_CorrectLeversForCorrectProblems, P26_ContinuousPressureBeatsThresholdCuts, P27_AdjustmentsNeedCooldowns, P28_StructuralDominanceIsNotPathological, P29_BottleneckDetection, P2_ClosedLoopsNeedDirectHandoff, P30_DynamicBottleneckRotation, P31_AnchorValueTracking, P32_VelocityAboveSupply, P33_FairNotEqual, P34_ExtractionRatio, P35_DestructionCreatesValue, P36_MechanicFrictionDetector, P37_LatecommerProblem, P38_CommunicationPreventsRevolt, P39_TheLagPrinciple, P3_BootstrapCapitalCoversFirstTransaction, P40_ReplacementRate, P41_MultiResolutionMonitoring, P42_TheMedianPrinciple, P43_SimulationMinimum, P44_ComplexityBudget, P45_TimeBudget, P46_PersonaDiversity, P47_SmokeTest, P48_CurrencyInsulation, P49_IdleAssetTax, P4_MaterialsFlowFasterThanCooldown, P50_PayPowerRatio, P51_CyclicalEngagement, P52_EndowmentEffect, P53_EventCompletionRate, P54_OperationalCadence, P55_ArbitrageThermometer, P56_SupplyShockAbsorption, P57_CombinatorialPriceSpace, P58_NoNaturalNumeraire, P59_GiftEconomyNoise, P5_ProfitabilityIsRelative, P60_SurplusDisposalAsymmetry, P6_CrowdingMultiplierOnAllRoles, P7_NonSpecialistsSubsidiseSpecialists, P8_RegulatorCannotFightDesign, P9_RoleSwitchingNeedsFriction, PARTICIPANT_EXPERIENCE_PRINCIPLES, PERSONA_HEALTHY_RANGES, POPULATION_PRINCIPLES, ParameterRegistry, type ParameterScope, type ParameterType, type PersonaConfig, type PersonaProfile, PersonaTracker, type PersonaType, type PinchPointStatus, Planner, type Principle, type PrincipleCategory, type PrincipleOk, type PrincipleResult, type PrincipleViolation, REGULATOR_PRINCIPLES, RESOURCE_MGMT_PRINCIPLES, type RegisteredParameter, type RegistryValidationResult, type RollbackCondition, STATISTICAL_PRINCIPLES, SUPPLY_CHAIN_PRINCIPLES, SYSTEM_DYNAMICS_PRINCIPLES, type SimulationConfig, type SimulationOutcome, type SimulationResult, Simulator, type SuggestedAction, type Thresholds, type TickConfig, type ValidationError, type ValidationResult, type ValidationWarning, emptyMetrics, findWorstSystem, validateEconomyState };
|
|
784
|
+
export { ALL_PRINCIPLES, type ActionPlan, AgentE, type AgentEConfig, type AgentEMode, BOOTSTRAP_PRINCIPLES, CURRENCY_FLOW_PRINCIPLES, DEFAULT_THRESHOLDS, type DecisionEntry, DecisionLog, type DecisionResult, Diagnoser, type Diagnosis, type EconomicEvent, type EconomicEventType, type EconomyAdapter, type EconomyMetrics, type EconomyState, type ExecutionResult, Executor, FEEDBACK_LOOP_PRINCIPLES, type FlowImpact, INCENTIVE_PRINCIPLES, MARKET_DYNAMICS_PRINCIPLES, MEASUREMENT_PRINCIPLES, type MetricQuery, type MetricQueryResult, type MetricResolution, MetricStore, OPEN_ECONOMY_PRINCIPLES, OPERATIONS_PRINCIPLES, Observer, P10_EntryWeightingUsesInversePopulation, P11_TwoTierPressure, P12_OnePrimaryFaucet, P13_PotsAreZeroSumAndSelfRegulate, P14_TrackActualInjection, P15_PoolsNeedCapAndDecay, P16_WithdrawalPenaltyScales, P17_GracePeriodBeforeIntervention, P18_FirstProducerNeedsStartingInventory, P19_StartingSupplyExceedsDemand, P1_ProductionMatchesConsumption, P20_DecayPreventsAccumulation, P21_PriceFromGlobalSupply, P22_MarketAwarenessPreventsSurplus, P23_ProfitabilityFactorsFeasibility, P24_BlockedAgentsDecayFaster, P25_CorrectLeversForCorrectProblems, P26_ContinuousPressureBeatsThresholdCuts, P27_AdjustmentsNeedCooldowns, P8_RegulatorCannotFightDesign as P28_StructuralDominanceIsNotPathological, P29_BottleneckDetection, P2_ClosedLoopsNeedDirectHandoff, P30_DynamicBottleneckRotation, P31_AnchorValueTracking, P32_VelocityAboveSupply, P33_FairNotEqual, P34_ExtractionRatio, P35_DestructionCreatesValue, P36_MechanicFrictionDetector, P37_LatecommerProblem, P38_CommunicationPreventsRevolt, P39_TheLagPrinciple, P3_BootstrapCapitalCoversFirstTransaction, P40_ReplacementRate, P41_MultiResolutionMonitoring, P42_TheMedianPrinciple, P43_SimulationMinimum, P44_ComplexityBudget, P45_TimeBudget, P46_PersonaDiversity, P47_SmokeTest, P48_CurrencyInsulation, P49_IdleAssetTax, P4_MaterialsFlowFasterThanCooldown, P50_PayPowerRatio, P51_CyclicalEngagement, P52_EndowmentEffect, P53_EventCompletionRate, P54_OperationalCadence, P55_ArbitrageThermometer, P56_SupplyShockAbsorption, P57_CombinatorialPriceSpace, P58_NoNaturalNumeraire, P59_GiftEconomyNoise, P5_ProfitabilityIsRelative, P60_SurplusDisposalAsymmetry, P6_CrowdingMultiplierOnAllRoles, P7_NonSpecialistsSubsidiseSpecialists, P8_RegulatorCannotFightDesign, P9_RoleSwitchingNeedsFriction, PARTICIPANT_EXPERIENCE_PRINCIPLES, PERSONA_HEALTHY_RANGES, POPULATION_PRINCIPLES, ParameterRegistry, type ParameterScope, type ParameterType, type PersonaConfig, type PersonaProfile, PersonaTracker, type PersonaType, type PinchPointStatus, Planner, type Principle, type PrincipleCategory, type PrincipleOk, type PrincipleResult, type PrincipleViolation, REGULATOR_PRINCIPLES, RESOURCE_MGMT_PRINCIPLES, type RegisteredParameter, type RegistryValidationResult, type RollbackCondition, STATISTICAL_PRINCIPLES, SUPPLY_CHAIN_PRINCIPLES, SYSTEM_DYNAMICS_PRINCIPLES, type SimulationConfig, type SimulationOutcome, type SimulationResult, Simulator, type SuggestedAction, type Thresholds, type TickConfig, type ValidationError, type ValidationResult, type ValidationWarning, emptyMetrics, findWorstSystem, validateEconomyState };
|
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ __export(index_exports, {
|
|
|
55
55
|
P25_CorrectLeversForCorrectProblems: () => P25_CorrectLeversForCorrectProblems,
|
|
56
56
|
P26_ContinuousPressureBeatsThresholdCuts: () => P26_ContinuousPressureBeatsThresholdCuts,
|
|
57
57
|
P27_AdjustmentsNeedCooldowns: () => P27_AdjustmentsNeedCooldowns,
|
|
58
|
-
P28_StructuralDominanceIsNotPathological: () =>
|
|
58
|
+
P28_StructuralDominanceIsNotPathological: () => P8_RegulatorCannotFightDesign,
|
|
59
59
|
P29_BottleneckDetection: () => P29_BottleneckDetection,
|
|
60
60
|
P2_ClosedLoopsNeedDirectHandoff: () => P2_ClosedLoopsNeedDirectHandoff,
|
|
61
61
|
P30_DynamicBottleneckRotation: () => P30_DynamicBottleneckRotation,
|
|
@@ -176,7 +176,9 @@ var DEFAULT_THRESHOLDS = {
|
|
|
176
176
|
relativePriceConvergenceTarget: 0.85,
|
|
177
177
|
priceDiscoveryWindowTicks: 20,
|
|
178
178
|
giftTradeFilterRatio: 0.15,
|
|
179
|
-
disposalTradeWeightDiscount: 0.5
|
|
179
|
+
disposalTradeWeightDiscount: 0.5,
|
|
180
|
+
// Structural dominance (P8)
|
|
181
|
+
dominantRoles: []
|
|
180
182
|
};
|
|
181
183
|
var PERSONA_HEALTHY_RANGES = {
|
|
182
184
|
Active: { min: 0.2, max: 0.4 },
|
|
@@ -208,7 +210,7 @@ var Observer = class {
|
|
|
208
210
|
registerCustomMetric(name, fn) {
|
|
209
211
|
this.customMetricFns[name] = fn;
|
|
210
212
|
}
|
|
211
|
-
compute(state, recentEvents) {
|
|
213
|
+
compute(state, recentEvents, personaDistribution) {
|
|
212
214
|
if (!state.currencies || state.currencies.length === 0) {
|
|
213
215
|
console.warn("[AgentE] Warning: state.currencies is empty. Metrics will be zeroed.");
|
|
214
216
|
}
|
|
@@ -361,6 +363,18 @@ var Observer = class {
|
|
|
361
363
|
for (const [role, count] of Object.entries(populationByRole)) {
|
|
362
364
|
roleShares[role] = count / Math.max(1, totalAgents);
|
|
363
365
|
}
|
|
366
|
+
const uniqueRoles = new Set(Object.values(state.agentRoles));
|
|
367
|
+
const rolesEmpty = uniqueRoles.size <= 1;
|
|
368
|
+
if (rolesEmpty && personaDistribution && Object.keys(personaDistribution).length > 0) {
|
|
369
|
+
for (const key of Object.keys(populationByRole)) delete populationByRole[key];
|
|
370
|
+
for (const key of Object.keys(roleShares)) delete roleShares[key];
|
|
371
|
+
for (const [persona, fraction] of Object.entries(personaDistribution)) {
|
|
372
|
+
populationByRole[persona] = Math.round(fraction * totalAgents);
|
|
373
|
+
}
|
|
374
|
+
for (const [role, count] of Object.entries(populationByRole)) {
|
|
375
|
+
roleShares[role] = count / Math.max(1, totalAgents);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
364
378
|
const churnByRole = {};
|
|
365
379
|
for (const e of roleChangeEvents) {
|
|
366
380
|
const role = e.role ?? "unknown";
|
|
@@ -850,25 +864,50 @@ var P4_MaterialsFlowFasterThanCooldown = {
|
|
|
850
864
|
category: "supply_chain",
|
|
851
865
|
description: "Input delivery rate must exceed or match production cooldown rate. If producers produce every 5 ticks but only receive raw materials every 10 ticks, they starve regardless of supply levels.",
|
|
852
866
|
check(metrics, _thresholds) {
|
|
853
|
-
const { supplyByResource, populationByRole, velocity, totalAgents } = metrics;
|
|
867
|
+
const { supplyByResource, populationByRole, velocity, velocityByCurrency, totalAgents } = metrics;
|
|
854
868
|
const totalSupply = Object.values(supplyByResource).reduce((s, v) => s + v, 0);
|
|
855
869
|
const avgSupplyPerAgent = totalAgents > 0 ? totalSupply / totalAgents : 0;
|
|
856
870
|
const roleEntries = Object.entries(populationByRole);
|
|
857
871
|
const totalRoles = roleEntries.length;
|
|
858
|
-
if (totalRoles >= 2 &&
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
+
if (totalRoles >= 2 && avgSupplyPerAgent < 0.5) {
|
|
873
|
+
const stagnantCurrencies = [];
|
|
874
|
+
for (const [currency, currVelocity] of Object.entries(velocityByCurrency)) {
|
|
875
|
+
if (currVelocity < 5) {
|
|
876
|
+
stagnantCurrencies.push({ currency, currVelocity });
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
if (stagnantCurrencies.length > 0) {
|
|
880
|
+
const worst = stagnantCurrencies.reduce((a, b) => a.currVelocity < b.currVelocity ? a : b);
|
|
881
|
+
return {
|
|
882
|
+
violated: true,
|
|
883
|
+
severity: 5,
|
|
884
|
+
evidence: { stagnantCurrencies, worst: worst.currency, avgSupplyPerAgent, totalRoles },
|
|
885
|
+
suggestedAction: {
|
|
886
|
+
parameterType: "yield",
|
|
887
|
+
scope: { currency: worst.currency },
|
|
888
|
+
direction: "increase",
|
|
889
|
+
magnitude: 0.15,
|
|
890
|
+
reasoning: `${stagnantCurrencies.length} currencies stagnant (worst: ${worst.currency} at ${worst.currVelocity.toFixed(1)}). Increase yield to compensate.`
|
|
891
|
+
},
|
|
892
|
+
confidence: 0.7,
|
|
893
|
+
estimatedLag: 8
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
if (Object.keys(velocityByCurrency).length === 0 && velocity < 5) {
|
|
897
|
+
return {
|
|
898
|
+
violated: true,
|
|
899
|
+
severity: 5,
|
|
900
|
+
evidence: { avgSupplyPerAgent, velocity, totalRoles },
|
|
901
|
+
suggestedAction: {
|
|
902
|
+
parameterType: "yield",
|
|
903
|
+
direction: "increase",
|
|
904
|
+
magnitude: 0.15,
|
|
905
|
+
reasoning: "Low supply per agent with stagnant velocity. Increase yield to compensate."
|
|
906
|
+
},
|
|
907
|
+
confidence: 0.65,
|
|
908
|
+
estimatedLag: 8
|
|
909
|
+
};
|
|
910
|
+
}
|
|
872
911
|
}
|
|
873
912
|
if (avgSupplyPerAgent > 2) {
|
|
874
913
|
return {
|
|
@@ -1027,28 +1066,31 @@ var P8_RegulatorCannotFightDesign = {
|
|
|
1027
1066
|
id: "P8",
|
|
1028
1067
|
name: "Regulator Cannot Fight the Design",
|
|
1029
1068
|
category: "incentive",
|
|
1030
|
-
description: "If
|
|
1031
|
-
check(metrics,
|
|
1069
|
+
description: "If a role dominates above 30%, classify as structural (in dominantRoles config) or pathological. Structural dominance gets no intervention. Pathological dominance gets crowding pressure.",
|
|
1070
|
+
check(metrics, thresholds) {
|
|
1032
1071
|
const { roleShares, avgSatisfaction } = metrics;
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
suggestedAction: {
|
|
1041
|
-
parameterType: "reward",
|
|
1042
|
-
direction: "increase",
|
|
1043
|
-
magnitude: 0.1,
|
|
1044
|
-
reasoning: `Low satisfaction with ${dominantRole[0]} dominant. Regulator may be suppressing a structurally necessary role. Ease pressure on dominant role rewards.`
|
|
1045
|
-
},
|
|
1046
|
-
confidence: 0.55,
|
|
1047
|
-
estimatedLag: 8
|
|
1048
|
-
};
|
|
1049
|
-
}
|
|
1072
|
+
const dominant = Object.entries(roleShares).sort((a, b) => b[1] - a[1])[0];
|
|
1073
|
+
if (!dominant) return { violated: false };
|
|
1074
|
+
const [dominantRole, dominantShare] = dominant;
|
|
1075
|
+
if (dominantShare <= 0.3) return { violated: false };
|
|
1076
|
+
const isStructural = thresholds.dominantRoles?.includes(dominantRole) ?? false;
|
|
1077
|
+
if (isStructural) {
|
|
1078
|
+
return { violated: false };
|
|
1050
1079
|
}
|
|
1051
|
-
return {
|
|
1080
|
+
return {
|
|
1081
|
+
violated: true,
|
|
1082
|
+
severity: 7,
|
|
1083
|
+
evidence: { role: dominantRole, share: dominantShare, classification: "pathological", avgSatisfaction },
|
|
1084
|
+
suggestedAction: {
|
|
1085
|
+
parameterType: "reward",
|
|
1086
|
+
scope: { tags: [dominantRole] },
|
|
1087
|
+
direction: "decrease",
|
|
1088
|
+
magnitude: 0.1,
|
|
1089
|
+
reasoning: `${dominantRole} at ${(dominantShare * 100).toFixed(0)}% is not a designed majority \u2014 apply crowding pressure.`
|
|
1090
|
+
},
|
|
1091
|
+
confidence: 0.7,
|
|
1092
|
+
estimatedLag: 12
|
|
1093
|
+
};
|
|
1052
1094
|
}
|
|
1053
1095
|
};
|
|
1054
1096
|
var INCENTIVE_PRINCIPLES = [
|
|
@@ -1314,7 +1356,7 @@ var P15_PoolsNeedCapAndDecay = {
|
|
|
1314
1356
|
id: "P15",
|
|
1315
1357
|
name: "Pools Need Cap + Decay",
|
|
1316
1358
|
category: "currency",
|
|
1317
|
-
description: "Any pool (bank, reward pool) without a cap accumulates infinitely. A pool at 42% of total supply means 42% of the economy is frozen. Cap
|
|
1359
|
+
description: "Any pool (bank, reward pool) without a cap accumulates infinitely. A pool at 42% of total supply means 42% of the economy is frozen. Cap configurable (default 10%). Violation fires at 2\xD7 cap share of total supply.",
|
|
1318
1360
|
check(metrics, thresholds) {
|
|
1319
1361
|
const { poolCapPercent } = thresholds;
|
|
1320
1362
|
for (const [pool, currencyAmounts] of Object.entries(metrics.poolSizesByCurrency)) {
|
|
@@ -1347,7 +1389,7 @@ var P16_WithdrawalPenaltyScales = {
|
|
|
1347
1389
|
id: "P16",
|
|
1348
1390
|
name: "Withdrawal Penalty Scales with Lock Duration",
|
|
1349
1391
|
category: "currency",
|
|
1350
|
-
description: "
|
|
1392
|
+
description: "Depleted pool with estimated high staking signals early-withdrawal abuse. Symptom detector \u2014 penalty formula is developer responsibility.",
|
|
1351
1393
|
check(metrics, _thresholds) {
|
|
1352
1394
|
for (const [poolName, currencyAmounts] of Object.entries(metrics.poolSizesByCurrency)) {
|
|
1353
1395
|
for (const curr of metrics.currencies) {
|
|
@@ -1463,7 +1505,7 @@ var P17_GracePeriodBeforeIntervention = {
|
|
|
1463
1505
|
id: "P17",
|
|
1464
1506
|
name: "Grace Period Before Intervention",
|
|
1465
1507
|
category: "bootstrap",
|
|
1466
|
-
description: "Any intervention before tick
|
|
1508
|
+
description: "Any intervention before tick 30 is premature. The economy needs time to bootstrap with designed distributions. Early intervention against designed dominance can kill the economy instantly.",
|
|
1467
1509
|
check(metrics, _thresholds) {
|
|
1468
1510
|
if (metrics.tick < 30 && metrics.avgSatisfaction < 40) {
|
|
1469
1511
|
return {
|
|
@@ -1784,7 +1826,7 @@ var P27_AdjustmentsNeedCooldowns = {
|
|
|
1784
1826
|
id: "P27",
|
|
1785
1827
|
name: "Adjustments Need Cooldowns",
|
|
1786
1828
|
category: "regulator",
|
|
1787
|
-
description: "
|
|
1829
|
+
description: "High churn + low satisfaction may indicate oscillation from rapid adjustments. Cooldown enforcement is structural (Planner). This is a symptom detector.",
|
|
1788
1830
|
check(metrics, _thresholds) {
|
|
1789
1831
|
const { churnRate, avgSatisfaction } = metrics;
|
|
1790
1832
|
if (churnRate > 0.08 && avgSatisfaction < 50) {
|
|
@@ -1806,42 +1848,11 @@ var P27_AdjustmentsNeedCooldowns = {
|
|
|
1806
1848
|
return { violated: false };
|
|
1807
1849
|
}
|
|
1808
1850
|
};
|
|
1809
|
-
var P28_StructuralDominanceIsNotPathological = {
|
|
1810
|
-
id: "P28",
|
|
1811
|
-
name: "Structural Dominance \u2260 Pathological Monopoly",
|
|
1812
|
-
category: "regulator",
|
|
1813
|
-
description: 'A designed dominant role (majority exceeds 55%) should not trigger population suppression. AgentE must distinguish between "this role is dominant BY DESIGN" (configured via dominantRoles) and "this role took over unexpectedly".',
|
|
1814
|
-
check(metrics, _thresholds) {
|
|
1815
|
-
const { roleShares, avgSatisfaction } = metrics;
|
|
1816
|
-
const dominant = Object.entries(roleShares).sort((a, b) => b[1] - a[1])[0];
|
|
1817
|
-
if (!dominant) return { violated: false };
|
|
1818
|
-
const [dominantRole, dominantShare] = dominant;
|
|
1819
|
-
if (dominantShare > 0.4 && avgSatisfaction > 70) {
|
|
1820
|
-
return { violated: false };
|
|
1821
|
-
}
|
|
1822
|
-
if (dominantShare > 0.4 && avgSatisfaction < 50) {
|
|
1823
|
-
return {
|
|
1824
|
-
violated: true,
|
|
1825
|
-
severity: 5,
|
|
1826
|
-
evidence: { dominantRole, dominantShare, avgSatisfaction },
|
|
1827
|
-
suggestedAction: {
|
|
1828
|
-
parameterType: "cost",
|
|
1829
|
-
direction: "decrease",
|
|
1830
|
-
magnitude: 0.1,
|
|
1831
|
-
reasoning: `${dominantRole} dominant (${(dominantShare * 100).toFixed(0)}%) with low satisfaction. Pathological dominance \u2014 agents trapped, not thriving. Ease costs to allow role switching.`
|
|
1832
|
-
},
|
|
1833
|
-
confidence: 0.65,
|
|
1834
|
-
estimatedLag: 15
|
|
1835
|
-
};
|
|
1836
|
-
}
|
|
1837
|
-
return { violated: false };
|
|
1838
|
-
}
|
|
1839
|
-
};
|
|
1840
1851
|
var P38_CommunicationPreventsRevolt = {
|
|
1841
1852
|
id: "P38",
|
|
1842
1853
|
name: "Communication Prevents Revolt",
|
|
1843
1854
|
category: "regulator",
|
|
1844
|
-
description: "
|
|
1855
|
+
description: "High churn may indicate unexplained changes. Logging enforcement is structural (DecisionLog). Flags high churn as signal to review recent decisions.",
|
|
1845
1856
|
check(metrics, _thresholds) {
|
|
1846
1857
|
const { churnRate } = metrics;
|
|
1847
1858
|
if (churnRate > 0.1) {
|
|
@@ -1866,7 +1877,7 @@ var REGULATOR_PRINCIPLES = [
|
|
|
1866
1877
|
P25_CorrectLeversForCorrectProblems,
|
|
1867
1878
|
P26_ContinuousPressureBeatsThresholdCuts,
|
|
1868
1879
|
P27_AdjustmentsNeedCooldowns,
|
|
1869
|
-
|
|
1880
|
+
// P28 merged into P8 (v1.6.7)
|
|
1870
1881
|
P38_CommunicationPreventsRevolt
|
|
1871
1882
|
];
|
|
1872
1883
|
|
|
@@ -2175,7 +2186,7 @@ var P43_SimulationMinimum = {
|
|
|
2175
2186
|
id: "P43",
|
|
2176
2187
|
name: "Simulation Minimum (100 Iterations)",
|
|
2177
2188
|
category: "statistical",
|
|
2178
|
-
description: "
|
|
2189
|
+
description: "Wild inflation swings (>30%) may indicate insufficient simulation data. Minimum iteration enforcement is structural (Simulator config). Symptom detector.",
|
|
2179
2190
|
check(metrics, thresholds) {
|
|
2180
2191
|
const { inflationRate } = metrics;
|
|
2181
2192
|
if (Math.abs(inflationRate) > 0.3) {
|
|
@@ -2342,7 +2353,7 @@ var P49_IdleAssetTax = {
|
|
|
2342
2353
|
id: "P49",
|
|
2343
2354
|
name: "Idle Asset Tax",
|
|
2344
2355
|
category: "resource",
|
|
2345
|
-
description:
|
|
2356
|
+
description: "Concentrated idle wealth (Gini >0.55, top 10% >60%, velocity <5). Raises transaction fees as proxy holding tax. Decay/storage/expiry requires developer implementation.",
|
|
2346
2357
|
check(metrics, _thresholds) {
|
|
2347
2358
|
const { giniCoefficient, top10PctShare, velocity } = metrics;
|
|
2348
2359
|
if (giniCoefficient > 0.55 && top10PctShare > 0.6 && velocity < 5) {
|
|
@@ -2375,7 +2386,7 @@ var P33_FairNotEqual = {
|
|
|
2375
2386
|
id: "P33",
|
|
2376
2387
|
name: "Fair \u2260 Equal",
|
|
2377
2388
|
category: "participant_experience",
|
|
2378
|
-
description: "Gini = 0 is boring \u2014 everyone has the same and there is nothing to strive for. Healthy inequality from skill/effort is fine. Inequality from money (pay-to-win) is toxic.
|
|
2389
|
+
description: "Gini = 0 is boring \u2014 everyone has the same and there is nothing to strive for. Healthy inequality from skill/effort is fine. Inequality from money (pay-to-win) is toxic. Below 0.10 Gini = too flat; above configurable thresholds = oligarchy.",
|
|
2379
2390
|
check(metrics, thresholds) {
|
|
2380
2391
|
for (const curr of metrics.currencies) {
|
|
2381
2392
|
const giniCoefficient = metrics.giniCoefficientByCurrency[curr] ?? 0;
|
|
@@ -2485,7 +2496,7 @@ var P45_TimeBudget = {
|
|
|
2485
2496
|
id: "P45",
|
|
2486
2497
|
name: "Time Budget",
|
|
2487
2498
|
category: "participant_experience",
|
|
2488
|
-
description: "
|
|
2499
|
+
description: "timeToValue > 30 with satisfaction < 55 suggests excessive time demand. Proxy metric \u2014 does not measure individual available time.",
|
|
2489
2500
|
check(metrics, thresholds) {
|
|
2490
2501
|
const { timeToValue, avgSatisfaction } = metrics;
|
|
2491
2502
|
const timePressure = timeToValue > 30;
|
|
@@ -2723,7 +2734,7 @@ var P52_EndowmentEffect = {
|
|
|
2723
2734
|
id: "P52",
|
|
2724
2735
|
name: "Endowment Effect",
|
|
2725
2736
|
category: "operations",
|
|
2726
|
-
description: "
|
|
2737
|
+
description: "High completion (>90%) + low satisfaction (<60) suggests activities not creating perceived value. May indicate missing endowment effect.",
|
|
2727
2738
|
check(metrics, _thresholds) {
|
|
2728
2739
|
const { avgSatisfaction, churnRate } = metrics;
|
|
2729
2740
|
const { eventCompletionRate } = metrics;
|
|
@@ -2796,7 +2807,7 @@ var P54_OperationalCadence = {
|
|
|
2796
2807
|
id: "P54",
|
|
2797
2808
|
name: "Operational Cadence",
|
|
2798
2809
|
category: "operations",
|
|
2799
|
-
description: "
|
|
2810
|
+
description: "Low velocity (<2) + low satisfaction after tick 100 = supply stagnation. Advisory signal for developer to audit content freshness.",
|
|
2800
2811
|
check(metrics, _thresholds) {
|
|
2801
2812
|
const { velocity, avgSatisfaction } = metrics;
|
|
2802
2813
|
if (velocity < 2 && avgSatisfaction < 55 && metrics.tick > 100) {
|
|
@@ -3646,11 +3657,14 @@ var DEFAULT_PERSONA_CONFIG = {
|
|
|
3646
3657
|
dormantWindow: 20,
|
|
3647
3658
|
atRiskDropThreshold: 0.5,
|
|
3648
3659
|
powerUserMinSystems: 3,
|
|
3649
|
-
historyWindow: 50
|
|
3660
|
+
historyWindow: 50,
|
|
3661
|
+
reclassifyInterval: 10
|
|
3650
3662
|
};
|
|
3651
3663
|
var PersonaTracker = class {
|
|
3652
3664
|
constructor(config) {
|
|
3653
3665
|
this.agents = /* @__PURE__ */ new Map();
|
|
3666
|
+
this.cachedDistribution = {};
|
|
3667
|
+
this.lastClassifiedTick = -Infinity;
|
|
3654
3668
|
this.config = { ...DEFAULT_PERSONA_CONFIG, ...config };
|
|
3655
3669
|
}
|
|
3656
3670
|
/**
|
|
@@ -3658,6 +3672,7 @@ var PersonaTracker = class {
|
|
|
3658
3672
|
* Call this once per tick BEFORE getDistribution().
|
|
3659
3673
|
*/
|
|
3660
3674
|
update(state, events) {
|
|
3675
|
+
if (!state.agentBalances) return;
|
|
3661
3676
|
const tick = state.tick;
|
|
3662
3677
|
const txByAgent = /* @__PURE__ */ new Map();
|
|
3663
3678
|
if (events) {
|
|
@@ -3713,8 +3728,18 @@ var PersonaTracker = class {
|
|
|
3713
3728
|
/**
|
|
3714
3729
|
* Classify all tracked agents and return the population distribution.
|
|
3715
3730
|
* Returns { Whale: 0.05, ActiveTrader: 0.18, Passive: 0.42, ... }
|
|
3731
|
+
* Caches results and only reclassifies at `reclassifyInterval` boundaries.
|
|
3716
3732
|
*/
|
|
3717
|
-
getDistribution() {
|
|
3733
|
+
getDistribution(currentTick) {
|
|
3734
|
+
const tick = currentTick ?? 0;
|
|
3735
|
+
if (tick - this.lastClassifiedTick < this.config.reclassifyInterval && Object.keys(this.cachedDistribution).length > 0) {
|
|
3736
|
+
return this.cachedDistribution;
|
|
3737
|
+
}
|
|
3738
|
+
this.lastClassifiedTick = tick;
|
|
3739
|
+
this.cachedDistribution = this._classify();
|
|
3740
|
+
return this.cachedDistribution;
|
|
3741
|
+
}
|
|
3742
|
+
_classify() {
|
|
3718
3743
|
const agentIds = [...this.agents.keys()];
|
|
3719
3744
|
const total = agentIds.length;
|
|
3720
3745
|
if (total === 0) return {};
|
|
@@ -4020,16 +4045,17 @@ var AgentE = class {
|
|
|
4020
4045
|
this.currentTick = currentState.tick;
|
|
4021
4046
|
const events = this.eventBuffer;
|
|
4022
4047
|
this.eventBuffer = [];
|
|
4048
|
+
this.personaTracker.update(currentState, events);
|
|
4049
|
+
const personaDist = this.personaTracker.getDistribution(currentState.tick);
|
|
4023
4050
|
let metrics;
|
|
4024
4051
|
try {
|
|
4025
|
-
metrics = this.observer.compute(currentState, events);
|
|
4052
|
+
metrics = this.observer.compute(currentState, events, personaDist);
|
|
4026
4053
|
} catch (err) {
|
|
4027
4054
|
console.error(`[AgentE] Observer.compute() failed at tick ${currentState.tick}:`, err);
|
|
4028
4055
|
return;
|
|
4029
4056
|
}
|
|
4030
4057
|
this.store.record(metrics);
|
|
4031
|
-
|
|
4032
|
-
metrics.personaDistribution = this.personaTracker.getDistribution();
|
|
4058
|
+
metrics.personaDistribution = personaDist;
|
|
4033
4059
|
const { rolledBack, settled } = await this.executor.checkRollbacks(metrics, this.adapter);
|
|
4034
4060
|
for (const plan2 of rolledBack) {
|
|
4035
4061
|
this.planner.recordRolledBack(plan2);
|