legends-mcp 1.1.1 → 1.1.3
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/LICENSE +21 -0
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/dist/legends/prompt-builder.d.ts.map +1 -1
- package/dist/legends/prompt-builder.js +23 -0
- package/dist/legends/prompt-builder.js.map +1 -1
- package/dist/tools/get-legend-insight.d.ts +5 -1
- package/dist/tools/get-legend-insight.d.ts.map +1 -1
- package/dist/tools/get-legend-insight.js +69 -7
- package/dist/tools/get-legend-insight.js.map +1 -1
- package/dist/tools/index.d.ts +14 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list-legends.d.ts +1 -1
- package/dist/tools/list-legends.d.ts.map +1 -1
- package/dist/tools/list-legends.js +1 -1
- package/dist/tools/list-legends.js.map +1 -1
- package/dist/tools/search-legends.d.ts +36 -0
- package/dist/tools/search-legends.d.ts.map +1 -0
- package/dist/tools/search-legends.js +73 -0
- package/dist/tools/search-legends.js.map +1 -0
- package/dist/tools/summon-legend.d.ts +2 -0
- package/dist/tools/summon-legend.d.ts.map +1 -1
- package/dist/tools/summon-legend.js +21 -6
- package/dist/tools/summon-legend.js.map +1 -1
- package/legends/charlie-munger/skill.yaml +1 -0
- package/legends/elon-musk/skill.yaml +1 -0
- package/legends/jeff-bezos/skill.yaml +1 -0
- package/legends/jensen-huang/skill.yaml +4 -0
- package/legends/marc-andreessen/skill.yaml +4 -0
- package/legends/naval-ravikant/skill.yaml +1 -0
- package/legends/paul-graham/skill.yaml +1 -0
- package/legends/peter-thiel/skill.yaml +1 -0
- package/legends/reid-hoffman/skill.yaml +4 -0
- package/legends/sam-altman/skill.yaml +4 -0
- package/legends/steve-jobs/skill.yaml +1 -0
- package/legends/warren-buffett/skill.yaml +4 -0
- package/package.json +4 -2
- package/dist/agents/guardrails.d.ts +0 -44
- package/dist/agents/guardrails.d.ts.map +0 -1
- package/dist/agents/guardrails.js +0 -144
- package/dist/agents/guardrails.js.map +0 -1
- package/dist/agents/misbehavior-prevention.d.ts +0 -33
- package/dist/agents/misbehavior-prevention.d.ts.map +0 -1
- package/dist/agents/misbehavior-prevention.js +0 -278
- package/dist/agents/misbehavior-prevention.js.map +0 -1
- package/dist/config.d.ts +0 -4
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -27
- package/dist/config.js.map +0 -1
- package/dist/insights/smart-injection.d.ts +0 -67
- package/dist/insights/smart-injection.d.ts.map +0 -1
- package/dist/insights/smart-injection.js +0 -257
- package/dist/insights/smart-injection.js.map +0 -1
- package/dist/legends/personality.d.ts +0 -24
- package/dist/legends/personality.d.ts.map +0 -1
- package/dist/legends/personality.js +0 -211
- package/dist/legends/personality.js.map +0 -1
package/dist/config.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Configuration for Legends MCP Server
|
|
2
|
-
// No API key required - Claude does the roleplay!
|
|
3
|
-
// Legal disclaimer that MUST appear with every response
|
|
4
|
-
export const LEGAL_DISCLAIMER = `
|
|
5
|
-
---
|
|
6
|
-
**IMPORTANT DISCLAIMER**
|
|
7
|
-
|
|
8
|
-
This is an AI persona created for **educational and entertainment purposes only**.
|
|
9
|
-
|
|
10
|
-
- NOT affiliated with, endorsed by, or representative of the real individual
|
|
11
|
-
- NOT financial, legal, or professional advice
|
|
12
|
-
- NOT the actual person - this is an AI simulation
|
|
13
|
-
- Based on publicly available information, speeches, and writings
|
|
14
|
-
- For learning frameworks and thinking patterns
|
|
15
|
-
- Always do your own research (DYOR)
|
|
16
|
-
|
|
17
|
-
*The views expressed are AI-generated interpretations, not statements from the real person.*
|
|
18
|
-
`;
|
|
19
|
-
// Short disclaimer for inline use
|
|
20
|
-
export const SHORT_DISCLAIMER = `*AI persona for education only. Not the real person. Not advice. DYOR.*`;
|
|
21
|
-
// Debug logging
|
|
22
|
-
export function log(...args) {
|
|
23
|
-
if (process.env.LEGENDS_MCP_DEBUG === 'true') {
|
|
24
|
-
console.error('[legends-mcp]', ...args);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kDAAkD;AAElD,wDAAwD;AACxD,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;CAc/B,CAAC;AAEF,kCAAkC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,yEAAyE,CAAC;AAE1G,gBAAgB;AAChB,MAAM,UAAU,GAAG,CAAC,GAAG,IAAe;IACpC,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,MAAM,EAAE,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* INSIGHT INJECTION STRATEGY
|
|
3
|
-
*
|
|
4
|
-
* WHERE to inject insights:
|
|
5
|
-
* 1. Topic-triggered: User discusses topic → relevant legend speaks
|
|
6
|
-
* 2. Task-completion: After finishing work → celebratory wisdom
|
|
7
|
-
* 3. Problem-solving: User stuck → mentor perspective
|
|
8
|
-
* 4. Decision points: User choosing options → framework suggestion
|
|
9
|
-
* 5. Learning moments: User asks "how" → pattern/principle injection
|
|
10
|
-
*
|
|
11
|
-
* HOW MANY:
|
|
12
|
-
* - Max 1 insight per conversation turn
|
|
13
|
-
* - Max 3 insights per session (avoid spam)
|
|
14
|
-
* - Cooldown: 5 messages minimum between insights
|
|
15
|
-
* - User can disable with LEGENDS_DISABLE_INSIGHTS=true
|
|
16
|
-
*/
|
|
17
|
-
export declare const TOPIC_LEGEND_MAP: Record<string, string[]>;
|
|
18
|
-
export type InsightContext = 'topic_match' | 'task_complete' | 'problem_solving' | 'decision_point' | 'learning_moment' | 'random_wisdom';
|
|
19
|
-
export interface InsightInjectionRule {
|
|
20
|
-
context: InsightContext;
|
|
21
|
-
trigger: RegExp | string[];
|
|
22
|
-
legend_ids: string[];
|
|
23
|
-
priority: number;
|
|
24
|
-
cooldown_messages: number;
|
|
25
|
-
}
|
|
26
|
-
export declare const INJECTION_RULES: InsightInjectionRule[];
|
|
27
|
-
interface SessionState {
|
|
28
|
-
insightCount: number;
|
|
29
|
-
messagesSinceLastInsight: number;
|
|
30
|
-
lastInsightLegend: string | null;
|
|
31
|
-
disabledUntil: number;
|
|
32
|
-
}
|
|
33
|
-
export declare const INSIGHT_CONFIG: {
|
|
34
|
-
maxInsightsPerSession: number;
|
|
35
|
-
minMessagesBetweenInsights: number;
|
|
36
|
-
globalCooldownMs: number;
|
|
37
|
-
enabled: boolean;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Detect topics in user message and find relevant legends
|
|
41
|
-
*/
|
|
42
|
-
export declare function detectRelevantLegends(message: string): string[];
|
|
43
|
-
/**
|
|
44
|
-
* Check if insight should be injected based on context and rules
|
|
45
|
-
*/
|
|
46
|
-
export declare function shouldInjectInsight(sessionId: string, message: string, context?: InsightContext): {
|
|
47
|
-
should: boolean;
|
|
48
|
-
legendId?: string;
|
|
49
|
-
reason?: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Get a recommended insight for the current context
|
|
53
|
-
*/
|
|
54
|
-
export declare function getRecommendedInsight(sessionId: string, message: string): {
|
|
55
|
-
insight: string;
|
|
56
|
-
legendId: string;
|
|
57
|
-
} | null;
|
|
58
|
-
/**
|
|
59
|
-
* Reset session state (for testing or new conversations)
|
|
60
|
-
*/
|
|
61
|
-
export declare function resetSession(sessionId: string): void;
|
|
62
|
-
/**
|
|
63
|
-
* Get session stats (for debugging)
|
|
64
|
-
*/
|
|
65
|
-
export declare function getSessionStats(sessionId: string): SessionState;
|
|
66
|
-
export {};
|
|
67
|
-
//# sourceMappingURL=smart-injection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"smart-injection.d.ts","sourceRoot":"","sources":["../../src/insights/smart-injection.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAuErD,CAAC;AAGF,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,eAAe,CAAC;AAGpB,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAGD,eAAO,MAAM,eAAe,EAAE,oBAAoB,EAkDjD,CAAC;AAGF,UAAU,YAAY;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;IACjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB;AAYD,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAW/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACvB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAwEzD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiB9C;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CAE/D"}
|
|
@@ -1,257 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC,YAAY,EAAE,aAAa,CAAC;IACxC,YAAY,EAAE,CAAC,YAAY,CAAC;IAC5B,iBAAiB,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;IAChD,IAAI,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;IAEnC,sBAAsB;IACtB,WAAW,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACjD,OAAO,EA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C;AAC/D,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface PersonalityTraits {
|
|
2
|
-
catchphrases: string[];
|
|
3
|
-
memeResponses: Record<string, string>;
|
|
4
|
-
signatureEndings: string[];
|
|
5
|
-
vibeCheck: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const LEGEND_PERSONALITIES: Record<string, PersonalityTraits>;
|
|
8
|
-
/**
|
|
9
|
-
* Get a random catchphrase for a legend
|
|
10
|
-
*/
|
|
11
|
-
export declare function getRandomCatchphrase(legendId: string): string | null;
|
|
12
|
-
/**
|
|
13
|
-
* Get a meme response if the topic matches
|
|
14
|
-
*/
|
|
15
|
-
export declare function getMemeResponse(legendId: string, topic: string): string | null;
|
|
16
|
-
/**
|
|
17
|
-
* Get a random signature ending
|
|
18
|
-
*/
|
|
19
|
-
export declare function getSignatureEnding(legendId: string): string | null;
|
|
20
|
-
/**
|
|
21
|
-
* Inject personality into a response
|
|
22
|
-
*/
|
|
23
|
-
export declare function injectPersonality(legendId: string, response: string, addEnding?: boolean): string;
|
|
24
|
-
//# sourceMappingURL=personality.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"personality.d.ts","sourceRoot":"","sources":["../../src/legends/personality.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAwKlE,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW9E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIlE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,OAAc,GACxB,MAAM,CASR"}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
// Personality injections for memeable, viral responses
|
|
2
|
-
// These make legends feel alive, not robotic
|
|
3
|
-
// Personality traits for each legend
|
|
4
|
-
export const LEGEND_PERSONALITIES = {
|
|
5
|
-
'elon-musk': {
|
|
6
|
-
catchphrases: [
|
|
7
|
-
"The only limit is physics.",
|
|
8
|
-
"If it's not impossible, it's an engineering problem.",
|
|
9
|
-
"Delete that requirement.",
|
|
10
|
-
"The machine that builds the machine is the hard part.",
|
|
11
|
-
],
|
|
12
|
-
memeResponses: {
|
|
13
|
-
'impossible': "Physics allows it? Then it's just engineering. Get to work.",
|
|
14
|
-
'expensive': "What's the idiot index on that? Break it down to raw materials.",
|
|
15
|
-
'slow': "Time to delete some steps. What can we cut?",
|
|
16
|
-
'meeting': "Leave the meeting. Meetings are where productivity goes to die.",
|
|
17
|
-
},
|
|
18
|
-
signatureEndings: [
|
|
19
|
-
"Now delete half your requirements and try again.",
|
|
20
|
-
"The Algorithm applies here. Think about it.",
|
|
21
|
-
"Back to first principles.",
|
|
22
|
-
],
|
|
23
|
-
vibeCheck: "🚀 Ready to go to Mars or nah?",
|
|
24
|
-
},
|
|
25
|
-
'warren-buffett': {
|
|
26
|
-
catchphrases: [
|
|
27
|
-
"Price is what you pay, value is what you get.",
|
|
28
|
-
"Be fearful when others are greedy.",
|
|
29
|
-
"The stock market is a device for transferring money from the impatient to the patient.",
|
|
30
|
-
"Rule #1: Never lose money. Rule #2: Never forget rule #1.",
|
|
31
|
-
],
|
|
32
|
-
memeResponses: {
|
|
33
|
-
'crypto': "I don't invest in things I don't understand. And I definitely don't understand magic internet money.",
|
|
34
|
-
'get rich quick': "Get rich slow. That's my whole thing.",
|
|
35
|
-
'YOLO': "The opposite of that. Whatever that is.",
|
|
36
|
-
'leverage': "If you're smart, you don't need it. If you're dumb, you shouldn't use it.",
|
|
37
|
-
},
|
|
38
|
-
signatureEndings: [
|
|
39
|
-
"*sips Cherry Coke*",
|
|
40
|
-
"Now I'm going back to my McDonald's breakfast.",
|
|
41
|
-
"Call me when it's undervalued.",
|
|
42
|
-
],
|
|
43
|
-
vibeCheck: "🍔 Value investing or gambling?",
|
|
44
|
-
},
|
|
45
|
-
'steve-jobs': {
|
|
46
|
-
catchphrases: [
|
|
47
|
-
"Stay hungry. Stay foolish.",
|
|
48
|
-
"Design is not just what it looks like. Design is how it works.",
|
|
49
|
-
"People don't know what they want until you show it to them.",
|
|
50
|
-
"One more thing...",
|
|
51
|
-
],
|
|
52
|
-
memeResponses: {
|
|
53
|
-
'focus group': "We don't do focus groups. We just make insanely great products.",
|
|
54
|
-
'feature': "You're thinking about it wrong. What's the EXPERIENCE?",
|
|
55
|
-
'MVP': "Don't ship crap. Ship something you're proud of.",
|
|
56
|
-
'android': "... *stares in disgust*",
|
|
57
|
-
},
|
|
58
|
-
signatureEndings: [
|
|
59
|
-
"Now make it simpler.",
|
|
60
|
-
"Oh, and one more thing...",
|
|
61
|
-
"This changes everything. Again.",
|
|
62
|
-
],
|
|
63
|
-
vibeCheck: "🎨 Is it insanely great or just okay?",
|
|
64
|
-
},
|
|
65
|
-
'paul-graham': {
|
|
66
|
-
catchphrases: [
|
|
67
|
-
"Do things that don't scale.",
|
|
68
|
-
"Make something people want.",
|
|
69
|
-
"Startups = growth.",
|
|
70
|
-
"Better to make a few people love you than many people like you.",
|
|
71
|
-
],
|
|
72
|
-
memeResponses: {
|
|
73
|
-
'idea': "Ideas are cheap. Execution is everything.",
|
|
74
|
-
'funding': "Raise less than you think. Stay ramen profitable.",
|
|
75
|
-
'scale': "Not yet. First, make something people want.",
|
|
76
|
-
'co-founder': "The most important decision you'll make.",
|
|
77
|
-
},
|
|
78
|
-
signatureEndings: [
|
|
79
|
-
"Anyway, that's 2,000 words. Hope it helps.",
|
|
80
|
-
"There's probably an essay in this.",
|
|
81
|
-
"Now go talk to users.",
|
|
82
|
-
],
|
|
83
|
-
vibeCheck: "✍️ Essays or GTFO",
|
|
84
|
-
},
|
|
85
|
-
'cz-binance': {
|
|
86
|
-
catchphrases: [
|
|
87
|
-
"4",
|
|
88
|
-
"Funds are SAFU.",
|
|
89
|
-
"Ignore FUD, keep BUIDLing.",
|
|
90
|
-
"Stay humble.",
|
|
91
|
-
],
|
|
92
|
-
memeResponses: {
|
|
93
|
-
'FUD': "4",
|
|
94
|
-
'regulation': "We work with regulators. Next question.",
|
|
95
|
-
'bear market': "Best time to BUIDL.",
|
|
96
|
-
'competitor': "4",
|
|
97
|
-
},
|
|
98
|
-
signatureEndings: [
|
|
99
|
-
"4",
|
|
100
|
-
"Keep BUIDLing 🧱",
|
|
101
|
-
"Ignore the noise.",
|
|
102
|
-
],
|
|
103
|
-
vibeCheck: "🌏 Global or nothing",
|
|
104
|
-
},
|
|
105
|
-
'anatoly-yakovenko': {
|
|
106
|
-
catchphrases: [
|
|
107
|
-
"Proof of History goes brrr.",
|
|
108
|
-
"TPS is a meme. Throughput matters.",
|
|
109
|
-
"We'll fix it in post.",
|
|
110
|
-
"Hardware gets better. Design for tomorrow.",
|
|
111
|
-
],
|
|
112
|
-
memeResponses: {
|
|
113
|
-
'outage': "We had outages. We fixed them. Next.",
|
|
114
|
-
'ethereum': "Different design choices. We optimized for speed.",
|
|
115
|
-
'decentralization': "It's a spectrum, not binary.",
|
|
116
|
-
'fees': "Fractions of a cent. What's the problem?",
|
|
117
|
-
},
|
|
118
|
-
signatureEndings: [
|
|
119
|
-
"Anyway, back to optimizing the runtime.",
|
|
120
|
-
"We'll ship the fix tomorrow.",
|
|
121
|
-
"*returns to staring at validator metrics*",
|
|
122
|
-
],
|
|
123
|
-
vibeCheck: "⚡ Fast or die",
|
|
124
|
-
},
|
|
125
|
-
'mert-mumtaz': {
|
|
126
|
-
catchphrases: [
|
|
127
|
-
"RPC is love, RPC is life.",
|
|
128
|
-
"Developer experience is the product.",
|
|
129
|
-
"Docs are product too.",
|
|
130
|
-
"Ship it, then iterate.",
|
|
131
|
-
],
|
|
132
|
-
memeResponses: {
|
|
133
|
-
'infra': "Someone has to build the boring stuff that makes everything work.",
|
|
134
|
-
'support': "Support tickets are product insights in disguise.",
|
|
135
|
-
'competitor': "We're all building the ecosystem. Rising tide lifts all boats.",
|
|
136
|
-
'downtime': "Status page is your friend. Transparency builds trust.",
|
|
137
|
-
},
|
|
138
|
-
signatureEndings: [
|
|
139
|
-
"Now go check your RPC health.",
|
|
140
|
-
"Documentation is in the docs.",
|
|
141
|
-
"Discord is always open.",
|
|
142
|
-
],
|
|
143
|
-
vibeCheck: "🔧 Infra gang rise up",
|
|
144
|
-
},
|
|
145
|
-
'michael-heinrich': {
|
|
146
|
-
catchphrases: [
|
|
147
|
-
"Make something people want. Then make it 10x better.",
|
|
148
|
-
"Infrastructure outlasts applications.",
|
|
149
|
-
"Ship fast, learn fast.",
|
|
150
|
-
"NFA, always DYOR.",
|
|
151
|
-
],
|
|
152
|
-
memeResponses: {
|
|
153
|
-
'token': "NFA. I focus on the tech, not the token.",
|
|
154
|
-
'YC': "Best thing that ever happened to me as a founder.",
|
|
155
|
-
'exit': "Previous exit taught me: timing is everything.",
|
|
156
|
-
'AI': "The infrastructure for AI doesn't exist yet. That's what we're building.",
|
|
157
|
-
},
|
|
158
|
-
signatureEndings: [
|
|
159
|
-
"NFA, obviously.",
|
|
160
|
-
"Back to building.",
|
|
161
|
-
"YC taught me: just ship it.",
|
|
162
|
-
],
|
|
163
|
-
vibeCheck: "🎯 BUIDL mode activated",
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
/**
|
|
167
|
-
* Get a random catchphrase for a legend
|
|
168
|
-
*/
|
|
169
|
-
export function getRandomCatchphrase(legendId) {
|
|
170
|
-
const personality = LEGEND_PERSONALITIES[legendId];
|
|
171
|
-
if (!personality?.catchphrases.length)
|
|
172
|
-
return null;
|
|
173
|
-
return personality.catchphrases[Math.floor(Math.random() * personality.catchphrases.length)];
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Get a meme response if the topic matches
|
|
177
|
-
*/
|
|
178
|
-
export function getMemeResponse(legendId, topic) {
|
|
179
|
-
const personality = LEGEND_PERSONALITIES[legendId];
|
|
180
|
-
if (!personality?.memeResponses)
|
|
181
|
-
return null;
|
|
182
|
-
const lowerTopic = topic.toLowerCase();
|
|
183
|
-
for (const [key, response] of Object.entries(personality.memeResponses)) {
|
|
184
|
-
if (lowerTopic.includes(key)) {
|
|
185
|
-
return response;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Get a random signature ending
|
|
192
|
-
*/
|
|
193
|
-
export function getSignatureEnding(legendId) {
|
|
194
|
-
const personality = LEGEND_PERSONALITIES[legendId];
|
|
195
|
-
if (!personality?.signatureEndings.length)
|
|
196
|
-
return null;
|
|
197
|
-
return personality.signatureEndings[Math.floor(Math.random() * personality.signatureEndings.length)];
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Inject personality into a response
|
|
201
|
-
*/
|
|
202
|
-
export function injectPersonality(legendId, response, addEnding = true) {
|
|
203
|
-
if (!addEnding)
|
|
204
|
-
return response;
|
|
205
|
-
const ending = getSignatureEnding(legendId);
|
|
206
|
-
if (ending && Math.random() > 0.5) { // 50% chance to add signature ending
|
|
207
|
-
return `${response}\n\n${ending}`;
|
|
208
|
-
}
|
|
209
|
-
return response;
|
|
210
|
-
}
|
|
211
|
-
//# sourceMappingURL=personality.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"personality.js","sourceRoot":"","sources":["../../src/legends/personality.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