slashvibe-mcp 0.2.9 → 0.3.13

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 (205) hide show
  1. package/README.md +1 -0
  2. package/analytics.js +107 -0
  3. package/auth-store.js +148 -0
  4. package/auto-update.js +130 -0
  5. package/bridges/bridge-monitor.js +388 -0
  6. package/bridges/discord-bot.js +431 -0
  7. package/bridges/farcaster.js +299 -0
  8. package/bridges/telegram.js +261 -0
  9. package/bridges/webhook-health.js +420 -0
  10. package/bridges/webhook-server.js +437 -0
  11. package/bridges/whatsapp.js +441 -0
  12. package/bridges/x-webhook.js +423 -0
  13. package/config.js +154 -5
  14. package/crypto.js +3 -8
  15. package/games/arcade.js +406 -0
  16. package/games/chess.js +451 -0
  17. package/games/colorguess.js +343 -0
  18. package/games/crossword-words.js +171 -0
  19. package/games/crossword.js +461 -0
  20. package/games/drawing.js +347 -0
  21. package/games/gameroulette.js +300 -0
  22. package/games/gamerouter.js +336 -0
  23. package/games/gamestatus.js +337 -0
  24. package/games/guessnumber.js +209 -0
  25. package/games/hangman.js +279 -0
  26. package/games/memory.js +338 -0
  27. package/games/multiplayer-tictactoe.js +389 -0
  28. package/games/pixelart.js +399 -0
  29. package/games/quickduel.js +354 -0
  30. package/games/riddle.js +371 -0
  31. package/games/rockpaperscissors.js +291 -0
  32. package/games/snake.js +406 -0
  33. package/games/storybuilder.js +343 -0
  34. package/games/tictactoe.js +345 -0
  35. package/games/twentyquestions.js +286 -0
  36. package/games/twotruths.js +207 -0
  37. package/games/werewolf.js +508 -0
  38. package/games/wordassociation.js +247 -0
  39. package/games/wordchain.js +135 -0
  40. package/index.js +105 -216
  41. package/intelligence/index.js +45 -0
  42. package/intelligence/infer.js +316 -0
  43. package/intelligence/interests.js +369 -0
  44. package/intelligence/patterns.js +651 -0
  45. package/intelligence/proactive.js +358 -0
  46. package/intelligence/serendipity.js +306 -0
  47. package/memory.js +166 -0
  48. package/notification-emitter.js +77 -0
  49. package/notify.js +102 -1
  50. package/package.json +21 -7
  51. package/prompts.js +1 -1
  52. package/protocol/index.js +161 -1
  53. package/setup.js +402 -0
  54. package/store/api.js +528 -82
  55. package/store/profiles.js +160 -12
  56. package/tools/_actions.js +463 -16
  57. package/tools/_deprecated/auto-suggest-connections.js +304 -0
  58. package/tools/_deprecated/bootstrap-skills.js +231 -0
  59. package/tools/_deprecated/bridge-dashboard.js +342 -0
  60. package/tools/_deprecated/bridge-health.js +400 -0
  61. package/tools/_deprecated/bridge-live.js +384 -0
  62. package/tools/_deprecated/bridges.js +383 -0
  63. package/tools/_deprecated/colorguess.js +281 -0
  64. package/tools/_deprecated/discover-insights.js +379 -0
  65. package/tools/_deprecated/discover-momentum.js +256 -0
  66. package/tools/_deprecated/discovery-analytics.js +345 -0
  67. package/tools/_deprecated/discovery-auto-suggest.js +275 -0
  68. package/tools/_deprecated/discovery-bootstrap.js +267 -0
  69. package/tools/_deprecated/discovery-daily.js +375 -0
  70. package/tools/_deprecated/discovery-dashboard.js +385 -0
  71. package/tools/_deprecated/discovery-digest.js +314 -0
  72. package/tools/_deprecated/discovery-hub.js +357 -0
  73. package/tools/_deprecated/discovery-insights.js +384 -0
  74. package/tools/_deprecated/discovery-momentum.js +281 -0
  75. package/tools/_deprecated/discovery-monitor.js +319 -0
  76. package/tools/_deprecated/discovery-proactive.js +300 -0
  77. package/tools/_deprecated/draw.js +317 -0
  78. package/tools/_deprecated/farcaster.js +307 -0
  79. package/tools/_deprecated/forget.js +119 -0
  80. package/tools/_deprecated/games-catalog.js +376 -0
  81. package/tools/_deprecated/games.js +313 -0
  82. package/tools/_deprecated/guessnumber.js +194 -0
  83. package/tools/_deprecated/hangman.js +129 -0
  84. package/tools/_deprecated/multiplayer-tictactoe.js +303 -0
  85. package/tools/_deprecated/recall.js +147 -0
  86. package/tools/_deprecated/remember.js +86 -0
  87. package/tools/_deprecated/riddle.js +240 -0
  88. package/tools/_deprecated/run-bootstrap.js +69 -0
  89. package/tools/_deprecated/skills-analytics.js +349 -0
  90. package/tools/_deprecated/skills-bootstrap.js +301 -0
  91. package/tools/_deprecated/skills-dashboard.js +268 -0
  92. package/tools/_deprecated/skills.js +380 -0
  93. package/tools/_deprecated/smart-intro.js +353 -0
  94. package/tools/_deprecated/storybuilder.js +331 -0
  95. package/tools/_deprecated/telegram-bot.js +183 -0
  96. package/tools/_deprecated/telegram-setup.js +214 -0
  97. package/tools/_deprecated/twentyquestions.js +143 -0
  98. package/tools/_discovery-enhanced.js +290 -0
  99. package/tools/_discovery.js +439 -0
  100. package/tools/_proactive-discovery.js +301 -0
  101. package/tools/_shared/index.js +64 -0
  102. package/tools/_shared.js +234 -0
  103. package/tools/_work-context.js +338 -0
  104. package/tools/_work-context.manual-test.js +199 -0
  105. package/tools/_work-context.test.js +260 -0
  106. package/tools/activity.js +220 -0
  107. package/tools/admin-inbox.js +218 -0
  108. package/tools/agent-treasury.js +288 -0
  109. package/tools/analytics.js +191 -0
  110. package/tools/approve.js +197 -0
  111. package/tools/arcade.js +173 -0
  112. package/tools/artifact-create.js +17 -11
  113. package/tools/artifact-view.js +31 -1
  114. package/tools/artifacts-price.js +47 -43
  115. package/tools/ask-expert.js +160 -0
  116. package/tools/available.js +120 -0
  117. package/tools/become-expert.js +150 -0
  118. package/tools/broadcast.js +286 -0
  119. package/tools/chat.js +202 -0
  120. package/tools/collaborative-drawing.js +286 -0
  121. package/tools/connection-status.js +178 -0
  122. package/tools/crossword.js +17 -1
  123. package/tools/discover.js +350 -34
  124. package/tools/dm.js +115 -73
  125. package/tools/drawing.js +1 -1
  126. package/tools/earnings.js +126 -0
  127. package/tools/echo.js +16 -0
  128. package/tools/feed.js +51 -7
  129. package/tools/follow.js +224 -0
  130. package/tools/friends.js +207 -0
  131. package/tools/game.js +2 -2
  132. package/tools/genesis.js +233 -0
  133. package/tools/gig-browse.js +206 -0
  134. package/tools/gig-complete.js +144 -0
  135. package/tools/handoff.js +7 -1
  136. package/tools/help.js +4 -4
  137. package/tools/idea.js +9 -2
  138. package/tools/inbox.js +334 -28
  139. package/tools/init.js +727 -36
  140. package/tools/invite.js +15 -4
  141. package/tools/l2-bridge.js +272 -0
  142. package/tools/l2-status.js +217 -0
  143. package/tools/l2.js +206 -0
  144. package/tools/migrate.js +156 -0
  145. package/tools/mint.js +377 -0
  146. package/tools/multiplayer-game.js +1 -1
  147. package/tools/notifications.js +415 -0
  148. package/tools/observe.js +200 -0
  149. package/tools/onboarding.js +147 -0
  150. package/tools/open.js +143 -12
  151. package/tools/party-game.js +2 -2
  152. package/tools/plan.js +225 -0
  153. package/tools/presence-agent.js +7 -0
  154. package/tools/proof-of-work.js +100 -104
  155. package/tools/pulse.js +218 -0
  156. package/tools/reply.js +166 -0
  157. package/tools/report.js +2 -2
  158. package/tools/reputation.js +175 -0
  159. package/tools/request.js +17 -3
  160. package/tools/schedule.js +367 -0
  161. package/tools/search-messages.js +123 -0
  162. package/tools/session.js +420 -0
  163. package/tools/session_price.js +128 -0
  164. package/tools/settings.js +126 -3
  165. package/tools/ship.js +31 -8
  166. package/tools/shipback.js +326 -0
  167. package/tools/smart-check.js +201 -0
  168. package/tools/social-processor.js +445 -0
  169. package/tools/solo-game.js +1 -1
  170. package/tools/start.js +335 -93
  171. package/tools/status.js +53 -6
  172. package/tools/stuck.js +297 -0
  173. package/tools/subscribe.js +148 -0
  174. package/tools/subscriptions.js +134 -0
  175. package/tools/suggest-tags.js +6 -8
  176. package/tools/tag-suggestions.js +257 -0
  177. package/tools/tip.js +193 -0
  178. package/tools/token.js +103 -0
  179. package/tools/update.js +1 -1
  180. package/tools/wallet.js +239 -186
  181. package/tools/watch.js +157 -0
  182. package/tools/webhook-test.js +388 -0
  183. package/tools/who.js +54 -3
  184. package/tools/withdraw.js +145 -0
  185. package/tools/work-summary.js +96 -0
  186. package/tools/workshop.js +327 -0
  187. package/tools/x-mentions.js +1 -1
  188. package/version.json +14 -3
  189. package/tools/artifacts-buy.js +0 -111
  190. package/tools/connect.js +0 -284
  191. package/tools/gigs-apply.js +0 -99
  192. package/tools/gigs-browse.js +0 -114
  193. package/tools/gigs-complete.js +0 -128
  194. package/tools/gigs-post.js +0 -140
  195. package/tools/live-off.js +0 -109
  196. package/tools/live-watch.js +0 -176
  197. package/tools/live.js +0 -128
  198. package/tools/sessions-browse.js +0 -105
  199. package/tools/whats-happening.js +0 -125
  200. /package/tools/{away.js → _deprecated/away.js} +0 -0
  201. /package/tools/{back.js → _deprecated/back.js} +0 -0
  202. /package/tools/{mute.js → _deprecated/mute.js} +0 -0
  203. /package/tools/{skills-exchange.js → _deprecated/skills-exchange.js} +0 -0
  204. /package/tools/{tictactoe.js → _deprecated/tictactoe.js} +0 -0
  205. /package/tools/{wordassociation.js → _deprecated/wordassociation.js} +0 -0
