@elizaos/plugin-social-alpha 2.0.0-alpha.7 → 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.
- package/README.md +176 -0
- package/dist/assets/index-BFamh0Wi.js +124 -0
- package/dist/assets/index-C4gOAEPc.js +124 -0
- package/dist/assets/index-ChK0A7dY.js +124 -0
- package/dist/assets/index-ClOaVew8.css +1 -0
- package/dist/assets/index-DKFCULo2.css +1 -0
- package/dist/assets/index-DsruU1f2.js +124 -0
- package/dist/assets/index-DvARYTre.js +124 -0
- package/dist/index.html +2 -2
- package/package.json +25 -24
- package/dist/__tests__/e2e/benchmarks/benchmark.utils.d.ts +0 -38
- package/dist/__tests__/e2e/benchmarks/trust_algorithm.benchmark.d.ts +0 -18
- package/dist/__tests__/e2e/events.d.ts +0 -2
- package/dist/__tests__/e2e/index.d.ts +0 -3
- package/dist/__tests__/e2e/scenarios.d.ts +0 -3
- package/dist/__tests__/e2e/service.d.ts +0 -1
- package/dist/__tests__/e2e/socialAlpha.d.ts +0 -2
- package/dist/__tests__/e2e/test-utils.d.ts +0 -12
- package/dist/__tests__/e2e/test.setup.d.ts +0 -2
- package/dist/__tests__/e2e/trustOptimizationE2E.d.ts +0 -4
- package/dist/__tests__/e2e/trustScenariosE2E.d.ts +0 -4
- package/dist/__tests__/e2e/trustScore.d.ts +0 -2
- package/dist/__tests__/mocks/mockPriceService.d.ts +0 -36
- package/dist/assets/index-CNEn_XZo.js +0 -109
- package/dist/assets/index-D088W50X.css +0 -1
- package/dist/assets/index-D32we_nf.js +0 -17204
- package/dist/assets/index-DU6B6kWr.js +0 -17202
- package/dist/clients.d.ts +0 -382
- package/dist/config.d.ts +0 -143
- package/dist/events.d.ts +0 -4
- package/dist/frontend/LeaderboardTable.d.ts +0 -7
- package/dist/frontend/index.d.ts +0 -3
- package/dist/frontend/loader.d.ts +0 -1
- package/dist/frontend/ui/badge.d.ts +0 -11
- package/dist/frontend/ui/button.d.ts +0 -11
- package/dist/frontend/ui/card.d.ts +0 -8
- package/dist/frontend/ui/input.d.ts +0 -3
- package/dist/frontend/ui/table.d.ts +0 -10
- package/dist/frontend/ui/tabs.d.ts +0 -7
- package/dist/frontend/utils.d.ts +0 -2
- package/dist/index.d.ts +0 -28
- package/dist/mockPriceService.d.ts +0 -1
- package/dist/providers/socialAlphaProvider.d.ts +0 -14
- package/dist/reports.d.ts +0 -56
- package/dist/routes.d.ts +0 -2
- package/dist/schemas.d.ts +0 -150
- package/dist/scripts/analyze-trust-scores.d.ts +0 -15
- package/dist/scripts/enrich-price-data.d.ts +0 -15
- package/dist/scripts/optimize-algorithm.d.ts +0 -14
- package/dist/scripts/process-discord-data.d.ts +0 -14
- package/dist/service.d.ts +0 -286
- package/dist/services/PriceDataService.d.ts +0 -36
- package/dist/services/SimulationService.d.ts +0 -31
- package/dist/services/TrustScoreService.d.ts +0 -37
- package/dist/services/balancedTrustScoreCalculator.d.ts +0 -60
- package/dist/services/historicalPriceService.d.ts +0 -60
- package/dist/services/index.d.ts +0 -22
- package/dist/services/priceEnrichmentService.d.ts +0 -114
- package/dist/services/simulationActorsV2.d.ts +0 -53
- package/dist/services/simulationRunner.d.ts +0 -114
- package/dist/services/tokenSimulationService.d.ts +0 -33
- package/dist/services/trustScoreOptimizer.d.ts +0 -109
- package/dist/simulationActors.d.ts +0 -23
- package/dist/tests/index.d.ts +0 -3
- package/dist/types.d.ts +0 -959
- package/dist/utils.d.ts +0 -51
package/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Agent Plugin View</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-DsruU1f2.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="./assets/index-ClOaVew8.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-social-alpha",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "Social Alpha Plugin — Tracks token recommendations (shills/FUD), builds trust scores based on P&L outcomes, and exposes a Social Alpha Provider with win rate, rank, and recommender analytics.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,53 +18,54 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "bunx vite build",
|
|
20
20
|
"dev": "vite",
|
|
21
|
-
"test": "vitest",
|
|
22
|
-
"clean": "rm -rf dist .turbo
|
|
21
|
+
"test": "vitest run --passWithNoTests",
|
|
22
|
+
"clean": "rm -rf dist .turbo",
|
|
23
23
|
"lint": "echo \"Lint skipped for release\"",
|
|
24
24
|
"lint:check": "bun run lint",
|
|
25
|
-
"format": "
|
|
26
|
-
"format:check": "
|
|
25
|
+
"format": "echo \"Format skipped (source is gitignored vendor code)\"",
|
|
26
|
+
"format:check": "echo \"Format check skipped (source is gitignored vendor code)\"",
|
|
27
27
|
"typecheck": "echo \"Typecheck skipped for release\""
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@elizaos/core": "2.0.0-
|
|
31
|
-
"bignumber.js": "^
|
|
30
|
+
"@elizaos/core": "2.0.0-beta.1",
|
|
31
|
+
"bignumber.js": "^11.0.0",
|
|
32
32
|
"class-variance-authority": "^0.7.1",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
34
|
-
"dotenv": "^
|
|
35
|
-
"fast-xml-parser": "^5.2
|
|
34
|
+
"dotenv": "^17.0.0",
|
|
35
|
+
"fast-xml-parser": "^5.7.2",
|
|
36
36
|
"p-limit": "^5.0.0",
|
|
37
37
|
"tailwindcss-animate": "^1.0.7",
|
|
38
|
-
"uuid": "^
|
|
39
|
-
"zod": "^4.3
|
|
38
|
+
"uuid": "^14.0.0",
|
|
39
|
+
"zod": "^4.4.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@elizaos/core": "2.0.0-
|
|
42
|
+
"@elizaos/core": "2.0.0-beta.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@
|
|
45
|
+
"@biomejs/biome": "^2.4.14",
|
|
46
|
+
"@cypress/react": "^9.0.2",
|
|
47
|
+
"@radix-ui/react-slot": "^1.0.0",
|
|
48
|
+
"@radix-ui/react-tabs": "^1.0.0",
|
|
49
|
+
"@tailwindcss/postcss": "4.2.4",
|
|
46
50
|
"@tanstack/react-query": "^5.62.0",
|
|
47
51
|
"@testing-library/cypress": "^10.0.0",
|
|
48
52
|
"@types/react": "^19.0.0",
|
|
49
53
|
"@types/react-dom": "^19.0.0",
|
|
50
54
|
"@vitejs/plugin-react-swc": "^4.0.0",
|
|
51
55
|
"autoprefixer": "^10.4.21",
|
|
52
|
-
"cypress": "^
|
|
56
|
+
"cypress": "^15.14.2",
|
|
57
|
+
"lucide-react": "^1.0.0",
|
|
53
58
|
"postcss": "^8.5.4",
|
|
54
59
|
"react": "^19.0.0",
|
|
55
60
|
"react-dom": "^19.0.0",
|
|
56
|
-
"
|
|
61
|
+
"tailwind-merge": "^3.4.0",
|
|
62
|
+
"tailwindcss": "^4.0.0",
|
|
57
63
|
"tsconfig-paths": "^4.2.0",
|
|
58
|
-
"tsup": "8.5.
|
|
59
|
-
"tsx": "4.
|
|
60
|
-
"typescript": "^
|
|
64
|
+
"tsup": "^8.5.1",
|
|
65
|
+
"tsx": "4.21.0",
|
|
66
|
+
"typescript": "^6.0.3",
|
|
61
67
|
"vite": "^6.0.0",
|
|
62
|
-
"
|
|
63
|
-
"@radix-ui/react-slot": "^1.0.0",
|
|
64
|
-
"@radix-ui/react-tabs": "^1.0.0",
|
|
65
|
-
"tailwind-merge": "^3.4.0",
|
|
66
|
-
"vitest": "^3.1.4",
|
|
67
|
-
"@biomejs/biome": "^2.3.11"
|
|
68
|
+
"vitest": "^4.0.0"
|
|
68
69
|
},
|
|
69
70
|
"publishConfig": {
|
|
70
71
|
"access": "public"
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { IAgentRuntime, UUID } from "@elizaos/core";
|
|
2
|
-
import type { MockPriceService } from "../../../mockPriceService";
|
|
3
|
-
import type { SimulatedActor, SimulatedCall } from "../../../simulationActors";
|
|
4
|
-
export interface BenchmarkSimulationParams {
|
|
5
|
-
durationSteps: number;
|
|
6
|
-
actors: SimulatedActor[];
|
|
7
|
-
priceService: MockPriceService;
|
|
8
|
-
outputBasePath: string;
|
|
9
|
-
benchmarkName: string;
|
|
10
|
-
optimisticAthWindowDays?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface BenchmarkStepMetrics {
|
|
13
|
-
step: number;
|
|
14
|
-
actorScores: Record<UUID, {
|
|
15
|
-
username: string;
|
|
16
|
-
archetype: string;
|
|
17
|
-
score: number;
|
|
18
|
-
}>;
|
|
19
|
-
callsMadeThisStep: SimulatedCall[];
|
|
20
|
-
}
|
|
21
|
-
export interface CallPnlData {
|
|
22
|
-
callId: UUID;
|
|
23
|
-
actorId: UUID;
|
|
24
|
-
tokenAddress: string;
|
|
25
|
-
recommendationType: "BUY" | "SELL";
|
|
26
|
-
priceAtRecommendation?: number;
|
|
27
|
-
potentialProfitPercent?: number;
|
|
28
|
-
avoidedLossPercent?: number;
|
|
29
|
-
isScamOrRug?: boolean;
|
|
30
|
-
evaluationTimestamp: number;
|
|
31
|
-
notes?: string;
|
|
32
|
-
athWindowDaysUsed?: number;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Core simulation engine for benchmarks.
|
|
36
|
-
* This function will be called by individual benchmark TestCases.
|
|
37
|
-
*/
|
|
38
|
-
export declare function runBenchmarkSimulation(runtime: IAgentRuntime, params: BenchmarkSimulationParams): Promise<void>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { TestSuite, UUID } from "@elizaos/core";
|
|
2
|
-
import { Conviction, SupportedChain } from "../../../types";
|
|
3
|
-
export interface EnrichedCallDataPrv {
|
|
4
|
-
callId: UUID;
|
|
5
|
-
originalMessageId: string;
|
|
6
|
-
userId: string;
|
|
7
|
-
username: string;
|
|
8
|
-
timestamp: number;
|
|
9
|
-
content: string;
|
|
10
|
-
tokenMentioned: string;
|
|
11
|
-
isTicker: boolean;
|
|
12
|
-
resolvedAddress?: string;
|
|
13
|
-
chain: SupportedChain;
|
|
14
|
-
sentiment: "positive" | "negative";
|
|
15
|
-
conviction: Conviction;
|
|
16
|
-
}
|
|
17
|
-
export declare const trustAlgorithmBenchmarkSuite: TestSuite;
|
|
18
|
-
export default trustAlgorithmBenchmarkSuite;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Entity, IAgentRuntime, Room, World } from "@elizaos/core";
|
|
2
|
-
type Content = {
|
|
3
|
-
text: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function setupScenario(runtime: IAgentRuntime): Promise<{
|
|
7
|
-
user: Entity;
|
|
8
|
-
room: Room;
|
|
9
|
-
world: World;
|
|
10
|
-
}>;
|
|
11
|
-
export declare function sendMessageAndWaitForResponse(runtime: IAgentRuntime, room: Room, user: Entity, text: string): Promise<Content>;
|
|
12
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { SupportedChain, TokenAPIData } from "../../types";
|
|
2
|
-
export interface SimulatedToken {
|
|
3
|
-
address: string;
|
|
4
|
-
symbol: string;
|
|
5
|
-
name: string;
|
|
6
|
-
chain: SupportedChain;
|
|
7
|
-
performanceType: "good" | "bad" | "neutral" | "volatile";
|
|
8
|
-
priceTrajectory: (step: number) => number;
|
|
9
|
-
initialPrice: number;
|
|
10
|
-
liquidity?: number;
|
|
11
|
-
marketCap?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare class MockPriceService {
|
|
14
|
-
private tokens;
|
|
15
|
-
private currentTimeStep;
|
|
16
|
-
private baseTimestamp;
|
|
17
|
-
private stepIncrementMs;
|
|
18
|
-
constructor(initialTokens: SimulatedToken[]);
|
|
19
|
-
addToken(token: SimulatedToken): void;
|
|
20
|
-
advanceTime(step: number): void;
|
|
21
|
-
getCurrentTimestamp(step?: number): number;
|
|
22
|
-
getStepFromTimestamp(timestamp: number): number | null;
|
|
23
|
-
getTokenAPIData(tokenAddress: string, chain: SupportedChain, // Chain might be used if addresses are not unique across chains
|
|
24
|
-
step?: number): Promise<TokenAPIData | null>;
|
|
25
|
-
/**
|
|
26
|
-
* Calculates the All-Time High (ATH) for a token within a specified number of days (steps)
|
|
27
|
-
* starting from a given step.
|
|
28
|
-
*/
|
|
29
|
-
getAthInWindow(tokenAddress: string, chain: SupportedChain, fromStep: number, windowDays: number): number | null;
|
|
30
|
-
getTokensByPerformanceType(type: SimulatedToken["performanceType"]): SimulatedToken[];
|
|
31
|
-
getAllTokens(): SimulatedToken[];
|
|
32
|
-
static goodTokenTrajectory: (initialPrice: number, growthFactor?: number) => (step: number) => number;
|
|
33
|
-
static badTokenTrajectory: (initialPrice: number, decayFactor?: number, rugStepMultiplier?: number) => (step: number) => number;
|
|
34
|
-
static neutralTokenTrajectory: (initialPrice: number, volatility?: number) => (step: number) => number;
|
|
35
|
-
static volatileTokenTrajectory: (initialPrice: number, volatility?: number, pumpDumpChance?: number) => (step: number) => number;
|
|
36
|
-
}
|