@lagoon-protocol/lagoon-mcp 0.3.0 → 0.4.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 (51) hide show
  1. package/dist/graphql/fragments/vault-list.fragment.d.ts +9 -5
  2. package/dist/graphql/fragments/vault-list.fragment.d.ts.map +1 -1
  3. package/dist/graphql/fragments/vault-list.fragment.js +8 -4
  4. package/dist/graphql/fragments/vault-list.fragment.js.map +1 -1
  5. package/dist/graphql/fragments/vault-summary.fragment.d.ts +17 -5
  6. package/dist/graphql/fragments/vault-summary.fragment.d.ts.map +1 -1
  7. package/dist/graphql/fragments/vault-summary.fragment.js +16 -4
  8. package/dist/graphql/fragments/vault-summary.fragment.js.map +1 -1
  9. package/dist/graphql/fragments.d.ts +183 -0
  10. package/dist/graphql/fragments.d.ts.map +1 -0
  11. package/dist/graphql/fragments.js +297 -0
  12. package/dist/graphql/fragments.js.map +1 -0
  13. package/dist/graphql/queries/period-summaries.d.ts +15 -0
  14. package/dist/graphql/queries/period-summaries.d.ts.map +1 -0
  15. package/dist/graphql/queries/period-summaries.js +24 -0
  16. package/dist/graphql/queries/period-summaries.js.map +1 -0
  17. package/dist/graphql/queries/vault.queries.d.ts +8 -3
  18. package/dist/graphql/queries/vault.queries.d.ts.map +1 -1
  19. package/dist/graphql/queries/vault.queries.js +29 -3
  20. package/dist/graphql/queries/vault.queries.js.map +1 -1
  21. package/dist/index.js +0 -0
  22. package/dist/prompts/financial-analysis.js +1 -1
  23. package/dist/server.js +1 -1
  24. package/dist/services/analytics/protocol-overview.service.d.ts +61 -0
  25. package/dist/services/analytics/protocol-overview.service.d.ts.map +1 -0
  26. package/dist/services/analytics/protocol-overview.service.js +182 -0
  27. package/dist/services/analytics/protocol-overview.service.js.map +1 -0
  28. package/dist/services/analytics/risk.service.d.ts +1 -1
  29. package/dist/services/analytics/risk.service.js +5 -5
  30. package/dist/services/analytics/risk.service.js.map +1 -1
  31. package/dist/tools/analyze-risk.d.ts +1 -1
  32. package/dist/tools/analyze-risk.js +1 -1
  33. package/dist/tools/compare-vaults.d.ts +1 -1
  34. package/dist/tools/compare-vaults.d.ts.map +1 -1
  35. package/dist/tools/compare-vaults.js +23 -2
  36. package/dist/tools/compare-vaults.js.map +1 -1
  37. package/dist/tools/index.d.ts +26 -0
  38. package/dist/tools/index.d.ts.map +1 -0
  39. package/dist/tools/index.js +32 -0
  40. package/dist/tools/index.js.map +1 -0
  41. package/dist/tools/registry.js +2 -2
  42. package/dist/utils/comparison-metrics.d.ts +20 -1
  43. package/dist/utils/comparison-metrics.d.ts.map +1 -1
  44. package/dist/utils/comparison-metrics.js +55 -4
  45. package/dist/utils/comparison-metrics.js.map +1 -1
  46. package/dist/utils/risk-scoring.d.ts +3 -1
  47. package/dist/utils/risk-scoring.d.ts.map +1 -1
  48. package/dist/utils/risk-scoring.js +2 -0
  49. package/dist/utils/risk-scoring.js.map +1 -1
  50. package/dist/utils/validators.js +3 -3
  51. package/package.json +1 -1