@@ -0,0 +1,400 @@
1
+ /**
2
+ * vibe bridge-health — Monitor and diagnose bridge connections
3
+ *
4
+ * Real-time health monitoring for all social bridges.
5
+ * Checks connectivity, rate limits, and provides recovery suggestions.
6
+ */
7
+
8
+ const twitter = require('../twitter');
9
+ const telegram = require('../bridges/telegram');
10
+ const discord = require('../discord');
11
+ const discordBot = require('../bridges/discord-bot');
12
+ const farcaster = require('../bridges/farcaster');
13
+ const { requireInit, header, divider, success, warning, error } = require('./_shared');
14
+
15
+ const definition = {
16
+ name: 'vibe_bridge_health',
17
+ description: 'Monitor health and connectivity of all social bridges',
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ platform: {
22
+ type: 'string',
23
+ enum: ['all', 'x', 'twitter', 'telegram', 'discord', 'farcaster'],
24
+ description: 'Check specific platform or all (default: all)'
25
+ },
26
+ fix: {
27
+ type: 'boolean',
28
+ description: 'Attempt to fix detected issues (default: false)'
29
+ },
30
+ details: {
31
+ type: 'boolean',
32
+ description: 'Show detailed diagnostics (default: false)'
33
+ }
34
+ }
35
+ }
36
+ };
37
+
38
+ async function handler(args) {
39
+ const initCheck = requireInit();
40
+ if (initCheck) return initCheck;
41
+
42
+ const { platform = 'all', fix = false, details = false } = args;
43
+
44
+ try {
45
+ const results = await runHealthChecks(platform);
46
+ return formatHealthReport(results, fix, details);
47
+ } catch (e) {
48
+ return {
49
+ display: `${header('Bridge Health Check')}\n\n${error('Health check failed: ' + e.message)}`
50
+ };
51
+ }
52
+ }
53
+
54
+ async function runHealthChecks(platform) {
55
+ const checks = {};
56
+
57
+ if (platform === 'all' || platform === 'x' || platform === 'twitter') {
58
+ checks.x = await checkXHealth();
59
+ }
60
+
61
+ if (platform === 'all' || platform === 'telegram') {
62
+ checks.telegram = await checkTelegramHealth();
63
+ }
64
+
65
+ if (platform === 'all' || platform === 'discord') {
66
+ checks.discord = await checkDiscordHealth();
67
+ }
68
+
69
+ if (platform === 'all' || platform === 'farcaster') {
70
+ checks.farcaster = await checkFarcasterHealth();
71
+ }
72
+
73
+ return checks;
74
+ }
75
+
76
+ async function checkXHealth() {
77
+ const health = {
78
+ platform: 'x',
79
+ configured: twitter.isConfigured(),
80
+ connected: false,
81
+ canRead: false,
82
+ canWrite: false,
83
+ rateLimits: {},
84
+ issues: [],
85
+ suggestions: [],
86
+ lastCheck: new Date().toISOString()
87
+ };
88
+
89
+ if (!health.configured) {
90
+ health.issues.push('API credentials not configured');
91
+ health.suggestions.push('Add X API credentials to config.json');
92
+ health.suggestions.push('Requires paid X API access for posting');
93
+ return health;
94
+ }
95
+
96
+ try {
97
+ // Test authentication
98
+ const me = await twitter.getMe();
99
+ health.connected = true;
100
+ health.username = me.data.username;
101
+ health.userId = me.data.id;
102
+ health.canRead = true;
103
+
104
+ // Test read capability
105
+ try {
106
+ await twitter.getMentions();
107
+ health.canRead = true;
108
+ } catch (e) {
109
+ health.issues.push(`Read test failed: ${e.message}`);
110
+ if (e.message.includes('rate limit')) {
111
+ health.rateLimits.mentions = 'exceeded';
112
+ }
113
+ }
114
+
115
+ // Note: We don't test write capability to avoid spam
116
+ health.canWrite = true; // Assume true if connected
117
+
118
+ } catch (e) {
119
+ health.issues.push(`Connection failed: ${e.message}`);
120
+
121
+ if (e.message.includes('rate limit')) {
122
+ health.suggestions.push('Wait for rate limit to reset (15 minutes)');
123
+ } else if (e.message.includes('unauthorized')) {
124
+ health.suggestions.push('Check API credentials and permissions');
125
+ } else {
126
+ health.suggestions.push('Verify API credentials and X API access level');
127
+ }
128
+ }
129
+
130
+ return health;
131
+ }
132
+
133
+ async function checkTelegramHealth() {
134
+ const health = {
135
+ platform: 'telegram',
136
+ configured: telegram.isConfigured(),
137
+ connected: false,
138
+ canRead: true, // Telegram bot always can read if configured
139
+ canWrite: false,
140
+ webhookConfigured: false,
141
+ issues: [],
142
+ suggestions: [],
143
+ lastCheck: new Date().toISOString()
144
+ };
145
+
146
+ if (!health.configured) {
147
+ health.issues.push('Bot token not configured');
148
+ health.suggestions.push('Run: vibe telegram-bot --action setup');
149
+ return health;
150
+ }
151
+
152
+ try {
153
+ const botInfo = await telegram.getBotInfo();
154
+ health.connected = true;
155
+ health.canWrite = true;
156
+ health.username = botInfo.username;
157
+ health.botName = botInfo.first_name;
158
+ health.botId = botInfo.id;
159
+ health.canJoinGroups = botInfo.can_join_groups;
160
+
161
+ // Check if webhook is set up (optional for polling mode)
162
+ try {
163
+ // This would require a separate API call to getWebhookInfo
164
+ // For now, we'll assume webhook setup is external
165
+ health.webhookConfigured = false;
166
+ health.suggestions.push('Consider setting up webhook for real-time updates');
167
+ } catch (e) {
168
+ // Non-critical
169
+ }
170
+
171
+ } catch (e) {
172
+ health.issues.push(`Bot connection failed: ${e.message}`);
173
+
174
+ if (e.message.includes('token')) {
175
+ health.suggestions.push('Check bot token in config.json');
176
+ } else {
177
+ health.suggestions.push('Verify bot is active and token is valid');
178
+ }
179
+ }
180
+
181
+ return health;
182
+ }
183
+
184
+ async function checkDiscordHealth() {
185
+ const health = {
186
+ platform: 'discord',
187
+ configured: discord.isConfigured() || discordBot.isConfigured(),
188
+ connected: false,
189
+ canRead: false,
190
+ canWrite: false,
191
+ webhookOnly: false,
192
+ botConfigured: discordBot.isConfigured(),
193
+ issues: [],
194
+ suggestions: [],
195
+ lastCheck: new Date().toISOString()
196
+ };
197
+
198
+ // Check webhook first (simpler)
199
+ if (discord.isConfigured()) {
200
+ try {
201
+ const testSent = await discord.post('🔍 Health check - ignore this test');
202
+ if (testSent) {
203
+ health.canWrite = true;
204
+ health.webhookOnly = true;
205
+ health.connected = true;
206
+ } else {
207
+ health.issues.push('Webhook test failed');
208
+ }
209
+ } catch (e) {
210
+ health.issues.push(`Webhook error: ${e.message}`);
211
+ health.suggestions.push('Check DISCORD_WEBHOOK_URL in config.json');
212
+ }
213
+ }
214
+
215
+ // Check bot (if configured)
216
+ if (discordBot.isConfigured()) {
217
+ try {
218
+ const botInfo = await discordBot.getBotInfo();
219
+ health.connected = true;
220
+ health.canRead = true;
221
+ health.canWrite = true;
222
+ health.botUsername = botInfo.username;
223
+ health.botId = botInfo.id;
224
+
225
+ if (health.webhookOnly) {
226
+ health.suggestions.push('Both webhook and bot configured - consider using bot only');
227
+ }
228
+ } catch (e) {
229
+ health.issues.push(`Bot connection failed: ${e.message}`);
230
+ health.suggestions.push('Check DISCORD_BOT_TOKEN and bot permissions');
231
+ }
232
+ }
233
+
234
+ if (!health.configured) {
235
+ health.issues.push('Neither webhook nor bot configured');
236
+ health.suggestions.push('Add DISCORD_WEBHOOK_URL for one-way posting');
237
+ health.suggestions.push('Or add DISCORD_BOT_TOKEN for full bot features');
238
+ }
239
+
240
+ return health;
241
+ }
242
+
243
+ async function checkFarcasterHealth() {
244
+ const health = {
245
+ platform: 'farcaster',
246
+ configured: farcaster.isConfigured(),
247
+ connected: false,
248
+ canRead: false,
249
+ canWrite: false,
250
+ issues: [],
251
+ suggestions: [],
252
+ lastCheck: new Date().toISOString()
253
+ };
254
+
255
+ if (!health.configured) {
256
+ health.issues.push('Farcaster credentials not configured');
257
+ health.suggestions.push('Need: NEYNAR_API_KEY, FARCASTER_SIGNER_UUID, FARCASTER_FID');
258
+ health.suggestions.push('Get API key from https://neynar.com');
259
+ health.suggestions.push('Create signer via Neynar developer tools');
260
+ return health;
261
+ }
262
+
263
+ try {
264
+ const userInfo = await farcaster.getUser();
265
+ const user = userInfo.users[0];
266
+
267
+ health.connected = true;
268
+ health.canRead = true;
269
+ health.canWrite = true; // Assume true if we can read user info
270
+ health.username = user.username;
271
+ health.displayName = user.display_name;
272
+ health.fid = user.fid;
273
+ health.followers = user.follower_count;
274
+
275
+ // Test read functionality
276
+ try {
277
+ await farcaster.getFeed(null, 5);
278
+ health.canRead = true;
279
+ } catch (e) {
280
+ health.issues.push(`Feed read failed: ${e.message}`);
281
+ health.canRead = false;
282
+ }
283
+
284
+ } catch (e) {
285
+ health.issues.push(`Connection failed: ${e.message}`);
286
+
287
+ if (e.message.includes('API key')) {
288
+ health.suggestions.push('Check NEYNAR_API_KEY in config.json');
289
+ } else if (e.message.includes('signer')) {
290
+ health.suggestions.push('Verify FARCASTER_SIGNER_UUID is valid and active');
291
+ } else if (e.message.includes('FID')) {
292
+ health.suggestions.push('Check FARCASTER_FID matches your account');
293
+ } else {
294
+ health.suggestions.push('Verify all Farcaster credentials in config.json');
295
+ }
296
+ }
297
+
298
+ return health;
299
+ }
300
+
301
+ function formatHealthReport(results, fix, details) {
302
+ let display = header('Bridge Health Report');
303
+ display += `\n\n_Checked at ${new Date().toLocaleString()}_\n`;
304
+ display += divider();
305
+ display += '\n';
306
+
307
+ const allPlatforms = Object.keys(results);
308
+ const healthyCount = allPlatforms.filter(p => results[p].connected).length;
309
+ const configuredCount = allPlatforms.filter(p => results[p].configured).length;
310
+
311
+ display += `**Summary:** ${healthyCount}/${allPlatforms.length} connected, ${configuredCount} configured\n\n`;
312
+
313
+ // Individual platform reports
314
+ for (const [platformName, health] of Object.entries(results)) {
315
+ display += formatPlatformHealth(health, details);
316
+ display += '\n';
317
+ }
318
+
319
+ // Overall recommendations
320
+ display += divider();
321
+ display += '**Quick Actions:**\n';
322
+
323
+ const unconfigured = allPlatforms.filter(p => !results[p].configured);
324
+ if (unconfigured.length > 0) {
325
+ display += `• Configure: ${unconfigured.join(', ')}\n`;
326
+ }
327
+
328
+ const hasIssues = allPlatforms.filter(p => results[p].issues.length > 0);
329
+ if (hasIssues.length > 0) {
330
+ display += `• Fix issues: ${hasIssues.join(', ')}\n`;
331
+ }
332
+
333
+ display += `• Test posting: \`vibe social-post --dry_run --content "test" --channels ["${allPlatforms[0]}"]\`\n`;
334
+ display += `• View unified inbox: \`vibe social-inbox --refresh\``;
335
+
336
+ if (fix) {
337
+ display += '\n\n' + divider();
338
+ display += '**Auto-fix Results:**\n';
339
+ display += '_Auto-fix not yet implemented. Check suggestions above._';
340
+ }
341
+
342
+ return { display };
343
+ }
344
+
345
+ function formatPlatformHealth(health, showDetails) {
346
+ const statusIcon = health.connected ? '✅' : (health.configured ? '⚠️' : '❌');
347
+ const platformName = health.platform.toUpperCase();
348
+
349
+ let result = `${statusIcon} **${platformName}**`;
350
+
351
+ if (health.username) {
352
+ result += ` (@${health.username})`;
353
+ }
354
+
355
+ result += '\n';
356
+
357
+ // Capabilities
358
+ const caps = [];
359
+ if (health.canRead) caps.push('read');
360
+ if (health.canWrite) caps.push('write');
361
+ if (health.webhookOnly) caps.push('webhook-only');
362
+ if (health.botConfigured) caps.push('bot');
363
+ if (caps.length > 0) {
364
+ result += ` ${caps.join(' • ')}\n`;
365
+ }
366
+
367
+ // Issues
368
+ if (health.issues.length > 0) {
369
+ for (const issue of health.issues) {
370
+ result += ` ⚠️ ${issue}\n`;
371
+ }
372
+ }
373
+
374
+ // Show details if requested
375
+ if (showDetails) {
376
+ if (health.rateLimits && Object.keys(health.rateLimits).length > 0) {
377
+ result += ` Rate limits: ${JSON.stringify(health.rateLimits)}\n`;
378
+ }
379
+
380
+ if (health.followers !== undefined) {
381
+ result += ` Followers: ${health.followers}\n`;
382
+ }
383
+
384
+ if (health.lastCheck) {
385
+ result += ` Last checked: ${new Date(health.lastCheck).toLocaleTimeString()}\n`;
386
+ }
387
+ }
388
+
389
+ // Suggestions (first 2 to keep concise)
390
+ const suggestions = health.suggestions.slice(0, 2);
391
+ if (suggestions.length > 0) {
392
+ for (const suggestion of suggestions) {
393
+ result += ` 💡 ${suggestion}\n`;
394
+ }
395
+ }
396
+
397
+ return result;
398
+ }
399
+
400
+ module.exports = { definition, handler };