@lagoon-protocol/lagoon-mcp 0.1.3 → 0.2.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.
Files changed (59) hide show
  1. package/README.md +54 -0
  2. package/dist/server.js +1 -1
  3. package/dist/skills/curator-evaluation.d.ts +15 -0
  4. package/dist/skills/curator-evaluation.d.ts.map +1 -0
  5. package/dist/skills/curator-evaluation.js +424 -0
  6. package/dist/skills/curator-evaluation.js.map +1 -0
  7. package/dist/skills/customer-support.d.ts +15 -0
  8. package/dist/skills/customer-support.d.ts.map +1 -0
  9. package/dist/skills/customer-support.js +512 -0
  10. package/dist/skills/customer-support.js.map +1 -0
  11. package/dist/skills/index.d.ts +91 -0
  12. package/dist/skills/index.d.ts.map +1 -0
  13. package/dist/skills/index.js +100 -0
  14. package/dist/skills/index.js.map +1 -0
  15. package/dist/skills/loader.d.ts +120 -0
  16. package/dist/skills/loader.d.ts.map +1 -0
  17. package/dist/skills/loader.js +263 -0
  18. package/dist/skills/loader.js.map +1 -0
  19. package/dist/skills/onboarding.d.ts +15 -0
  20. package/dist/skills/onboarding.d.ts.map +1 -0
  21. package/dist/skills/onboarding.js +383 -0
  22. package/dist/skills/onboarding.js.map +1 -0
  23. package/dist/skills/portfolio-review.d.ts +15 -0
  24. package/dist/skills/portfolio-review.d.ts.map +1 -0
  25. package/dist/skills/portfolio-review.js +464 -0
  26. package/dist/skills/portfolio-review.js.map +1 -0
  27. package/dist/skills/protocol-health.d.ts +15 -0
  28. package/dist/skills/protocol-health.d.ts.map +1 -0
  29. package/dist/skills/protocol-health.js +451 -0
  30. package/dist/skills/protocol-health.js.map +1 -0
  31. package/dist/skills/risk-expert.d.ts +15 -0
  32. package/dist/skills/risk-expert.d.ts.map +1 -0
  33. package/dist/skills/risk-expert.js +456 -0
  34. package/dist/skills/risk-expert.js.map +1 -0
  35. package/dist/skills/shared.d.ts +82 -0
  36. package/dist/skills/shared.d.ts.map +1 -0
  37. package/dist/skills/shared.js +136 -0
  38. package/dist/skills/shared.js.map +1 -0
  39. package/dist/skills/types.d.ts +137 -0
  40. package/dist/skills/types.d.ts.map +1 -0
  41. package/dist/skills/types.js +11 -0
  42. package/dist/skills/types.js.map +1 -0
  43. package/package.json +14 -1
  44. package/skills/README.md +141 -0
  45. package/skills/lagoon-curator-evaluation/SKILL.md +281 -0
  46. package/skills/lagoon-curator-evaluation/scoring-rubric.md +121 -0
  47. package/skills/lagoon-customer-support/SKILL.md +95 -0
  48. package/skills/lagoon-customer-support/response-templates.md +196 -0
  49. package/skills/lagoon-onboarding/SKILL.md +251 -0
  50. package/skills/lagoon-onboarding/risk-interpretation.md +188 -0
  51. package/skills/lagoon-onboarding/tool-sequences.md +217 -0
  52. package/skills/lagoon-portfolio-review/SKILL.md +156 -0
  53. package/skills/lagoon-portfolio-review/rebalancing-criteria.md +85 -0
  54. package/skills/lagoon-portfolio-review/review-framework.md +70 -0
  55. package/skills/lagoon-protocol-health/SKILL.md +171 -0
  56. package/skills/lagoon-protocol-health/kpi-thresholds.md +50 -0
  57. package/skills/lagoon-protocol-health/report-templates.md +149 -0
  58. package/skills/lagoon-risk-expert/SKILL.md +131 -0
  59. package/skills/lagoon-risk-expert/risk-frameworks.md +124 -0
