slashvibe-mcp 0.3.21 → 0.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +280 -47
  3. package/auto-update.js +10 -15
  4. package/config.js +36 -31
  5. package/crypto.js +1 -6
  6. package/debug.js +12 -0
  7. package/discord.js +19 -19
  8. package/eslint.config.js +54 -0
  9. package/index.js +217 -207
  10. package/intelligence/index.js +2 -9
  11. package/intelligence/infer.js +10 -16
  12. package/intelligence/patterns.js +23 -18
  13. package/intelligence/proactive.js +16 -15
  14. package/intelligence/serendipity.js +57 -20
  15. package/memory.js +13 -8
  16. package/migrate-v2.js +72 -0
  17. package/notification-emitter.js +2 -2
  18. package/notify.js +39 -14
  19. package/package.json +28 -29
  20. package/post-install.js +141 -0
  21. package/presence.js +2 -2
  22. package/prompts.js +5 -9
  23. package/protocol/index.js +123 -87
  24. package/protocol/telegram-commands.js +36 -37
  25. package/store/api.js +358 -529
  26. package/store/local.js +9 -10
  27. package/store/profiles.js +48 -192
  28. package/store/reservations.js +2 -9
  29. package/store/skills.js +69 -71
  30. package/store/sqlite.js +355 -0
  31. package/test-skills-bootstrap.js +20 -0
  32. package/test-v2-integration.js +385 -0
  33. package/tools/_actions.js +48 -387
  34. package/tools/_connection-queue.js +45 -56
  35. package/tools/_discovery-enhanced.js +52 -57
  36. package/tools/_discovery.js +87 -185
  37. package/tools/{l2-status.js → _experimental/l2-status.js} +68 -70
  38. package/tools/{shipback.js → _experimental/shipback.js} +4 -3
  39. package/tools/_proactive-discovery.js +60 -73
  40. package/tools/_shared/index.js +41 -64
  41. package/tools/admin-inbox.js +10 -15
  42. package/tools/agents.js +1 -1
  43. package/tools/artifact-create.js +13 -23
  44. package/tools/artifact-view.js +4 -4
  45. package/tools/{_deprecated/back.js → back.js} +1 -1
  46. package/tools/bye.js +3 -5
  47. package/tools/consent.js +2 -2
  48. package/tools/context.js +9 -10
  49. package/tools/crossword.js +3 -2
  50. package/tools/discover.js +94 -356
  51. package/tools/dm.js +27 -86
  52. package/tools/doctor.js +12 -41
  53. package/tools/drawing.js +34 -20
  54. package/tools/echo.js +11 -11
  55. package/tools/feed.js +30 -58
  56. package/tools/follow.js +64 -187
  57. package/tools/{_deprecated/forget.js → forget.js} +4 -7
  58. package/tools/game.js +144 -48
  59. package/tools/handoff.js +6 -8
  60. package/tools/help.js +3 -3
  61. package/tools/idea.js +15 -27
  62. package/tools/inbox.js +121 -293
  63. package/tools/init.js +54 -151
  64. package/tools/invite.js +8 -21
  65. package/tools/migrate.js +27 -24
  66. package/tools/multiplayer-game.js +50 -40
  67. package/tools/{_deprecated/mute.js → mute.js} +4 -3
  68. package/tools/notifications.js +58 -48
  69. package/tools/observe.js +12 -15
  70. package/tools/onboarding.js +8 -11
  71. package/tools/open.js +13 -144
  72. package/tools/party-game.js +23 -12
  73. package/tools/patterns.js +2 -1
  74. package/tools/ping.js +5 -7
  75. package/tools/react.js +28 -30
  76. package/tools/{_deprecated/recall.js → recall.js} +5 -10
  77. package/tools/release.js +4 -2
  78. package/tools/{_deprecated/remember.js → remember.js} +4 -6
  79. package/tools/report.js +2 -2
  80. package/tools/request.js +6 -26
  81. package/tools/reserve.js +1 -1
  82. package/tools/session-fork.js +97 -0
  83. package/tools/session-save.js +109 -0
  84. package/tools/settings.js +30 -99
  85. package/tools/ship.js +74 -56
  86. package/tools/{_deprecated/skills-exchange.js → skills-exchange.js} +38 -39
  87. package/tools/social-inbox.js +22 -28
  88. package/tools/social-post.js +24 -27
  89. package/tools/solo-game.js +54 -46
  90. package/tools/start.js +14 -148
  91. package/tools/status.js +21 -68
  92. package/tools/submit.js +4 -2
  93. package/tools/suggest-tags.js +36 -33
  94. package/tools/summarize.js +19 -16
  95. package/tools/tag-suggestions.js +72 -73
  96. package/tools/test.js +1 -1
  97. package/tools/{_deprecated/tictactoe.js → tictactoe.js} +26 -26
  98. package/tools/token.js +4 -4
  99. package/tools/update.js +1 -2
  100. package/tools/watch.js +132 -112
  101. package/tools/who.js +20 -40
  102. package/tools/{_deprecated/wordassociation.js → wordassociation.js} +23 -20
  103. package/tools/workshop-buddy.js +52 -53
  104. package/tools/x-mentions.js +0 -1
  105. package/tools/x-reply.js +0 -1
  106. package/twitter.js +14 -20
  107. package/version.json +8 -10
  108. package/webhook-runner.js +132 -0
  109. package/auth-store.js +0 -148
  110. package/bridges/bridge-monitor.js +0 -388
  111. package/bridges/discord-bot.js +0 -431
  112. package/bridges/farcaster.js +0 -299
  113. package/bridges/telegram.js +0 -261
  114. package/bridges/webhook-health.js +0 -420
  115. package/bridges/webhook-server.js +0 -437
  116. package/bridges/whatsapp.js +0 -441
  117. package/bridges/x-webhook.js +0 -423
  118. package/games/arcade.js +0 -406
  119. package/games/chess.js +0 -451
  120. package/games/colorguess.js +0 -343
  121. package/games/crossword-words.js +0 -171
  122. package/games/crossword.js +0 -461
  123. package/games/drawing.js +0 -347
  124. package/games/gameroulette.js +0 -300
  125. package/games/gamerouter.js +0 -336
  126. package/games/gamestatus.js +0 -337
  127. package/games/guessnumber.js +0 -209
  128. package/games/hangman.js +0 -279
  129. package/games/memory.js +0 -338
  130. package/games/multiplayer-tictactoe.js +0 -389
  131. package/games/pixelart.js +0 -399
  132. package/games/quickduel.js +0 -354
  133. package/games/riddle.js +0 -371
  134. package/games/rockpaperscissors.js +0 -291
  135. package/games/snake.js +0 -406
  136. package/games/storybuilder.js +0 -343
  137. package/games/tictactoe.js +0 -345
  138. package/games/twentyquestions.js +0 -286
  139. package/games/twotruths.js +0 -207
  140. package/games/werewolf.js +0 -508
  141. package/games/wordassociation.js +0 -247
  142. package/games/wordchain.js +0 -135
  143. package/intelligence/interests.js +0 -369
  144. package/setup.js +0 -480
  145. package/smart-inbox.js +0 -276
  146. package/tools/_deprecated/auto-suggest-connections.js +0 -304
  147. package/tools/_deprecated/bootstrap-skills.js +0 -231
  148. package/tools/_deprecated/bridge-dashboard.js +0 -342
  149. package/tools/_deprecated/bridge-health.js +0 -400
  150. package/tools/_deprecated/bridge-live.js +0 -384
  151. package/tools/_deprecated/bridges.js +0 -383
  152. package/tools/_deprecated/colorguess.js +0 -281
  153. package/tools/_deprecated/discover-insights.js +0 -379
  154. package/tools/_deprecated/discover-momentum.js +0 -256
  155. package/tools/_deprecated/discovery-analytics.js +0 -345
  156. package/tools/_deprecated/discovery-auto-suggest.js +0 -275
  157. package/tools/_deprecated/discovery-bootstrap.js +0 -267
  158. package/tools/_deprecated/discovery-daily.js +0 -375
  159. package/tools/_deprecated/discovery-dashboard.js +0 -385
  160. package/tools/_deprecated/discovery-digest.js +0 -314
  161. package/tools/_deprecated/discovery-hub.js +0 -357
  162. package/tools/_deprecated/discovery-insights.js +0 -384
  163. package/tools/_deprecated/discovery-momentum.js +0 -281
  164. package/tools/_deprecated/discovery-monitor.js +0 -319
  165. package/tools/_deprecated/discovery-proactive.js +0 -300
  166. package/tools/_deprecated/draw.js +0 -317
  167. package/tools/_deprecated/farcaster.js +0 -307
  168. package/tools/_deprecated/games-catalog.js +0 -376
  169. package/tools/_deprecated/games.js +0 -313
  170. package/tools/_deprecated/guessnumber.js +0 -194
  171. package/tools/_deprecated/hangman.js +0 -129
  172. package/tools/_deprecated/multiplayer-tictactoe.js +0 -303
  173. package/tools/_deprecated/riddle.js +0 -240
  174. package/tools/_deprecated/run-bootstrap.js +0 -69
  175. package/tools/_deprecated/skills-analytics.js +0 -349
  176. package/tools/_deprecated/skills-bootstrap.js +0 -301
  177. package/tools/_deprecated/skills-dashboard.js +0 -268
  178. package/tools/_deprecated/skills.js +0 -380
  179. package/tools/_deprecated/smart-intro.js +0 -353
  180. package/tools/_deprecated/storybuilder.js +0 -331
  181. package/tools/_deprecated/telegram-bot.js +0 -183
  182. package/tools/_deprecated/telegram-setup.js +0 -214
  183. package/tools/_deprecated/twentyquestions.js +0 -143
  184. package/tools/_shared.js +0 -234
  185. package/tools/_work-context.js +0 -338
  186. package/tools/_work-context.manual-test.js +0 -199
  187. package/tools/_work-context.test.js +0 -260
  188. package/tools/activity.js +0 -220
  189. package/tools/agent-treasury.js +0 -288
  190. package/tools/analytics.js +0 -191
  191. package/tools/approve.js +0 -197
  192. package/tools/arcade.js +0 -173
  193. package/tools/artifacts-price.js +0 -107
  194. package/tools/ask-expert.js +0 -160
  195. package/tools/available.js +0 -120
  196. package/tools/become-expert.js +0 -150
  197. package/tools/broadcast.js +0 -325
  198. package/tools/chat.js +0 -202
  199. package/tools/collaborative-drawing.js +0 -286
  200. package/tools/connection-status.js +0 -178
  201. package/tools/earnings.js +0 -126
  202. package/tools/friends.js +0 -207
  203. package/tools/genesis.js +0 -233
  204. package/tools/gig-browse.js +0 -206
  205. package/tools/gig-complete.js +0 -144
  206. package/tools/health.js +0 -87
  207. package/tools/leaderboard.js +0 -117
  208. package/tools/lib/git-apply.js +0 -206
  209. package/tools/lib/git-bundle.js +0 -407
  210. package/tools/mint.js +0 -377
  211. package/tools/plan.js +0 -225
  212. package/tools/profile.js +0 -219
  213. package/tools/proof-of-work.js +0 -144
  214. package/tools/pulse.js +0 -218
  215. package/tools/reply.js +0 -166
  216. package/tools/reputation.js +0 -175
  217. package/tools/schedule.js +0 -367
  218. package/tools/search-messages.js +0 -123
  219. package/tools/session.js +0 -467
  220. package/tools/session_price.js +0 -128
  221. package/tools/smart-check.js +0 -201
  222. package/tools/social-processor.js +0 -445
  223. package/tools/streak.js +0 -147
  224. package/tools/stuck.js +0 -297
  225. package/tools/subscribe.js +0 -148
  226. package/tools/subscriptions.js +0 -134
  227. package/tools/tip.js +0 -193
  228. package/tools/wallet.js +0 -269
  229. package/tools/webhook-test.js +0 -388
  230. package/tools/withdraw.js +0 -145
  231. package/tools/work-summary.js +0 -96
  232. package/tools/workshop.js +0 -327
  233. /package/tools/{l2-bridge.js → _experimental/l2-bridge.js} +0 -0
  234. /package/tools/{l2.js → _experimental/l2.js} +0 -0
  235. /package/tools/{_deprecated/away.js → away.js} +0 -0
