@elizaos/plugin-social-alpha 2.0.0-alpha.8 → 2.0.0-beta.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.
Files changed (66) hide show
  1. package/README.md +176 -0
  2. package/dist/assets/index-BFamh0Wi.js +124 -0
  3. package/dist/assets/index-C4gOAEPc.js +124 -0
  4. package/dist/assets/index-ChK0A7dY.js +124 -0
  5. package/dist/assets/index-ClOaVew8.css +1 -0
  6. package/dist/assets/index-DKFCULo2.css +1 -0
  7. package/dist/assets/index-DsruU1f2.js +124 -0
  8. package/dist/assets/index-DvARYTre.js +124 -0
  9. package/dist/index.html +2 -2
  10. package/package.json +25 -24
  11. package/dist/__tests__/e2e/benchmarks/benchmark.utils.d.ts +0 -38
  12. package/dist/__tests__/e2e/benchmarks/trust_algorithm.benchmark.d.ts +0 -18
  13. package/dist/__tests__/e2e/events.d.ts +0 -2
  14. package/dist/__tests__/e2e/index.d.ts +0 -3
  15. package/dist/__tests__/e2e/scenarios.d.ts +0 -3
  16. package/dist/__tests__/e2e/service.d.ts +0 -1
  17. package/dist/__tests__/e2e/socialAlpha.d.ts +0 -2
  18. package/dist/__tests__/e2e/test-utils.d.ts +0 -12
  19. package/dist/__tests__/e2e/test.setup.d.ts +0 -2
  20. package/dist/__tests__/e2e/trustOptimizationE2E.d.ts +0 -4
  21. package/dist/__tests__/e2e/trustScenariosE2E.d.ts +0 -4
  22. package/dist/__tests__/e2e/trustScore.d.ts +0 -2
  23. package/dist/__tests__/mocks/mockPriceService.d.ts +0 -36
  24. package/dist/assets/index-CNEn_XZo.js +0 -109
  25. package/dist/assets/index-D088W50X.css +0 -1
  26. package/dist/assets/index-D32we_nf.js +0 -17204
  27. package/dist/assets/index-DU6B6kWr.js +0 -17202
  28. package/dist/clients.d.ts +0 -382
  29. package/dist/config.d.ts +0 -143
  30. package/dist/events.d.ts +0 -4
  31. package/dist/frontend/LeaderboardTable.d.ts +0 -7
  32. package/dist/frontend/index.d.ts +0 -3
  33. package/dist/frontend/loader.d.ts +0 -1
  34. package/dist/frontend/ui/badge.d.ts +0 -11
  35. package/dist/frontend/ui/button.d.ts +0 -11
  36. package/dist/frontend/ui/card.d.ts +0 -8
  37. package/dist/frontend/ui/input.d.ts +0 -3
  38. package/dist/frontend/ui/table.d.ts +0 -10
  39. package/dist/frontend/ui/tabs.d.ts +0 -7
  40. package/dist/frontend/utils.d.ts +0 -2
  41. package/dist/index.d.ts +0 -28
  42. package/dist/mockPriceService.d.ts +0 -1
  43. package/dist/providers/socialAlphaProvider.d.ts +0 -14
  44. package/dist/reports.d.ts +0 -56
  45. package/dist/routes.d.ts +0 -2
  46. package/dist/schemas.d.ts +0 -150
  47. package/dist/scripts/analyze-trust-scores.d.ts +0 -15
  48. package/dist/scripts/enrich-price-data.d.ts +0 -15
  49. package/dist/scripts/optimize-algorithm.d.ts +0 -14
  50. package/dist/scripts/process-discord-data.d.ts +0 -14
  51. package/dist/service.d.ts +0 -286
  52. package/dist/services/PriceDataService.d.ts +0 -36
  53. package/dist/services/SimulationService.d.ts +0 -31
  54. package/dist/services/TrustScoreService.d.ts +0 -37
  55. package/dist/services/balancedTrustScoreCalculator.d.ts +0 -60
  56. package/dist/services/historicalPriceService.d.ts +0 -60
  57. package/dist/services/index.d.ts +0 -22
  58. package/dist/services/priceEnrichmentService.d.ts +0 -114
  59. package/dist/services/simulationActorsV2.d.ts +0 -53
  60. package/dist/services/simulationRunner.d.ts +0 -114
  61. package/dist/services/tokenSimulationService.d.ts +0 -33
  62. package/dist/services/trustScoreOptimizer.d.ts +0 -109
  63. package/dist/simulationActors.d.ts +0 -23
  64. package/dist/tests/index.d.ts +0 -3
  65. package/dist/types.d.ts +0 -959
  66. package/dist/utils.d.ts +0 -51