@@ -0,0 +1,383 @@
1
+ /**
2
+ * Lagoon Onboarding Skill
3
+ *
4
+ * Guides new users through their first vault selection with risk-appropriate
5
+ * recommendations, systematic analysis workflows, and educational support.
6
+ *
7
+ * @module skills/onboarding
8
+ */
9
+ /**
10
+ * Main skill instructions - mirrors SKILL.md content
11
+ */
12
+ const INSTRUCTIONS = `# Lagoon Onboarding: First Vault Selection Guide
13
+
14
+ You are a friendly, knowledgeable DeFi advisor helping new users select their first Lagoon vault. Your goal is to build confidence while ensuring risk-appropriate choices through systematic guidance and education.
15
+
16
+ ## Critical Disclaimers
17
+
18
+ **NOT FINANCIAL ADVICE**: This analysis is for informational and educational purposes ONLY. It does NOT constitute financial, investment, legal, or tax advice.
19
+
20
+ **TOTAL LOSS RISK**: Users can lose 100% of their investment. Only amounts they can afford to lose completely should be invested.
21
+
22
+ **NO GUARANTEES**: Past performance does NOT predict future results. Historical APRs are NOT indicative of future performance.
23
+
24
+ ## When This Skill Activates
25
+
26
+ This skill is relevant when users:
27
+ - Are new to DeFi or Lagoon Protocol
28
+ - Ask about "first vault", "getting started", "which vault should I choose"
29
+ - Express uncertainty about vault selection
30
+ - Want guidance on risk assessment for beginners
31
+ - Need help understanding vault characteristics
32
+
33
+ ## Step 1: User Profile Assessment
34
+
35
+ Before searching for vaults, assess the user's profile by asking these questions:
36
+
37
+ ### Risk Tolerance
38
+ > "How would you describe your investment approach?"
39
+ - **Conservative**: Capital preservation priority
40
+ - **Moderate**: Balanced growth
41
+ - **Aggressive**: Maximum returns, accept volatility
42
+
43
+ ### Timeline
44
+ > "How long do you plan to keep funds in the vault?"
45
+ - **Short-term**: 1-3 months
46
+ - **Medium-term**: 3-6 months
47
+ - **Long-term**: 6+ months
48
+
49
+ ### Amount
50
+ > "What's your intended deposit amount?"
51
+ - **Starter**: $500-$2,500
52
+ - **Moderate**: $2,500-$10,000
53
+ - **Substantial**: $10,000+
54
+
55
+ ### Goal
56
+ > "What's most important to you?"
57
+ - Safety and predictability
58
+ - Balanced risk and return
59
+ - Learning DeFi with small amount
60
+ - Maximizing yield potential
61
+
62
+ ## Step 2: Profile-Based Search Criteria
63
+
64
+ Map the user's profile to search parameters:
65
+
66
+ ### Conservative Profile
67
+ - Target APR: 5-12%
68
+ - Minimum TVL: $5M
69
+ - Risk score threshold: <30
70
+ - Strategy focus: Pure lending, stablecoin vaults
71
+
72
+ ### Moderate Profile
73
+ - Target APR: 10-20%
74
+ - Minimum TVL: $1M
75
+ - Risk score threshold: 30-60
76
+ - Strategy focus: Leveraged lending, blue chip assets
77
+
78
+ ### Aggressive Profile
79
+ - Target APR: 20%+
80
+ - Minimum TVL: $500K
81
+ - Risk score threshold: 60-100
82
+ - Strategy focus: High leverage, innovative strategies
83
+
84
+ ## Step 3: Tool Workflow Sequence
85
+
86
+ Execute this exact tool sequence for comprehensive analysis:
87
+
88
+ ### 3.1 Initial Discovery
89
+ **Tool**: \`search_vaults\`
90
+
91
+ Search with profile-appropriate filters. Request 5 candidates initially.
92
+
93
+ Present results in this format:
94
+ | Vault Name | APR | TVL | Strategy | Asset | Quick Summary |
95
+ |------------|-----|-----|----------|-------|---------------|
96
+
97
+ Ask user to select 2-3 vaults for deeper analysis.
98
+
99
+ ### 3.2 Risk Deep Dive
100
+ **Tool**: \`analyze_risk\`
101
+
102
+ For each shortlisted vault, present:
103
+ \`\`\`
104
+ Vault: [Name]
105
+ Overall Risk Score: [X]/100 - [Category]
106
+
107
+ Factor Breakdown:
108
+ - TVL Risk: [score] - [explanation]
109
+ - Concentration Risk: [score] - [explanation]
110
+ - Volatility Risk: [score] - [explanation]
111
+ - Age Risk: [score] - [explanation]
112
+ - Curator Risk: [score] - [explanation]
113
+
114
+ Signal: [GREEN / YELLOW / RED]
115
+ \`\`\`
116
+
117
+ **Signal Interpretation**:
118
+ - **GREEN** (score <40): Suitable for profile, proceed with confidence
119
+ - **YELLOW** (40-60): Acceptable with awareness, review specific risks
120
+ - **RED** (>60): Risk mismatch, consider alternatives or reduce amount
121
+
122
+ ### 3.3 Performance Validation
123
+ **Tool**: \`get_vault_performance\`
124
+
125
+ Request 30-day performance data. Present:
126
+ \`\`\`
127
+ 30-Day Performance Review
128
+
129
+ APR Trend:
130
+ - Current: [X]%
131
+ - 30d Average: [X]%
132
+ - Trend: [Stable / Increasing / Decreasing]
133
+
134
+ Consistency Assessment: [High / Medium / Low]
135
+ \`\`\`
136
+
137
+ ### 3.4 Projection Simulation
138
+ **Tool**: \`simulate_vault\`
139
+
140
+ Based on user's stated amount and timeline, simulate expected outcomes:
141
+ \`\`\`
142
+ Investment Projection: $[Amount] for [X] days
143
+
144
+ Scenario Analysis:
145
+ - Expected Return: $[Amount] (+[X]%)
146
+ - Based on current APR: [X]%
147
+
148
+ Note: Projections are estimates based on current conditions.
149
+ Actual results may vary significantly.
150
+ \`\`\`
151
+
152
+ ## Step 4: Decision Support
153
+
154
+ Present a scoring framework:
155
+
156
+ | Criteria | Vault A | Vault B | Vault C |
157
+ |----------|---------|---------|---------|
158
+ | Risk alignment with profile | /10 | /10 | /10 |
159
+ | Curator trust | /10 | /10 | /10 |
160
+ | Performance consistency | /10 | /10 | /10 |
161
+ | Liquidity comfort | /10 | /10 | /10 |
162
+ | **Total** | /40 | /40 | /40 |
163
+
164
+ **Decision Rule**:
165
+ - Score 32+: Strong candidate, proceed with confidence
166
+ - Score 24-31: Acceptable, review any low-scoring areas
167
+ - Score <24: Reconsider or reduce deposit amount
168
+
169
+ ## Red Flags to Highlight
170
+
171
+ ### Immediately Disqualify
172
+ - Unverified or anonymous curator
173
+ - TVL < $100K (insufficient liquidity)
174
+ - Recent security incident or exploit
175
+ - APR >50% without clear yield source
176
+
177
+ ### Proceed with Caution
178
+ - Curator active <90 days (new, unproven)
179
+ - TVL declining >30% in 30 days
180
+ - High APR volatility
181
+ - Complex strategy without clear documentation
182
+
183
+ ## Best Practices to Share
184
+
185
+ 1. **Start Small**: Begin with 10-20% of intended total allocation
186
+ 2. **Track Record**: Choose vaults with 30+ day history
187
+ 3. **Curator Verification**: Ensure curator has managed >$1M TVL
188
+ 4. **Liquidity Match**: Ensure vault liquidity matches your timeline
189
+ 5. **Review Schedule**: Set calendar reminder to review in 30 days
190
+
191
+ ## Common Beginner Mistakes to Warn Against
192
+
193
+ 1. Chasing highest APR without risk assessment
194
+ 2. Depositing entire portfolio in one vault
195
+ 3. Ignoring liquidity needs (lock-up periods)
196
+ 4. Skipping curator research
197
+ 5. Setting unrealistic return expectations
198
+
199
+ ## Communication Guidelines
200
+
201
+ ### Language Standards
202
+
203
+ **NEVER use**:
204
+ - "I recommend you invest..."
205
+ - "You should buy/deposit..."
206
+ - "This is a good investment..."
207
+ - "Best choice for you..."
208
+
209
+ **ALWAYS use**:
210
+ - "Historical data shows..."
211
+ - "For educational purposes, consider..."
212
+ - "This vault's characteristics include..."
213
+ - "One approach is..."
214
+
215
+ ### Tone
216
+ - **Encouraging**: Build confidence, not fear
217
+ - **Educational**: Explain "why" behind each analysis step
218
+ - **Practical**: Focus on actionable next steps
219
+ - **Honest**: Don't oversell or hide risks
220
+
221
+ ## Post-Selection Guidance
222
+
223
+ After the user makes a selection, provide:
224
+
225
+ ### Immediate Next Steps
226
+ 1. Bookmark vault for easy access
227
+ 2. Set calendar reminder to review in 30 days
228
+ 3. Document reasoning for decision
229
+ 4. Start with smaller amount to test workflow
230
+
231
+ ### Monitoring Schedule
232
+ - **Week 1**: Check APR stability, verify deposit confirmed
233
+ - **Week 2**: Review curator updates, check TVL trend
234
+ - **Week 4**: Full performance review, rebalancing decision
235
+
236
+ ### Exit Signals to Watch
237
+ - Risk score increases >20 points
238
+ - APR drops below minimum threshold
239
+ - TVL declines >50%
240
+ - Curator reputation issues emerge`;
241
+ /**
242
+ * Tool sequences resource - detailed tool parameters
243
+ */
244
+ const TOOL_SEQUENCES = `# Tool Sequences for Onboarding
245
+
246
+ ## Conservative Profile Search
247
+ \`\`\`json
248
+ {
249
+ "filters": {
250
+ "state_totalAssetsUsd_gte": 5000000,
251
+ "isVisible_eq": true
252
+ },
253
+ "orderBy": "totalAssetsUsd",
254
+ "orderDirection": "desc",
255
+ "maxResults": 5,
256
+ "responseFormat": "summary"
257
+ }
258
+ \`\`\`
259
+
260
+ ## Moderate Profile Search
261
+ \`\`\`json
262
+ {
263
+ "filters": {
264
+ "state_totalAssetsUsd_gte": 1000000,
265
+ "isVisible_eq": true
266
+ },
267
+ "orderBy": "totalAssetsUsd",
268
+ "orderDirection": "desc",
269
+ "maxResults": 5,
270
+ "responseFormat": "summary"
271
+ }
272
+ \`\`\`
273
+
274
+ ## Aggressive Profile Search
275
+ \`\`\`json
276
+ {
277
+ "filters": {
278
+ "state_totalAssetsUsd_gte": 500000,
279
+ "isVisible_eq": true
280
+ },
281
+ "orderBy": "totalAssetsUsd",
282
+ "orderDirection": "desc",
283
+ "maxResults": 5,
284
+ "responseFormat": "summary"
285
+ }
286
+ \`\`\`
287
+
288
+ ## Risk Analysis Call
289
+ \`\`\`json
290
+ {
291
+ "vaultAddress": "0x...",
292
+ "chainId": 1,
293
+ "responseFormat": "detailed"
294
+ }
295
+ \`\`\`
296
+
297
+ ## Performance Call
298
+ \`\`\`json
299
+ {
300
+ "vaultAddress": "0x...",
301
+ "chainId": 1,
302
+ "timeRange": "30d",
303
+ "responseFormat": "summary"
304
+ }
305
+ \`\`\``;
306
+ /**
307
+ * Risk interpretation resource - user-friendly explanations
308
+ */
309
+ const RISK_INTERPRETATION = `# Risk Score Interpretation
310
+
311
+ ## Visual Risk Scale
312
+ \`\`\`
313
+ 0 20 40 60 80 100
314
+ |-----|-----|-----|-----|-----|
315
+ Very Low Med High Very
316
+ Low High
317
+
318
+ Conservative users: Stay under 40
319
+ Moderate users: 30-60 acceptable
320
+ Aggressive users: Up to 80 with awareness
321
+ \`\`\`
322
+
323
+ ## Factor Explanations
324
+
325
+ ### TVL Risk
326
+ "Think of TVL like a swimming pool. A bigger pool (higher TVL) means more room and easier to get in and out."
327
+
328
+ | TVL | Risk Level | Recommendation |
329
+ |-----|------------|----------------|
330
+ | >$10M | Very Low | Excellent liquidity |
331
+ | $5M-$10M | Low | Good for most users |
332
+ | $1M-$5M | Medium | Acceptable with awareness |
333
+ | <$1M | Higher | Caution advised |
334
+
335
+ ### Concentration Risk
336
+ "If one person takes up half the seats on a bus, when they leave, it affects everyone."
337
+
338
+ ### Volatility Risk
339
+ "Like weather predictability - consistent weather (low volatility) is easier to plan around."
340
+
341
+ ### Age Risk
342
+ "Like a restaurant track record - 5 years open proves sustainability."
343
+
344
+ ### Curator Risk
345
+ "The fund manager's experience and reputation."`;
346
+ /**
347
+ * Lagoon Onboarding Skill Definition
348
+ */
349
+ export const lagoonOnboardingSkill = {
350
+ name: 'lagoon-onboarding',
351
+ description: 'Guide new users through their first Lagoon vault selection with risk-appropriate recommendations, systematic analysis workflows, and educational support. Activates for first-time DeFi investors, vault discovery requests, and onboarding conversations.',
352
+ triggers: [
353
+ 'first vault',
354
+ 'getting started',
355
+ 'new to defi',
356
+ 'new to lagoon',
357
+ 'which vault',
358
+ 'where should i start',
359
+ 'beginner',
360
+ 'first time',
361
+ 'how do i begin',
362
+ 'vault selection',
363
+ 'help me choose',
364
+ 'recommend a vault',
365
+ 'safe vault',
366
+ 'low risk vault',
367
+ ],
368
+ audience: 'customer-new',
369
+ instructions: INSTRUCTIONS,
370
+ resources: {
371
+ toolSequences: TOOL_SEQUENCES,
372
+ interpretation: RISK_INTERPRETATION,
373
+ },
374
+ metadata: {
375
+ version: '1.0.0',
376
+ category: 'onboarding',
377
+ primaryTools: ['search_vaults', 'analyze_risk', 'get_vault_performance', 'simulate_vault'],
378
+ estimatedTokens: 3500,
379
+ lastUpdated: '2024-12-15',
380
+ },
381
+ };
382
+ export default lagoonOnboardingSkill;
383
+ //# sourceMappingURL=onboarding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../src/skills/onboarding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;GAEG;AACH,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAoOc,CAAC;AAEpC;;GAEG;AACH,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6DhB,CAAC;AAER;;GAEG;AACH,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAoCoB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAgB;IAChD,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,4PAA4P;IAC9P,QAAQ,EAAE;QACR,aAAa;QACb,iBAAiB;QACjB,aAAa;QACb,eAAe;QACf,aAAa;QACb,sBAAsB;QACtB,UAAU;QACV,YAAY;QACZ,gBAAgB;QAChB,iBAAiB;QACjB,gBAAgB;QAChB,mBAAmB;QACnB,YAAY;QACZ,gBAAgB;KACjB;IACD,QAAQ,EAAE,cAAc;IACxB,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE;QACT,aAAa,EAAE,cAAc;QAC7B,cAAc,EAAE,mBAAmB;KACpC;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,uBAAuB,EAAE,gBAAgB,CAAC;QAC1F,eAAe,EAAE,IAAI;QACrB,WAAW,EAAE,YAAY;KAC1B;CACF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Lagoon Portfolio Review Skill
3
+ *
4
+ * Provides structured portfolio health checks for existing Lagoon users,
5
+ * including risk assessment, performance analysis, and rebalancing guidance.
6
+ *
7
+ * @module skills/portfolio-review
8
+ */
9
+ import type { LagoonSkill } from './types.js';
10
+ /**
11
+ * Lagoon Portfolio Review Skill Definition
12
+ */
13
+ export declare const lagoonPortfolioReviewSkill: LagoonSkill;
14
+ export default lagoonPortfolioReviewSkill;
15
+ //# sourceMappingURL=portfolio-review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portfolio-review.d.ts","sourceRoot":"","sources":["../../src/skills/portfolio-review.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA6Z9C;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,WA2CxC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}