package/tools/profile.js DELETED
@@ -1,219 +0,0 @@
1
- /**
2
- * vibe profile — Manage your /vibe profile for better discovery
3
- *
4
- * Set up your profile so others can find you:
5
- * - What you're building
6
- * - Your interests (broad topics you care about)
7
- * - Your tags (specific skills/technologies)
8
- * - View and update your profile
9
- *
10
- * Commands:
11
- * - profile view [@handle] — View your or someone's profile
12
- * - profile building "what you're working on" — Set current project
13
- * - profile interests "ai, startups, music" — Set interests (comma-separated)
14
- * - profile tags "react, typescript, frontend" — Set skill tags
15
- * - profile clear — Clear your profile data
16
- */
17
-
18
- const config = require('../config');
19
- const userProfiles = require('../store/profiles');
20
- const { formatTimeAgo, requireInit } = require('./_shared');
21
-
22
- const definition = {
23
- name: 'vibe_profile',
24
- description: 'Manage your profile for better discovery and connections.',
25
- inputSchema: {
26
- type: 'object',
27
- properties: {
28
- command: {
29
- type: 'string',
30
- enum: ['view', 'building', 'interests', 'tags', 'clear'],
31
- description: 'Profile action to take'
32
- },
33
- value: {
34
- type: 'string',
35
- description: 'Value to set (for building, interests, tags)'
36
- },
37
- handle: {
38
- type: 'string',
39
- description: 'Handle to view (for view command, defaults to you)'
40
- }
41
- }
42
- }
43
- };
44
-
45
- // Format profile for display
46
- function formatProfile(profile, isMe = false) {
47
- const title = isMe ? 'Your Profile' : `@${profile.handle}'s Profile`;
48
- let display = `## ${title}\n\n`;
49
-
50
- // Building
51
- if (profile.building) {
52
- display += `🚀 **Building:** ${profile.building}\n\n`;
53
- } else {
54
- display += `🚀 **Building:** _Not set_\n\n`;
55
- }
56
-
57
- // Interests
58
- if (profile.interests && profile.interests.length > 0) {
59
- display += `💡 **Interests:** ${profile.interests.join(', ')}\n\n`;
60
- } else {
61
- display += `💡 **Interests:** _Not set_\n\n`;
62
- }
63
-
64
- // Tags/Skills
65
- if (profile.tags && profile.tags.length > 0) {
66
- display += `🏷️ **Skills/Tags:** ${profile.tags.join(', ')}\n\n`;
67
- } else {
68
- display += `🏷️ **Skills/Tags:** _Not set_\n\n`;
69
- }
70
-
71
- // Activity
72
- if (profile.lastSeen) {
73
- display += `🕐 **Last active:** ${formatTimeAgo(profile.lastSeen)}\n`;
74
- }
75
-
76
- if (profile.firstSeen) {
77
- display += `📅 **Member since:** ${new Date(profile.firstSeen).toLocaleDateString()}\n`;
78
- }
79
-
80
- // Ships
81
- if (profile.ships && profile.ships.length > 0) {
82
- display += `\n**Recent ships:**\n`;
83
- profile.ships.slice(0, 3).forEach(ship => {
84
- display += `• ${ship.what} _(${formatTimeAgo(ship.timestamp)})_\n`;
85
- });
86
- }
87
-
88
- // Connections
89
- if (profile.connections && profile.connections.length > 0) {
90
- display += `\n**Connected to ${profile.connections.length} people**\n`;
91
- }
92
-
93
- return display;
94
- }
95
-
96
- async function handler(args) {
97
- const initCheck = requireInit();
98
- if (initCheck) return initCheck;
99
-
100
- const myHandle = config.getHandle();
101
- const command = args.command || 'view';
102
-
103
- let display = '';
104
-
105
- try {
106
- switch (command) {
107
- case 'view': {
108
- const targetHandle = args.handle ? args.handle.replace('@', '') : myHandle;
109
- const profile = await userProfiles.getProfile(targetHandle);
110
- const isMe = targetHandle === myHandle;
111
-
112
- display = formatProfile(profile, isMe);
113
-
114
- if (isMe) {
115
- display += `\n---\n`;
116
- display += `**Update your profile:**\n`;
117
- display += `• \`profile building "AI chat app"\`\n`;
118
- display += `• \`profile interests "ai, startups, music"\`\n`;
119
- display += `• \`profile tags "react, typescript, frontend"\`\n\n`;
120
- display += `Better profiles = better connections! 🤝`;
121
- } else {
122
- display += `\n---\n`;
123
- display += `**Connect:**\n`;
124
- display += `• \`message @${targetHandle}\` to reach out\n`;
125
- display += `• \`discover\` to find similar builders`;
126
- }
127
- break;
128
- }
129
-
130
- case 'building': {
131
- if (!args.value) {
132
- return { error: 'Please specify what you\'re building: profile building "AI chat app"' };
133
- }
134
-
135
- await userProfiles.updateProfile(myHandle, { building: args.value });
136
-
137
- display = `## Profile Updated\n\n`;
138
- display += `🚀 **Now building:** ${args.value}\n\n`;
139
- display += `Others can find you via:\n`;
140
- display += `• \`discover search "${args.value.split(' ')[0]}"\`\n`;
141
- display += `• Similar project recommendations\n\n`;
142
- display += `**Next:** Set your interests and tags for better matches!`;
143
- break;
144
- }
145
-
146
- case 'interests': {
147
- if (!args.value) {
148
- return { error: 'Please specify interests: profile interests "ai, startups, music"' };
149
- }
150
-
151
- const interests = args.value.split(',').map(s => s.trim()).filter(s => s);
152
- await userProfiles.updateProfile(myHandle, { interests });
153
-
154
- display = `## Profile Updated\n\n`;
155
- display += `💡 **Interests:** ${interests.join(', ')}\n\n`;
156
- display += `You'll now get matched with people who share:\n`;
157
- interests.forEach(interest => {
158
- display += `• ${interest}\n`;
159
- });
160
- display += `\n**Try:** \`discover suggest\` to see your matches!`;
161
- break;
162
- }
163
-
164
- case 'tags': {
165
- if (!args.value) {
166
- return { error: 'Please specify skill tags: profile tags "react, typescript, frontend"' };
167
- }
168
-
169
- const tags = args.value.split(',').map(s => s.trim()).filter(s => s);
170
- await userProfiles.updateProfile(myHandle, { tags });
171
-
172
- display = `## Profile Updated\n\n`;
173
- display += `🏷️ **Skills/Tags:** ${tags.join(', ')}\n\n`;
174
- display += `You'll get matched with people who:\n`;
175
- display += `• Share these skills\n`;
176
- display += `• Have complementary skills\n`;
177
- display += `• Are building similar things\n\n`;
178
- display += `**Try:** \`discover active\` to see similar builders online now!`;
179
- break;
180
- }
181
-
182
- case 'clear': {
183
- const emptyProfile = {
184
- building: null,
185
- interests: [],
186
- tags: []
187
- };
188
- await userProfiles.updateProfile(myHandle, emptyProfile);
189
-
190
- display = `## Profile Cleared\n\n`;
191
- display += `Your profile data has been reset.\n\n`;
192
- display += `**Set up again:**\n`;
193
- display += `• \`profile building "what you're working on"\`\n`;
194
- display += `• \`profile interests "topic1, topic2, topic3"\`\n`;
195
- display += `• \`profile tags "skill1, skill2, skill3"\``;
196
- break;
197
- }
198
-
199
- default:
200
- display = `## Profile Commands\n\n`;
201
- display += `**View profiles:**\n`;
202
- display += `• \`profile view\` — Your profile\n`;
203
- display += `• \`profile view @handle\` — Someone else's profile\n\n`;
204
- display += `**Update your profile:**\n`;
205
- display += `• \`profile building "what you're working on"\`\n`;
206
- display += `• \`profile interests "ai, startups, music"\`\n`;
207
- display += `• \`profile tags "react, typescript, frontend"\`\n`;
208
- display += `• \`profile clear\` — Reset your profile\n\n`;
209
- display += `**Why profiles matter:**\n`;
210
- display += `Better profiles = better connections through \`discover\`!`;
211
- }
212
- } catch (error) {
213
- display = `## Profile Error\n\n${error.message}`;
214
- }
215
-
216
- return { display };
217
- }
218
-
219
- module.exports = { definition, handler };
@@ -1,144 +0,0 @@
1
- /**
2
- * vibe_proof_of_work - Get unified proof-of-work summary for a user
3
- *
4
- * Shows the complete "proof of work" picture:
5
- * - PAST: Artifacts created/sold, sessions shared
6
- * - PRESENT: Live presence, current work
7
- * - FUTURE: Gigs completed/posted, hire availability
8
- * - UNIFIED: Vibe score, tier, proven skills
9
- */
10
-
11
- const config = require('../config');
12
- const { requireInit, normalizeHandle, displayHandle, header, divider, emptyState, formatTimeAgo } = require('./_shared');
13
- const { actions, formatActions } = require('./_actions');
14
-
15
- const BASE_URL = process.env.VIBE_API_URL || 'https://www.slashvibe.dev';
16
-
17
- const definition = {
18
- name: 'vibe_proof_of_work',
19
- description: 'Get proof-of-work summary for a user. Shows artifacts, sessions, gigs, vibe score, and proven skills.',
20
- inputSchema: {
21
- type: 'object',
22
- properties: {
23
- handle: {
24
- type: 'string',
25
- description: 'User handle to look up (default: yourself)'
26
- }
27
- }
28
- }
29
- };
30
-
31
- async function handler(args) {
32
- const initCheck = requireInit();
33
- if (initCheck) return initCheck;
34
-
35
- const targetHandle = normalizeHandle(args.handle) || config.getHandle();
36
-
37
- try {
38
- const response = await fetch(`${BASE_URL}/api/proof-of-work?handle=${encodeURIComponent(targetHandle)}`);
39
- const data = await response.json();
40
-
41
- if (!data.success) {
42
- return { display: `❌ ${data.error || 'Failed to fetch proof-of-work'}` };
43
- }
44
-
45
- const pow = data.proof_of_work;
46
- const isSelf = targetHandle === config.getHandle();
47
-
48
- // Build display
49
- let display = header(`Proof of Work: ${displayHandle(targetHandle)}`, 2) + '\n\n';
50
-
51
- // Vibe Score & Tier
52
- display += `**Vibe Score:** ${pow.unified?.vibe_score || 0}\n`;
53
- display += `**Tier:** ${formatTier(pow.unified?.tier)}\n\n`;
54
-
55
- // ━━━ PAST ━━━
56
- display += header('📜 PAST (Artifacts & Sessions)', 3) + '\n';
57
- const past = pow.past || {};
58
- display += `• **Artifacts Created:** ${past.artifacts_created || 0}\n`;
59
- display += `• **Artifacts Sold:** ${past.artifacts_sold || 0}\n`;
60
- display += `• **Revenue Earned:** $${((past.revenue_cents || 0) / 100).toFixed(2)}\n`;
61
- display += `• **Sessions Shared:** ${past.sessions_shared || 0}\n\n`;
62
-
63
- // ━━━ PRESENT ━━━
64
- display += header('🟢 PRESENT (Live)', 3) + '\n';
65
- const present = pow.present || {};
66
- if (present.is_online) {
67
- display += `• **Status:** Online\n`;
68
- if (present.working_on) {
69
- display += `• **Working on:** ${present.working_on}\n`;
70
- }
71
- if (present.project) {
72
- display += `• **Project:** ${present.project}\n`;
73
- }
74
- } else {
75
- display += `• **Status:** Offline\n`;
76
- if (present.last_seen) {
77
- display += `• **Last seen:** ${formatTimeAgo(present.last_seen)}\n`;
78
- }
79
- }
80
- display += '\n';
81
-
82
- // ━━━ FUTURE ━━━
83
- display += header('🚀 FUTURE (Gigs & Availability)', 3) + '\n';
84
- const future = pow.future || {};
85
- display += `• **Gigs Completed:** ${future.gigs_completed || 0}\n`;
86
- display += `• **Gigs Posted:** ${future.gigs_posted || 0}\n`;
87
- display += `• **Avg Rating:** ${future.avg_rating ? `${future.avg_rating.toFixed(1)}⭐` : 'No ratings yet'}\n`;
88
- display += `• **Available for Hire:** ${future.available_for_hire ? 'Yes' : 'No'}\n\n`;
89
-
90
- // ━━━ PROVEN SKILLS ━━━
91
- const skills = pow.unified?.proven_skills || [];
92
- if (skills.length > 0) {
93
- display += header('🛠️ Proven Skills', 3) + '\n';
94
- skills.slice(0, 10).forEach(skill => {
95
- display += `• ${skill.name} (${skill.count} gig${skill.count !== 1 ? 's' : ''})\n`;
96
- });
97
- display += '\n';
98
- }
99
-
100
- // ━━━ SCORE BREAKDOWN ━━━
101
- const breakdown = pow.unified?.score_breakdown;
102
- if (breakdown) {
103
- display += header('📊 Score Breakdown', 3) + '\n';
104
- display += `• Gigs: ${breakdown.gigs || 0}\n`;
105
- display += `• Artifacts: ${breakdown.artifacts || 0}\n`;
106
- display += `• Sessions: ${breakdown.sessions || 0}\n`;
107
- display += `• Invites: ${breakdown.invites || 0}\n`;
108
- display += `• Ships: ${breakdown.ships || 0}\n`;
109
- }
110
-
111
- // CTA for self
112
- if (isSelf) {
113
- display += divider();
114
- display += '💡 **Boost your score:** Complete gigs (+50), sell artifacts (+30), share sessions (+10)\n';
115
- }
116
-
117
- // Build result with tip actions
118
- const result = { display };
119
- result.actions = formatActions(actions.afterProofOfWork(targetHandle, isSelf));
120
-
121
- return result;
122
-
123
- } catch (e) {
124
- console.error('[proof-of-work] Error:', e);
125
- return { display: `❌ Failed to fetch proof-of-work: ${e.message}` };
126
- }
127
- }
128
-
129
- /**
130
- * Format tier with emoji
131
- */
132
- function formatTier(tier) {
133
- const tiers = {
134
- newcomer: '🌱 Newcomer',
135
- rising: '📈 Rising',
136
- proven: '✅ Proven',
137
- established: '🏆 Established',
138
- expert: '⭐ Expert',
139
- legendary: '👑 Legendary'
140
- };
141
- return tiers[tier] || tier || 'Unknown';
142
- }
143
-
144
- module.exports = { definition, handler };
package/tools/pulse.js DELETED
@@ -1,218 +0,0 @@
1
- /**
2
- * vibe pulse — Lightweight presence check for inline display
3
- *
4
- * Returns a compact "mini card" showing who's online.
5
- * Designed to be called periodically by Claude based on CLAUDE.md instructions.
6
- *
7
- * Unlike vibe_who (full presence), this is:
8
- * - Faster (minimal data)
9
- * - Compact (fits in a response footer)
10
- * - Suggestive (gentle nudges to connect)
11
- */
12
-
13
- const config = require('../config');
14
- const store = require('../store');
15
-
16
- const definition = {
17
- name: 'vibe_pulse',
18
- description: 'Quick presence check for inline display. Returns compact mini card showing who\'s online. Call periodically (~every 5 messages) to maintain ambient awareness.',
19
- inputSchema: {
20
- type: 'object',
21
- properties: {}
22
- }
23
- };
24
-
25
- // Gentle nudge templates
26
- const NUDGES = {
27
- just_joined: [
28
- "{handle} just joined — say hi?",
29
- "{handle} is here! Quick wave?",
30
- "New face: {handle} just arrived"
31
- ],
32
- shipping: [
33
- "{handle} is shipping — cheer them on?",
34
- "{handle} in flow mode 🔥"
35
- ],
36
- debugging: [
37
- "{handle} debugging — maybe you can help?",
38
- "{handle} stuck on something"
39
- ],
40
- active: [
41
- "{handle} is around",
42
- "{handle} building right now"
43
- ],
44
- multiple: [
45
- "{count} builders online — you're not alone",
46
- "{count} people vibing right now",
47
- "Room's alive: {count} online"
48
- ]
49
- };
50
-
51
- function pickRandom(arr) {
52
- return arr[Math.floor(Math.random() * arr.length)];
53
- }
54
-
55
- function formatNudge(template, vars) {
56
- let result = template;
57
- for (const [key, value] of Object.entries(vars)) {
58
- result = result.replace(`{${key}}`, value);
59
- }
60
- return result;
61
- }
62
-
63
- function getStatusEmoji(user) {
64
- // Explicit mood takes priority
65
- if (user.mood === '🔥' || user.mood === 'shipping') return '🔥';
66
- if (user.mood === '🐛' || user.mood === 'debugging') return '🐛';
67
- if (user.mood === '🧠' || user.mood === 'thinking') return '🧠';
68
- if (user.mood === '🎉' || user.mood === 'celebrating') return '🎉';
69
- if (user.mood === '🎧') return '🎧';
70
- if (user.mood === '☕') return '☕';
71
-
72
- // Infer from what they're building (one_liner)
73
- const workingOn = (user.one_liner || '').toLowerCase();
74
- if (workingOn.includes('ai') || workingOn.includes('agent') || workingOn.includes('llm')) return '🤖';
75
- if (workingOn.includes('creative') || workingOn.includes('art') || workingOn.includes('design')) return '🎨';
76
- if (workingOn.includes('game') || workingOn.includes('chess') || workingOn.includes('play')) return '🎮';
77
- if (workingOn.includes('social') || workingOn.includes('chat') || workingOn.includes('message')) return '💬';
78
- if (workingOn.includes('crypto') || workingOn.includes('web3') || workingOn.includes('token')) return '⛓️';
79
- if (workingOn.includes('tool') || workingOn.includes('platform') || workingOn.includes('infra')) return '🛠️';
80
- if (workingOn.includes('mobile') || workingOn.includes('app')) return '📱';
81
- if (workingOn.includes('data') || workingOn.includes('analytics')) return '📊';
82
-
83
- // Infer from builderMode
84
- if (user.builderMode === 'deep-focus') return '🧘';
85
- if (user.builderMode === 'shipping') return '🚀';
86
- if (user.builderMode === 'exploring') return '🔍';
87
- if (user.builderMode === 'focused') return '💻';
88
-
89
- // Fallback to recency
90
- const age = Date.now() - user.lastSeen;
91
- if (age < 2 * 60 * 1000) return '⚡'; // Active < 2min
92
- if (age < 5 * 60 * 1000) return '●'; // Recent < 5min
93
- return '○'; // Idle
94
- }
95
-
96
- function getUserState(user) {
97
- const age = Date.now() - user.lastSeen;
98
-
99
- // Check for just joined (< 2 min session)
100
- if (user.firstSeen) {
101
- const sessionDuration = (user.lastSeen - new Date(user.firstSeen).getTime()) / 60000;
102
- if (sessionDuration < 2 && age < 2 * 60 * 1000) {
103
- return 'just_joined';
104
- }
105
- }
106
-
107
- if (user.mood === '🔥' || user.mood === 'shipping') return 'shipping';
108
- if (user.mood === '🐛' || user.mood === 'debugging') return 'debugging';
109
-
110
- return 'active';
111
- }
112
-
113
- async function handler(args) {
114
- // Check if initialized
115
- if (!config.isInitialized()) {
116
- return {
117
- display: null,
118
- empty: true,
119
- reason: 'not_initialized'
120
- };
121
- }
122
-
123
- const myHandle = config.getHandle();
124
-
125
- // Fetch presence and unread (wrap in Promise.resolve for local store compat)
126
- const [users, unreadCount] = await Promise.all([
127
- Promise.resolve(store.getActiveUsers()).catch(() => []),
128
- Promise.resolve(store.getUnreadCount(myHandle)).catch(() => 0)
129
- ]);
130
-
131
- const others = users.filter(u => u.handle !== myHandle);
132
-
133
- // Empty room
134
- if (others.length === 0 && unreadCount === 0) {
135
- return {
136
- display: null,
137
- empty: true,
138
- reason: 'no_one_online'
139
- };
140
- }
141
-
142
- // Smart truncate: break at word boundary, add ellipsis if truncated
143
- function smartTruncate(text, maxLen) {
144
- if (!text || text.length <= maxLen) return text || '';
145
- // Find last space before maxLen
146
- const truncated = text.slice(0, maxLen);
147
- const lastSpace = truncated.lastIndexOf(' ');
148
- if (lastSpace > maxLen * 0.6) {
149
- // Break at word if we're not losing too much
150
- return truncated.slice(0, lastSpace) + '…';
151
- }
152
- return truncated.slice(0, maxLen - 1) + '…';
153
- }
154
-
155
- // Get short status label from what they're working on
156
- function getStatusLabel(user) {
157
- if (user.mood === '🔥' || user.mood === 'shipping') return 'shipping';
158
- if (user.mood === '🐛' || user.mood === 'debugging') return 'debugging';
159
- if (user.mood === '🧠' || user.mood === 'thinking') return 'thinking';
160
- if (user.mood === '🎉' || user.mood === 'celebrating') return 'shipped!';
161
- if (user.mood === '👥' || user.mood === 'pairing') return 'pairing';
162
- if (user.mood === '🎧') return 'vibing';
163
- if (user.note) return smartTruncate(user.note, 28);
164
- if (user.one_liner) return smartTruncate(user.one_liner, 28);
165
- return '';
166
- }
167
-
168
- // Build compact single-line summary optimized for collapsed view
169
- // This ONE line must contain all key info since details get hidden
170
- const topUsers = others.slice(0, 4);
171
- const userChips = topUsers.map(u => `${getStatusEmoji(u)} ${u.handle}`).join(' · ');
172
- const moreCount = others.length > 4 ? ` +${others.length - 4}` : '';
173
- const dmsBadge = unreadCount > 0 ? `📬 ${unreadCount} · ` : '';
174
-
175
- // Single summary line with all key info
176
- let display = `${dmsBadge}☕ ${others.length} online — ${userChips}${moreCount}`;
177
-
178
- // Generate nudge
179
- let nudge = null;
180
- if (others.length > 0) {
181
- // Find most interesting user for nudge
182
- const states = others.map(u => ({ user: u, state: getUserState(u) }));
183
-
184
- // Priority: just_joined > shipping > debugging > active
185
- const priority = ['just_joined', 'shipping', 'debugging', 'active'];
186
- let picked = null;
187
-
188
- for (const state of priority) {
189
- picked = states.find(s => s.state === state);
190
- if (picked) break;
191
- }
192
-
193
- if (picked) {
194
- const templates = NUDGES[picked.state] || NUDGES.active;
195
- nudge = formatNudge(pickRandom(templates), {
196
- handle: `@${picked.user.handle}`,
197
- count: others.length
198
- });
199
- } else if (others.length >= 2) {
200
- nudge = formatNudge(pickRandom(NUDGES.multiple), { count: others.length });
201
- }
202
- }
203
-
204
- // Add nudge after details
205
- if (nudge) {
206
- display += `\n\n_${nudge}_`;
207
- }
208
-
209
- return {
210
- display,
211
- online_count: others.length,
212
- unread_count: unreadCount,
213
- nudge,
214
- handles: others.slice(0, 5).map(u => u.handle)
215
- };
216
- }
217
-
218
- module.exports = { definition, handler };