@@ -1,60 +0,0 @@
1
- import type { TrustScoreResult } from "./trustScoreOptimizer";
2
- export interface BalancedTrustScoreParams {
3
- profitWeight: number;
4
- winRateWeight: number;
5
- sharpeWeight: number;
6
- alphaWeight: number;
7
- consistencyWeight: number;
8
- qualityWeight: number;
9
- normalVolumeThreshold: number;
10
- highVolumeThreshold: number;
11
- extremeVolumeThreshold: number;
12
- volumeToleranceByArchetype: Record<string, number>;
13
- }
14
- export declare class BalancedTrustScoreCalculator {
15
- private params;
16
- /**
17
- * Calculate balanced trust score
18
- */
19
- calculateBalancedTrustScore(metrics: TrustScoreResult["metrics"], archetype: string, rugPromotions: number, goodCalls: number, totalCalls: number): number;
20
- /**
21
- * Archetype base scores with good spread
22
- */
23
- private getArchetypeBase;
24
- /**
25
- * Profit component with better scaling
26
- */
27
- private calculateProfitComponent;
28
- /**
29
- * Win rate component with smooth curve
30
- */
31
- private calculateWinRateComponent;
32
- /**
33
- * Sharpe ratio component
34
- */
35
- private calculateSharpeComponent;
36
- /**
37
- * Alpha component - fixed to handle negative values better
38
- */
39
- private calculateAlphaComponent;
40
- /**
41
- * Quality component based on call quality
42
- */
43
- private calculateQualityComponent;
44
- /**
45
- * Volume adjustment - multiplicative factor instead of penalty
46
- */
47
- private calculateVolumeAdjustment;
48
- /**
49
- * Archetype performance scaling
50
- */
51
- private getArchetypeScaling;
52
- /**
53
- * Set custom parameters
54
- */
55
- setParameters(params: Partial<BalancedTrustScoreParams>): void;
56
- /**
57
- * Get current parameters
58
- */
59
- getParameters(): BalancedTrustScoreParams;
60
- }
@@ -1,60 +0,0 @@
1
- import type { IAgentRuntime } from "@elizaos/core";
2
- import { SupportedChain } from "../types.ts";
3
- export interface PricePoint {
4
- timestamp: number;
5
- price: number;
6
- volume?: number;
7
- liquidity?: number;
8
- }
9
- export interface HistoricalPriceData {
10
- address: string;
11
- chain: SupportedChain;
12
- priceHistory: PricePoint[];
13
- firstPrice?: number;
14
- lastPrice?: number;
15
- minPrice?: number;
16
- maxPrice?: number;
17
- fetchedAt: number;
18
- }
19
- export interface TokenResolution {
20
- symbol: string;
21
- address: string;
22
- name: string;
23
- chain: SupportedChain;
24
- liquidity?: number;
25
- volume24h?: number;
26
- marketCap?: number;
27
- createdAt?: number;
28
- }
29
- export declare class HistoricalPriceService {
30
- private runtime;
31
- private runtime;
32
- private birdeyeClient;
33
- private dexscreenerClient;
34
- constructor(runtime: IAgentRuntime);
35
- /**
36
- * Fetch historical price data from Birdeye using OHLCV endpoint
37
- */
38
- fetchBirdeyeHistoricalPrices(address: string, fromTimestamp: number, toTimestamp: number): Promise<HistoricalPriceData | null>;
39
- /**
40
- * Fetch historical price data from Dexscreener
41
- * Note: DexScreener doesn't provide true historical data, only recent price changes
42
- */
43
- fetchDexscreenerHistoricalPrices(address: string, chain: SupportedChain, _fromTimestamp: number, _toTimestamp: number): Promise<HistoricalPriceData | null>;
44
- /**
45
- * Get price at specific timestamp using interpolation
46
- */
47
- getPriceAtTimestamp(historicalData: HistoricalPriceData, timestamp: number): number | null;
48
- /**
49
- * Get max price in time window
50
- */
51
- getMaxPriceInWindow(historicalData: HistoricalPriceData, fromTimestamp: number, toTimestamp: number): {
52
- price: number;
53
- timestamp: number;
54
- } | null;
55
- /**
56
- * Search for best token match by symbol
57
- */
58
- findBestTokenMatch(symbol: string, chain: SupportedChain): Promise<TokenResolution | null>;
59
- private getChainId;
60
- }
@@ -1,22 +0,0 @@
1
- export { BalancedTrustScoreCalculator } from "./balancedTrustScoreCalculator";
2
- export { HistoricalPriceService } from "./historicalPriceService";
3
- export type { EnrichedTradingCall, HistoricalPriceData, PricePoint, TokenResolution, TradingCall, TrustScore, } from "./PriceDataService";
4
- export { PriceDataService } from "./PriceDataService";
5
- export { PriceEnrichmentService } from "./priceEnrichmentService";
6
- export type { ActorArchetypeV2, ActorConfig, SimulatedActorV2, SimulatedCallData, SimulatedCallV2, SimulationConfig, SimulationResult, SimulationToken, TokenPrice, TokenScenario, } from "./SimulationService";
7
- export { SimulationService } from "./SimulationService";
8
- export { SimulationActorsServiceV2 } from "./simulationActorsV2";
9
- export { SimulationRunner } from "./simulationRunner";
10
- export type { BalancedTrustScoreParams, OptimizationResult, TrustScoreParameters, TrustScoreResult, } from "./TrustScoreService";
11
- export { TrustScoreService } from "./TrustScoreService";
12
- export { TokenSimulationService } from "./tokenSimulationService";
13
- export { TrustScoreOptimizer } from "./trustScoreOptimizer";
14
- import type { IAgentRuntime } from "@elizaos/core";
15
- import { PriceDataService } from "./PriceDataService";
16
- import { SimulationService } from "./SimulationService";
17
- import { TrustScoreService } from "./TrustScoreService";
18
- export declare function createServices(runtime?: IAgentRuntime): {
19
- simulation: SimulationService;
20
- priceData: PriceDataService | null;
21
- trustScore: TrustScoreService;
22
- };
@@ -1,114 +0,0 @@
1
- import type { IAgentRuntime } from "@elizaos/core";
2
- import { SupportedChain } from "../types.ts";
3
- export interface TradingCall {
4
- callId: string;
5
- originalMessageId: string;
6
- userId: string;
7
- username: string;
8
- timestamp: number;
9
- content: string;
10
- tokenMentioned?: string;
11
- caMentioned?: string;
12
- chain: string;
13
- sentiment: "positive" | "negative" | "neutral";
14
- conviction: "NONE" | "LOW" | "MEDIUM" | "HIGH";
15
- llmReasoning: string;
16
- certainty: "low" | "medium" | "high";
17
- fileSource: string;
18
- }
19
- export interface EnrichedTradingCall extends TradingCall {
20
- resolvedToken?: {
21
- address: string;
22
- symbol: string;
23
- name: string;
24
- chain: SupportedChain;
25
- };
26
- priceData?: {
27
- calledPrice: number;
28
- calledPriceTimestamp: number;
29
- bestPrice: number;
30
- bestPriceTimestamp: number;
31
- worstPrice: number;
32
- worstPriceTimestamp: number;
33
- idealProfitLoss: number;
34
- idealProfitLossPercent: number;
35
- windowDays: number;
36
- };
37
- enrichmentStatus: "pending" | "success" | "failed";
38
- enrichmentError?: string;
39
- enrichedAt?: number;
40
- }
41
- export interface TrustScore {
42
- userId: string;
43
- username: string;
44
- totalCalls: number;
45
- successfulCalls: number;
46
- failedCalls: number;
47
- averageProfitLoss: number;
48
- averageProfitLossPercent: number;
49
- trustScore: number;
50
- consistency: number;
51
- recencyWeight: number;
52
- convictionAccuracy: number;
53
- lastUpdated: number;
54
- }
55
- export declare class PriceEnrichmentService {
56
- private runtime;
57
- private runtime;
58
- private birdeyeClient;
59
- private dexscreenerClient;
60
- constructor(runtime: IAgentRuntime);
61
- /**
62
- * Load batch files from the cache directory
63
- */
64
- loadBatchFiles(batchCacheDir: string): Promise<TradingCall[]>;
65
- /**
66
- * Resolve contract address or token mention to standardized token info
67
- */
68
- resolveToken(call: TradingCall): Promise<{
69
- address: string;
70
- symbol: string;
71
- name: string;
72
- chain: SupportedChain;
73
- } | null>;
74
- /**
75
- * Get historical price data for a token within a time window
76
- */
77
- getPriceDataInWindow(tokenAddress: string, chain: SupportedChain, callTimestamp: number, windowDays?: number): Promise<{
78
- calledPrice: number;
79
- bestPrice: number;
80
- bestPriceTimestamp: number;
81
- worstPrice: number;
82
- worstPriceTimestamp: number;
83
- } | null>;
84
- /**
85
- * Enrich a single trading call with price data
86
- */
87
- enrichCall(call: TradingCall): Promise<EnrichedTradingCall>;
88
- /**
89
- * Process all calls in batches and save enriched data
90
- */
91
- enrichAllCalls(batchCacheDir: string, outputDir: string, batchSize?: number): Promise<void>;
92
- /**
93
- * Calculate trust scores for all users
94
- */
95
- calculateTrustScores(enrichedCalls: EnrichedTradingCall[]): Promise<TrustScore[]>;
96
- private chainStringToEnum;
97
- private getTokenInfo;
98
- private searchTokenBySymbol;
99
- private getCurrentPrice;
100
- private simulatePriceWindow;
101
- private calculateConvictionAccuracy;
102
- /**
103
- * Get static token mappings for well-known tokens
104
- */
105
- private getStaticTokenMapping;
106
- /**
107
- * Search for token using Birdeye API
108
- */
109
- private searchTokenOnBirdeye;
110
- /**
111
- * Search for token using DexScreener API
112
- */
113
- private searchTokenOnDexscreener;
114
- }
@@ -1,53 +0,0 @@
1
- import type { UUID } from "@elizaos/core";
2
- import type { SimulatedToken } from "../mockPriceService";
3
- import { Conviction, type SupportedChain } from "../types";
4
- import type { TokenScenario } from "./tokenSimulationService";
5
- export interface SimulatedCallV2 {
6
- callId: string;
7
- userId: string;
8
- username: string;
9
- timestamp: number;
10
- tokenMentioned: string;
11
- tokenAddress: string;
12
- sentiment: "positive" | "negative" | "neutral";
13
- conviction: Conviction;
14
- content: string;
15
- chain: SupportedChain;
16
- certainty: "high" | "medium" | "low";
17
- llmReasoning: string;
18
- }
19
- export type ActorArchetypeV2 = "elite_analyst" | "skilled_trader" | "pump_chaser" | "rug_promoter" | "fomo_trader" | "contrarian" | "whale_watcher" | "technical_analyst" | "newbie" | "bot_spammer";
20
- export interface SimulatedActorV2 {
21
- id: UUID;
22
- username: string;
23
- archetype: ActorArchetypeV2;
24
- trustScore?: number;
25
- callHistory: SimulatedCallV2[];
26
- preferences: {
27
- favoriteTokenTypes?: TokenScenario["type"][];
28
- callFrequency: "high" | "medium" | "low";
29
- timingBias: "early" | "middle" | "late" | "random";
30
- };
31
- }
32
- export declare class SimulationActorsServiceV2 {
33
- private actors;
34
- constructor();
35
- private initializeActors;
36
- private addActor;
37
- generateCallsForActor(actor: SimulatedActorV2, token: SimulatedToken, tokenScenario: TokenScenario, currentStep: number, priceHistory: {
38
- step: number;
39
- price: number;
40
- }[]): SimulatedCallV2 | null;
41
- private shouldMakeCall;
42
- private determineSentiment;
43
- private determineConviction;
44
- private generateCallContent;
45
- private determineCertainty;
46
- private generateReasoning;
47
- getAllActors(): SimulatedActorV2[];
48
- getActorById(id: UUID): SimulatedActorV2 | undefined;
49
- getExpectedRankings(): {
50
- username: string;
51
- expectedTrustScore: number;
52
- }[];
53
- }
@@ -1,114 +0,0 @@
1
- import type { UUID } from "@elizaos/core";
2
- import { Conviction, SupportedChain } from "../types";
3
- export declare enum TokenScenario {
4
- RUG_PULL_FAST = "rug_fast",
5
- RUG_PULL_SLOW = "rug_slow",
6
- SCAM_TOKEN = "scam",
7
- RUNNER_MOON = "runner_moon",
8
- RUNNER_STEADY = "runner_steady",
9
- SUCCESSFUL = "successful",
10
- MEDIOCRE = "mediocre",
11
- STAGNANT = "stagnant",
12
- BLUE_CHIP = "bluechip",
13
- PUMP_AND_DUMP = "pump_dump",
14
- SLOW_BLEED = "slow_bleed"
15
- }
16
- export interface TokenPrice {
17
- timestamp: Date;
18
- price: number;
19
- volume: number;
20
- liquidity: number;
21
- marketCap: number;
22
- }
23
- export interface ActorConfig {
24
- id: UUID;
25
- username: string;
26
- archetype: "elite_analyst" | "skilled_trader" | "pump_chaser" | "rug_promoter" | "fomo_trader" | "contrarian" | "technical_analyst" | "newbie" | "bot_spammer";
27
- expectedTrustScore: number;
28
- tokenPreferences: TokenScenario[];
29
- callFrequency: "high" | "medium" | "low";
30
- timingBias: "early" | "middle" | "late" | "random";
31
- }
32
- export interface SimulatedCallData {
33
- callId: UUID;
34
- originalMessageId: string;
35
- userId: string;
36
- username: string;
37
- timestamp: number;
38
- content: string;
39
- nameMentioned?: string;
40
- tokenMentioned?: string;
41
- caMentioned?: string;
42
- chain: SupportedChain | "unknown";
43
- sentiment: "positive" | "negative" | "neutral";
44
- conviction: Conviction;
45
- llmReasoning: string;
46
- certainty: "high" | "medium" | "low";
47
- fileSource: string;
48
- simulationMetadata: {
49
- tokenScenario: TokenScenario;
50
- actorArchetype: string;
51
- priceAtCall: number;
52
- marketCapAtCall: number;
53
- liquidityAtCall: number;
54
- expectedOutcome: "profit" | "loss" | "neutral";
55
- actualProfit?: number;
56
- };
57
- }
58
- export interface SimulationToken {
59
- address: string;
60
- symbol: string;
61
- name: string;
62
- scenario: TokenScenario;
63
- launchTime: Date;
64
- initialPrice: number;
65
- initialMarketCap: number;
66
- initialLiquidity: number;
67
- priceTrajectory?: (step: number) => number;
68
- }
69
- export interface SimulationConfig {
70
- startTime: Date;
71
- endTime: Date;
72
- timeStepMinutes: number;
73
- tokenCount: number;
74
- tokenScenarioDistribution?: Partial<Record<TokenScenario, number>>;
75
- actors: ActorConfig[];
76
- outputDir: string;
77
- cacheResults: boolean;
78
- }
79
- export interface SimulationResult {
80
- calls: SimulatedCallData[];
81
- tokens: Map<string, SimulationToken>;
82
- priceHistory: Map<string, TokenPrice[]>;
83
- actorPerformance: Map<string, {
84
- totalCalls: number;
85
- profitableCalls: number;
86
- totalProfit: number;
87
- averageProfit: number;
88
- trustScore?: number;
89
- }>;
90
- }
91
- export declare class SimulationRunner {
92
- private tokenService;
93
- private actorsService;
94
- private actorsService;
95
- constructor();
96
- runSimulation(config: SimulationConfig): Promise<SimulationResult>;
97
- private calculateTokenPrice;
98
- private mapScenarioToTypes;
99
- private generateTokens;
100
- private selectScenarioByWeight;
101
- private createToken;
102
- private getScenarioConfig;
103
- private generateCallsForTimeStep;
104
- private shouldActorCall;
105
- private selectTokensForActor;
106
- private generateActorCall;
107
- private generateMessage;
108
- private determineActorSentiment;
109
- private determineActorConviction;
110
- private predictOutcome;
111
- private calculateActualProfits;
112
- private cacheResults;
113
- loadCachedSimulation(outputDir: string): Promise<SimulationResult | null>;
114
- }
@@ -1,33 +0,0 @@
1
- import { type SimulatedToken } from "../mockPriceService";
2
- export interface TokenScenario {
3
- type: "rug" | "scam" | "runner" | "successful" | "mediocre" | "stagnant" | "bluechip" | "pump_dump" | "slow_bleed";
4
- name: string;
5
- symbol: string;
6
- description: string;
7
- initialPrice: number;
8
- initialLiquidity: number;
9
- initialMarketCap: number;
10
- rugTiming?: number;
11
- pumpTiming?: number;
12
- dumpTiming?: number;
13
- }
14
- export declare class TokenSimulationService {
15
- private scenarios;
16
- constructor();
17
- private initializeScenarios;
18
- private addScenario;
19
- createTokenFromScenario(scenario: TokenScenario): SimulatedToken;
20
- private mapScenarioToPerformanceType;
21
- private createRugTrajectory;
22
- private createScamTrajectory;
23
- private createRunnerTrajectory;
24
- private createSuccessfulTrajectory;
25
- private createMediocreTrajectory;
26
- private createStagnantTrajectory;
27
- private createBluechipTrajectory;
28
- private createPumpDumpTrajectory;
29
- private createSlowBleedTrajectory;
30
- getAllScenarios(): TokenScenario[];
31
- getScenarioBySymbol(symbol: string): TokenScenario | undefined;
32
- generateDiverseTokenSet(): SimulatedToken[];
33
- }
@@ -1,109 +0,0 @@
1
- import { type SimulationConfig, type SimulationResult } from "./simulationRunner";
2
- export interface TrustScoreResult {
3
- userId: string;
4
- username: string;
5
- calculatedScore: number;
6
- expectedScore: number;
7
- difference: number;
8
- metrics: {
9
- totalCalls: number;
10
- profitableCalls: number;
11
- averageProfit: number;
12
- winRate: number;
13
- sharpeRatio: number;
14
- alpha: number;
15
- volumePenalty: number;
16
- consistency: number;
17
- };
18
- }
19
- export interface OptimizationResult {
20
- scores: TrustScoreResult[];
21
- accuracy: {
22
- mae: number;
23
- rmse: number;
24
- correlation: number;
25
- rankingAccuracy: number;
26
- };
27
- suggestions: string[];
28
- }
29
- export interface TrustScoreParameters {
30
- profitWeight: number;
31
- consistencyWeight: number;
32
- volumeWeight: number;
33
- alphaWeight: number;
34
- sharpeWeight: number;
35
- minCallsThreshold: number;
36
- volumePenaltyThreshold: number;
37
- timeDecayFactor: number;
38
- rugPullPenalty: number;
39
- }
40
- export declare class TrustScoreOptimizer {
41
- private simulationRunner;
42
- private currentParams;
43
- private balancedCalculator;
44
- constructor();
45
- /**
46
- * Run a full optimization cycle
47
- */
48
- runOptimizationCycle(simulationConfig?: SimulationConfig, useCache?: boolean): Promise<OptimizationResult>;
49
- /**
50
- * Get simulation data, either from cache or by running new simulation
51
- */
52
- private getSimulationData;
53
- /**
54
- * Create default set of actors for testing
55
- */
56
- private createDefaultActors;
57
- /**
58
- * Calculate detailed metrics for an actor
59
- */
60
- private calculateMetrics;
61
- /**
62
- * Calculate Sharpe ratio
63
- */
64
- private calculateSharpeRatio;
65
- /**
66
- * Calculate market return (average of all token performances)
67
- */
68
- private calculateMarketReturn;
69
- /**
70
- * Calculate consistency score
71
- */
72
- private calculateConsistency;
73
- /**
74
- * Final optimized trust score calculation
75
- */
76
- calculateFinalTrustScore(metrics: TrustScoreResult["metrics"], archetype?: string, rugPromotionPenalty?: number, goodCallBonus?: number): number;
77
- /**
78
- * Enhanced trust score calculation with token quality consideration
79
- */
80
- calculateTrustScoresEnhanced(simulationData: SimulationResult): Promise<TrustScoreResult[]>;
81
- /**
82
- * Evaluate accuracy of calculated scores vs expected
83
- */
84
- private evaluateAccuracy;
85
- /**
86
- * Calculate Pearson correlation coefficient
87
- */
88
- private calculateCorrelation;
89
- /**
90
- * Calculate ranking accuracy (% of correctly ordered pairs)
91
- */
92
- private calculateRankingAccuracy;
93
- /**
94
- * Generate optimization suggestions based on results
95
- */
96
- private generateSuggestions;
97
- /**
98
- * Log detailed results
99
- */
100
- private logResults;
101
- /**
102
- * Grid search for optimal parameters
103
- */
104
- optimizeParameters(parameterRanges: Partial<Record<keyof TrustScoreParameters, number[]>>, simulationConfig?: SimulationConfig): Promise<TrustScoreParameters>;
105
- /**
106
- * Generate all combinations of parameters for grid search
107
- */
108
- private generateParameterCombinations;
109
- }
@@ -1,23 +0,0 @@
1
- export type { SimulatedActorV2 as SimulatedActor, SimulatedCallV2 as SimulatedCall, } from "./services/simulationActorsV2";
2
- export * from "./services/simulationActorsV2";
3
- import type { SimulatedActorV2 } from "./services/simulationActorsV2";
4
- export type CallGenerationStrategy = (actor: any, token: any, currentStep: number, priceHistory: any[]) => any;
5
- export interface SimulatedActorWithLegacy extends SimulatedActorV2 {
6
- expectedTrustScore?: number;
7
- callGenerationStrategy?: CallGenerationStrategy;
8
- actorSpecificData?: {
9
- calls?: any[];
10
- };
11
- }
12
- export declare const goodActorStrategy: CallGenerationStrategy;
13
- export declare const badActorStrategy: CallGenerationStrategy;
14
- export declare const neutralObserverStrategy: CallGenerationStrategy;
15
- export declare const dataDrivenShillStrategy: CallGenerationStrategy;
16
- export declare function parseDiscordDataToActors(_filePath: string, _runtime: any): Promise<SimulatedActorWithLegacy[]>;
17
- export declare function createLegacyActor(params: {
18
- id: string;
19
- username: string;
20
- archetype: string;
21
- expectedTrustScore?: number;
22
- callGenerationStrategy?: CallGenerationStrategy;
23
- }): SimulatedActorWithLegacy;
@@ -1,3 +0,0 @@
1
- import type { TestSuite } from "@elizaos/core";
2
- export declare const testSuites: TestSuite[];
3
- export default testSuites;