@@ -0,0 +1,297 @@
1
+ /**
2
+ * Shared GraphQL Fragments
3
+ *
4
+ * Reusable query fragments for consistent data fetching across tools.
5
+ * Maintains single source of truth for complex nested structures.
6
+ */
7
+ /**
8
+ * Complete vault data GraphQL fragment
9
+ *
10
+ * Includes ALL available fields for comprehensive vault analysis.
11
+ * Use this fragment in any query that needs complete vault information.
12
+ *
13
+ * Schema verified against working API query on 2025-01-04
14
+ *
15
+ * Usage:
16
+ * ```graphql
17
+ * query MyQuery {
18
+ * someField {
19
+ * vault {
20
+ * ...VaultFragment
21
+ * }
22
+ * }
23
+ * }
24
+ * ${VAULT_FRAGMENT}
25
+ * ```
26
+ */
27
+ export const VAULT_FRAGMENT = `
28
+ fragment VaultFragment on Vault {
29
+ address
30
+ symbol
31
+ decimals
32
+ name
33
+ description
34
+ shortDescription
35
+ maxCapacity
36
+ logoUrl
37
+ averageSettlement
38
+ isVisible
39
+ asset {
40
+ id
41
+ name
42
+ symbol
43
+ decimals
44
+ address
45
+ logoUrl
46
+ description
47
+ chain {
48
+ id
49
+ name
50
+ nativeToken
51
+ logoUrl
52
+ }
53
+ priceSources {
54
+ chainlinkPriceFeed {
55
+ address
56
+ chainId
57
+ }
58
+ }
59
+ priceUsd
60
+ isVisible
61
+ }
62
+ chain {
63
+ id
64
+ name
65
+ nativeToken
66
+ logoUrl
67
+ wrappedNativeToken {
68
+ address
69
+ decimals
70
+ name
71
+ symbol
72
+ }
73
+ factory
74
+ }
75
+ state {
76
+ state
77
+ totalAssets
78
+ totalAssetsUsd
79
+ totalSupply
80
+ pricePerShare
81
+ pricePerShareUsd
82
+ safeAssetBalance
83
+ liveAPR {
84
+ grossApr
85
+ name
86
+ netApr
87
+ description
88
+ }
89
+ roles {
90
+ owner
91
+ valuationManager
92
+ whitelistManager
93
+ safe
94
+ feeReceiver
95
+ }
96
+ managementFee
97
+ performanceFee
98
+ pendingSettlement {
99
+ assets
100
+ assetsUsd
101
+ }
102
+ inceptionApr {
103
+ linearNetApr
104
+ linearNetAprWithoutExtraYields
105
+ airdrops {
106
+ name
107
+ apr
108
+ description
109
+ distributionTimestamp
110
+ endTimestamp
111
+ isEstimation
112
+ logoUrl
113
+ multiplier
114
+ ppsIncrease
115
+ startTimestamp
116
+ }
117
+ incentives {
118
+ name
119
+ apr
120
+ aprDescription
121
+ description
122
+ endTimestamp
123
+ incentiveRate {
124
+ incentiveAmount
125
+ referenceToken {
126
+ id
127
+ }
128
+ referenceTokenAmount
129
+ }
130
+ }
131
+ nativeYields {
132
+ name
133
+ apr
134
+ aprDescription
135
+ description
136
+ endTimestamp
137
+ isEstimation
138
+ logoUrl
139
+ multiplier
140
+ startTimestamp
141
+ }
142
+ }
143
+ pendingSiloBalances {
144
+ assets
145
+ shares
146
+ }
147
+ monthlyApr {
148
+ linearNetApr
149
+ linearNetAprWithoutExtraYields
150
+ airdrops {
151
+ name
152
+ apr
153
+ description
154
+ distributionTimestamp
155
+ endTimestamp
156
+ isEstimation
157
+ logoUrl
158
+ multiplier
159
+ ppsIncrease
160
+ startTimestamp
161
+ }
162
+ incentives {
163
+ name
164
+ apr
165
+ aprDescription
166
+ description
167
+ endTimestamp
168
+ incentiveRate {
169
+ incentiveAmount
170
+ referenceToken {
171
+ id
172
+ }
173
+ referenceTokenAmount
174
+ }
175
+ }
176
+ nativeYields {
177
+ name
178
+ apr
179
+ aprDescription
180
+ description
181
+ endTimestamp
182
+ isEstimation
183
+ logoUrl
184
+ multiplier
185
+ startTimestamp
186
+ }
187
+ }
188
+ newTotalAssets
189
+ highWaterMark
190
+ lastFeeTime
191
+ safeAssetBalanceUsd
192
+ weeklyApr {
193
+ linearNetApr
194
+ linearNetAprWithoutExtraYields
195
+ airdrops {
196
+ name
197
+ apr
198
+ description
199
+ distributionTimestamp
200
+ endTimestamp
201
+ isEstimation
202
+ logoUrl
203
+ multiplier
204
+ ppsIncrease
205
+ startTimestamp
206
+ }
207
+ incentives {
208
+ name
209
+ apr
210
+ aprDescription
211
+ description
212
+ endTimestamp
213
+ incentiveRate {
214
+ incentiveAmount
215
+ referenceToken {
216
+ id
217
+ }
218
+ referenceTokenAmount
219
+ }
220
+ }
221
+ nativeYields {
222
+ name
223
+ apr
224
+ aprDescription
225
+ description
226
+ endTimestamp
227
+ isEstimation
228
+ logoUrl
229
+ multiplier
230
+ startTimestamp
231
+ }
232
+ }
233
+ yearlyApr {
234
+ linearNetApr
235
+ linearNetAprWithoutExtraYields
236
+ airdrops {
237
+ name
238
+ apr
239
+ description
240
+ distributionTimestamp
241
+ endTimestamp
242
+ isEstimation
243
+ logoUrl
244
+ multiplier
245
+ ppsIncrease
246
+ startTimestamp
247
+ }
248
+ incentives {
249
+ name
250
+ apr
251
+ aprDescription
252
+ description
253
+ endTimestamp
254
+ incentiveRate {
255
+ incentiveAmount
256
+ referenceToken {
257
+ id
258
+ }
259
+ referenceTokenAmount
260
+ }
261
+ }
262
+ nativeYields {
263
+ name
264
+ apr
265
+ aprDescription
266
+ description
267
+ endTimestamp
268
+ isEstimation
269
+ logoUrl
270
+ multiplier
271
+ startTimestamp
272
+ }
273
+ }
274
+ }
275
+ curators {
276
+ name
277
+ id
278
+ aboutDescription
279
+ logoUrl
280
+ url
281
+ }
282
+ integrator {
283
+ name
284
+ url
285
+ logoUrl
286
+ aboutDescription
287
+ }
288
+ defiIntegrations {
289
+ name
290
+ description
291
+ link
292
+ logoUrl
293
+ type
294
+ }
295
+ }
296
+ `;
297
+ //# sourceMappingURL=fragments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fragments.js","sourceRoot":"","sources":["../../src/graphql/fragments.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiMH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Q7B,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * GraphQL Query: Period Summaries
3
+ *
4
+ * Fetch historical vault period summaries for APR calculations.
5
+ */
6
+ /**
7
+ * Query to fetch period summaries for a vault
8
+ *
9
+ * Period summaries contain historical snapshots of vault state at regular intervals.
10
+ * Used by SDK to calculate accurate APR from price per share changes over time.
11
+ *
12
+ * @returns Array of period summaries with timestamp and vault state
13
+ */
14
+ export declare const GET_PERIOD_SUMMARIES_QUERY: string;
15
+ //# sourceMappingURL=period-summaries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"period-summaries.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/period-summaries.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,QAQtC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * GraphQL Query: Period Summaries
3
+ *
4
+ * Fetch historical vault period summaries for APR calculations.
5
+ */
6
+ import { gql } from 'graphql-request';
7
+ /**
8
+ * Query to fetch period summaries for a vault
9
+ *
10
+ * Period summaries contain historical snapshots of vault state at regular intervals.
11
+ * Used by SDK to calculate accurate APR from price per share changes over time.
12
+ *
13
+ * @returns Array of period summaries with timestamp and vault state
14
+ */
15
+ export const GET_PERIOD_SUMMARIES_QUERY = gql `
16
+ query GetPeriodSummaries($vaultAddress: String!, $chainId: Int!) {
17
+ periodSummaries(vaultAddress: $vaultAddress, chainId: $chainId) {
18
+ timestamp
19
+ totalAssetsAtStart
20
+ totalSupplyAtStart
21
+ }
22
+ }
23
+ `;
24
+ //# sourceMappingURL=period-summaries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"period-summaries.js","sourceRoot":"","sources":["../../../src/graphql/queries/period-summaries.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;CAQ5C,CAAC"}
@@ -79,6 +79,9 @@ export declare const VAULT_FIRST_TRANSACTION_QUERY = "\n query VaultFirstTransa
79
79
  * Note: Returns ALL transactions for the given vaults ordered by timestamp.
