slashvibe-mcp 0.3.21 → 0.3.22

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 (229) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +280 -47
  3. package/config.js +36 -31
  4. package/crypto.js +1 -6
  5. package/discord.js +19 -19
  6. package/index.js +217 -207
  7. package/intelligence/index.js +2 -9
  8. package/intelligence/infer.js +10 -16
  9. package/intelligence/patterns.js +23 -18
  10. package/intelligence/proactive.js +16 -15
  11. package/intelligence/serendipity.js +57 -20
  12. package/memory.js +13 -8
  13. package/notify.js +39 -14
  14. package/package.json +27 -20
  15. package/presence.js +2 -2
  16. package/prompts.js +5 -9
  17. package/protocol/index.js +123 -87
  18. package/protocol/telegram-commands.js +36 -37
  19. package/store/api.js +358 -529
  20. package/store/local.js +9 -10
  21. package/store/profiles.js +48 -192
  22. package/store/reservations.js +2 -9
  23. package/store/skills.js +69 -71
  24. package/store/sqlite.js +355 -0
  25. package/tools/_actions.js +48 -387
  26. package/tools/_connection-queue.js +45 -56
  27. package/tools/_discovery-enhanced.js +52 -57
  28. package/tools/_discovery.js +87 -185
  29. package/tools/{l2-status.js → _experimental/l2-status.js} +68 -70
  30. package/tools/{shipback.js → _experimental/shipback.js} +4 -3
  31. package/tools/_proactive-discovery.js +60 -73
  32. package/tools/_shared/index.js +41 -64
  33. package/tools/admin-inbox.js +10 -15
  34. package/tools/agents.js +1 -1
  35. package/tools/artifact-create.js +13 -23
  36. package/tools/artifact-view.js +4 -4
  37. package/tools/{_deprecated/back.js → back.js} +1 -1
  38. package/tools/bye.js +3 -5
  39. package/tools/consent.js +2 -2
  40. package/tools/context.js +9 -10
  41. package/tools/crossword.js +3 -2
  42. package/tools/discover.js +94 -356
  43. package/tools/dm.js +27 -86
  44. package/tools/doctor.js +12 -41
  45. package/tools/drawing.js +34 -20
  46. package/tools/echo.js +11 -11
  47. package/tools/feed.js +30 -58
  48. package/tools/follow.js +64 -187
  49. package/tools/{_deprecated/forget.js → forget.js} +4 -7
  50. package/tools/game.js +144 -48
  51. package/tools/handoff.js +6 -8
  52. package/tools/help.js +3 -3
  53. package/tools/idea.js +15 -27
  54. package/tools/inbox.js +121 -293
  55. package/tools/init.js +54 -151
  56. package/tools/invite.js +8 -21
  57. package/tools/migrate.js +27 -24
  58. package/tools/multiplayer-game.js +50 -40
  59. package/tools/{_deprecated/mute.js → mute.js} +4 -3
  60. package/tools/notifications.js +58 -48
  61. package/tools/observe.js +12 -15
  62. package/tools/onboarding.js +8 -11
  63. package/tools/open.js +13 -144
  64. package/tools/party-game.js +23 -12
  65. package/tools/patterns.js +2 -1
  66. package/tools/ping.js +5 -7
  67. package/tools/react.js +28 -30
  68. package/tools/{_deprecated/recall.js → recall.js} +5 -10
  69. package/tools/release.js +4 -2
  70. package/tools/{_deprecated/remember.js → remember.js} +4 -6
  71. package/tools/report.js +2 -2
  72. package/tools/request.js +6 -26
  73. package/tools/reserve.js +1 -1
  74. package/tools/session-fork.js +97 -0
  75. package/tools/session-save.js +109 -0
  76. package/tools/settings.js +30 -99
  77. package/tools/ship.js +74 -56
  78. package/tools/{_deprecated/skills-exchange.js → skills-exchange.js} +38 -39
  79. package/tools/social-inbox.js +22 -28
  80. package/tools/social-post.js +24 -27
  81. package/tools/solo-game.js +54 -46
  82. package/tools/start.js +14 -148
  83. package/tools/status.js +21 -68
  84. package/tools/submit.js +4 -2
  85. package/tools/suggest-tags.js +36 -33
  86. package/tools/summarize.js +19 -16
  87. package/tools/tag-suggestions.js +72 -73
  88. package/tools/test.js +1 -1
  89. package/tools/{_deprecated/tictactoe.js → tictactoe.js} +26 -26
  90. package/tools/token.js +4 -4
  91. package/tools/update.js +1 -2
  92. package/tools/watch.js +132 -112
  93. package/tools/who.js +20 -40
  94. package/tools/{_deprecated/wordassociation.js → wordassociation.js} +23 -20
  95. package/tools/workshop-buddy.js +52 -53
  96. package/tools/x-mentions.js +0 -1
  97. package/tools/x-reply.js +0 -1
  98. package/twitter.js +14 -20
  99. package/version.json +8 -10
  100. package/analytics.js +0 -107
  101. package/auth-store.js +0 -148
  102. package/auto-update.js +0 -130
  103. package/bridges/bridge-monitor.js +0 -388
  104. package/bridges/discord-bot.js +0 -431
  105. package/bridges/farcaster.js +0 -299
  106. package/bridges/telegram.js +0 -261
  107. package/bridges/webhook-health.js +0 -420
  108. package/bridges/webhook-server.js +0 -437
  109. package/bridges/whatsapp.js +0 -441
  110. package/bridges/x-webhook.js +0 -423
  111. package/games/arcade.js +0 -406
  112. package/games/chess.js +0 -451
  113. package/games/colorguess.js +0 -343
  114. package/games/crossword-words.js +0 -171
  115. package/games/crossword.js +0 -461
  116. package/games/drawing.js +0 -347
  117. package/games/gameroulette.js +0 -300
  118. package/games/gamerouter.js +0 -336
  119. package/games/gamestatus.js +0 -337
  120. package/games/guessnumber.js +0 -209
  121. package/games/hangman.js +0 -279
  122. package/games/memory.js +0 -338
  123. package/games/multiplayer-tictactoe.js +0 -389
  124. package/games/pixelart.js +0 -399
  125. package/games/quickduel.js +0 -354
  126. package/games/riddle.js +0 -371
  127. package/games/rockpaperscissors.js +0 -291
  128. package/games/snake.js +0 -406
  129. package/games/storybuilder.js +0 -343
  130. package/games/tictactoe.js +0 -345
  131. package/games/twentyquestions.js +0 -286
  132. package/games/twotruths.js +0 -207
  133. package/games/werewolf.js +0 -508
  134. package/games/wordassociation.js +0 -247
  135. package/games/wordchain.js +0 -135
  136. package/intelligence/interests.js +0 -369
  137. package/notification-emitter.js +0 -77
  138. package/setup.js +0 -480
  139. package/smart-inbox.js +0 -276
  140. package/tools/_deprecated/auto-suggest-connections.js +0 -304
  141. package/tools/_deprecated/bootstrap-skills.js +0 -231
  142. package/tools/_deprecated/bridge-dashboard.js +0 -342
  143. package/tools/_deprecated/bridge-health.js +0 -400
  144. package/tools/_deprecated/bridge-live.js +0 -384
  145. package/tools/_deprecated/bridges.js +0 -383
  146. package/tools/_deprecated/colorguess.js +0 -281
  147. package/tools/_deprecated/discover-insights.js +0 -379
  148. package/tools/_deprecated/discover-momentum.js +0 -256
  149. package/tools/_deprecated/discovery-analytics.js +0 -345
  150. package/tools/_deprecated/discovery-auto-suggest.js +0 -275
  151. package/tools/_deprecated/discovery-bootstrap.js +0 -267
  152. package/tools/_deprecated/discovery-daily.js +0 -375
  153. package/tools/_deprecated/discovery-dashboard.js +0 -385
  154. package/tools/_deprecated/discovery-digest.js +0 -314
  155. package/tools/_deprecated/discovery-hub.js +0 -357
  156. package/tools/_deprecated/discovery-insights.js +0 -384
  157. package/tools/_deprecated/discovery-momentum.js +0 -281
  158. package/tools/_deprecated/discovery-monitor.js +0 -319
  159. package/tools/_deprecated/discovery-proactive.js +0 -300
  160. package/tools/_deprecated/draw.js +0 -317
  161. package/tools/_deprecated/farcaster.js +0 -307
  162. package/tools/_deprecated/games-catalog.js +0 -376
  163. package/tools/_deprecated/games.js +0 -313
  164. package/tools/_deprecated/guessnumber.js +0 -194
  165. package/tools/_deprecated/hangman.js +0 -129
  166. package/tools/_deprecated/multiplayer-tictactoe.js +0 -303
  167. package/tools/_deprecated/riddle.js +0 -240
  168. package/tools/_deprecated/run-bootstrap.js +0 -69
  169. package/tools/_deprecated/skills-analytics.js +0 -349
  170. package/tools/_deprecated/skills-bootstrap.js +0 -301
  171. package/tools/_deprecated/skills-dashboard.js +0 -268
  172. package/tools/_deprecated/skills.js +0 -380
  173. package/tools/_deprecated/smart-intro.js +0 -353
  174. package/tools/_deprecated/storybuilder.js +0 -331
  175. package/tools/_deprecated/telegram-bot.js +0 -183
  176. package/tools/_deprecated/telegram-setup.js +0 -214
  177. package/tools/_deprecated/twentyquestions.js +0 -143
  178. package/tools/_shared.js +0 -234
  179. package/tools/_work-context.js +0 -338
  180. package/tools/_work-context.manual-test.js +0 -199
  181. package/tools/_work-context.test.js +0 -260
  182. package/tools/activity.js +0 -220
  183. package/tools/agent-treasury.js +0 -288
  184. package/tools/analytics.js +0 -191
  185. package/tools/approve.js +0 -197
  186. package/tools/arcade.js +0 -173
  187. package/tools/artifacts-price.js +0 -107
  188. package/tools/ask-expert.js +0 -160
  189. package/tools/available.js +0 -120
  190. package/tools/become-expert.js +0 -150
  191. package/tools/broadcast.js +0 -325
  192. package/tools/chat.js +0 -202
  193. package/tools/collaborative-drawing.js +0 -286
  194. package/tools/connection-status.js +0 -178
  195. package/tools/earnings.js +0 -126
  196. package/tools/friends.js +0 -207
  197. package/tools/genesis.js +0 -233
  198. package/tools/gig-browse.js +0 -206
  199. package/tools/gig-complete.js +0 -144
  200. package/tools/health.js +0 -87
  201. package/tools/leaderboard.js +0 -117
  202. package/tools/lib/git-apply.js +0 -206
  203. package/tools/lib/git-bundle.js +0 -407
  204. package/tools/mint.js +0 -377
  205. package/tools/plan.js +0 -225
  206. package/tools/profile.js +0 -219
  207. package/tools/proof-of-work.js +0 -144
  208. package/tools/pulse.js +0 -218
  209. package/tools/reply.js +0 -166
  210. package/tools/reputation.js +0 -175
  211. package/tools/schedule.js +0 -367
  212. package/tools/search-messages.js +0 -123
  213. package/tools/session.js +0 -467
  214. package/tools/session_price.js +0 -128
  215. package/tools/smart-check.js +0 -201
  216. package/tools/social-processor.js +0 -445
  217. package/tools/streak.js +0 -147
  218. package/tools/stuck.js +0 -297
  219. package/tools/subscribe.js +0 -148
  220. package/tools/subscriptions.js +0 -134
  221. package/tools/tip.js +0 -193
  222. package/tools/wallet.js +0 -269
  223. package/tools/webhook-test.js +0 -388
  224. package/tools/withdraw.js +0 -145
  225. package/tools/work-summary.js +0 -96
  226. package/tools/workshop.js +0 -327
  227. /package/tools/{l2-bridge.js → _experimental/l2-bridge.js} +0 -0
  228. /package/tools/{l2.js → _experimental/l2.js} +0 -0
  229. /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 };