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.
- package/LICENSE +21 -0
- package/README.md +280 -47
- package/config.js +36 -31
- package/crypto.js +1 -6
- package/discord.js +19 -19
- package/index.js +217 -207
- package/intelligence/index.js +2 -9
- package/intelligence/infer.js +10 -16
- package/intelligence/patterns.js +23 -18
- package/intelligence/proactive.js +16 -15
- package/intelligence/serendipity.js +57 -20
- package/memory.js +13 -8
- package/notify.js +39 -14
- package/package.json +27 -20
- package/presence.js +2 -2
- package/prompts.js +5 -9
- package/protocol/index.js +123 -87
- package/protocol/telegram-commands.js +36 -37
- package/store/api.js +358 -529
- package/store/local.js +9 -10
- package/store/profiles.js +48 -192
- package/store/reservations.js +2 -9
- package/store/skills.js +69 -71
- package/store/sqlite.js +355 -0
- package/tools/_actions.js +48 -387
- package/tools/_connection-queue.js +45 -56
- package/tools/_discovery-enhanced.js +52 -57
- package/tools/_discovery.js +87 -185
- package/tools/{l2-status.js → _experimental/l2-status.js} +68 -70
- package/tools/{shipback.js → _experimental/shipback.js} +4 -3
- package/tools/_proactive-discovery.js +60 -73
- package/tools/_shared/index.js +41 -64
- package/tools/admin-inbox.js +10 -15
- package/tools/agents.js +1 -1
- package/tools/artifact-create.js +13 -23
- package/tools/artifact-view.js +4 -4
- package/tools/{_deprecated/back.js → back.js} +1 -1
- package/tools/bye.js +3 -5
- package/tools/consent.js +2 -2
- package/tools/context.js +9 -10
- package/tools/crossword.js +3 -2
- package/tools/discover.js +94 -356
- package/tools/dm.js +27 -86
- package/tools/doctor.js +12 -41
- package/tools/drawing.js +34 -20
- package/tools/echo.js +11 -11
- package/tools/feed.js +30 -58
- package/tools/follow.js +64 -187
- package/tools/{_deprecated/forget.js → forget.js} +4 -7
- package/tools/game.js +144 -48
- package/tools/handoff.js +6 -8
- package/tools/help.js +3 -3
- package/tools/idea.js +15 -27
- package/tools/inbox.js +121 -293
- package/tools/init.js +54 -151
- package/tools/invite.js +8 -21
- package/tools/migrate.js +27 -24
- package/tools/multiplayer-game.js +50 -40
- package/tools/{_deprecated/mute.js → mute.js} +4 -3
- package/tools/notifications.js +58 -48
- package/tools/observe.js +12 -15
- package/tools/onboarding.js +8 -11
- package/tools/open.js +13 -144
- package/tools/party-game.js +23 -12
- package/tools/patterns.js +2 -1
- package/tools/ping.js +5 -7
- package/tools/react.js +28 -30
- package/tools/{_deprecated/recall.js → recall.js} +5 -10
- package/tools/release.js +4 -2
- package/tools/{_deprecated/remember.js → remember.js} +4 -6
- package/tools/report.js +2 -2
- package/tools/request.js +6 -26
- package/tools/reserve.js +1 -1
- package/tools/session-fork.js +97 -0
- package/tools/session-save.js +109 -0
- package/tools/settings.js +30 -99
- package/tools/ship.js +74 -56
- package/tools/{_deprecated/skills-exchange.js → skills-exchange.js} +38 -39
- package/tools/social-inbox.js +22 -28
- package/tools/social-post.js +24 -27
- package/tools/solo-game.js +54 -46
- package/tools/start.js +14 -148
- package/tools/status.js +21 -68
- package/tools/submit.js +4 -2
- package/tools/suggest-tags.js +36 -33
- package/tools/summarize.js +19 -16
- package/tools/tag-suggestions.js +72 -73
- package/tools/test.js +1 -1
- package/tools/{_deprecated/tictactoe.js → tictactoe.js} +26 -26
- package/tools/token.js +4 -4
- package/tools/update.js +1 -2
- package/tools/watch.js +132 -112
- package/tools/who.js +20 -40
- package/tools/{_deprecated/wordassociation.js → wordassociation.js} +23 -20
- package/tools/workshop-buddy.js +52 -53
- package/tools/x-mentions.js +0 -1
- package/tools/x-reply.js +0 -1
- package/twitter.js +14 -20
- package/version.json +8 -10
- package/analytics.js +0 -107
- package/auth-store.js +0 -148
- package/auto-update.js +0 -130
- package/bridges/bridge-monitor.js +0 -388
- package/bridges/discord-bot.js +0 -431
- package/bridges/farcaster.js +0 -299
- package/bridges/telegram.js +0 -261
- package/bridges/webhook-health.js +0 -420
- package/bridges/webhook-server.js +0 -437
- package/bridges/whatsapp.js +0 -441
- package/bridges/x-webhook.js +0 -423
- package/games/arcade.js +0 -406
- package/games/chess.js +0 -451
- package/games/colorguess.js +0 -343
- package/games/crossword-words.js +0 -171
- package/games/crossword.js +0 -461
- package/games/drawing.js +0 -347
- package/games/gameroulette.js +0 -300
- package/games/gamerouter.js +0 -336
- package/games/gamestatus.js +0 -337
- package/games/guessnumber.js +0 -209
- package/games/hangman.js +0 -279
- package/games/memory.js +0 -338
- package/games/multiplayer-tictactoe.js +0 -389
- package/games/pixelart.js +0 -399
- package/games/quickduel.js +0 -354
- package/games/riddle.js +0 -371
- package/games/rockpaperscissors.js +0 -291
- package/games/snake.js +0 -406
- package/games/storybuilder.js +0 -343
- package/games/tictactoe.js +0 -345
- package/games/twentyquestions.js +0 -286
- package/games/twotruths.js +0 -207
- package/games/werewolf.js +0 -508
- package/games/wordassociation.js +0 -247
- package/games/wordchain.js +0 -135
- package/intelligence/interests.js +0 -369
- package/notification-emitter.js +0 -77
- package/setup.js +0 -480
- package/smart-inbox.js +0 -276
- package/tools/_deprecated/auto-suggest-connections.js +0 -304
- package/tools/_deprecated/bootstrap-skills.js +0 -231
- package/tools/_deprecated/bridge-dashboard.js +0 -342
- package/tools/_deprecated/bridge-health.js +0 -400
- package/tools/_deprecated/bridge-live.js +0 -384
- package/tools/_deprecated/bridges.js +0 -383
- package/tools/_deprecated/colorguess.js +0 -281
- package/tools/_deprecated/discover-insights.js +0 -379
- package/tools/_deprecated/discover-momentum.js +0 -256
- package/tools/_deprecated/discovery-analytics.js +0 -345
- package/tools/_deprecated/discovery-auto-suggest.js +0 -275
- package/tools/_deprecated/discovery-bootstrap.js +0 -267
- package/tools/_deprecated/discovery-daily.js +0 -375
- package/tools/_deprecated/discovery-dashboard.js +0 -385
- package/tools/_deprecated/discovery-digest.js +0 -314
- package/tools/_deprecated/discovery-hub.js +0 -357
- package/tools/_deprecated/discovery-insights.js +0 -384
- package/tools/_deprecated/discovery-momentum.js +0 -281
- package/tools/_deprecated/discovery-monitor.js +0 -319
- package/tools/_deprecated/discovery-proactive.js +0 -300
- package/tools/_deprecated/draw.js +0 -317
- package/tools/_deprecated/farcaster.js +0 -307
- package/tools/_deprecated/games-catalog.js +0 -376
- package/tools/_deprecated/games.js +0 -313
- package/tools/_deprecated/guessnumber.js +0 -194
- package/tools/_deprecated/hangman.js +0 -129
- package/tools/_deprecated/multiplayer-tictactoe.js +0 -303
- package/tools/_deprecated/riddle.js +0 -240
- package/tools/_deprecated/run-bootstrap.js +0 -69
- package/tools/_deprecated/skills-analytics.js +0 -349
- package/tools/_deprecated/skills-bootstrap.js +0 -301
- package/tools/_deprecated/skills-dashboard.js +0 -268
- package/tools/_deprecated/skills.js +0 -380
- package/tools/_deprecated/smart-intro.js +0 -353
- package/tools/_deprecated/storybuilder.js +0 -331
- package/tools/_deprecated/telegram-bot.js +0 -183
- package/tools/_deprecated/telegram-setup.js +0 -214
- package/tools/_deprecated/twentyquestions.js +0 -143
- package/tools/_shared.js +0 -234
- package/tools/_work-context.js +0 -338
- package/tools/_work-context.manual-test.js +0 -199
- package/tools/_work-context.test.js +0 -260
- package/tools/activity.js +0 -220
- package/tools/agent-treasury.js +0 -288
- package/tools/analytics.js +0 -191
- package/tools/approve.js +0 -197
- package/tools/arcade.js +0 -173
- package/tools/artifacts-price.js +0 -107
- package/tools/ask-expert.js +0 -160
- package/tools/available.js +0 -120
- package/tools/become-expert.js +0 -150
- package/tools/broadcast.js +0 -325
- package/tools/chat.js +0 -202
- package/tools/collaborative-drawing.js +0 -286
- package/tools/connection-status.js +0 -178
- package/tools/earnings.js +0 -126
- package/tools/friends.js +0 -207
- package/tools/genesis.js +0 -233
- package/tools/gig-browse.js +0 -206
- package/tools/gig-complete.js +0 -144
- package/tools/health.js +0 -87
- package/tools/leaderboard.js +0 -117
- package/tools/lib/git-apply.js +0 -206
- package/tools/lib/git-bundle.js +0 -407
- package/tools/mint.js +0 -377
- package/tools/plan.js +0 -225
- package/tools/profile.js +0 -219
- package/tools/proof-of-work.js +0 -144
- package/tools/pulse.js +0 -218
- package/tools/reply.js +0 -166
- package/tools/reputation.js +0 -175
- package/tools/schedule.js +0 -367
- package/tools/search-messages.js +0 -123
- package/tools/session.js +0 -467
- package/tools/session_price.js +0 -128
- package/tools/smart-check.js +0 -201
- package/tools/social-processor.js +0 -445
- package/tools/streak.js +0 -147
- package/tools/stuck.js +0 -297
- package/tools/subscribe.js +0 -148
- package/tools/subscriptions.js +0 -134
- package/tools/tip.js +0 -193
- package/tools/wallet.js +0 -269
- package/tools/webhook-test.js +0 -388
- package/tools/withdraw.js +0 -145
- package/tools/work-summary.js +0 -96
- package/tools/workshop.js +0 -327
- /package/tools/{l2-bridge.js → _experimental/l2-bridge.js} +0 -0
- /package/tools/{l2.js → _experimental/l2.js} +0 -0
- /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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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: '
|
|
254
|
-
description:
|
|
255
|
-
command:
|
|
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:
|
|
419
|
-
description:
|
|
420
|
-
command:
|
|
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: (
|
|
460
|
-
|
|
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
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
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
|
-
|
|
497
|
-
|
|
498
|
-
|
|
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:
|
|
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: '@
|
|
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:
|
|
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:
|
|
443
|
+
reactionOptions: handle => [
|
|
657
444
|
{
|
|
658
445
|
label: 'Fire',
|
|
659
|
-
description:
|
|
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 };
|