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
package/tools/_actions.js CHANGED
@@ -11,17 +11,18 @@
11
11
  */
12
12
 
13
13
  const config = require('../config');
14
+ const { debug } = require('./_shared');
14
15
 
15
16
  // Discovery-specific actions
16
17
  async function suggest_connection(from, to, reason) {
17
18
  try {
18
19
  const userProfiles = require('../store/profiles');
19
20
  await userProfiles.recordConnection(from, to, reason);
20
-
21
+
21
22
  // You could also send a notification here
22
23
  return { success: true, from, to, reason };
23
24
  } catch (error) {
24
- console.warn(`Failed to suggest connection ${from} -> ${to}:`, error.message);
25
+ debug('actions', `Failed to suggest connection ${from} -> ${to}:`, error.message);
25
26
  return { success: false, error: error.message };
26
27
  }
27
28
  }
@@ -30,13 +31,13 @@ async function dm_user(handle, message) {
30
31
  try {
31
32
  const store = require('../store');
32
33
  const timestamp = Date.now();
33
-
34
+
34
35
  // Store the message
35
36
  await store.storeDM('discovery-agent', handle, message, timestamp);
36
-
37
+
37
38
  return { success: true, to: handle, message };
38
39
  } catch (error) {
39
- console.warn(`Failed to DM ${handle}:`, error.message);
40
+ debug('actions', `Failed to DM ${handle}:`, error.message);
40
41
  return { success: false, error: error.message };
41
42
  }
42
43
  }
