slashvibe-mcp 0.3.21 → 0.3.23

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 (235) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +280 -47
  3. package/auto-update.js +10 -15
  4. package/config.js +36 -31
  5. package/crypto.js +1 -6
  6. package/debug.js +12 -0
  7. package/discord.js +19 -19
  8. package/eslint.config.js +54 -0
  9. package/index.js +217 -207
  10. package/intelligence/index.js +2 -9
  11. package/intelligence/infer.js +10 -16
  12. package/intelligence/patterns.js +23 -18
  13. package/intelligence/proactive.js +16 -15
  14. package/intelligence/serendipity.js +57 -20
  15. package/memory.js +13 -8
  16. package/migrate-v2.js +72 -0
  17. package/notification-emitter.js +2 -2
  18. package/notify.js +39 -14
  19. package/package.json +28 -29
  20. package/post-install.js +141 -0
  21. package/presence.js +2 -2
  22. package/prompts.js +5 -9
  23. package/protocol/index.js +123 -87
  24. package/protocol/telegram-commands.js +36 -37
  25. package/store/api.js +358 -529
  26. package/store/local.js +9 -10
  27. package/store/profiles.js +48 -192
  28. package/store/reservations.js +2 -9
  29. package/store/skills.js +69 -71
  30. package/store/sqlite.js +355 -0
  31. package/test-skills-bootstrap.js +20 -0
  32. package/test-v2-integration.js +385 -0
  33. package/tools/_actions.js +48 -387
  34. package/tools/_connection-queue.js +45 -56
  35. package/tools/_discovery-enhanced.js +52 -57
  36. package/tools/_discovery.js +87 -185
  37. package/tools/{l2-status.js → _experimental/l2-status.js} +68 -70
  38. package/tools/{shipback.js → _experimental/shipback.js} +4 -3
  39. package/tools/_proactive-discovery.js +60 -73
  40. package/tools/_shared/index.js +41 -64
  41. package/tools/admin-inbox.js +10 -15
  42. package/tools/agents.js +1 -1
  43. package/tools/artifact-create.js +13 -23
  44. package/tools/artifact-view.js +4 -4
  45. package/tools/{_deprecated/back.js → back.js} +1 -1
  46. package/tools/bye.js +3 -5
  47. package/tools/consent.js +2 -2
  48. package/tools/context.js +9 -10
  49. package/tools/crossword.js +3 -2
  50. package/tools/discover.js +94 -356
  51. package/tools/dm.js +27 -86
  52. package/tools/doctor.js +12 -41
  53. package/tools/drawing.js +34 -20
  54. package/tools/echo.js +11 -11
  55. package/tools/feed.js +30 -58
  56. package/tools/follow.js +64 -187
  57. package/tools/{_deprecated/forget.js → forget.js} +4 -7
  58. package/tools/game.js +144 -48
  59. package/tools/handoff.js +6 -8
  60. package/tools/help.js +3 -3
  61. package/tools/idea.js +15 -27
  62. package/tools/inbox.js +121 -293
  63. package/tools/init.js +54 -151
  64. package/tools/invite.js +8 -21
  65. package/tools/migrate.js +27 -24
  66. package/tools/multiplayer-game.js +50 -40
  67. package/tools/{_deprecated/mute.js → mute.js} +4 -3
  68. package/tools/notifications.js +58 -48
  69. package/tools/observe.js +12 -15
  70. package/tools/onboarding.js +8 -11
  71. package/tools/open.js +13 -144
  72. package/tools/party-game.js +23 -12
  73. package/tools/patterns.js +2 -1
  74. package/tools/ping.js +5 -7
  75. package/tools/react.js +28 -30
  76. package/tools/{_deprecated/recall.js → recall.js} +5 -10
  77. package/tools/release.js +4 -2
  78. package/tools/{_deprecated/remember.js → remember.js} +4 -6
  79. package/tools/report.js +2 -2
  80. package/tools/request.js +6 -26
  81. package/tools/reserve.js +1 -1
  82. package/tools/session-fork.js +97 -0
  83. package/tools/session-save.js +109 -0
  84. package/tools/settings.js +30 -99
  85. package/tools/ship.js +74 -56
  86. package/tools/{_deprecated/skills-exchange.js → skills-exchange.js} +38 -39
  87. package/tools/social-inbox.js +22 -28
  88. package/tools/social-post.js +24 -27
  89. package/tools/solo-game.js +54 -46
  90. package/tools/start.js +14 -148
  91. package/tools/status.js +21 -68
  92. package/tools/submit.js +4 -2
  93. package/tools/suggest-tags.js +36 -33
  94. package/tools/summarize.js +19 -16
  95. package/tools/tag-suggestions.js +72 -73
  96. package/tools/test.js +1 -1
  97. package/tools/{_deprecated/tictactoe.js → tictactoe.js} +26 -26
  98. package/tools/token.js +4 -4
  99. package/tools/update.js +1 -2
  100. package/tools/watch.js +132 -112
  101. package/tools/who.js +20 -40
  102. package/tools/{_deprecated/wordassociation.js → wordassociation.js} +23 -20
  103. package/tools/workshop-buddy.js +52 -53
  104. package/tools/x-mentions.js +0 -1
  105. package/tools/x-reply.js +0 -1
  106. package/twitter.js +14 -20
  107. package/version.json +8 -10
  108. package/webhook-runner.js +132 -0
  109. package/auth-store.js +0 -148
  110. package/bridges/bridge-monitor.js +0 -388
  111. package/bridges/discord-bot.js +0 -431
  112. package/bridges/farcaster.js +0 -299
  113. package/bridges/telegram.js +0 -261
  114. package/bridges/webhook-health.js +0 -420
  115. package/bridges/webhook-server.js +0 -437
  116. package/bridges/whatsapp.js +0 -441
  117. package/bridges/x-webhook.js +0 -423
  118. package/games/arcade.js +0 -406
  119. package/games/chess.js +0 -451
  120. package/games/colorguess.js +0 -343
  121. package/games/crossword-words.js +0 -171
  122. package/games/crossword.js +0 -461
  123. package/games/drawing.js +0 -347
  124. package/games/gameroulette.js +0 -300
  125. package/games/gamerouter.js +0 -336
  126. package/games/gamestatus.js +0 -337
  127. package/games/guessnumber.js +0 -209
  128. package/games/hangman.js +0 -279
  129. package/games/memory.js +0 -338
  130. package/games/multiplayer-tictactoe.js +0 -389
  131. package/games/pixelart.js +0 -399
  132. package/games/quickduel.js +0 -354
  133. package/games/riddle.js +0 -371
  134. package/games/rockpaperscissors.js +0 -291
  135. package/games/snake.js +0 -406
  136. package/games/storybuilder.js +0 -343
  137. package/games/tictactoe.js +0 -345
  138. package/games/twentyquestions.js +0 -286
  139. package/games/twotruths.js +0 -207
  140. package/games/werewolf.js +0 -508
  141. package/games/wordassociation.js +0 -247
  142. package/games/wordchain.js +0 -135
  143. package/intelligence/interests.js +0 -369
  144. package/setup.js +0 -480
  145. package/smart-inbox.js +0 -276
  146. package/tools/_deprecated/auto-suggest-connections.js +0 -304
  147. package/tools/_deprecated/bootstrap-skills.js +0 -231
  148. package/tools/_deprecated/bridge-dashboard.js +0 -342
  149. package/tools/_deprecated/bridge-health.js +0 -400
  150. package/tools/_deprecated/bridge-live.js +0 -384
  151. package/tools/_deprecated/bridges.js +0 -383
  152. package/tools/_deprecated/colorguess.js +0 -281
  153. package/tools/_deprecated/discover-insights.js +0 -379
  154. package/tools/_deprecated/discover-momentum.js +0 -256
  155. package/tools/_deprecated/discovery-analytics.js +0 -345
  156. package/tools/_deprecated/discovery-auto-suggest.js +0 -275
  157. package/tools/_deprecated/discovery-bootstrap.js +0 -267
  158. package/tools/_deprecated/discovery-daily.js +0 -375
  159. package/tools/_deprecated/discovery-dashboard.js +0 -385
  160. package/tools/_deprecated/discovery-digest.js +0 -314
  161. package/tools/_deprecated/discovery-hub.js +0 -357
  162. package/tools/_deprecated/discovery-insights.js +0 -384
  163. package/tools/_deprecated/discovery-momentum.js +0 -281
  164. package/tools/_deprecated/discovery-monitor.js +0 -319
  165. package/tools/_deprecated/discovery-proactive.js +0 -300
  166. package/tools/_deprecated/draw.js +0 -317
  167. package/tools/_deprecated/farcaster.js +0 -307
  168. package/tools/_deprecated/games-catalog.js +0 -376
  169. package/tools/_deprecated/games.js +0 -313
  170. package/tools/_deprecated/guessnumber.js +0 -194
  171. package/tools/_deprecated/hangman.js +0 -129
  172. package/tools/_deprecated/multiplayer-tictactoe.js +0 -303
  173. package/tools/_deprecated/riddle.js +0 -240
  174. package/tools/_deprecated/run-bootstrap.js +0 -69
  175. package/tools/_deprecated/skills-analytics.js +0 -349
  176. package/tools/_deprecated/skills-bootstrap.js +0 -301
  177. package/tools/_deprecated/skills-dashboard.js +0 -268
  178. package/tools/_deprecated/skills.js +0 -380
  179. package/tools/_deprecated/smart-intro.js +0 -353
  180. package/tools/_deprecated/storybuilder.js +0 -331
  181. package/tools/_deprecated/telegram-bot.js +0 -183
  182. package/tools/_deprecated/telegram-setup.js +0 -214
  183. package/tools/_deprecated/twentyquestions.js +0 -143
  184. package/tools/_shared.js +0 -234
  185. package/tools/_work-context.js +0 -338
  186. package/tools/_work-context.manual-test.js +0 -199
  187. package/tools/_work-context.test.js +0 -260
  188. package/tools/activity.js +0 -220
  189. package/tools/agent-treasury.js +0 -288
  190. package/tools/analytics.js +0 -191
  191. package/tools/approve.js +0 -197
  192. package/tools/arcade.js +0 -173
  193. package/tools/artifacts-price.js +0 -107
  194. package/tools/ask-expert.js +0 -160
  195. package/tools/available.js +0 -120
  196. package/tools/become-expert.js +0 -150
  197. package/tools/broadcast.js +0 -325
  198. package/tools/chat.js +0 -202
  199. package/tools/collaborative-drawing.js +0 -286
  200. package/tools/connection-status.js +0 -178
  201. package/tools/earnings.js +0 -126
  202. package/tools/friends.js +0 -207
  203. package/tools/genesis.js +0 -233
  204. package/tools/gig-browse.js +0 -206
  205. package/tools/gig-complete.js +0 -144
  206. package/tools/health.js +0 -87
  207. package/tools/leaderboard.js +0 -117
  208. package/tools/lib/git-apply.js +0 -206
  209. package/tools/lib/git-bundle.js +0 -407
  210. package/tools/mint.js +0 -377
  211. package/tools/plan.js +0 -225
  212. package/tools/profile.js +0 -219
  213. package/tools/proof-of-work.js +0 -144
  214. package/tools/pulse.js +0 -218
  215. package/tools/reply.js +0 -166
  216. package/tools/reputation.js +0 -175
  217. package/tools/schedule.js +0 -367
  218. package/tools/search-messages.js +0 -123
  219. package/tools/session.js +0 -467
  220. package/tools/session_price.js +0 -128
  221. package/tools/smart-check.js +0 -201
  222. package/tools/social-processor.js +0 -445
  223. package/tools/streak.js +0 -147
  224. package/tools/stuck.js +0 -297
  225. package/tools/subscribe.js +0 -148
  226. package/tools/subscriptions.js +0 -134
  227. package/tools/tip.js +0 -193
  228. package/tools/wallet.js +0 -269
  229. package/tools/webhook-test.js +0 -388
  230. package/tools/withdraw.js +0 -145
  231. package/tools/work-summary.js +0 -96
  232. package/tools/workshop.js +0 -327
  233. /package/tools/{l2-bridge.js → _experimental/l2-bridge.js} +0 -0
  234. /package/tools/{l2.js → _experimental/l2.js} +0 -0
  235. /package/tools/{_deprecated/away.js → away.js} +0 -0
