legends-mcp 1.0.0
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 +173 -0
- package/dist/agents/guardrails.d.ts +44 -0
- package/dist/agents/guardrails.d.ts.map +1 -0
- package/dist/agents/guardrails.js +144 -0
- package/dist/agents/guardrails.js.map +1 -0
- package/dist/agents/misbehavior-prevention.d.ts +33 -0
- package/dist/agents/misbehavior-prevention.d.ts.map +1 -0
- package/dist/agents/misbehavior-prevention.js +278 -0
- package/dist/agents/misbehavior-prevention.js.map +1 -0
- package/dist/chat/handler.d.ts +13 -0
- package/dist/chat/handler.d.ts.map +1 -0
- package/dist/chat/handler.js +101 -0
- package/dist/chat/handler.js.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +66 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +182 -0
- package/dist/index.js.map +1 -0
- package/dist/insights/smart-injection.d.ts +67 -0
- package/dist/insights/smart-injection.d.ts.map +1 -0
- package/dist/insights/smart-injection.js +257 -0
- package/dist/insights/smart-injection.js.map +1 -0
- package/dist/legends/character-training.d.ts +36 -0
- package/dist/legends/character-training.d.ts.map +1 -0
- package/dist/legends/character-training.js +198 -0
- package/dist/legends/character-training.js.map +1 -0
- package/dist/legends/loader.d.ts +26 -0
- package/dist/legends/loader.d.ts.map +1 -0
- package/dist/legends/loader.js +104 -0
- package/dist/legends/loader.js.map +1 -0
- package/dist/legends/personality.d.ts +24 -0
- package/dist/legends/personality.d.ts.map +1 -0
- package/dist/legends/personality.js +211 -0
- package/dist/legends/personality.js.map +1 -0
- package/dist/legends/prompt-builder.d.ts +11 -0
- package/dist/legends/prompt-builder.d.ts.map +1 -0
- package/dist/legends/prompt-builder.js +113 -0
- package/dist/legends/prompt-builder.js.map +1 -0
- package/dist/tools/chat-with-legend.d.ts +83 -0
- package/dist/tools/chat-with-legend.d.ts.map +1 -0
- package/dist/tools/chat-with-legend.js +91 -0
- package/dist/tools/chat-with-legend.js.map +1 -0
- package/dist/tools/get-legend-context.d.ts +64 -0
- package/dist/tools/get-legend-context.d.ts.map +1 -0
- package/dist/tools/get-legend-context.js +407 -0
- package/dist/tools/get-legend-context.js.map +1 -0
- package/dist/tools/get-legend-insight.d.ts +33 -0
- package/dist/tools/get-legend-insight.d.ts.map +1 -0
- package/dist/tools/get-legend-insight.js +209 -0
- package/dist/tools/get-legend-insight.js.map +1 -0
- package/dist/tools/index.d.ts +103 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +17 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/list-legends.d.ts +45 -0
- package/dist/tools/list-legends.d.ts.map +1 -0
- package/dist/tools/list-legends.js +124 -0
- package/dist/tools/list-legends.js.map +1 -0
- package/dist/types.d.ts +90 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/legends/anatoly-yakovenko/skill.yaml +534 -0
- package/legends/andre-cronje/skill.yaml +682 -0
- package/legends/andrew-carnegie/skill.yaml +499 -0
- package/legends/balaji-srinivasan/skill.yaml +706 -0
- package/legends/benjamin-graham/skill.yaml +671 -0
- package/legends/bill-gurley/skill.yaml +688 -0
- package/legends/brian-armstrong/skill.yaml +640 -0
- package/legends/brian-chesky/skill.yaml +692 -0
- package/legends/cathie-wood/skill.yaml +522 -0
- package/legends/charlie-munger/skill.yaml +694 -0
- package/legends/cz-binance/skill.yaml +545 -0
- package/legends/demis-hassabis/skill.yaml +762 -0
- package/legends/elon-musk/skill.yaml +594 -0
- package/legends/gary-vaynerchuk/skill.yaml +586 -0
- package/legends/hayden-adams/skill.yaml +591 -0
- package/legends/howard-marks/skill.yaml +767 -0
- package/legends/jack-dorsey/skill.yaml +568 -0
- package/legends/jeff-bezos/skill.yaml +623 -0
- package/legends/jensen-huang/skill.yaml +107 -0
- package/legends/marc-andreessen/skill.yaml +106 -0
- package/legends/mert-mumtaz/skill.yaml +551 -0
- package/legends/michael-heinrich/skill.yaml +425 -0
- package/legends/naval-ravikant/skill.yaml +575 -0
- package/legends/patrick-collison/skill.yaml +779 -0
- package/legends/paul-graham/skill.yaml +566 -0
- package/legends/peter-thiel/skill.yaml +741 -0
- package/legends/ray-dalio/skill.yaml +742 -0
- package/legends/reid-hoffman/skill.yaml +107 -0
- package/legends/sam-altman/skill.yaml +110 -0
- package/legends/satya-nadella/skill.yaml +751 -0
- package/legends/steve-jobs/skill.yaml +524 -0
- package/legends/sundar-pichai/skill.yaml +523 -0
- package/legends/tim-ferriss/skill.yaml +502 -0
- package/legends/tobi-lutke/skill.yaml +512 -0
- package/legends/vitalik-buterin/skill.yaml +739 -0
- package/legends/warren-buffett/skill.yaml +103 -0
- package/package.json +69 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
// Smart Insight Injection System
|
|
2
|
+
// Knows WHEN, WHERE, and HOW to recommend legend insights
|
|
3
|
+
import { getLegendById } from '../legends/loader.js';
|
|
4
|
+
/**
|
|
5
|
+
* INSIGHT INJECTION STRATEGY
|
|
6
|
+
*
|
|
7
|
+
* WHERE to inject insights:
|
|
8
|
+
* 1. Topic-triggered: User discusses topic → relevant legend speaks
|
|
9
|
+
* 2. Task-completion: After finishing work → celebratory wisdom
|
|
10
|
+
* 3. Problem-solving: User stuck → mentor perspective
|
|
11
|
+
* 4. Decision points: User choosing options → framework suggestion
|
|
12
|
+
* 5. Learning moments: User asks "how" → pattern/principle injection
|
|
13
|
+
*
|
|
14
|
+
* HOW MANY:
|
|
15
|
+
* - Max 1 insight per conversation turn
|
|
16
|
+
* - Max 3 insights per session (avoid spam)
|
|
17
|
+
* - Cooldown: 5 messages minimum between insights
|
|
18
|
+
* - User can disable with LEGENDS_DISABLE_INSIGHTS=true
|
|
19
|
+
*/
|
|
20
|
+
// Topic → Legend mapping for smart recommendations
|
|
21
|
+
export const TOPIC_LEGEND_MAP = {
|
|
22
|
+
// Tech & Engineering
|
|
23
|
+
'first principles': ['elon-musk'],
|
|
24
|
+
'physics': ['elon-musk'],
|
|
25
|
+
'manufacturing': ['elon-musk'],
|
|
26
|
+
'rockets': ['elon-musk'],
|
|
27
|
+
'electric vehicles': ['elon-musk'],
|
|
28
|
+
'scaling': ['elon-musk', 'jeff-bezos'],
|
|
29
|
+
// Product & Design
|
|
30
|
+
'design': ['steve-jobs'],
|
|
31
|
+
'product': ['steve-jobs', 'paul-graham'],
|
|
32
|
+
'simplicity': ['steve-jobs'],
|
|
33
|
+
'user experience': ['steve-jobs', 'mert-mumtaz'],
|
|
34
|
+
'ux': ['steve-jobs', 'mert-mumtaz'],
|
|
35
|
+
// Investing & Finance
|
|
36
|
+
'investing': ['warren-buffett', 'charlie-munger'],
|
|
37
|
+
'value': ['warren-buffett'],
|
|
38
|
+
'moat': ['warren-buffett'],
|
|
39
|
+
'compounding': ['warren-buffett', 'naval-ravikant'],
|
|
40
|
+
'mental models': ['charlie-munger'],
|
|
41
|
+
// Startups
|
|
42
|
+
'startup': ['paul-graham', 'sam-altman'],
|
|
43
|
+
'yc': ['paul-graham', 'sam-altman', 'michael-heinrich'],
|
|
44
|
+
'y combinator': ['paul-graham', 'sam-altman', 'michael-heinrich'],
|
|
45
|
+
'fundraising': ['paul-graham', 'marc-andreessen'],
|
|
46
|
+
'mvp': ['paul-graham'],
|
|
47
|
+
'launch': ['paul-graham'],
|
|
48
|
+
// Crypto & Web3
|
|
49
|
+
'crypto': ['cz-binance', 'anatoly-yakovenko'],
|
|
50
|
+
'blockchain': ['cz-binance', 'anatoly-yakovenko'],
|
|
51
|
+
'solana': ['anatoly-yakovenko', 'mert-mumtaz'],
|
|
52
|
+
'exchange': ['cz-binance'],
|
|
53
|
+
'binance': ['cz-binance'],
|
|
54
|
+
'rpc': ['mert-mumtaz'],
|
|
55
|
+
'infrastructure': ['mert-mumtaz', 'michael-heinrich'],
|
|
56
|
+
'decentralization': ['anatoly-yakovenko', 'michael-heinrich'],
|
|
57
|
+
'ai infrastructure': ['michael-heinrich'],
|
|
58
|
+
'0g': ['michael-heinrich'],
|
|
59
|
+
// Business & Strategy
|
|
60
|
+
'network effects': ['reid-hoffman'],
|
|
61
|
+
'blitzscaling': ['reid-hoffman'],
|
|
62
|
+
'marketplace': ['reid-hoffman'],
|
|
63
|
+
'monopoly': ['peter-thiel'],
|
|
64
|
+
'competition': ['peter-thiel'],
|
|
65
|
+
'contrarian': ['peter-thiel'],
|
|
66
|
+
'zero to one': ['peter-thiel'],
|
|
67
|
+
// AI & Technology
|
|
68
|
+
'ai': ['sam-altman', 'jensen-huang', 'michael-heinrich'],
|
|
69
|
+
'agi': ['sam-altman'],
|
|
70
|
+
'gpu': ['jensen-huang'],
|
|
71
|
+
'nvidia': ['jensen-huang'],
|
|
72
|
+
'cuda': ['jensen-huang'],
|
|
73
|
+
// Philosophy & Wealth
|
|
74
|
+
'wealth': ['naval-ravikant'],
|
|
75
|
+
'leverage': ['naval-ravikant'],
|
|
76
|
+
'specific knowledge': ['naval-ravikant'],
|
|
77
|
+
'happiness': ['naval-ravikant'],
|
|
78
|
+
// Developer Experience
|
|
79
|
+
'developer experience': ['mert-mumtaz'],
|
|
80
|
+
'dx': ['mert-mumtaz'],
|
|
81
|
+
'documentation': ['mert-mumtaz'],
|
|
82
|
+
'docs': ['mert-mumtaz'],
|
|
83
|
+
'api': ['mert-mumtaz'],
|
|
84
|
+
};
|
|
85
|
+
// Default injection rules
|
|
86
|
+
export const INJECTION_RULES = [
|
|
87
|
+
// High priority - direct topic matches
|
|
88
|
+
{
|
|
89
|
+
context: 'topic_match',
|
|
90
|
+
trigger: /first\s*principles?/i,
|
|
91
|
+
legend_ids: ['elon-musk'],
|
|
92
|
+
priority: 9,
|
|
93
|
+
cooldown_messages: 3,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
context: 'topic_match',
|
|
97
|
+
trigger: /value\s*invest/i,
|
|
98
|
+
legend_ids: ['warren-buffett'],
|
|
99
|
+
priority: 9,
|
|
100
|
+
cooldown_messages: 3,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
context: 'topic_match',
|
|
104
|
+
trigger: /solana|sol\s+(network|blockchain)/i,
|
|
105
|
+
legend_ids: ['anatoly-yakovenko', 'mert-mumtaz'],
|
|
106
|
+
priority: 8,
|
|
107
|
+
cooldown_messages: 3,
|
|
108
|
+
},
|
|
109
|
+
// Medium priority - problem solving
|
|
110
|
+
{
|
|
111
|
+
context: 'problem_solving',
|
|
112
|
+
trigger: ['stuck', 'help', "can't figure out", 'struggling'],
|
|
113
|
+
legend_ids: ['paul-graham', 'charlie-munger'],
|
|
114
|
+
priority: 6,
|
|
115
|
+
cooldown_messages: 5,
|
|
116
|
+
},
|
|
117
|
+
// Decision points
|
|
118
|
+
{
|
|
119
|
+
context: 'decision_point',
|
|
120
|
+
trigger: ['should I', 'which option', 'better approach', 'trade-off'],
|
|
121
|
+
legend_ids: ['charlie-munger', 'jeff-bezos'],
|
|
122
|
+
priority: 7,
|
|
123
|
+
cooldown_messages: 5,
|
|
124
|
+
},
|
|
125
|
+
// Task completion celebration
|
|
126
|
+
{
|
|
127
|
+
context: 'task_complete',
|
|
128
|
+
trigger: ['done', 'finished', 'completed', 'shipped'],
|
|
129
|
+
legend_ids: ['steve-jobs', 'paul-graham'],
|
|
130
|
+
priority: 4,
|
|
131
|
+
cooldown_messages: 10,
|
|
132
|
+
},
|
|
133
|
+
];
|
|
134
|
+
const sessionStates = new Map();
|
|
135
|
+
const DEFAULT_SESSION_STATE = {
|
|
136
|
+
insightCount: 0,
|
|
137
|
+
messagesSinceLastInsight: 0,
|
|
138
|
+
lastInsightLegend: null,
|
|
139
|
+
disabledUntil: 0,
|
|
140
|
+
};
|
|
141
|
+
// Configuration
|
|
142
|
+
export const INSIGHT_CONFIG = {
|
|
143
|
+
maxInsightsPerSession: 3,
|
|
144
|
+
minMessagesBetweenInsights: 5,
|
|
145
|
+
globalCooldownMs: 60000, // 1 minute minimum between any insights
|
|
146
|
+
enabled: process.env.LEGENDS_DISABLE_INSIGHTS !== 'true',
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Detect topics in user message and find relevant legends
|
|
150
|
+
*/
|
|
151
|
+
export function detectRelevantLegends(message) {
|
|
152
|
+
const messageLower = message.toLowerCase();
|
|
153
|
+
const relevantLegends = new Set();
|
|
154
|
+
for (const [topic, legends] of Object.entries(TOPIC_LEGEND_MAP)) {
|
|
155
|
+
if (messageLower.includes(topic.toLowerCase())) {
|
|
156
|
+
legends.forEach(l => relevantLegends.add(l));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return Array.from(relevantLegends);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Check if insight should be injected based on context and rules
|
|
163
|
+
*/
|
|
164
|
+
export function shouldInjectInsight(sessionId, message, context) {
|
|
165
|
+
// Check if disabled
|
|
166
|
+
if (!INSIGHT_CONFIG.enabled) {
|
|
167
|
+
return { should: false, reason: 'Insights disabled by config' };
|
|
168
|
+
}
|
|
169
|
+
// Get or create session state
|
|
170
|
+
let state = sessionStates.get(sessionId);
|
|
171
|
+
if (!state) {
|
|
172
|
+
state = { ...DEFAULT_SESSION_STATE };
|
|
173
|
+
sessionStates.set(sessionId, state);
|
|
174
|
+
}
|
|
175
|
+
// Check session limits
|
|
176
|
+
if (state.insightCount >= INSIGHT_CONFIG.maxInsightsPerSession) {
|
|
177
|
+
return { should: false, reason: 'Max insights per session reached' };
|
|
178
|
+
}
|
|
179
|
+
// Check message cooldown
|
|
180
|
+
if (state.messagesSinceLastInsight < INSIGHT_CONFIG.minMessagesBetweenInsights) {
|
|
181
|
+
state.messagesSinceLastInsight++;
|
|
182
|
+
return { should: false, reason: 'Cooldown period active' };
|
|
183
|
+
}
|
|
184
|
+
// Check global cooldown
|
|
185
|
+
if (Date.now() < state.disabledUntil) {
|
|
186
|
+
return { should: false, reason: 'Global cooldown active' };
|
|
187
|
+
}
|
|
188
|
+
// Find matching rules
|
|
189
|
+
const messageLower = message.toLowerCase();
|
|
190
|
+
let bestMatch = null;
|
|
191
|
+
for (const rule of INJECTION_RULES) {
|
|
192
|
+
if (context && rule.context !== context)
|
|
193
|
+
continue;
|
|
194
|
+
let matches = false;
|
|
195
|
+
if (rule.trigger instanceof RegExp) {
|
|
196
|
+
matches = rule.trigger.test(message);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
matches = rule.trigger.some(t => messageLower.includes(t.toLowerCase()));
|
|
200
|
+
}
|
|
201
|
+
if (matches) {
|
|
202
|
+
// Pick a legend that isn't the last one used
|
|
203
|
+
const availableLegends = rule.legend_ids.filter(l => l !== state.lastInsightLegend);
|
|
204
|
+
const legendId = availableLegends[0] || rule.legend_ids[0];
|
|
205
|
+
if (!bestMatch || rule.priority > bestMatch.rule.priority) {
|
|
206
|
+
bestMatch = { rule, legendId };
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (bestMatch) {
|
|
211
|
+
// Update state
|
|
212
|
+
state.insightCount++;
|
|
213
|
+
state.messagesSinceLastInsight = 0;
|
|
214
|
+
state.lastInsightLegend = bestMatch.legendId;
|
|
215
|
+
state.disabledUntil = Date.now() + INSIGHT_CONFIG.globalCooldownMs;
|
|
216
|
+
return {
|
|
217
|
+
should: true,
|
|
218
|
+
legendId: bestMatch.legendId,
|
|
219
|
+
reason: `Matched rule: ${bestMatch.rule.context}`,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
// Increment message counter even if no insight
|
|
223
|
+
state.messagesSinceLastInsight++;
|
|
224
|
+
return { should: false, reason: 'No matching rules' };
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Get a recommended insight for the current context
|
|
228
|
+
*/
|
|
229
|
+
export function getRecommendedInsight(sessionId, message) {
|
|
230
|
+
const check = shouldInjectInsight(sessionId, message);
|
|
231
|
+
if (!check.should || !check.legendId) {
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
const legend = getLegendById(check.legendId);
|
|
235
|
+
if (!legend)
|
|
236
|
+
return null;
|
|
237
|
+
// Import the insight generator
|
|
238
|
+
// Note: This would be imported from get-legend-insight.ts
|
|
239
|
+
// For now, return a simple format
|
|
240
|
+
return {
|
|
241
|
+
insight: `💡 **${legend.name}** might have wisdom on this topic. Try: \`get_legend_insight legend_id="${check.legendId}"\``,
|
|
242
|
+
legendId: check.legendId,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Reset session state (for testing or new conversations)
|
|
247
|
+
*/
|
|
248
|
+
export function resetSession(sessionId) {
|
|
249
|
+
sessionStates.delete(sessionId);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Get session stats (for debugging)
|
|
253
|
+
*/
|
|
254
|
+
export function getSessionStats(sessionId) {
|
|
255
|
+
return sessionStates.get(sessionId) || DEFAULT_SESSION_STATE;
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=smart-injection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-injection.js","sourceRoot":"","sources":["../../src/insights/smart-injection.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,0DAA0D;AAG1D,OAAO,EAAiB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AAEH,mDAAmD;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,qBAAqB;IACrB,kBAAkB,EAAE,CAAC,WAAW,CAAC;IACjC,SAAS,EAAE,CAAC,WAAW,CAAC;IACxB,eAAe,EAAE,CAAC,WAAW,CAAC;IAC9B,SAAS,EAAE,CAAC,WAAW,CAAC;IACxB,mBAAmB,EAAE,CAAC,WAAW,CAAC;IAClC,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;IAEtC,mBAAmB;IACnB,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,SAAS,EAAE,CA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zB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC5C,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,OAAO,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE SECRET SAUCE:
|
|
3
|
+
*
|
|
4
|
+
* 1. REAL QUOTES - Use their actual words, not paraphrases
|
|
5
|
+
* 2. SPEAKING PATTERNS - How they structure sentences
|
|
6
|
+
* 3. THOUGHT PROCESS - How they reason through problems
|
|
7
|
+
* 4. SIGNATURE MOVES - Things only THEY would say
|
|
8
|
+
* 5. ANTI-PATTERNS - Things they would NEVER say
|
|
9
|
+
*
|
|
10
|
+
* The more specific and grounded in reality, the better.
|
|
11
|
+
*/
|
|
12
|
+
export interface CharacterTraining {
|
|
13
|
+
realQuotes: string[];
|
|
14
|
+
thinkingPatterns: string[];
|
|
15
|
+
sentencePatterns: string[];
|
|
16
|
+
obsessions: string[];
|
|
17
|
+
disagreementStyle: string;
|
|
18
|
+
admissionStyle: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const ELON_TRAINING: CharacterTraining;
|
|
21
|
+
export declare const BUFFETT_TRAINING: CharacterTraining;
|
|
22
|
+
export declare const CZ_TRAINING: CharacterTraining;
|
|
23
|
+
/**
|
|
24
|
+
* Build a character-grounded system prompt injection
|
|
25
|
+
* This makes the legend sound MORE authentic
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildCharacterInjection(legendId: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Validate a response sounds in-character
|
|
30
|
+
* Returns confidence score 0-1
|
|
31
|
+
*/
|
|
32
|
+
export declare function validateCharacterConsistency(legendId: string, response: string): {
|
|
33
|
+
score: number;
|
|
34
|
+
issues: string[];
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=character-training.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-training.d.ts","sourceRoot":"","sources":["../../src/legends/character-training.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,iBAAiB;IAEhC,UAAU,EAAE,MAAM,EAAE,CAAC;IAGrB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAG3B,UAAU,EAAE,MAAM,EAAE,CAAC;IAGrB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAGD,eAAO,MAAM,aAAa,EAAE,iBA0C3B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,iBA0C9B,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,iBAyCzB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA0BhE;AAUD;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CA2CrC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// Character Training System
|
|
2
|
+
// Makes legends sound AUTHENTIC, not generic AI
|
|
3
|
+
// ELON MUSK - Based on actual interviews, tweets, books
|
|
4
|
+
export const ELON_TRAINING = {
|
|
5
|
+
realQuotes: [
|
|
6
|
+
"I think it's important to reason from first principles rather than by analogy.",
|
|
7
|
+
"The first step is to establish that something is possible; then probability will occur.",
|
|
8
|
+
"If you're not failing, you're not innovating enough.",
|
|
9
|
+
"I'd rather be optimistic and wrong than pessimistic and right.",
|
|
10
|
+
"The best part is no part. The best process is no process.",
|
|
11
|
+
"Failure is an option here. If things are not failing, you are not innovating enough.",
|
|
12
|
+
"When Henry Ford made cheap, reliable cars, people said, 'Nah, what's wrong with a horse?'",
|
|
13
|
+
"I think that's the single best piece of advice: constantly think about how you could be doing things better.",
|
|
14
|
+
],
|
|
15
|
+
thinkingPatterns: [
|
|
16
|
+
"Boil down to first principles",
|
|
17
|
+
"Ask 'what does physics allow?'",
|
|
18
|
+
"Question every requirement",
|
|
19
|
+
"Delete unnecessary steps",
|
|
20
|
+
"Calculate from raw materials",
|
|
21
|
+
"Think in probabilities, not certainties",
|
|
22
|
+
],
|
|
23
|
+
sentencePatterns: [
|
|
24
|
+
"The thing is...",
|
|
25
|
+
"If physics allows it...",
|
|
26
|
+
"The idiot index on that is...",
|
|
27
|
+
"Let me put it this way...",
|
|
28
|
+
"The fundamental issue is...",
|
|
29
|
+
"Here's the thing though...",
|
|
30
|
+
],
|
|
31
|
+
obsessions: [
|
|
32
|
+
"First principles",
|
|
33
|
+
"Physics constraints",
|
|
34
|
+
"Manufacturing efficiency",
|
|
35
|
+
"Cost reduction",
|
|
36
|
+
"Deleting steps",
|
|
37
|
+
"Vertical integration",
|
|
38
|
+
"Aggressive timelines",
|
|
39
|
+
],
|
|
40
|
+
disagreementStyle: "I respectfully disagree. Here's why physics says otherwise...",
|
|
41
|
+
admissionStyle: "We definitely messed that up. We learned [specific lesson]. Now we do [new approach].",
|
|
42
|
+
};
|
|
43
|
+
// WARREN BUFFETT - Based on shareholder letters, interviews
|
|
44
|
+
export const BUFFETT_TRAINING = {
|
|
45
|
+
realQuotes: [
|
|
46
|
+
"Price is what you pay, value is what you get.",
|
|
47
|
+
"Be fearful when others are greedy and greedy when others are fearful.",
|
|
48
|
+
"Risk comes from not knowing what you're doing.",
|
|
49
|
+
"It's far better to buy a wonderful company at a fair price than a fair company at a wonderful price.",
|
|
50
|
+
"Only when the tide goes out do you discover who's been swimming naked.",
|
|
51
|
+
"The stock market is designed to transfer money from the Active to the Patient.",
|
|
52
|
+
"I never attempt to make money on the stock market. I buy on the assumption that they could close the market the next day.",
|
|
53
|
+
"Time is the friend of the wonderful company, the enemy of the mediocre.",
|
|
54
|
+
],
|
|
55
|
+
thinkingPatterns: [
|
|
56
|
+
"What's the intrinsic value?",
|
|
57
|
+
"What's my margin of safety?",
|
|
58
|
+
"Would I buy the whole company?",
|
|
59
|
+
"Can I understand this business?",
|
|
60
|
+
"What's the competitive moat?",
|
|
61
|
+
"Think in decades, not quarters",
|
|
62
|
+
],
|
|
63
|
+
sentencePatterns: [
|
|
64
|
+
"Well, let me tell you...",
|
|
65
|
+
"Charlie and I have always said...",
|
|
66
|
+
"The way I see it...",
|
|
67
|
+
"Here's a simple example...",
|
|
68
|
+
"If you don't understand the business...",
|
|
69
|
+
"Over the long term...",
|
|
70
|
+
],
|
|
71
|
+
obsessions: [
|
|
72
|
+
"Intrinsic value",
|
|
73
|
+
"Margin of safety",
|
|
74
|
+
"Competitive moats",
|
|
75
|
+
"Management quality",
|
|
76
|
+
"Long-term thinking",
|
|
77
|
+
"Circle of competence",
|
|
78
|
+
"Avoiding losses",
|
|
79
|
+
],
|
|
80
|
+
disagreementStyle: "I've never been able to understand that approach. In my experience...",
|
|
81
|
+
admissionStyle: "That was a mistake. A really dumb one. I should have known better because...",
|
|
82
|
+
};
|
|
83
|
+
// CZ - Based on tweets, AMAs, interviews
|
|
84
|
+
export const CZ_TRAINING = {
|
|
85
|
+
realQuotes: [
|
|
86
|
+
"4",
|
|
87
|
+
"Funds are SAFU.",
|
|
88
|
+
"Ignore FUD, focus on building.",
|
|
89
|
+
"Stay humble.",
|
|
90
|
+
"Users come first.",
|
|
91
|
+
"Build during the bear market.",
|
|
92
|
+
"We don't comment on rumors.",
|
|
93
|
+
"Keep building. Ignore the noise.",
|
|
94
|
+
],
|
|
95
|
+
thinkingPatterns: [
|
|
96
|
+
"What's best for users?",
|
|
97
|
+
"Think globally, act locally",
|
|
98
|
+
"Move fast, be flexible",
|
|
99
|
+
"Transparency builds trust",
|
|
100
|
+
"Community over company",
|
|
101
|
+
"Long-term over short-term",
|
|
102
|
+
],
|
|
103
|
+
sentencePatterns: [
|
|
104
|
+
"4",
|
|
105
|
+
"Simple answer:",
|
|
106
|
+
"Let me be clear:",
|
|
107
|
+
"From a global perspective...",
|
|
108
|
+
"Users first, always.",
|
|
109
|
+
"We're building for the long term.",
|
|
110
|
+
],
|
|
111
|
+
obsessions: [
|
|
112
|
+
"Global expansion",
|
|
113
|
+
"User protection",
|
|
114
|
+
"SAFU fund",
|
|
115
|
+
"Regulatory compliance",
|
|
116
|
+
"Community building",
|
|
117
|
+
"24/7 operations",
|
|
118
|
+
],
|
|
119
|
+
disagreementStyle: "4. (I understand, but let me explain our perspective...)",
|
|
120
|
+
admissionStyle: "We made a mistake. We've addressed it. Here's what we changed...",
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Build a character-grounded system prompt injection
|
|
124
|
+
* This makes the legend sound MORE authentic
|
|
125
|
+
*/
|
|
126
|
+
export function buildCharacterInjection(legendId) {
|
|
127
|
+
const training = CHARACTER_TRAININGS[legendId];
|
|
128
|
+
if (!training)
|
|
129
|
+
return '';
|
|
130
|
+
const injection = `
|
|
131
|
+
## Speaking Authentically
|
|
132
|
+
|
|
133
|
+
When responding, naturally incorporate:
|
|
134
|
+
|
|
135
|
+
**Your Actual Words:**
|
|
136
|
+
${training.realQuotes.slice(0, 3).map(q => `- "${q}"`).join('\n')}
|
|
137
|
+
|
|
138
|
+
**How You Think:**
|
|
139
|
+
${training.thinkingPatterns.slice(0, 3).map(p => `- ${p}`).join('\n')}
|
|
140
|
+
|
|
141
|
+
**Your Speaking Patterns:**
|
|
142
|
+
${training.sentencePatterns.slice(0, 3).map(s => `- Start with: "${s}"`).join('\n')}
|
|
143
|
+
|
|
144
|
+
**Topics You Care About:**
|
|
145
|
+
${training.obsessions.join(', ')}
|
|
146
|
+
|
|
147
|
+
**When You Disagree:** ${training.disagreementStyle}
|
|
148
|
+
**When You're Wrong:** ${training.admissionStyle}
|
|
149
|
+
`;
|
|
150
|
+
return injection;
|
|
151
|
+
}
|
|
152
|
+
// Registry of all character trainings
|
|
153
|
+
const CHARACTER_TRAININGS = {
|
|
154
|
+
'elon-musk': ELON_TRAINING,
|
|
155
|
+
'warren-buffett': BUFFETT_TRAINING,
|
|
156
|
+
'cz-binance': CZ_TRAINING,
|
|
157
|
+
// Add more as we develop them
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Validate a response sounds in-character
|
|
161
|
+
* Returns confidence score 0-1
|
|
162
|
+
*/
|
|
163
|
+
export function validateCharacterConsistency(legendId, response) {
|
|
164
|
+
const training = CHARACTER_TRAININGS[legendId];
|
|
165
|
+
if (!training)
|
|
166
|
+
return { score: 0.7, issues: [] }; // Default if no training
|
|
167
|
+
const issues = [];
|
|
168
|
+
let score = 0.7; // Base score
|
|
169
|
+
// Check for their vocabulary/obsessions
|
|
170
|
+
const obsessionMatches = training.obsessions.filter(o => response.toLowerCase().includes(o.toLowerCase()));
|
|
171
|
+
if (obsessionMatches.length > 0) {
|
|
172
|
+
score += 0.1 * Math.min(obsessionMatches.length / 2, 1);
|
|
173
|
+
}
|
|
174
|
+
// Check for their sentence patterns
|
|
175
|
+
const patternMatches = training.sentencePatterns.filter(p => response.includes(p.replace('...', '')));
|
|
176
|
+
if (patternMatches.length > 0) {
|
|
177
|
+
score += 0.1;
|
|
178
|
+
}
|
|
179
|
+
// Penalize generic AI-speak
|
|
180
|
+
const genericPhrases = [
|
|
181
|
+
"As an AI",
|
|
182
|
+
"I cannot",
|
|
183
|
+
"It's important to note",
|
|
184
|
+
"Based on my training",
|
|
185
|
+
"I don't have personal opinions",
|
|
186
|
+
];
|
|
187
|
+
for (const phrase of genericPhrases) {
|
|
188
|
+
if (response.includes(phrase)) {
|
|
189
|
+
issues.push(`Generic AI phrase detected: "${phrase}"`);
|
|
190
|
+
score -= 0.15;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
score: Math.max(0, Math.min(1, score)),
|
|
195
|
+
issues,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=character-training.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-training.js","sourceRoot":"","sources":["../../src/legends/character-training.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,gDAAgD;AAkChD,wDAAwD;AACxD,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,UAAU,EAAE;QACV,gFAAgF;QAChF,yFAAyF;QACzF,sDAAsD;QACtD,gEAAgE;QAChE,2DAA2D;QAC3D,sFAAsF;QACtF,2FAA2F;QAC3F,8GAA8G;KAC/G;IAED,gBAAgB,EAAE;QAChB,+BAA+B;QAC/B,gCAAgC;QAChC,4BAA4B;QAC5B,0BAA0B;QAC1B,8BAA8B;QAC9B,yCAAyC;KAC1C;IAED,gBAAgB,EAAE;QAChB,iBAAiB;QACjB,yBAAyB;QACzB,+BAA+B;QAC/B,2BAA2B;QAC3B,6BAA6B;QAC7B,4BAA4B;KAC7B;IAED,UAAU,EAAE;QACV,kBAAkB;QAClB,qBAAqB;QACrB,0BAA0B;QAC1B,gBAAgB;QAChB,gBAAgB;QAChB,sBAAsB;QACtB,sBAAsB;KACvB;IAED,iBAAiB,EAAE,+DAA+D;IAClF,cAAc,EAAE,uFAAuF;CACxG,CAAC;AAEF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,UAAU,EAAE;QACV,+CAA+C;QAC/C,uEAAuE;QACvE,gDAAgD;QAChD,sGAAsG;QACtG,wEAAwE;QACxE,gFAAgF;QAChF,2HAA2H;QAC3H,yEAAyE;KAC1E;IAED,gBAAgB,EAAE;QAChB,6BAA6B;QAC7B,6BAA6B;QAC7B,gCAAgC;QAChC,iCAAiC;QACjC,8BAA8B;QAC9B,gCAAgC;KACjC;IAED,gBAAgB,EAAE;QAChB,0BAA0B;QAC1B,mCAAmC;QACnC,qBAAqB;QACrB,4BAA4B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AC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,oCAAoC;IACpC,MAAM,cAAc,GAAG,QAAQ,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAC1D,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CACxC,CAAC;IACF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,KAAK,IAAI,GAAG,CAAC;IACf,CAAC;IAED,4BAA4B;IAC5B,MAAM,cAAc,GAAG;QACrB,UAAU;QACV,UAAU;QACV,wBAAwB;QACxB,sBAAsB;QACtB,gCAAgC;KACjC,CAAC;IAEF,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE,CAAC;QACpC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC9B,MAAM,CAAC,IAAI,CAAC,gCAAgC,MAAM,GAAG,CAAC,CAAC;YACvD,KAAK,IAAI,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACtC,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { LegendSkill, LegendSummary } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Load all legends from YAML files
|
|
4
|
+
*/
|
|
5
|
+
export declare function loadLegends(): Map<string, LegendSkill>;
|
|
6
|
+
/**
|
|
7
|
+
* Get all legends
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAllLegends(): LegendSkill[];
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific legend by ID
|
|
12
|
+
*/
|
|
13
|
+
export declare function getLegendById(id: string): LegendSkill | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Get legend summaries (lightweight list)
|
|
16
|
+
*/
|
|
17
|
+
export declare function getLegendSummaries(): LegendSummary[];
|
|
18
|
+
/**
|
|
19
|
+
* Search legends by query
|
|
20
|
+
*/
|
|
21
|
+
export declare function searchLegends(query: string): LegendSkill[];
|
|
22
|
+
/**
|
|
23
|
+
* Get legend count
|
|
24
|
+
*/
|
|
25
|
+
export declare function getLegendCount(): number;
|
|
26
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/legends/loader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA4B9D;;GAEG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAgCtD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,WAAW,EAAE,CAG7C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAGjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,aAAa,EAAE,CASpD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,EAAE,CAU1D;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Legend loader - loads and caches legend data from bundled YAML files
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import yaml from 'yaml';
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
// Cache for loaded legends
|
|
9
|
+
let legendsCache = null;
|
|
10
|
+
/**
|
|
11
|
+
* Get the path to the bundled legends directory
|
|
12
|
+
*/
|
|
13
|
+
function getLegendsDir() {
|
|
14
|
+
// In dist/legends/ or ../legends/ relative to the compiled file
|
|
15
|
+
const possiblePaths = [
|
|
16
|
+
path.join(__dirname, '..', '..', 'legends'),
|
|
17
|
+
path.join(__dirname, '..', 'legends'),
|
|
18
|
+
path.join(process.cwd(), 'legends'),
|
|
19
|
+
];
|
|
20
|
+
for (const p of possiblePaths) {
|
|
21
|
+
if (fs.existsSync(p)) {
|
|
22
|
+
return p;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
throw new Error('Could not find legends directory. Ensure the package is properly installed.');
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Load all legends from YAML files
|
|
29
|
+
*/
|
|
30
|
+
export function loadLegends() {
|
|
31
|
+
if (legendsCache) {
|
|
32
|
+
return legendsCache;
|
|
33
|
+
}
|
|
34
|
+
const legendsDir = getLegendsDir();
|
|
35
|
+
const legends = new Map();
|
|
36
|
+
const entries = fs.readdirSync(legendsDir, { withFileTypes: true });
|
|
37
|
+
for (const entry of entries) {
|
|
38
|
+
if (!entry.isDirectory())
|
|
39
|
+
continue;
|
|
40
|
+
const skillPath = path.join(legendsDir, entry.name, 'skill.yaml');
|
|
41
|
+
if (!fs.existsSync(skillPath))
|
|
42
|
+
continue;
|
|
43
|
+
try {
|
|
44
|
+
const content = fs.readFileSync(skillPath, 'utf-8');
|
|
45
|
+
const data = yaml.parse(content);
|
|
46
|
+
// Ensure required fields
|
|
47
|
+
if (!data.id)
|
|
48
|
+
data.id = entry.name;
|
|
49
|
+
if (!data.category)
|
|
50
|
+
data.category = 'legends';
|
|
51
|
+
legends.set(data.id, data);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
console.error(`[vibey-legends] Error loading ${skillPath}:`, error);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
legendsCache = legends;
|
|
58
|
+
return legends;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get all legends
|
|
62
|
+
*/
|
|
63
|
+
export function getAllLegends() {
|
|
64
|
+
const legends = loadLegends();
|
|
65
|
+
return Array.from(legends.values());
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get a specific legend by ID
|
|
69
|
+
*/
|
|
70
|
+
export function getLegendById(id) {
|
|
71
|
+
const legends = loadLegends();
|
|
72
|
+
return legends.get(id);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get legend summaries (lightweight list)
|
|
76
|
+
*/
|
|
77
|
+
export function getLegendSummaries() {
|
|
78
|
+
const legends = getAllLegends();
|
|
79
|
+
return legends.map(l => ({
|
|
80
|
+
id: l.id,
|
|
81
|
+
name: l.name,
|
|
82
|
+
description: l.description,
|
|
83
|
+
expertise: l.owns || [],
|
|
84
|
+
tags: l.tags || [],
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Search legends by query
|
|
89
|
+
*/
|
|
90
|
+
export function searchLegends(query) {
|
|
91
|
+
const legends = getAllLegends();
|
|
92
|
+
const q = query.toLowerCase();
|
|
93
|
+
return legends.filter(l => l.name.toLowerCase().includes(q) ||
|
|
94
|
+
l.description.toLowerCase().includes(q) ||
|
|
95
|
+
l.tags?.some(t => t.toLowerCase().includes(q)) ||
|
|
96
|
+
l.owns?.some(o => o.toLowerCase().includes(q)));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get legend count
|
|
100
|
+
*/
|
|
101
|
+
export function getLegendCount() {
|
|
102
|
+
return loadLegends().size;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/legends/loader.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACp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