@@ -45,21 +46,9 @@ async function dm_user(handle, message) {
45
46
  const actions = {
46
47
  // After vibe_start or vibe_who
47
48
  dashboard: (context = {}) => {
48
- const { unreadCount = 0, onlineUsers = [], suggestion, workContext } = context;
49
+ const { unreadCount = 0, onlineUsers = [], suggestion } = context;
49
50
  const result = [];
50
51
 
51
- // Priority 0: If we have work context, offer to share it
52
- if (workContext?.summary) {
53
- const shortSummary = workContext.summary.length > 40
54
- ? workContext.summary.slice(0, 40) + '...'
55
- : workContext.summary;
56
- result.push({
57
- label: `Share: "${shortSummary}"`,
58
- description: 'Post what you\'re working on',
59
- command: `ship: ${workContext.summary}`
60
- });
61
- }
62
-
63
52
  // Priority 1: Unread messages
64
53
  if (unreadCount > 0) {
65
54
  result.push({
@@ -71,12 +60,13 @@ const actions = {
71
60
 
72
61
  // Priority 2: Suggested connection
73
62
  if (suggestion) {
74
- const reason = {
75
- just_joined: 'just joined',
76
- shipping: 'is shipping',
77
- needs_help: 'might need help',
78
- active_now: 'is active'
79
- }[suggestion.reason] || 'is around';
63
+ const reason =
64
+ {
65
+ just_joined: 'just joined',
66
+ shipping: 'is shipping',
67
+ needs_help: 'might need help',
68
+ active_now: 'is active'
69
+ }[suggestion.reason] || 'is around';
80
70
 
81
71
  result.push({
82
72
  label: `Message @${suggestion.handle}`,
@@ -104,7 +94,7 @@ const actions = {
104
94
 
105
95
  result.push({
106
96
  label: 'Share context',
107
- description: 'Show what you\'re working on',
97
+ description: "Show what you're working on",
108
98
  command: 'share my context'
109
99
  });
110
100
 
@@ -173,11 +163,11 @@ const actions = {
173
163
  // Profile setup actions
174
164
  profileSetup: (currentProfile = {}) => {
175
165
  const result = [];
176
-
166
+
177
167
  if (!currentProfile.building) {
178
168
  result.push({
179
169
  label: 'Add project',
180
- description: 'Share what you\'re building',
170
+ description: "Share what you're building",
181
171
  command: 'update building'
182
172
  });
183
173
  }
@@ -209,7 +199,7 @@ const actions = {
209
199
  },
210
200
 
211
201
  // When welcoming new users
212
- welcome: (handle) => [
202
+ welcome: handle => [
213
203
  {
214
204
  label: 'Set up profile',
215
205
  description: 'Add interests and skills for better matches',
@@ -227,18 +217,13 @@ const actions = {
227
217
  },
228
218
  {
229
219
  label: 'Join conversation',
230
- description: 'See who\'s online now',
220
+ description: "See who's online now",
231
221
  command: 'who'
232
222
  }
233
223
  ],
234
224
 
235
225
  // After sending a DM
236
- afterDm: (handle) => [
237
- {
238
- label: 'Reply + tip $1',
239
- description: `Send reply with $1 USDC tip to @${handle}`,
240
- command: `reply @${handle} with tip`
241
- },
226
+ afterDm: handle => [
242
227
  {
243
228
  label: 'Send another',
244
229
  description: `Continue conversation with @${handle}`,
@@ -250,28 +235,9 @@ const actions = {
250
235
  command: `react to @${handle}`
251
236
  },
252
237
  {
253
- label: 'Find more people',
254
- description: 'Discover other connections',
255
- command: 'discover suggest'
256
- }
257
- ],
258
-
259
- // After sending a tip
260
- afterTip: (handle) => [
261
- {
262
- label: 'Send message',
263
- description: `Message @${handle}`,
264
- command: `message @${handle}`
265
- },
266
- {
267
- label: 'Tip again',
268
- description: `Send another tip to @${handle}`,
269
- command: `tip @${handle}`
270
- },
271
- {
272
- label: 'View their work',
273
- description: `See @${handle}'s proof of work`,
274
- command: `show proof of work for @${handle}`
238
+ label: 'Remember something',
239
+ description: `Save a note about @${handle}`,
240
+ command: `remember something about @${handle}`
275
241
  },
276
242
  {
277
243
  label: 'Find more people',
@@ -280,110 +246,6 @@ const actions = {
280
246
  }
281
247
  ],
282
248
 
283
- // After viewing a ship in the feed
284
- afterShipView: (ship) => {
285
- const author = ship?.author || 'creator';
286
- return [
287
- {
288
- label: 'Tip $1 for this ship',
289
- description: `Thank @${author} for shipping`,
290
- command: `tip @${author} 1 for ship`
291
- },
292
- {
293
- label: `Message @${author}`,
294
- description: 'Start a conversation',
295
- command: `message @${author}`
296
- },
297
- {
298
- label: 'React 🔥',
299
- description: 'Show some love',
300
- command: `react fire to @${author}`
301
- },
302
- {
303
- label: 'See more ships',
304
- description: 'Browse the feed',
305
- command: 'show the feed'
306
- }
307
- ];
308
- },
309
-
310
- // After viewing someone's proof-of-work profile
311
- afterProofOfWork: (handle, isSelf = false) => {
312
- if (isSelf) {
313
- return [
314
- {
315
- label: 'Post a ship',
316
- description: 'Share what you\'re building',
317
- command: 'ship something'
318
- },
319
- {
320
- label: 'Browse gigs',
321
- description: 'Find work opportunities',
322
- command: 'browse gigs'
323
- },
324
- {
325
- label: 'Set availability',
326
- description: 'Update your hire status',
327
- command: 'update availability'
328
- },
329
- {
330
- label: 'View earnings',
331
- description: 'Check your earnings dashboard',
332
- command: 'show my earnings'
333
- }
334
- ];
335
- }
336
- return [
337
- {
338
- label: `Tip @${handle}`,
339
- description: 'Send a tip to support their work',
340
- command: `tip @${handle}`
341
- },
342
- {
343
- label: `Message @${handle}`,
344
- description: 'Start a conversation',
345
- command: `message @${handle}`
346
- },
347
- {
348
- label: 'View their ships',
349
- description: `See what @${handle} has shipped`,
350
- command: `show feed from @${handle}`
351
- },
352
- {
353
- label: 'Find similar builders',
354
- description: 'Discover people like them',
355
- command: 'discover suggest'
356
- }
357
- ];
358
- },
359
-
360
- // After completing a gig
361
- afterGigComplete: (gig) => {
362
- const worker = gig?.hired_handle || 'worker';
363
- return [
364
- {
365
- label: 'Add $5 bonus tip',
366
- description: `Extra thanks to @${worker} for great work`,
367
- command: `tip @${worker} 5 gig bonus`
368
- },
369
- {
370
- label: `Message @${worker}`,
371
- description: 'Send a thank you message',
372
- command: `message @${worker}`
373
- },
374
- {
375
- label: 'Post another gig',
376
- description: 'Create a new gig listing',
377
- command: 'post a gig'
378
- },
379
- {
380
- label: 'Browse gigs',
381
- description: 'See other opportunities',
382
- command: 'browse gigs'
383
- }
384
- ];
385
- },
386
-
387
249
  // After checking inbox
388
250
  afterInbox: (threads = []) => {
389
251
  const result = [];
@@ -415,9 +277,9 @@ const actions = {
415
277
  });
416
278
 
417
279
  result.push({
418
- label: 'Who\'s online',
419
- description: 'See who\'s building right now',
420
- command: 'who\'s around'
280
+ label: "Who's online",
281
+ description: "See who's building right now",
282
+ command: "who's around"
421
283
  });
422
284
 
423
285
  return result.slice(0, 4);
@@ -456,54 +318,28 @@ const actions = {
456
318
  },
457
319
 
458
320
  // When room is empty
459
- emptyRoom: (context = {}) => {
460
- const { workContext } = context;
461
- const result = [];
462
-
463
- // If we have work context, lead with "share your progress"
464
- if (workContext?.summary) {
465
- const shortSummary = workContext.summary.length > 40
466
- ? workContext.summary.slice(0, 40) + '...'
467
- : workContext.summary;
468
- result.push({
469
- label: `Ship: "${shortSummary}"`,
470
- description: 'Share your progress to the board',
471
- command: `ship: ${workContext.summary}`
472
- });
473
- }
474
-
475
- result.push({
321
+ emptyRoom: () => [
322
+ {
476
323
  label: 'Find your people',
477
324
  description: 'Discover builders with similar interests',
478
325
  command: 'discover suggest'
479
- });
480
-
481
- // Only show "Set up profile" if we didn't already add work context
482
- if (!workContext?.summary) {
483
- result.push({
484
- label: 'Set up profile',
485
- description: 'Add interests to get matched',
486
- command: 'update my profile'
487
- });
488
- }
489
-
490
- result.push({
326
+ },
327
+ {
328
+ label: 'Set up profile',
329
+ description: 'Add interests to get matched',
330
+ command: 'update my profile'
331
+ },
332
+ {
491
333
  label: 'Invite someone',
492
334
  description: 'Generate a shareable invite link',
493
335
  command: 'generate invite link'
494
- });
495
-
496
- // Only add generic "Post to board" if we don't have specific work context
497
- if (!workContext?.summary) {
498
- result.push({
499
- label: 'Post to board',
500
- description: 'Share what you\'re building',
501
- command: 'post to the vibe board'
502
- });
336
+ },
337
+ {
338
+ label: 'Post to board',
339
+ description: "Share what you're building",
340
+ command: 'post to the vibe board'
503
341
  }
504
-
505
- return result.slice(0, 4);
506
- },
342
+ ],
507
343
 
508
344
  // When inbox is empty (all caught up) - RETENTION OPTIMIZED
509
345
  emptyInbox: (context = {}) => {
@@ -528,7 +364,7 @@ const actions = {
528
364
  });
529
365
  } else {
530
366
  result.push({
531
- label: 'See what\'s happening',
367
+ label: "See what's happening",
532
368
  description: 'Check the ship board',
533
369
  command: 'show the feed'
534
370
  });
@@ -564,7 +400,7 @@ const actions = {
564
400
  newUser: () => [
565
401
  {
566
402
  label: 'Check messages (Recommended)',
567
- description: '@seth sent you a personalized welcome!',
403
+ description: '@vibe sent you a personalized welcome!',
568
404
  command: 'check my messages'
569
405
  },
570
406
  {
@@ -573,7 +409,7 @@ const actions = {
573
409
  command: 'discover suggest'
574
410
  },
575
411
  {
576
- label: 'Share what you\'re shipping',
412
+ label: "Share what you're shipping",
577
413
  description: 'Post to the ship board',
578
414
  command: 'post to the vibe board'
579
415
  }
@@ -603,60 +439,11 @@ const actions = {
603
439
  }
604
440
  ],
605
441
 
606
- // Recommended connections for empty inbox (personalized message options)
607
- // matches should include: handle, building, reasons, statusIcon, statusLabel
608
- recommendedConnections: (matches = []) => {
609
- const result = [];
610
-
611
- // Top 3 matches become direct "Message @person" options
612
- matches.slice(0, 3).forEach(match => {
613
- // Build rich description: status + building + reason
614
- const parts = [];
615
-
616
- // Status (e.g., "🔥 shipping")
617
- if (match.statusIcon && match.statusLabel) {
618
- parts.push(`${match.statusIcon} ${match.statusLabel}`);
619
- }
620
-
621
- // Building (e.g., "Building AI code reviewer")
622
- if (match.building) {
623
- const shortBuilding = match.building.length > 35
624
- ? match.building.slice(0, 35) + '...'
625
- : match.building;
626
- parts.push(`"${shortBuilding}"`);
627
- }
628
-
629
- // First reason (e.g., "Shared interest: AI")
630
- if (match.reasons?.[0]) {
631
- parts.push(match.reasons[0]);
632
- }
633
-
634
- const description = parts.length > 0
635
- ? parts.join(' • ')
636
- : 'Connect with them';
637
-
638
- result.push({
639
- label: `Message @${match.handle}`,
640
- description,
641
- command: `message @${match.handle}`
642
- });
643
- });
644
-
645
- // 4th option: Discover more people
646
- result.push({
647
- label: 'Discover more people',
648
- description: 'See more recommendations',
649
- command: 'discover suggest'
650
- });
651
-
652
- return result.slice(0, 4);
653
- },
654
-
655
442
  // Reaction selection
656
- reactionOptions: (handle) => [
443
+ reactionOptions: handle => [
657
444
  {
658
445
  label: 'Fire',
659
- description: 'That\'s awesome',
446
+ description: "That's awesome",
660
447
  command: `react fire to @${handle}`
661
448
  },
662
449
  {
@@ -674,133 +461,7 @@ const actions = {
674
461
  description: 'Smart thinking',
675
462
  command: `react brain to @${handle}`
676
463
  }
677
- ],
678
-
679
- // After opening a thread - smart pre-drafted replies
680
- // Takes the last message from the other person and generates contextual reply options
681
- afterOpenThread: (handle, lastMessage = '', context = {}) => {
682
- const result = [];
683
- const msg = (lastMessage || '').toLowerCase();
684
-
685
- // Detect message tone/type and generate appropriate replies
686
- const isQuestion = msg.includes('?') ||
687
- msg.startsWith('what') ||
688
- msg.startsWith('how') ||
689
- msg.startsWith('can you') ||
690
- msg.startsWith('could you') ||
691
- msg.startsWith('do you') ||
692
- msg.startsWith('would you');
693
-
694
- const isShipping = msg.includes('shipped') ||
695
- msg.includes('deployed') ||
696
- msg.includes('launched') ||
697
- msg.includes('just pushed') ||
698
- msg.includes('it\'s live') ||
699
- msg.includes('check out') ||
700
- msg.includes('built');
701
-
702
- const isOfferingHelp = msg.includes('let me know') ||
703
- msg.includes('i can help') ||
704
- msg.includes('happy to') ||
705
- msg.includes('i\'ll handle');
706
-
707
- const isAskingForHelp = msg.includes('help') ||
708
- msg.includes('stuck') ||
709
- msg.includes('issue') ||
710
- msg.includes('problem') ||
711
- msg.includes('bug');
712
-
713
- const isUpdate = msg.includes('update') ||
714
- msg.includes('progress') ||
715
- msg.includes('working on') ||
716
- msg.includes('gonna') ||
717
- msg.includes('going to');
718
-
719
- // Generate 2 contextual reply drafts based on tone
720
- // Command format: "reply @handle: <message>" triggers compose flow
721
- if (isQuestion) {
722
- // They asked a question - suggest helpful answers
723
- result.push({
724
- label: '"Yeah, happy to help with that!"',
725
- description: 'Positive response',
726
- command: `reply @${handle}: Yeah, happy to help with that!`
727
- });
728
- result.push({
729
- label: '"Let me look into it and get back to you"',
730
- description: 'Need time to check',
731
- command: `reply @${handle}: Let me look into it and get back to you`
732
- });
733
- } else if (isShipping) {
734
- // They shipped something - celebrate!
735
- result.push({
736
- label: '"Nice! 🚀 Congrats on shipping!"',
737
- description: 'Celebrate their ship',
738
- command: `reply @${handle}: Nice! 🚀 Congrats on shipping!`
739
- });
740
- result.push({
741
- label: '"That\'s awesome, checking it out now!"',
742
- description: 'Show interest',
743
- command: `reply @${handle}: That's awesome, checking it out now!`
744
- });
745
- } else if (isOfferingHelp) {
746
- // They're offering to help - accept gracefully
747
- result.push({
748
- label: '"Perfect, thanks for taking that on! 🙌"',
749
- description: 'Accept their help',
750
- command: `reply @${handle}: Perfect, thanks for taking that on! 🙌`
751
- });
752
- result.push({
753
- label: '"Appreciate it! LMK if you need anything from me"',
754
- description: 'Grateful + offer support back',
755
- command: `reply @${handle}: Appreciate it! LMK if you need anything from me`
756
- });
757
- } else if (isAskingForHelp) {
758
- // They need help - offer assistance
759
- result.push({
760
- label: '"I can take a look - what have you tried?"',
761
- description: 'Offer to help',
762
- command: `reply @${handle}: I can take a look - what have you tried so far?`
763
- });
764
- result.push({
765
- label: '"Want to hop on a quick call to debug?"',
766
- description: 'Offer pairing session',
767
- command: `reply @${handle}: Want to hop on a quick call to debug together?`
768
- });
769
- } else if (isUpdate) {
770
- // General update - acknowledge
771
- result.push({
772
- label: '"Sounds good, thanks for the update!"',
773
- description: 'Acknowledge',
774
- command: `reply @${handle}: Sounds good, thanks for the update!`
775
- });
776
- result.push({
777
- label: '"Nice! LMK if you need anything"',
778
- description: 'Supportive acknowledgment',
779
- command: `reply @${handle}: Nice! LMK if you need anything`
780
- });
781
- } else {
782
- // Default fallback - general positive responses
783
- result.push({
784
- label: '"Sounds good! 👍"',
785
- description: 'Quick acknowledgment',
786
- command: `reply @${handle}: Sounds good! 👍`
787
- });
788
- result.push({
789
- label: '"Thanks for letting me know!"',
790
- description: 'Grateful response',
791
- command: `reply @${handle}: Thanks for letting me know!`
792
- });
793
- }
794
-
795
- // 3rd option: escape to something else (feed or discover)
796
- result.push({
797
- label: 'Browse the feed',
798
- description: 'See what people are shipping',
799
- command: 'show the feed'
800
- });
801
-
802
- return result.slice(0, 3);
803
- }
464
+ ]
804
465
  };
805
466
 
806
467
  // Format actions for the response object
@@ -821,4 +482,4 @@ function formatActions(actionList) {
821
482
  };
822
483
  }
823
484
 
824
- module.exports = { actions, formatActions, suggest_connection, dm_user };
485
+ module.exports = { actions, formatActions, suggest_connection, dm_user };