80
80
  * The caller must group by vault address and take the first (oldest) for each.
81
81
  *
82
+ * The vault address is extracted from the TransactionData union via inline fragments,
83
+ * since the vault field exists on each transaction type variant, not on Transaction directly.
84
+ *
82
85
  * Usage:
83
86
  * ```typescript
84
87
  * const data = await graphqlClient.request<BatchVaultFirstTransactionsResponse>(
@@ -89,15 +92,17 @@ export declare const VAULT_FIRST_TRANSACTION_QUERY = "\n query VaultFirstTransa
89
92
  * const ageMap = buildVaultAgeMap(data.transactions.items);
90
93
  * ```
91
94
  */
92
- export declare const BATCH_VAULT_FIRST_TRANSACTIONS_QUERY = "\n query BatchVaultFirstTransactions($vaultAddresses: [Address!]!) {\n transactions(\n where: { vault_in: $vaultAddresses },\n orderBy: timestamp,\n orderDirection: asc,\n first: 100\n ) {\n items {\n vault {\n address\n }\n timestamp\n }\n }\n }\n";
95
+ export declare const BATCH_VAULT_FIRST_TRANSACTIONS_QUERY = "\n query BatchVaultFirstTransactions($vaultAddresses: [Address!]!) {\n transactions(\n where: { vault_in: $vaultAddresses },\n orderBy: timestamp,\n orderDirection: asc,\n first: 100\n ) {\n items {\n timestamp\n data {\n ...TransactionVaultFragment\n }\n }\n }\n }\n \n fragment TransactionVaultFragment on TransactionData {\n ... on SettleDeposit { vault { address } }\n ... on SettleRedeem { vault { address } }\n ... on DepositRequest { vault { address } }\n ... on RedeemRequest { vault { address } }\n ... on DepositSync { vault { address } }\n ... on DepositRequestCanceled { vault { address } }\n ... on TotalAssetsUpdated { vault { address } }\n ... on NewTotalAssetsUpdated { vault { address } }\n ... on PeriodSummary { vault { address } }\n ... on RatesUpdated { vault { address } }\n ... on StateUpdated { vault { address } }\n ... on WhitelistUpdated { vault { address } }\n }\n\n";
93
96
  /**
94
97
  * Response type for BATCH_VAULT_FIRST_TRANSACTIONS_QUERY
95
98
  */
