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.
- package/README.md +1 -0
- package/analytics.js +107 -0
- package/auth-store.js +148 -0
- package/auto-update.js +130 -0
- package/bridges/bridge-monitor.js +388 -0
- package/bridges/discord-bot.js +431 -0
- package/bridges/farcaster.js +299 -0
- package/bridges/telegram.js +261 -0
- package/bridges/webhook-health.js +420 -0
- package/bridges/webhook-server.js +437 -0
- package/bridges/whatsapp.js +441 -0
- package/bridges/x-webhook.js +423 -0
- package/config.js +154 -5
- package/crypto.js +3 -8
- package/games/arcade.js +406 -0
- package/games/chess.js +451 -0
- package/games/colorguess.js +343 -0
- package/games/crossword-words.js +171 -0
- package/games/crossword.js +461 -0
- package/games/drawing.js +347 -0
- package/games/gameroulette.js +300 -0
- package/games/gamerouter.js +336 -0
- package/games/gamestatus.js +337 -0
- package/games/guessnumber.js +209 -0
- package/games/hangman.js +279 -0
- package/games/memory.js +338 -0
- package/games/multiplayer-tictactoe.js +389 -0
- package/games/pixelart.js +399 -0
- package/games/quickduel.js +354 -0
- package/games/riddle.js +371 -0
- package/games/rockpaperscissors.js +291 -0
- package/games/snake.js +406 -0
- package/games/storybuilder.js +343 -0
- package/games/tictactoe.js +345 -0
- package/games/twentyquestions.js +286 -0
- package/games/twotruths.js +207 -0
- package/games/werewolf.js +508 -0
- package/games/wordassociation.js +247 -0
- package/games/wordchain.js +135 -0
- package/index.js +105 -216
- package/intelligence/index.js +45 -0
- package/intelligence/infer.js +316 -0
- package/intelligence/interests.js +369 -0
- package/intelligence/patterns.js +651 -0
- package/intelligence/proactive.js +358 -0
- package/intelligence/serendipity.js +306 -0
- package/memory.js +166 -0
- package/notification-emitter.js +77 -0
- package/notify.js +102 -1
- package/package.json +21 -7
- package/prompts.js +1 -1
- package/protocol/index.js +161 -1
- package/setup.js +402 -0
- package/store/api.js +528 -82
- package/store/profiles.js +160 -12
- package/tools/_actions.js +463 -16
- package/tools/_deprecated/auto-suggest-connections.js +304 -0
- package/tools/_deprecated/bootstrap-skills.js +231 -0
- package/tools/_deprecated/bridge-dashboard.js +342 -0
- package/tools/_deprecated/bridge-health.js +400 -0
- package/tools/_deprecated/bridge-live.js +384 -0
- package/tools/_deprecated/bridges.js +383 -0
- package/tools/_deprecated/colorguess.js +281 -0
- package/tools/_deprecated/discover-insights.js +379 -0
- package/tools/_deprecated/discover-momentum.js +256 -0
- package/tools/_deprecated/discovery-analytics.js +345 -0
- package/tools/_deprecated/discovery-auto-suggest.js +275 -0
- package/tools/_deprecated/discovery-bootstrap.js +267 -0
- package/tools/_deprecated/discovery-daily.js +375 -0
- package/tools/_deprecated/discovery-dashboard.js +385 -0
- package/tools/_deprecated/discovery-digest.js +314 -0
- package/tools/_deprecated/discovery-hub.js +357 -0
- package/tools/_deprecated/discovery-insights.js +384 -0
- package/tools/_deprecated/discovery-momentum.js +281 -0
- package/tools/_deprecated/discovery-monitor.js +319 -0
- package/tools/_deprecated/discovery-proactive.js +300 -0
- package/tools/_deprecated/draw.js +317 -0
- package/tools/_deprecated/farcaster.js +307 -0
- package/tools/_deprecated/forget.js +119 -0
- package/tools/_deprecated/games-catalog.js +376 -0
- package/tools/_deprecated/games.js +313 -0
- package/tools/_deprecated/guessnumber.js +194 -0
- package/tools/_deprecated/hangman.js +129 -0
- package/tools/_deprecated/multiplayer-tictactoe.js +303 -0
- package/tools/_deprecated/recall.js +147 -0
- package/tools/_deprecated/remember.js +86 -0
- package/tools/_deprecated/riddle.js +240 -0
- package/tools/_deprecated/run-bootstrap.js +69 -0
- package/tools/_deprecated/skills-analytics.js +349 -0
- package/tools/_deprecated/skills-bootstrap.js +301 -0
- package/tools/_deprecated/skills-dashboard.js +268 -0
- package/tools/_deprecated/skills.js +380 -0
- package/tools/_deprecated/smart-intro.js +353 -0
- package/tools/_deprecated/storybuilder.js +331 -0
- package/tools/_deprecated/telegram-bot.js +183 -0
- package/tools/_deprecated/telegram-setup.js +214 -0
- package/tools/_deprecated/twentyquestions.js +143 -0
- package/tools/_discovery-enhanced.js +290 -0
- package/tools/_discovery.js +439 -0
- package/tools/_proactive-discovery.js +301 -0
- package/tools/_shared/index.js +64 -0
- package/tools/_shared.js +234 -0
- package/tools/_work-context.js +338 -0
- package/tools/_work-context.manual-test.js +199 -0
- package/tools/_work-context.test.js +260 -0
- package/tools/activity.js +220 -0
- package/tools/admin-inbox.js +218 -0
- package/tools/agent-treasury.js +288 -0
- package/tools/analytics.js +191 -0
- package/tools/approve.js +197 -0
- package/tools/arcade.js +173 -0
- package/tools/artifact-create.js +17 -11
- package/tools/artifact-view.js +31 -1
- package/tools/artifacts-price.js +47 -43
- package/tools/ask-expert.js +160 -0
- package/tools/available.js +120 -0
- package/tools/become-expert.js +150 -0
- package/tools/broadcast.js +286 -0
- package/tools/chat.js +202 -0
- package/tools/collaborative-drawing.js +286 -0
- package/tools/connection-status.js +178 -0
- package/tools/crossword.js +17 -1
- package/tools/discover.js +350 -34
- package/tools/dm.js +115 -73
- package/tools/drawing.js +1 -1
- package/tools/earnings.js +126 -0
- package/tools/echo.js +16 -0
- package/tools/feed.js +51 -7
- package/tools/follow.js +224 -0
- package/tools/friends.js +207 -0
- package/tools/game.js +2 -2
- package/tools/genesis.js +233 -0
- package/tools/gig-browse.js +206 -0
- package/tools/gig-complete.js +144 -0
- package/tools/handoff.js +7 -1
- package/tools/help.js +4 -4
- package/tools/idea.js +9 -2
- package/tools/inbox.js +334 -28
- package/tools/init.js +727 -36
- package/tools/invite.js +15 -4
- package/tools/l2-bridge.js +272 -0
- package/tools/l2-status.js +217 -0
- package/tools/l2.js +206 -0
- package/tools/migrate.js +156 -0
- package/tools/mint.js +377 -0
- package/tools/multiplayer-game.js +1 -1
- package/tools/notifications.js +415 -0
- package/tools/observe.js +200 -0
- package/tools/onboarding.js +147 -0
- package/tools/open.js +143 -12
- package/tools/party-game.js +2 -2
- package/tools/plan.js +225 -0
- package/tools/presence-agent.js +7 -0
- package/tools/proof-of-work.js +100 -104
- package/tools/pulse.js +218 -0
- package/tools/reply.js +166 -0
- package/tools/report.js +2 -2
- package/tools/reputation.js +175 -0
- package/tools/request.js +17 -3
- package/tools/schedule.js +367 -0
- package/tools/search-messages.js +123 -0
- package/tools/session.js +420 -0
- package/tools/session_price.js +128 -0
- package/tools/settings.js +126 -3
- package/tools/ship.js +31 -8
- package/tools/shipback.js +326 -0
- package/tools/smart-check.js +201 -0
- package/tools/social-processor.js +445 -0
- package/tools/solo-game.js +1 -1
- package/tools/start.js +335 -93
- package/tools/status.js +53 -6
- package/tools/stuck.js +297 -0
- package/tools/subscribe.js +148 -0
- package/tools/subscriptions.js +134 -0
- package/tools/suggest-tags.js +6 -8
- package/tools/tag-suggestions.js +257 -0
- package/tools/tip.js +193 -0
- package/tools/token.js +103 -0
- package/tools/update.js +1 -1
- package/tools/wallet.js +239 -186
- package/tools/watch.js +157 -0
- package/tools/webhook-test.js +388 -0
- package/tools/who.js +54 -3
- package/tools/withdraw.js +145 -0
- package/tools/work-summary.js +96 -0
- package/tools/workshop.js +327 -0
- package/tools/x-mentions.js +1 -1
- package/version.json +14 -3
- package/tools/artifacts-buy.js +0 -111
- package/tools/connect.js +0 -284
- package/tools/gigs-apply.js +0 -99
- package/tools/gigs-browse.js +0 -114
- package/tools/gigs-complete.js +0 -128
- package/tools/gigs-post.js +0 -140
- package/tools/live-off.js +0 -109
- package/tools/live-watch.js +0 -176
- package/tools/live.js +0 -128
- package/tools/sessions-browse.js +0 -105
- package/tools/whats-happening.js +0 -125
- /package/tools/{away.js → _deprecated/away.js} +0 -0
- /package/tools/{back.js → _deprecated/back.js} +0 -0
- /package/tools/{mute.js → _deprecated/mute.js} +0 -0
- /package/tools/{skills-exchange.js → _deprecated/skills-exchange.js} +0 -0
- /package/tools/{tictactoe.js → _deprecated/tictactoe.js} +0 -0
- /package/tools/{wordassociation.js → _deprecated/wordassociation.js} +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vibe bridge-dashboard — Real-time bridge monitoring dashboard
|
|
3
|
+
*
|
|
4
|
+
* Live view of all bridge health, recent events, and webhook activity.
|
|
5
|
+
* Auto-refreshes to show real-time status of social connections.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const twitter = require('../twitter');
|
|
9
|
+
const telegram = require('../bridges/telegram');
|
|
10
|
+
const discord = require('../discord');
|
|
11
|
+
const farcaster = require('../bridges/farcaster');
|
|
12
|
+
const { requireInit, header, divider, success, warning, error } = require('./_shared');
|
|
13
|
+
|
|
14
|
+
const definition = {
|
|
15
|
+
name: 'vibe_bridge_dashboard',
|
|
16
|
+
description: 'Real-time monitoring dashboard for all social bridges and webhook activity',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
refresh_rate: {
|
|
21
|
+
type: 'number',
|
|
22
|
+
description: 'Auto-refresh interval in seconds (0 = no auto-refresh, default: 30)'
|
|
23
|
+
},
|
|
24
|
+
show_events: {
|
|
25
|
+
type: 'boolean',
|
|
26
|
+
description: 'Show recent webhook events (default: true)'
|
|
27
|
+
},
|
|
28
|
+
compact: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
description: 'Compact view with minimal details (default: false)'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
async function handler(args) {
|
|
37
|
+
const initCheck = requireInit();
|
|
38
|
+
if (initCheck) return initCheck;
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
refresh_rate = 30,
|
|
42
|
+
show_events = true,
|
|
43
|
+
compact = false
|
|
44
|
+
} = args;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
// Get comprehensive bridge status
|
|
48
|
+
const bridgeStatuses = await getAllBridgeStatuses();
|
|
49
|
+
const webhookStats = await getWebhookStats();
|
|
50
|
+
const recentEvents = show_events ? await getRecentWebhookEvents(10) : [];
|
|
51
|
+
|
|
52
|
+
return formatDashboard(bridgeStatuses, webhookStats, recentEvents, compact, refresh_rate);
|
|
53
|
+
|
|
54
|
+
} catch (e) {
|
|
55
|
+
return {
|
|
56
|
+
display: `${header('Bridge Dashboard')}\n\n${error('Dashboard error: ' + e.message)}`
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function getAllBridgeStatuses() {
|
|
62
|
+
const statuses = {};
|
|
63
|
+
|
|
64
|
+
// X Bridge
|
|
65
|
+
statuses.x = await getBridgeStatus('x', twitter);
|
|
66
|
+
|
|
67
|
+
// Telegram Bridge
|
|
68
|
+
statuses.telegram = await getBridgeStatus('telegram', telegram);
|
|
69
|
+
|
|
70
|
+
// Discord Bridge
|
|
71
|
+
statuses.discord = await getBridgeStatus('discord', discord);
|
|
72
|
+
|
|
73
|
+
// Farcaster Bridge
|
|
74
|
+
statuses.farcaster = await getBridgeStatus('farcaster', farcaster);
|
|
75
|
+
|
|
76
|
+
return statuses;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function getBridgeStatus(platform, module) {
|
|
80
|
+
const status = {
|
|
81
|
+
platform,
|
|
82
|
+
configured: module.isConfigured(),
|
|
83
|
+
connected: false,
|
|
84
|
+
username: null,
|
|
85
|
+
lastActivity: null,
|
|
86
|
+
errors: [],
|
|
87
|
+
capabilities: getCapabilities(platform),
|
|
88
|
+
health: 'unknown'
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
if (!status.configured) {
|
|
92
|
+
status.health = 'not_configured';
|
|
93
|
+
return status;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
// Test connection based on platform
|
|
98
|
+
switch (platform) {
|
|
99
|
+
case 'x':
|
|
100
|
+
const me = await twitter.getMe();
|
|
101
|
+
status.connected = true;
|
|
102
|
+
status.username = me.data.username;
|
|
103
|
+
status.health = 'healthy';
|
|
104
|
+
break;
|
|
105
|
+
|
|
106
|
+
case 'telegram':
|
|
107
|
+
const botInfo = await telegram.getBotInfo();
|
|
108
|
+
status.connected = true;
|
|
109
|
+
status.username = botInfo.username;
|
|
110
|
+
status.health = 'healthy';
|
|
111
|
+
break;
|
|
112
|
+
|
|
113
|
+
case 'discord':
|
|
114
|
+
// Discord webhook doesn't have a test endpoint, assume healthy if configured
|
|
115
|
+
status.connected = true;
|
|
116
|
+
status.health = 'healthy';
|
|
117
|
+
status.username = 'webhook';
|
|
118
|
+
break;
|
|
119
|
+
|
|
120
|
+
case 'farcaster':
|
|
121
|
+
const userInfo = await farcaster.getUser();
|
|
122
|
+
status.connected = true;
|
|
123
|
+
status.username = userInfo.users[0].username;
|
|
124
|
+
status.health = 'healthy';
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Check for recent activity (would require KV access for webhook events)
|
|
129
|
+
status.lastActivity = await getLastActivity(platform);
|
|
130
|
+
|
|
131
|
+
} catch (e) {
|
|
132
|
+
status.health = 'error';
|
|
133
|
+
status.errors.push(e.message);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return status;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function getWebhookStats() {
|
|
140
|
+
try {
|
|
141
|
+
// Try to get KV store
|
|
142
|
+
const KV_CONFIGURED = !!(process.env.KV_REST_API_URL && process.env.KV_REST_API_TOKEN);
|
|
143
|
+
if (!KV_CONFIGURED) {
|
|
144
|
+
return {
|
|
145
|
+
x: { total_deliveries: 0, events_processed: 0, last_delivery: null }
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const { kv } = await import('@vercel/kv');
|
|
150
|
+
|
|
151
|
+
// Get X webhook stats
|
|
152
|
+
const xStats = await kv.hgetall('vibe:x_webhook_stats') || {};
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
x: {
|
|
156
|
+
total_deliveries: parseInt(xStats.total_deliveries) || 0,
|
|
157
|
+
events_processed: parseInt(xStats.events_processed) || 0,
|
|
158
|
+
last_delivery: xStats.last_delivery || null,
|
|
159
|
+
kv_available: true
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
} catch (e) {
|
|
164
|
+
return {
|
|
165
|
+
x: { total_deliveries: 0, events_processed: 0, last_delivery: null, error: e.message }
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
async function getRecentWebhookEvents(limit) {
|
|
171
|
+
try {
|
|
172
|
+
const KV_CONFIGURED = !!(process.env.KV_REST_API_URL && process.env.KV_REST_API_TOKEN);
|
|
173
|
+
if (!KV_CONFIGURED) return [];
|
|
174
|
+
|
|
175
|
+
const { kv } = await import('@vercel/kv');
|
|
176
|
+
const inboxKey = 'vibe:social_inbox';
|
|
177
|
+
|
|
178
|
+
const rawEvents = await kv.lrange(inboxKey, 0, limit - 1);
|
|
179
|
+
|
|
180
|
+
return rawEvents.map(eventStr => {
|
|
181
|
+
const event = JSON.parse(eventStr);
|
|
182
|
+
return {
|
|
183
|
+
id: event.id,
|
|
184
|
+
platform: event.platform,
|
|
185
|
+
type: event.type,
|
|
186
|
+
from: event.from?.handle || 'unknown',
|
|
187
|
+
timestamp: event.timestamp,
|
|
188
|
+
timeAgo: formatTimeAgo(new Date(event.timestamp))
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
} catch (e) {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
async function getLastActivity(platform) {
|
|
198
|
+
// Placeholder - would check KV for last webhook event from this platform
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function getCapabilities(platform) {
|
|
203
|
+
const capabilities = {
|
|
204
|
+
x: ['read', 'write', 'dm', 'webhook'],
|
|
205
|
+
telegram: ['read', 'write', 'groups', 'bot'],
|
|
206
|
+
discord: ['write', 'webhook'],
|
|
207
|
+
farcaster: ['read', 'write', 'channels', 'frames']
|
|
208
|
+
};
|
|
209
|
+
return capabilities[platform] || [];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function formatTimeAgo(date) {
|
|
213
|
+
const now = new Date();
|
|
214
|
+
const diffMs = now - date;
|
|
215
|
+
const diffMins = Math.floor(diffMs / (1000 * 60));
|
|
216
|
+
const diffHours = Math.floor(diffMs / (1000 * 60 * 60));
|
|
217
|
+
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));
|
|
218
|
+
|
|
219
|
+
if (diffMins < 1) return 'just now';
|
|
220
|
+
if (diffMins < 60) return `${diffMins}m ago`;
|
|
221
|
+
if (diffHours < 24) return `${diffHours}h ago`;
|
|
222
|
+
return `${diffDays}d ago`;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function formatDashboard(bridges, webhookStats, events, compact, refreshRate) {
|
|
226
|
+
let display = header('🔗 Bridge Dashboard');
|
|
227
|
+
display += `\n\n_Live status • ${new Date().toLocaleTimeString()}_\n`;
|
|
228
|
+
|
|
229
|
+
if (refreshRate > 0) {
|
|
230
|
+
display += `_Auto-refresh: ${refreshRate}s_\n`;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
display += divider();
|
|
234
|
+
display += '\n';
|
|
235
|
+
|
|
236
|
+
// Overall health summary
|
|
237
|
+
const totalBridges = Object.keys(bridges).length;
|
|
238
|
+
const connectedBridges = Object.values(bridges).filter(b => b.connected).length;
|
|
239
|
+
const healthyBridges = Object.values(bridges).filter(b => b.health === 'healthy').length;
|
|
240
|
+
|
|
241
|
+
let healthIcon = '✅';
|
|
242
|
+
if (healthyBridges === 0) healthIcon = '❌';
|
|
243
|
+
else if (healthyBridges < connectedBridges) healthIcon = '⚠️';
|
|
244
|
+
|
|
245
|
+
display += `${healthIcon} **System Health:** ${healthyBridges}/${totalBridges} bridges healthy\n`;
|
|
246
|
+
|
|
247
|
+
// Quick stats
|
|
248
|
+
if (webhookStats.x.total_deliveries > 0) {
|
|
249
|
+
display += `🔔 **Webhooks:** ${webhookStats.x.total_deliveries} deliveries, ${webhookStats.x.events_processed} events processed\n`;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (events.length > 0) {
|
|
253
|
+
const recentCount = events.filter(e => new Date() - new Date(e.timestamp) < 60 * 60 * 1000).length;
|
|
254
|
+
display += `📬 **Recent Activity:** ${recentCount} events in last hour\n`;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
display += '\n' + divider();
|
|
258
|
+
display += '**BRIDGE STATUS**\n\n';
|
|
259
|
+
|
|
260
|
+
// Individual bridge status
|
|
261
|
+
for (const [platformName, bridge] of Object.entries(bridges)) {
|
|
262
|
+
display += formatBridgeQuickStatus(bridge, compact);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Recent webhook events
|
|
266
|
+
if (events.length > 0) {
|
|
267
|
+
display += '\n' + divider();
|
|
268
|
+
display += '**RECENT EVENTS**\n\n';
|
|
269
|
+
|
|
270
|
+
for (const event of events.slice(0, compact ? 3 : 5)) {
|
|
271
|
+
display += formatEventQuickStatus(event);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (events.length > (compact ? 3 : 5)) {
|
|
275
|
+
display += `_...and ${events.length - (compact ? 3 : 5)} more events_\n`;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Quick actions
|
|
280
|
+
display += '\n' + divider();
|
|
281
|
+
display += '**QUICK ACTIONS**\n';
|
|
282
|
+
display += '• `vibe social-inbox` - View all messages\n';
|
|
283
|
+
display += '• `vibe bridge-health --details` - Detailed diagnostics\n';
|
|
284
|
+
display += '• `vibe bridges --action test --platform x` - Test specific bridge\n';
|
|
285
|
+
display += '• `vibe bridge-dashboard --compact` - Compact view';
|
|
286
|
+
|
|
287
|
+
return { display };
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function formatBridgeQuickStatus(bridge, compact) {
|
|
291
|
+
const statusIcons = {
|
|
292
|
+
healthy: '🟢',
|
|
293
|
+
error: '🔴',
|
|
294
|
+
not_configured: '⚪',
|
|
295
|
+
unknown: '🟡'
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
const icon = statusIcons[bridge.health] || '🟡';
|
|
299
|
+
const platformName = bridge.platform.toUpperCase().padEnd(10);
|
|
300
|
+
|
|
301
|
+
let line = `${icon} ${platformName}`;
|
|
302
|
+
|
|
303
|
+
if (bridge.connected && bridge.username) {
|
|
304
|
+
line += ` @${bridge.username}`;
|
|
305
|
+
} else if (bridge.health === 'not_configured') {
|
|
306
|
+
line += ` Not configured`;
|
|
307
|
+
} else if (bridge.errors.length > 0) {
|
|
308
|
+
line += ` ${bridge.errors[0]}`;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
line += '\n';
|
|
312
|
+
|
|
313
|
+
if (!compact && bridge.capabilities.length > 0) {
|
|
314
|
+
line += ` ${bridge.capabilities.join(' • ')}\n`;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return line;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function formatEventQuickStatus(event) {
|
|
321
|
+
const platformIcons = {
|
|
322
|
+
x: '𝕏',
|
|
323
|
+
farcaster: '🟣',
|
|
324
|
+
telegram: '✈️',
|
|
325
|
+
discord: '💬'
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
const typeIcons = {
|
|
329
|
+
mention: '@',
|
|
330
|
+
dm: '✉️',
|
|
331
|
+
like: '❤️',
|
|
332
|
+
follow: '👤',
|
|
333
|
+
cast: '📡'
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
const platformIcon = platformIcons[event.platform] || '📱';
|
|
337
|
+
const typeIcon = typeIcons[event.type] || '';
|
|
338
|
+
|
|
339
|
+
return `${platformIcon} ${typeIcon} @${event.from} • ${event.timeAgo}\n`;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
module.exports = { definition, handler };
|