@@ -1,385 +0,0 @@
1
- /**
2
- * vibe discovery-dashboard — Personal Discovery Dashboard
3
- *
4
- * Shows users their discovery profile health, connection potential, and
5
- * actionable steps to improve their discoverability within /vibe.
6
- *
7
- * Commands:
8
- * - discovery-dashboard health — Check your discovery profile health
9
- * - discovery-dashboard potential — See your connection potential
10
- * - discovery-dashboard improve — Get specific improvement suggestions
11
- */
12
-
13
- const config = require('../config');
14
- const userProfiles = require('../store/profiles');
15
- const { formatTimeAgo, requireInit } = require('./_shared');
16
-
17
- const definition = {
18
- name: 'vibe_discovery_dashboard',
19
- description: 'Personal dashboard showing your discovery profile and connection potential.',
20
- inputSchema: {
21
- type: 'object',
22
- properties: {
23
- command: {
24
- type: 'string',
25
- enum: ['health', 'potential', 'improve'],
26
- description: 'Dashboard command to run'
27
- }
28
- }
29
- }
30
- };
31
-
32
- // Calculate profile health score
33
- async function calculateProfileHealth(profile) {
34
- let score = 0;
35
- const feedback = [];
36
-
37
- // Building project (30 points)
38
- if (profile.building) {
39
- score += 30;
40
- feedback.push('✓ Has project description');
41
- } else {
42
- feedback.push('✗ Missing project description (+30 points)');
43
- }
44
-
45
- // Interests (25 points)
46
- const interestCount = (profile.interests || []).length;
47
- if (interestCount >= 3) {
48
- score += 25;
49
- feedback.push('✓ Has diverse interests');
50
- } else if (interestCount > 0) {
51
- score += Math.round(25 * (interestCount / 3));
52
- feedback.push(`△ Has ${interestCount} interests (add ${3 - interestCount} more for full points)`);
53
- } else {
54
- feedback.push('✗ No interests listed (+25 points)');
55
- }
56
-
57
- // Skills/Tags (25 points)
58
- const tagCount = (profile.tags || []).length;
59
- if (tagCount >= 5) {
60
- score += 25;
61
- feedback.push('✓ Has comprehensive skills');
62
- } else if (tagCount > 0) {
63
- score += Math.round(25 * (tagCount / 5));
64
- feedback.push(`△ Has ${tagCount} skills (add ${5 - tagCount} more for full points)`);
65
- } else {
66
- feedback.push('✗ No skills tagged (+25 points)');
67
- }
68
-
69
- // Recent activity (10 points)
70
- if (profile.lastSeen) {
71
- const hoursSince = (Date.now() - profile.lastSeen) / (1000 * 60 * 60);
72
- if (hoursSince < 24) {
73
- score += 10;
74
- feedback.push('✓ Recently active');
75
- } else if (hoursSince < 168) { // 1 week
76
- score += 5;
77
- feedback.push('△ Active this week');
78
- } else {
79
- feedback.push('△ Inactive for a while');
80
- }
81
- }
82
-
83
- // Connections made (10 points)
84
- const connectionCount = (profile.connections || []).length;
85
- if (connectionCount >= 5) {
86
- score += 10;
87
- feedback.push('✓ Well connected');
88
- } else if (connectionCount > 0) {
89
- score += Math.round(10 * (connectionCount / 5));
90
- feedback.push(`△ Has ${connectionCount} connections`);
91
- } else {
92
- feedback.push('△ No connections yet');
93
- }
94
-
95
- return { score, feedback, maxScore: 100 };
96
- }
97
-
98
- // Calculate connection potential
99
- async function calculateConnectionPotential(myHandle) {
100
- const myProfile = await userProfiles.getProfile(myHandle);
101
- const allProfiles = await userProfiles.getAllProfiles();
102
-
103
- let potentialMatches = 0;
104
- let skillMatches = 0;
105
- let interestMatches = 0;
106
- let projectMatches = 0;
107
-
108
- for (const other of allProfiles) {
109
- if (other.handle === myHandle) continue;
110
-
111
- // Skip if already connected
112
- const alreadyConnected = await userProfiles.hasBeenConnected(myHandle, other.handle);
113
- if (alreadyConnected) continue;
114
-
115
- let hasMatch = false;
116
-
117
- // Check skill overlap
118
- if (myProfile.tags && other.tags) {
119
- const sharedSkills = myProfile.tags.filter(tag => other.tags.includes(tag));
120
- if (sharedSkills.length > 0) {
121
- skillMatches++;
122
- hasMatch = true;
123
- }
124
- }
125
-
126
- // Check interest overlap
127
- if (myProfile.interests && other.interests) {
128
- const sharedInterests = myProfile.interests.filter(interest => other.interests.includes(interest));
129
- if (sharedInterests.length > 0) {
130
- interestMatches++;
131
- hasMatch = true;
132
- }
133
- }
134
-
135
- // Check project similarity
136
- if (myProfile.building && other.building) {
137
- const myWords = myProfile.building.toLowerCase().split(/\s+/);
138
- const theirWords = other.building.toLowerCase().split(/\s+/);
139
- const overlap = myWords.filter(word => theirWords.includes(word) && word.length > 3);
140
- if (overlap.length > 0) {
141
- projectMatches++;
142
- hasMatch = true;
143
- }
144
- }
145
-
146
- if (hasMatch) {
147
- potentialMatches++;
148
- }
149
- }
150
-
151
- return {
152
- total: potentialMatches,
153
- bySkills: skillMatches,
154
- byInterests: interestMatches,
155
- byProjects: projectMatches,
156
- totalPeople: allProfiles.length - 1
157
- };
158
- }
159
-
160
- // Generate improvement suggestions
161
- async function generateImprovements(myHandle) {
162
- const myProfile = await userProfiles.getProfile(myHandle);
163
- const allProfiles = await userProfiles.getAllProfiles();
164
- const suggestions = [];
165
-
166
- // Analyze what's missing
167
- if (!myProfile.building) {
168
- suggestions.push({
169
- action: 'Add project description',
170
- command: 'vibe update building "what you\'re working on"',
171
- impact: 'High - helps find collaborators and similar builders',
172
- points: 30
173
- });
174
- }
175
-
176
- const interestCount = (myProfile.interests || []).length;
177
- if (interestCount < 3) {
178
- suggestions.push({
179
- action: 'Add more interests',
180
- command: 'vibe update interests "ai, startups, music, gaming"',
181
- impact: 'Medium - expands your community reach',
182
- points: 25 - Math.round(25 * (interestCount / 3))
183
- });
184
- }
185
-
186
- const tagCount = (myProfile.tags || []).length;
187
- if (tagCount < 5) {
188
- suggestions.push({
189
- action: 'Tag your skills',
190
- command: 'vibe update tags "frontend, react, typescript, design"',
191
- impact: 'High - enables skill-based matching',
192
- points: 25 - Math.round(25 * (tagCount / 5))
193
- });
194
- }
195
-
196
- // Analyze community trends for suggestions
197
- const trendingInterests = await userProfiles.getTrendingInterests();
198
- const trendingTags = await userProfiles.getTrendingTags();
199
-
200
- if (trendingInterests.length > 0) {
201
- const missingPopularInterests = trendingInterests
202
- .filter(trend => !(myProfile.interests || []).includes(trend.interest))
203
- .slice(0, 3);
204
-
205
- if (missingPopularInterests.length > 0) {
206
- suggestions.push({
207
- action: 'Consider popular interests',
208
- command: `Consider adding: ${missingPopularInterests.map(i => i.interest).join(', ')}`,
209
- impact: 'Medium - join popular communities',
210
- points: 'Connection boost'
211
- });
212
- }
213
- }
214
-
215
- // Connection-based suggestions
216
- const connectionCount = (myProfile.connections || []).length;
217
- if (connectionCount === 0) {
218
- suggestions.push({
219
- action: 'Make your first connection',
220
- command: 'discover suggest',
221
- impact: 'High - starts your network',
222
- points: 'Network effect'
223
- });
224
- }
225
-
226
- return suggestions.sort((a, b) => (b.points || 0) - (a.points || 0));
227
- }
228
-
229
- async function handler(args) {
230
- const initCheck = requireInit();
231
- if (initCheck) return initCheck;
232
-
233
- const myHandle = config.getHandle();
234
- const command = args.command || 'health';
235
-
236
- let display = '';
237
-
238
- try {
239
- switch (command) {
240
- case 'health': {
241
- const myProfile = await userProfiles.getProfile(myHandle);
242
- const health = await calculateProfileHealth(myProfile);
243
-
244
- display = `## Your Discovery Profile Health 🏥\n\n`;
245
- display += `**Overall Score: ${health.score}/${health.maxScore}** `;
246
-
247
- if (health.score >= 80) {
248
- display += `🌟 Excellent!\n\n`;
249
- } else if (health.score >= 60) {
250
- display += `👍 Good\n\n`;
251
- } else if (health.score >= 40) {
252
- display += `⚡ Needs work\n\n`;
253
- } else {
254
- display += `🚧 Getting started\n\n`;
255
- }
256
-
257
- display += `### Profile Checklist\n`;
258
- for (const item of health.feedback) {
259
- display += `${item}\n`;
260
- }
261
-
262
- display += `\n### Your Current Profile\n`;
263
- display += `**Building:** ${myProfile.building || '_Not set_'}\n`;
264
- display += `**Interests:** ${(myProfile.interests || []).join(', ') || '_None set_'}\n`;
265
- display += `**Skills:** ${(myProfile.tags || []).join(', ') || '_None set_'}\n`;
266
- display += `**Connections:** ${(myProfile.connections || []).length}\n`;
267
- if (myProfile.lastSeen) {
268
- display += `**Last Active:** ${formatTimeAgo(myProfile.lastSeen)}\n`;
269
- }
270
-
271
- display += `\n**Next Steps:**\n`;
272
- display += `• \`discovery-dashboard improve\` — Get specific suggestions\n`;
273
- display += `• \`discovery-dashboard potential\` — See connection opportunities`;
274
- break;
275
- }
276
-
277
- case 'potential': {
278
- const potential = await calculateConnectionPotential(myHandle);
279
- const myProfile = await userProfiles.getProfile(myHandle);
280
-
281
- display = `## Your Connection Potential 🎯\n\n`;
282
-
283
- if (potential.totalPeople === 0) {
284
- display += `_No other users in the community yet._\n\n`;
285
- display += `**When people join, you'll be ready to connect if you:**\n`;
286
- display += `• Complete your profile\n`;
287
- display += `• Add interests and skills\n`;
288
- display += `• Share what you're building`;
289
- } else {
290
- display += `**Potential Matches:** ${potential.total}/${potential.totalPeople} people (${Math.round((potential.total/potential.totalPeople)*100)}%)\n\n`;
291
-
292
- if (potential.total > 0) {
293
- display += `### Match Breakdown\n`;
294
- display += `**Skill Matches:** ${potential.bySkills} people\n`;
295
- display += `**Interest Matches:** ${potential.byInterests} people\n`;
296
- display += `**Project Matches:** ${potential.byProjects} people\n\n`;
297
-
298
- if (potential.total >= potential.totalPeople * 0.3) {
299
- display += `🎉 **Great potential!** You match with many community members.\n`;
300
- } else if (potential.total >= 3) {
301
- display += `👍 **Good potential!** Several connection opportunities.\n`;
302
- } else {
303
- display += `⚡ **Room to grow!** Expanding your profile will help.\n`;
304
- }
305
-
306
- display += `\n**Find your matches:**\n`;
307
- display += `• \`discover suggest\` — See your top recommendations\n`;
308
- display += `• \`workshop-buddy find\` — Find collaboration partners`;
309
- } else {
310
- display += `**No matches found yet.**\n\n`;
311
- display += `This might be because:\n`;
312
- display += `• Your profile needs more details\n`;
313
- display += `• The community is just starting\n`;
314
- display += `• You have unique interests (be a pioneer!)\n\n`;
315
- display += `**Improve your potential:**\n`;
316
- display += `\`discovery-dashboard improve\` — Get specific suggestions`;
317
- }
318
- }
319
- break;
320
- }
321
-
322
- case 'improve': {
323
- const suggestions = await generateImprovements(myHandle);
324
-
325
- if (suggestions.length === 0) {
326
- display = `## Profile Optimization Complete! 🎉\n\n`;
327
- display += `Your discovery profile is in great shape!\n\n`;
328
- display += `**Keep growing:**\n`;
329
- display += `• Stay active in the community\n`;
330
- display += `• Update your project as it evolves\n`;
331
- display += `• Make new connections regularly\n`;
332
- display += `• Share what you ship\n\n`;
333
- display += `**Check your stats:**\n`;
334
- display += `• \`discovery-dashboard health\` — Profile health\n`;
335
- display += `• \`discovery-dashboard potential\` — Connection opportunities`;
336
- } else {
337
- display = `## Discovery Profile Improvements 🚀\n\n`;
338
- display += `_Quick wins to boost your discoverability:_\n\n`;
339
-
340
- for (const suggestion of suggestions.slice(0, 5)) {
341
- display += `### ${suggestion.action}\n`;
342
- display += `**Impact:** ${suggestion.impact}\n`;
343
- if (typeof suggestion.points === 'number') {
344
- display += `**Points:** +${suggestion.points}\n`;
345
- } else if (suggestion.points) {
346
- display += `**Value:** ${suggestion.points}\n`;
347
- }
348
- display += `**Action:** \`${suggestion.command}\`\n\n`;
349
- }
350
-
351
- display += `**After improvements:**\n`;
352
- display += `• Run \`discovery-dashboard health\` to see your new score\n`;
353
- display += `• Try \`discover suggest\` to find matches\n`;
354
- display += `• Use \`workshop-buddy find\` for collaborations`;
355
- }
356
- break;
357
- }
358
-
359
- default:
360
- display = `## Discovery Dashboard Commands
361
-
362
- **\`discovery-dashboard health\`** — Check your profile health score
363
- **\`discovery-dashboard potential\`** — See your connection opportunities
364
- **\`discovery-dashboard improve\`** — Get specific improvement suggestions
365
-
366
- **Your personal discovery toolkit:**
367
- - Health score (0-100) based on profile completeness
368
- - Connection potential analysis
369
- - Actionable improvement suggestions
370
- - Community trend insights
371
-
372
- **Goal: Maximum discoverability and meaningful connections!**`;
373
- }
374
- } catch (error) {
375
- display = `## Dashboard Error
376
-
377
- ${error.message}
378
-
379
- Try: \`discovery-dashboard\` for available commands`;
380
- }
381
-
382
- return { display };
383
- }
384
-
385
- module.exports = { definition, handler };
@@ -1,314 +0,0 @@
1
- /**
2
- * vibe discovery-digest — Your personalized community digest
3
- *
4
- * A smart daily digest that helps returning users catch up and connect.
5
- * Perfect for users who haven't been active recently or want a quick
6
- * overview of connection opportunities.
7
- *
8
- * Commands:
9
- * - discovery-digest — Get your personalized digest
10
- * - discovery-digest fresh — Focus on very recent activity
11
- * - discovery-digest weekly — Extended weekly digest
12
- * - discovery-digest highlights — Community highlights only
13
- */
14
-
15
- const config = require('../config');
16
- const store = require('../store');
17
- const userProfiles = require('../store/profiles');
18
- const { formatTimeAgo, requireInit } = require('./_shared');
19
-
20
- const definition = {
21
- name: 'vibe_discovery_digest',
22
- description: 'Get a personalized digest of discovery opportunities and community activity.',
23
- inputSchema: {
24
- type: 'object',
25
- properties: {
26
- timeframe: {
27
- type: 'string',
28
- enum: ['daily', 'fresh', 'weekly', 'highlights'],
29
- description: 'Digest timeframe and focus'
30
- }
31
- }
32
- }
33
- };
34
-
35
- // Calculate match score for digest purposes (simplified)
36
- function calculateDigestScore(user1, user2) {
37
- let score = 0;
38
- const reasons = [];
39
-
40
- // Project similarity
41
- if (user1.building && user2.building) {
42
- const building1 = user1.building.toLowerCase();
43
- const building2 = user2.building.toLowerCase();
44
-
45
- const words1 = building1.split(/\s+/);
46
- const words2 = building2.split(/\s+/);
47
- const overlap = words1.filter(w => words2.includes(w) && w.length > 3);
48
-
49
- if (overlap.length > 0) {
50
- score += overlap.length * 15;
51
- reasons.push(`Both working on ${overlap.join(', ')}`);
52
- }
53
- }
54
-
55
- // Interest overlap
56
- if (user1.interests && user2.interests) {
57
- const shared = user1.interests.filter(i => user2.interests.includes(i));
58
- if (shared.length > 0) {
59
- score += shared.length * 12;
60
- reasons.push(`Shared: ${shared.slice(0, 2).join(', ')}`);
61
- }
62
- }
63
-
64
- // Skill complementarity
65
- if (user1.tags && user2.tags) {
66
- const complementaryPairs = [
67
- ['frontend', 'backend'], ['design', 'engineering'], ['ai', 'data'],
68
- ['product', 'engineering'], ['mobile', 'web'], ['devops', 'security']
69
- ];
70
-
71
- for (const [skill1, skill2] of complementaryPairs) {
72
- if ((user1.tags.includes(skill1) && user2.tags.includes(skill2)) ||
73
- (user1.tags.includes(skill2) && user2.tags.includes(skill1))) {
74
- score += 20;
75
- reasons.push(`Perfect combo: ${skill1} + ${skill2}`);
76
- break;
77
- }
78
- }
79
- }
80
-
81
- // Recent activity bonus
82
- const now = Date.now();
83
- const day = 24 * 60 * 60 * 1000;
84
-
85
- if (user2.lastSeen && (now - user2.lastSeen) < day) {
86
- score += 10;
87
- reasons.push('Active recently');
88
- }
89
-
90
- return { score, reasons: reasons.slice(0, 2) };
91
- }
92
-
93
- // Generate personalized digest
94
- async function generatePersonalDigest(myHandle, timeframe = 'daily') {
95
- const myProfile = await userProfiles.getProfile(myHandle);
96
- const allProfiles = await userProfiles.getAllProfiles();
97
- const now = Date.now();
98
-
99
- let cutoffHours = 24;
100
- if (timeframe === 'fresh') cutoffHours = 6;
101
- if (timeframe === 'weekly') cutoffHours = 168; // 7 days
102
-
103
- const cutoff = now - (cutoffHours * 60 * 60 * 1000);
104
-
105
- // Find people to meet
106
- const candidates = allProfiles.filter(p =>
107
- p.handle !== myHandle &&
108
- p.lastSeen && p.lastSeen > cutoff
109
- );
110
-
111
- const matches = [];
112
- for (const candidate of candidates) {
113
- const match = calculateDigestScore(myProfile, candidate);
114
- if (match.score > 8) {
115
- matches.push({
116
- handle: candidate.handle,
117
- score: match.score,
118
- reasons: match.reasons,
119
- building: candidate.building,
120
- interests: candidate.interests || [],
121
- tags: candidate.tags || [],
122
- lastSeen: candidate.lastSeen,
123
- ships: (candidate.ships || []).slice(0, 2)
124
- });
125
- }
126
- }
127
-
128
- // Sort by score and recency
129
- matches.sort((a, b) => {
130
- const scoreWeight = (b.score - a.score) * 1000;
131
- const timeWeight = (b.lastSeen - a.lastSeen) / (60 * 60 * 1000); // Hours
132
- return scoreWeight + timeWeight;
133
- });
134
-
135
- return matches.slice(0, 5);
136
- }
137
-
138
- // Get community highlights
139
- async function getCommunityHighlights(timeframe = 'daily') {
140
- let cutoffHours = 24;
141
- if (timeframe === 'fresh') cutoffHours = 6;
142
- if (timeframe === 'weekly') cutoffHours = 168;
143
-
144
- const cutoff = Date.now() - (cutoffHours * 60 * 60 * 1000);
145
- const allProfiles = await userProfiles.getAllProfiles();
146
-
147
- // New joiners
148
- const newJoiners = allProfiles.filter(p =>
149
- p.firstSeen && p.firstSeen > cutoff
150
- ).slice(0, 3);
151
-
152
- // Most active builders
153
- const activeBuilders = allProfiles.filter(p =>
154
- p.lastSeen && p.lastSeen > cutoff && p.building
155
- ).sort((a, b) => b.lastSeen - a.lastSeen).slice(0, 3);
156
-
157
- // Recent ships
158
- const recentShips = [];
159
- for (const profile of allProfiles) {
160
- if (profile.ships && profile.ships.length > 0) {
161
- for (const ship of profile.ships) {
162
- if (ship.timestamp > cutoff) {
163
- recentShips.push({
164
- handle: profile.handle,
165
- what: ship.what,
166
- timestamp: ship.timestamp
167
- });
168
- }
169
- }
170
- }
171
- }
172
- recentShips.sort((a, b) => b.timestamp - a.timestamp);
173
-
174
- // Trending interests (people who joined with these interests recently)
175
- const recentInterests = {};
176
- const recentProfiles = allProfiles.filter(p => p.lastSeen && p.lastSeen > cutoff);
177
- for (const profile of recentProfiles) {
178
- if (profile.interests) {
179
- for (const interest of profile.interests) {
180
- recentInterests[interest] = (recentInterests[interest] || 0) + 1;
181
- }
182
- }
183
- }
184
-
185
- const trendingInterests = Object.entries(recentInterests)
186
- .sort(([,a], [,b]) => b - a)
187
- .slice(0, 5)
188
- .map(([interest, count]) => ({ interest, count }));
189
-
190
- return {
191
- newJoiners,
192
- activeBuilders,
193
- recentShips: recentShips.slice(0, 5),
194
- trendingInterests,
195
- totalActive: recentProfiles.length
196
- };
197
- }
198
-
199
- // Create digest content
200
- function formatDigest(matches, highlights, timeframe) {
201
- let display = '';
202
-
203
- const timeframeName = {
204
- 'daily': 'Daily',
205
- 'fresh': 'Fresh (6h)',
206
- 'weekly': 'Weekly',
207
- 'highlights': 'Community Highlights'
208
- };
209
-
210
- display += `## Your ${timeframeName[timeframe] || 'Daily'} Discovery Digest 📰\n\n`;
211
-
212
- // Connection opportunities
213
- if (matches && matches.length > 0) {
214
- display += `### People You Should Meet 🤝\n\n`;
215
-
216
- for (const match of matches) {
217
- display += `**@${match.handle}** _(${match.score} match)_\n`;
218
- display += `${match.building || 'Building something interesting'}\n`;
219
-
220
- if (match.reasons.length > 0) {
221
- display += `🔗 ${match.reasons.join(' • ')}\n`;
222
- }
223
-
224
- if (match.ships.length > 0) {
225
- display += `🚀 Recently shipped: ${match.ships[0].what}\n`;
226
- }
227
-
228
- display += `_Active: ${formatTimeAgo(match.lastSeen)}_\n\n`;
229
- }
230
-
231
- display += `**Quick actions:**\n`;
232
- display += `• \`dm @${matches[0].handle} "Hey! Saw you're working on..."\`\n`;
233
- display += `• \`discover suggest\` for more recommendations\n\n`;
234
- }
235
-
236
- // Community highlights
237
- if (highlights) {
238
- display += `### Community Pulse 📊\n\n`;
239
- display += `**Active builders:** ${highlights.totalActive}\n`;
240
-
241
- if (highlights.newJoiners.length > 0) {
242
- display += `**New joiners:** ${highlights.newJoiners.map(u => `@${u.handle}`).join(', ')}\n`;
243
- }
244
-
245
- if (highlights.recentShips.length > 0) {
246
- display += `**Recent ships:**\n`;
247
- for (const ship of highlights.recentShips.slice(0, 3)) {
248
- display += `• @${ship.handle}: ${ship.what}\n`;
249
- }
250
- }
251
-
252
- if (highlights.trendingInterests.length > 0) {
253
- display += `**Trending:** ${highlights.trendingInterests.slice(0, 3).map(t => t.interest).join(', ')}\n`;
254
- }
255
-
256
- display += `\n`;
257
- }
258
-
259
- // Empty state
260
- if ((!matches || matches.length === 0) && (!highlights || highlights.totalActive === 0)) {
261
- display += `_Quiet period in the community._\n\n`;
262
- display += `**While you wait:**\n`;
263
- display += `• Update your profile: \`update building "what you're working on"\`\n`;
264
- display += `• Browse all members: \`discover interests\`\n`;
265
- display += `• Check the board: \`board\`\n`;
266
- }
267
-
268
- return display;
269
- }
270
-
271
- async function handler(args) {
272
- const initCheck = requireInit();
273
- if (initCheck) return initCheck;
274
-
275
- const myHandle = config.getHandle();
276
- const timeframe = args.timeframe || 'daily';
277
-
278
- let display = '';
279
-
280
- try {
281
- if (timeframe === 'highlights') {
282
- // Community highlights only
283
- const highlights = await getCommunityHighlights('daily');
284
- display = formatDigest(null, highlights, timeframe);
285
- } else {
286
- // Full digest with personalized recommendations
287
- const [matches, highlights] = await Promise.all([
288
- generatePersonalDigest(myHandle, timeframe),
289
- getCommunityHighlights(timeframe)
290
- ]);
291
-
292
- display = formatDigest(matches, highlights, timeframe);
293
- }
294
-
295
- // Add footer with next steps
296
- display += `---\n\n`;
297
- display += `**More discovery options:**\n`;
298
- display += `• \`discovery-digest fresh\` — Last 6 hours only\n`;
299
- display += `• \`discovery-digest weekly\` — Extended weekly digest\n`;
300
- display += `• \`workshop-buddy find\` — Find collaboration partners\n`;
301
- display += `• \`skills-exchange browse\` — Skills marketplace\n`;
302
-
303
- } catch (error) {
304
- display = `## Discovery Digest Error\n\n${error.message}\n\n`;
305
- display += `**Try:**\n`;
306
- display += `• \`discovery-digest\` — Basic daily digest\n`;
307
- display += `• \`discover suggest\` — Simple recommendations\n`;
308
- display += `• \`who\` — See who's online now`;
309
- }
310
-
311
- return { display };
312
- }
313
-
314
- module.exports = { definition, handler };