96
99
  export interface BatchVaultFirstTransactionsResponse {
97
100
  transactions: {
98
101
  items: Array<{
99
- vault: {
100
- address: string;
102
+ data: {
103
+ vault?: {
104
+ address: string;
105
+ };
101
106
  };
102
107
  timestamp: number;
103
108
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"vault.queries.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/vault.queries.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,+5FAOhC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,i6FAOnC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,88FAShC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,6BAA6B,wQAazC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,oCAAoC,oUAgBhD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC;YACX,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM,CAAC;aACjB,CAAC;YACF,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC,CAAC;KACJ,CAAC;CACH"}
1
+ {"version":3,"file":"vault.queries.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/vault.queries.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,+5FAOhC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,i6FAOnC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,88FAShC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,6BAA6B,wQAazC,CAAC;AAyBF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oCAAoC,i/BAiBhD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC;YACX,IAAI,EAAE;gBACJ,KAAK,CAAC,EAAE;oBACN,OAAO,EAAE,MAAM,CAAC;iBACjB,CAAC;aACH,CAAC;YACF,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC,CAAC;KACJ,CAAC;CACH"}
@@ -106,6 +106,28 @@ export const VAULT_FIRST_TRANSACTION_QUERY = `
106
106
  }
107
107
  }
108
108
  `;
109
+ /**
110
+ * GraphQL fragment for extracting vault address from TransactionData union
111
+ *
112
+ * The vault field is on each variant of the TransactionData union, not on Transaction directly.
113
+ * This fragment extracts the vault address from whichever transaction type is present.
114
+ */
115
+ const TRANSACTION_VAULT_FRAGMENT = `
116
+ fragment TransactionVaultFragment on TransactionData {
117
+ ... on SettleDeposit { vault { address } }
118
+ ... on SettleRedeem { vault { address } }
119
+ ... on DepositRequest { vault { address } }
120
+ ... on RedeemRequest { vault { address } }
121
+ ... on DepositSync { vault { address } }
122
+ ... on DepositRequestCanceled { vault { address } }
123
+ ... on TotalAssetsUpdated { vault { address } }
124
+ ... on NewTotalAssetsUpdated { vault { address } }
125
+ ... on PeriodSummary { vault { address } }
126
+ ... on RatesUpdated { vault { address } }
127
+ ... on StateUpdated { vault { address } }
128
+ ... on WhitelistUpdated { vault { address } }
129
+ }
130
+ `;
109
131
  /**
110
132
  * GraphQL query for batch vault first transactions (creation dates)
111
133
  *
@@ -116,6 +138,9 @@ export const VAULT_FIRST_TRANSACTION_QUERY = `
116
138
  * Note: Returns ALL transactions for the given vaults ordered by timestamp.
117
139
  * The caller must group by vault address and take the first (oldest) for each.
118
140
  *
141
+ * The vault address is extracted from the TransactionData union via inline fragments,
142
+ * since the vault field exists on each transaction type variant, not on Transaction directly.
143
+ *
119
144
  * Usage:
120
145
  * ```typescript
121
146
  * const data = await graphqlClient.request<BatchVaultFirstTransactionsResponse>(
@@ -135,12 +160,13 @@ export const BATCH_VAULT_FIRST_TRANSACTIONS_QUERY = `
135
160
  first: 100
136
161
  ) {
137
162
  items {
138
- vault {
139
- address
140
- }
141
163
  timestamp
164
+ data {
165
+ ...TransactionVaultFragment
166
+ }
142
167
  }
143
168
  }
144
169
  }
170
+ ${TRANSACTION_VAULT_FRAGMENT}
145
171
  `;
146
172
  //# sourceMappingURL=vault.queries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vault.queries.js","sourceRoot":"","sources":["../../../src/graphql/queries/vault.queries.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;IAMhC,cAAc;CACjB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;IAMnC,cAAc;CACjB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;IAQhC,cAAc;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;;;;;;;;;;;;;CAa5C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG;;;;;;;;;;;;;;;;CAgBnD,CAAC"}
1
+ {"version":3,"file":"vault.queries.js","sourceRoot":"","sources":["../../../src/graphql/queries/vault.queries.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;IAMhC,cAAc;CACjB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;IAMnC,cAAc;CACjB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;IAQhC,cAAc;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;;;;;;;;;;;;;CAa5C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;CAelC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG;;;;;;;;;;;;;;;;IAgBhD,0BAA0B;CAC7B,CAAC"}
package/dist/index.js CHANGED
File without changes
@@ -501,7 +501,7 @@ Use this structure for comprehensive analysis reports:
501
501
  - **Single vault (1-5)**: Use \`get_vault_data\` with caching
502
502
  - **Vault composition**: Use \`get_vault_composition\` for protocol breakdown and HHI
503
503
  - **Discovery (20+)**: Use \`search_vaults\` with filters
504
- - **Comparison (2-10)**: Use \`compare_vaults\` for rankings with composition metrics
504
+ - **Comparison (2-20)**: Use \`compare_vaults\` for rankings with composition metrics
505
505
  - **Portfolio**: Use \`user_portfolio\` for multi-chain aggregation with \`compositionSummary\`
506
506
  - **Custom queries**: Use \`query_graphql\` for power users
507
507
 
package/dist/server.js CHANGED
@@ -34,7 +34,7 @@ import { getPortfolioOptimizationPrompt } from './prompts/portfolio-optimization
34
34
  export function createServer() {
35
35
  const server = new McpServer({
36
36
  name: 'lagoon-mcp',
37
- version: '0.3.0',
37
+ version: '0.3.1',
38
38
  });
39
39
  // ==========================================
40
40
  // Dependency Injection Container
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Protocol Overview Service
3
+ *
4
+ * Fetches real-time protocol metrics for dynamic prompt generation.
5
+ * Provides comprehensive KPI data for protocol health dashboards.
6
+ */
7
+ import { BaseService } from '../base.service.js';
8
+ /**
9
+ * Protocol metrics for overview dashboard
10
+ */
11
+ export interface ProtocolMetrics {
12
+ totalTVL: number;
13
+ tvl7dChange: number;
14
+ tvl30dChange: number;
15
+ totalVolume24h: number;
16
+ activeVaults: number;
17
+ vaultsLast30d: number;
18
+ avgAPR: number;
19
+ medianAPR: number;
20
+ totalUsers: number;
21
+ activeUsers30d: number;
22
+ newUsers30d: number;
23
+ securityIncidents90d: number;
24
+ avgRiskScore: number;
25
+ totalCurators: number;
26
+ activeCurators30d: number;
27
+ lastUpdated: string;
28
+ }
29
+ /**
30
+ * Protocol Overview Service
31
+ * Fetches and aggregates protocol-level metrics
32
+ */
33
+ export declare class ProtocolOverviewService extends BaseService {
34
+ private readonly CACHE_KEY;
35
+ private readonly CACHE_TTL;
36
+ /**
37
+ * Fetch protocol metrics with caching
38
+ */
39
+ getMetrics(): Promise<ProtocolMetrics>;
40
+ /**
41
+ * Fetch protocol metrics from GraphQL
42
+ */
43
+ private fetchMetrics;
44
+ /**
45
+ * Calculate protocol metrics from GraphQL data
46
+ */
47
+ private calculateMetrics;
48
+ /**
49
+ * Fallback metrics when GraphQL fails
50
+ */
51
+ private getFallbackMetrics;
52
+ /**
53
+ * Format TVL with appropriate unit
54
+ */
55
+ formatTVL(tvl: number): string;
56
+ /**
57
+ * Format percentage change
58
+ */
59
+ formatPercentage(value: number): string;
60
+ }
61
+ //# sourceMappingURL=protocol-overview.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-overview.service.d.ts","sourceRoot":"","sources":["../../../src/services/analytics/protocol-overview.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,eAAe;IAE9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IAGvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAGlB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IAGpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IAGrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+B;IACzD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAO;IAEjC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,eAAe,CAAC;IAgB5C;;OAEG;YACW,YAAY;IA4E1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAwFxB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAU9B;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAIxC"}