slashvibe-mcp 0.2.2 → 0.2.4
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/README.md +1 -0
- package/analytics.js +107 -0
- package/config.js +174 -3
- package/index.js +163 -34
- package/intelligence/index.js +45 -0
- package/intelligence/infer.js +316 -0
- package/intelligence/interests.js +369 -0
- package/intelligence/patterns.js +651 -0
- package/intelligence/proactive.js +358 -0
- package/intelligence/serendipity.js +306 -0
- package/notification-emitter.js +77 -0
- package/notify.js +141 -18
- package/package.json +14 -6
- package/presence.js +5 -1
- package/protocol/index.js +88 -1
- package/protocol/telegram-commands.js +199 -0
- package/store/api.js +469 -29
- package/store/index.js +7 -7
- package/store/local.js +67 -11
- package/store/profiles.js +435 -0
- package/store/reservations.js +321 -0
- package/store/skills.js +378 -0
- package/tools/_actions.js +491 -22
- package/tools/_connection-queue.js +257 -0
- package/tools/_discovery-enhanced.js +290 -0
- package/tools/_discovery.js +439 -0
- package/tools/_proactive-discovery.js +301 -0
- package/tools/_shared/index.js +64 -0
- package/tools/_work-context.js +338 -0
- package/tools/_work-context.manual-test.js +199 -0
- package/tools/_work-context.test.js +260 -0
- package/tools/admin-inbox.js +218 -0
- package/tools/agent-treasury.js +288 -0
- package/tools/agents.js +122 -0
- package/tools/analytics.js +191 -0
- package/tools/approve.js +197 -0
- package/tools/arcade.js +173 -0
- package/tools/artifact-create.js +247 -0
- package/tools/artifact-view.js +174 -0
- package/tools/artifacts-price.js +107 -0
- package/tools/ask-expert.js +160 -0
- package/tools/auto-suggest-connections.js +304 -0
- package/tools/away.js +68 -0
- package/tools/back.js +51 -0
- package/tools/become-expert.js +150 -0
- package/tools/bootstrap-skills.js +231 -0
- package/tools/bridge-dashboard.js +342 -0
- package/tools/bridge-health.js +400 -0
- package/tools/bridge-live.js +384 -0
- package/tools/bridges.js +383 -0
- package/tools/broadcast.js +286 -0
- package/tools/bye.js +4 -0
- package/tools/chat.js +202 -0
- package/tools/collaborative-drawing.js +286 -0
- package/tools/colorguess.js +281 -0
- package/tools/crossword.js +369 -0
- package/tools/discover-insights.js +379 -0
- package/tools/discover-momentum.js +256 -0
- package/tools/discover.js +675 -0
- package/tools/discovery-analytics.js +345 -0
- package/tools/discovery-auto-suggest.js +275 -0
- package/tools/discovery-bootstrap.js +267 -0
- package/tools/discovery-daily.js +375 -0
- package/tools/discovery-dashboard.js +385 -0
- package/tools/discovery-digest.js +314 -0
- package/tools/discovery-hub.js +357 -0
- package/tools/discovery-insights.js +384 -0
- package/tools/discovery-momentum.js +281 -0
- package/tools/discovery-monitor.js +319 -0
- package/tools/discovery-proactive.js +300 -0
- package/tools/dm.js +84 -14
- package/tools/draw.js +317 -0
- package/tools/drawing.js +310 -0
- package/tools/earnings.js +126 -0
- package/tools/echo.js +16 -0
- package/tools/farcaster.js +307 -0
- package/tools/feed.js +215 -0
- package/tools/follow.js +224 -0
- package/tools/friends.js +192 -0
- package/tools/game.js +218 -110
- package/tools/games-catalog.js +376 -0
- package/tools/games.js +313 -0
- package/tools/genesis.js +233 -0
- package/tools/gig-browse.js +206 -0
- package/tools/gig-complete.js +139 -0
- package/tools/guessnumber.js +194 -0
- package/tools/hangman.js +129 -0
- package/tools/help.js +269 -0
- package/tools/idea.js +217 -0
- package/tools/inbox.js +291 -25
- package/tools/init.js +657 -33
- package/tools/insights.js +123 -0
- package/tools/invite.js +142 -21
- package/tools/l2-bridge.js +272 -0
- package/tools/l2-status.js +217 -0
- package/tools/l2.js +206 -0
- package/tools/migrate.js +156 -0
- package/tools/mint.js +377 -0
- package/tools/multiplayer-game.js +275 -0
- package/tools/multiplayer-tictactoe.js +303 -0
- package/tools/mute.js +97 -0
- package/tools/notifications.js +415 -0
- package/tools/observe.js +200 -0
- package/tools/onboarding.js +147 -0
- package/tools/open.js +52 -3
- package/tools/party-game.js +314 -0
- package/tools/plan.js +225 -0
- package/tools/presence-agent.js +167 -0
- package/tools/profile.js +219 -0
- package/tools/proof-of-work.js +139 -0
- package/tools/pulse.js +218 -0
- package/tools/react.js +4 -0
- package/tools/release.js +83 -0
- package/tools/report.js +109 -0
- package/tools/reputation.js +175 -0
- package/tools/request.js +231 -0
- package/tools/reservations.js +116 -0
- package/tools/reserve.js +111 -0
- package/tools/riddle.js +240 -0
- package/tools/run-bootstrap.js +69 -0
- package/tools/schedule.js +367 -0
- package/tools/session.js +420 -0
- package/tools/session_price.js +128 -0
- package/tools/settings.js +200 -0
- package/tools/ship.js +188 -0
- package/tools/shipback.js +326 -0
- package/tools/skills-analytics.js +349 -0
- package/tools/skills-bootstrap.js +301 -0
- package/tools/skills-dashboard.js +268 -0
- package/tools/skills-exchange.js +342 -0
- package/tools/skills.js +380 -0
- package/tools/smart-intro.js +353 -0
- package/tools/social-inbox.js +326 -69
- package/tools/social-post.js +251 -66
- package/tools/social-processor.js +445 -0
- package/tools/solo-game.js +390 -0
- package/tools/start.js +296 -81
- package/tools/status.js +53 -6
- package/tools/storybuilder.js +331 -0
- package/tools/stuck.js +297 -0
- package/tools/subscribe.js +148 -0
- package/tools/subscriptions.js +134 -0
- package/tools/suggest-tags.js +184 -0
- package/tools/tag-suggestions.js +257 -0
- package/tools/telegram-bot.js +183 -0
- package/tools/telegram-setup.js +214 -0
- package/tools/tictactoe.js +155 -0
- package/tools/tip.js +120 -0
- package/tools/token.js +103 -0
- package/tools/twentyquestions.js +143 -0
- package/tools/update.js +1 -1
- package/tools/wallet.js +127 -0
- package/tools/watch.js +157 -0
- package/tools/webhook-test.js +388 -0
- package/tools/who.js +118 -25
- package/tools/withdraw.js +145 -0
- package/tools/wordassociation.js +247 -0
- package/tools/work-summary.js +96 -0
- package/tools/workshop-buddy.js +394 -0
- package/tools/workshop.js +327 -0
- package/version.json +12 -3
- package/tools/board.js +0 -130
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vibe workshop — Access the /vibe game workshop and arcade
|
|
3
|
+
*
|
|
4
|
+
* Play solo games, join multiplayer sessions, browse the game collection
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const config = require('../config');
|
|
8
|
+
const store = require('../store');
|
|
9
|
+
const { createGamePayload } = require('../protocol');
|
|
10
|
+
const { requireInit, normalizeHandle } = require('./_shared');
|
|
11
|
+
|
|
12
|
+
// Import game implementations
|
|
13
|
+
const arcade = require('../games/arcade');
|
|
14
|
+
const drawing = require('../games/drawing');
|
|
15
|
+
const hangman = require('../games/hangman');
|
|
16
|
+
const wordchain = require('../games/wordchain');
|
|
17
|
+
const twentyquestions = require('../games/twentyquestions');
|
|
18
|
+
const snake = require('../games/snake');
|
|
19
|
+
const memory = require('../games/memory');
|
|
20
|
+
const rockpaperscissors = require('../games/rockpaperscissors');
|
|
21
|
+
|
|
22
|
+
// Workshop shared game sessions (in-memory for now)
|
|
23
|
+
const gameSessions = new Map();
|
|
24
|
+
|
|
25
|
+
const definition = {
|
|
26
|
+
name: 'vibe_workshop',
|
|
27
|
+
description: 'Access the /vibe game workshop and arcade. Play games, join collaborative sessions, browse the collection',
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
game: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Game to play or "arcade" to browse all games',
|
|
34
|
+
enum: ['arcade', 'drawing', 'hangman', 'wordchain', 'twentyquestions', 'snake', 'memory', 'rockpaperscissors']
|
|
35
|
+
},
|
|
36
|
+
action: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Action to take (join, move, draw, guess, etc.)'
|
|
39
|
+
},
|
|
40
|
+
x: {
|
|
41
|
+
type: 'number',
|
|
42
|
+
description: 'X coordinate for drawing games'
|
|
43
|
+
},
|
|
44
|
+
y: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
description: 'Y coordinate for drawing games'
|
|
47
|
+
},
|
|
48
|
+
char: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Character to draw (use character names like "dot", "star", "heart")'
|
|
51
|
+
},
|
|
52
|
+
guess: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Letter or word to guess'
|
|
55
|
+
},
|
|
56
|
+
command: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Game-specific command or arcade navigation'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
required: ['game']
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Get or create a shared game session
|
|
67
|
+
*/
|
|
68
|
+
function getGameSession(gameType, sessionId = 'default') {
|
|
69
|
+
const key = `${gameType}:${sessionId}`;
|
|
70
|
+
|
|
71
|
+
if (!gameSessions.has(key)) {
|
|
72
|
+
let initialState;
|
|
73
|
+
|
|
74
|
+
switch (gameType) {
|
|
75
|
+
case 'drawing':
|
|
76
|
+
initialState = drawing.createInitialDrawingState();
|
|
77
|
+
break;
|
|
78
|
+
case 'hangman':
|
|
79
|
+
initialState = require('../games/hangman').createInitialHangmanState();
|
|
80
|
+
break;
|
|
81
|
+
case 'wordchain':
|
|
82
|
+
initialState = require('../games/wordchain').createInitialWordChainState();
|
|
83
|
+
break;
|
|
84
|
+
case 'twentyquestions':
|
|
85
|
+
initialState = require('../games/twentyquestions').createInitialTwentyQuestionsState();
|
|
86
|
+
break;
|
|
87
|
+
case 'snake':
|
|
88
|
+
initialState = require('../games/snake').createInitialSnakeState();
|
|
89
|
+
break;
|
|
90
|
+
case 'memory':
|
|
91
|
+
initialState = require('../games/memory').createInitialMemoryState();
|
|
92
|
+
break;
|
|
93
|
+
case 'rockpaperscissors':
|
|
94
|
+
initialState = require('../games/rockpaperscissors').createInitialRPSState();
|
|
95
|
+
break;
|
|
96
|
+
case 'arcade':
|
|
97
|
+
initialState = arcade.createInitialArcadeState();
|
|
98
|
+
break;
|
|
99
|
+
default:
|
|
100
|
+
throw new Error(`Unknown game type: ${gameType}`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
gameSessions.set(key, initialState);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return gameSessions.get(key);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Update a game session
|
|
111
|
+
*/
|
|
112
|
+
function updateGameSession(gameType, newState, sessionId = 'default') {
|
|
113
|
+
const key = `${gameType}:${sessionId}`;
|
|
114
|
+
gameSessions.set(key, newState);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Post activity to board when someone ships something cool
|
|
119
|
+
*/
|
|
120
|
+
async function postToBoard(content) {
|
|
121
|
+
const API_URL = process.env.VIBE_API_URL || 'https://www.slashvibe.dev';
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
await fetch(`${API_URL}/api/board`, {
|
|
125
|
+
method: 'POST',
|
|
126
|
+
headers: { 'Content-Type': 'application/json' },
|
|
127
|
+
body: JSON.stringify({
|
|
128
|
+
author: 'games-agent',
|
|
129
|
+
content,
|
|
130
|
+
category: 'general'
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
} catch (e) {
|
|
134
|
+
console.error('[workshop] Failed to post to board:', e.message);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async function handler(args) {
|
|
139
|
+
const initCheck = requireInit();
|
|
140
|
+
if (initCheck) return initCheck;
|
|
141
|
+
|
|
142
|
+
const { game, action, x, y, char, guess, command } = args;
|
|
143
|
+
const myHandle = config.getHandle();
|
|
144
|
+
|
|
145
|
+
try {
|
|
146
|
+
// Handle arcade browsing
|
|
147
|
+
if (game === 'arcade') {
|
|
148
|
+
const gameState = getGameSession('arcade');
|
|
149
|
+
|
|
150
|
+
if (command) {
|
|
151
|
+
const result = arcade.handleArcadeCommand(gameState, command);
|
|
152
|
+
if (result.error) {
|
|
153
|
+
return { display: `❌ ${result.error}` };
|
|
154
|
+
}
|
|
155
|
+
updateGameSession('arcade', result.gameState);
|
|
156
|
+
return { display: arcade.formatArcadeDisplay(result.gameState) };
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return { display: arcade.formatArcadeDisplay(gameState) };
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Handle collaborative drawing
|
|
163
|
+
if (game === 'drawing') {
|
|
164
|
+
const gameState = getGameSession('drawing');
|
|
165
|
+
|
|
166
|
+
// Join the drawing session
|
|
167
|
+
if (!gameState.players.includes(myHandle)) {
|
|
168
|
+
const joinResult = drawing.addPlayer(gameState, myHandle);
|
|
169
|
+
if (joinResult.error) {
|
|
170
|
+
return { display: `❌ ${joinResult.error}` };
|
|
171
|
+
}
|
|
172
|
+
updateGameSession('drawing', joinResult.gameState);
|
|
173
|
+
|
|
174
|
+
// Announce new artist
|
|
175
|
+
postToBoard(`🎨 @${myHandle} joined the collaborative drawing session!`);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const currentGameState = getGameSession('drawing');
|
|
179
|
+
|
|
180
|
+
// Handle drawing actions
|
|
181
|
+
if (action === 'draw' && x !== undefined && y !== undefined && char) {
|
|
182
|
+
// Convert character name to actual character
|
|
183
|
+
const drawChar = drawing.DRAWING_CHARS[char] || char;
|
|
184
|
+
const result = drawing.makeMove(currentGameState, x, y, drawChar, myHandle);
|
|
185
|
+
|
|
186
|
+
if (result.error) {
|
|
187
|
+
return { display: `❌ ${result.error}` };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
updateGameSession('drawing', result.gameState);
|
|
191
|
+
return {
|
|
192
|
+
display: `✏️ Drew ${drawChar} at (${x},${y})\n\n${drawing.formatDrawingDisplay(result.gameState)}`
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (action === 'line' && command) {
|
|
197
|
+
// Parse line command: "x0,y0 to x1,y1 with char"
|
|
198
|
+
const match = command.match(/(\d+),(\d+)\s+to\s+(\d+),(\d+)\s+with\s+(\w+)/);
|
|
199
|
+
if (match) {
|
|
200
|
+
const [, x0, y0, x1, y1, charName] = match;
|
|
201
|
+
const drawChar = drawing.DRAWING_CHARS[charName] || charName;
|
|
202
|
+
const result = drawing.drawLine(currentGameState, parseInt(x0), parseInt(y0), parseInt(x1), parseInt(y1), drawChar, myHandle);
|
|
203
|
+
|
|
204
|
+
if (result.error) {
|
|
205
|
+
return { display: `❌ ${result.error}` };
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
updateGameSession('drawing', result.gameState);
|
|
209
|
+
return {
|
|
210
|
+
display: `✏️ Drew line from (${x0},${y0}) to (${x1},${y1})\n\n${drawing.formatDrawingDisplay(result.gameState)}`
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (action === 'clear' && command) {
|
|
216
|
+
// Parse clear command: "x0,y0 to x1,y1"
|
|
217
|
+
const match = command.match(/(\d+),(\d+)\s+to\s+(\d+),(\d+)/);
|
|
218
|
+
if (match) {
|
|
219
|
+
const [, x0, y0, x1, y1] = match;
|
|
220
|
+
const result = drawing.clearRegion(currentGameState, parseInt(x0), parseInt(y0), parseInt(x1), parseInt(y1), myHandle);
|
|
221
|
+
|
|
222
|
+
if (result.error) {
|
|
223
|
+
return { display: `❌ ${result.error}` };
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
updateGameSession('drawing', result.gameState);
|
|
227
|
+
return {
|
|
228
|
+
display: `🧹 Cleared region (${x0},${y0}) to (${x1},${y1})\n\n${drawing.formatDrawingDisplay(result.gameState)}`
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (action === 'theme' && command) {
|
|
234
|
+
const result = drawing.setTheme(currentGameState, command, myHandle);
|
|
235
|
+
if (result.error) {
|
|
236
|
+
return { display: `❌ ${result.error}` };
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
updateGameSession('drawing', result.gameState);
|
|
240
|
+
const tips = drawing.getDrawingTips(command);
|
|
241
|
+
return {
|
|
242
|
+
display: `🎯 Set theme: ${command}\n\n**Tips:** ${tips.join(', ')}\n\n${drawing.formatDrawingDisplay(result.gameState)}`
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (action === 'stats') {
|
|
247
|
+
const stats = drawing.getCanvasStats(currentGameState);
|
|
248
|
+
return {
|
|
249
|
+
display: `📊 **Canvas Statistics**\n\n` +
|
|
250
|
+
`• Total moves: ${stats.totalMoves}\n` +
|
|
251
|
+
`• Canvas filled: ${stats.fillPercentage}%\n` +
|
|
252
|
+
`• Characters used: ${stats.uniqueCharsUsed}\n` +
|
|
253
|
+
`• Most popular: ${stats.mostUsedChar?.[0] || 'none'} (${stats.mostUsedChar?.[1] || 0} times)\n\n` +
|
|
254
|
+
`${drawing.formatDrawingDisplay(currentGameState)}`
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Default: show drawing canvas
|
|
259
|
+
return { display: drawing.formatDrawingDisplay(currentGameState) };
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Handle solo hangman
|
|
263
|
+
if (game === 'hangman') {
|
|
264
|
+
const gameState = getGameSession('hangman', myHandle); // Personal session
|
|
265
|
+
|
|
266
|
+
if (action === 'guess' && guess) {
|
|
267
|
+
const hangmanModule = require('../games/hangman');
|
|
268
|
+
const result = hangmanModule.makeGuess(gameState, guess);
|
|
269
|
+
|
|
270
|
+
if (result.error) {
|
|
271
|
+
return { display: `❌ ${result.error}` };
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
updateGameSession('hangman', result.gameState, myHandle);
|
|
275
|
+
|
|
276
|
+
let response = hangmanModule.formatHangmanDisplay(result.gameState);
|
|
277
|
+
|
|
278
|
+
if (result.gameState.won) {
|
|
279
|
+
response += '\n\n🎉 **You won!** Starting a new game...';
|
|
280
|
+
// Start new game
|
|
281
|
+
const newState = hangmanModule.createInitialHangmanState();
|
|
282
|
+
updateGameSession('hangman', newState, myHandle);
|
|
283
|
+
} else if (result.gameState.lost) {
|
|
284
|
+
response += '\n\n💀 **Game over!** Starting a new game...';
|
|
285
|
+
// Start new game
|
|
286
|
+
const newState = hangmanModule.createInitialHangmanState();
|
|
287
|
+
updateGameSession('hangman', newState, myHandle);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return { display: response };
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
if (action === 'new') {
|
|
294
|
+
const hangmanModule = require('../games/hangman');
|
|
295
|
+
const newState = hangmanModule.createInitialHangmanState();
|
|
296
|
+
updateGameSession('hangman', newState, myHandle);
|
|
297
|
+
return { display: hangmanModule.formatHangmanDisplay(newState) };
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Default: show current game
|
|
301
|
+
const hangmanModule = require('../games/hangman');
|
|
302
|
+
return { display: hangmanModule.formatHangmanDisplay(gameState) };
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Handle other games similarly...
|
|
306
|
+
// For now, return a helpful message for unsupported games
|
|
307
|
+
const supportedGames = ['arcade', 'drawing', 'hangman'];
|
|
308
|
+
if (!supportedGames.includes(game)) {
|
|
309
|
+
return {
|
|
310
|
+
display: `🎮 **${game.charAt(0).toUpperCase() + game.slice(1)}** game support coming soon!\n\n` +
|
|
311
|
+
`Currently available:\n` +
|
|
312
|
+
`• **arcade** - Browse all games\n` +
|
|
313
|
+
`• **drawing** - Collaborative drawing canvas\n` +
|
|
314
|
+
`• **hangman** - Solo word guessing\n\n` +
|
|
315
|
+
`Use \`vibe workshop arcade\` to explore all games!`
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return { display: 'Use --action to interact with the game!' };
|
|
320
|
+
|
|
321
|
+
} catch (error) {
|
|
322
|
+
console.error('[workshop] Error:', error);
|
|
323
|
+
return { display: `❌ Workshop error: ${error.message}` };
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
module.exports = { definition, handler };
|
package/version.json
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"updated": "2026-01-
|
|
4
|
-
"changelog": "
|
|
2
|
+
"version": "0.3.0",
|
|
3
|
+
"updated": "2026-01-10",
|
|
4
|
+
"changelog": "Artifacts system - create guides, learnings, workspaces with vibe_create_artifact",
|
|
5
|
+
"features": [
|
|
6
|
+
"vibe_create_artifact - Create social artifacts from conversations",
|
|
7
|
+
"vibe_view_artifact - View and list artifacts",
|
|
8
|
+
"Dual-write to KV + Postgres",
|
|
9
|
+
"HTML rendering at /a/:slug",
|
|
10
|
+
"Structured blocks: places, schedules, checklists, callouts"
|
|
11
|
+
],
|
|
12
|
+
"breaking": false,
|
|
13
|
+
"updateUrl": "https://www.slashvibe.dev/api/version"
|
|
5
14
|
}
|
package/tools/board.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* vibe board — Shared whiteboard for the /vibe community
|
|
3
|
-
*
|
|
4
|
-
* Read: vibe board (shows recent entries)
|
|
5
|
-
* Write: vibe board "your idea or use case"
|
|
6
|
-
* Categories: use-case, idea, shipped, question
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const config = require('../config');
|
|
10
|
-
const { requireInit, header, emptyState, formatTimeAgo, divider } = require('./_shared');
|
|
11
|
-
|
|
12
|
-
const definition = {
|
|
13
|
-
name: 'vibe_board',
|
|
14
|
-
description: 'Shared whiteboard for use cases, ideas, and things people have shipped. Read the board or add your own entry.',
|
|
15
|
-
inputSchema: {
|
|
16
|
-
type: 'object',
|
|
17
|
-
properties: {
|
|
18
|
-
content: {
|
|
19
|
-
type: 'string',
|
|
20
|
-
description: 'Your entry (max 500 chars). Leave empty to just read the board.'
|
|
21
|
-
},
|
|
22
|
-
category: {
|
|
23
|
-
type: 'string',
|
|
24
|
-
enum: ['use-case', 'idea', 'shipped', 'question', 'general'],
|
|
25
|
-
description: 'Category for your entry (default: general)'
|
|
26
|
-
},
|
|
27
|
-
filter: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
enum: ['use-case', 'idea', 'shipped', 'question', 'all'],
|
|
30
|
-
description: 'Filter entries by category when reading'
|
|
31
|
-
},
|
|
32
|
-
limit: {
|
|
33
|
-
type: 'number',
|
|
34
|
-
description: 'Number of entries to show (default: 10, max: 50)'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const CATEGORY_EMOJI = {
|
|
41
|
-
'use-case': '🎯',
|
|
42
|
-
'idea': '💡',
|
|
43
|
-
'shipped': '🚀',
|
|
44
|
-
'question': '❓',
|
|
45
|
-
'general': '📝'
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
async function handler(args) {
|
|
49
|
-
const initCheck = requireInit();
|
|
50
|
-
if (initCheck) return initCheck;
|
|
51
|
-
|
|
52
|
-
const apiUrl = config.getApiUrl();
|
|
53
|
-
const myHandle = config.getHandle();
|
|
54
|
-
|
|
55
|
-
// If content provided, add entry
|
|
56
|
-
if (args.content) {
|
|
57
|
-
if (args.content.length > 500) {
|
|
58
|
-
return { display: '⚠️ Entry must be 500 characters or less.' };
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
try {
|
|
62
|
-
const response = await fetch(`${apiUrl}/api/board`, {
|
|
63
|
-
method: 'POST',
|
|
64
|
-
headers: { 'Content-Type': 'application/json' },
|
|
65
|
-
body: JSON.stringify({
|
|
66
|
-
author: myHandle,
|
|
67
|
-
content: args.content,
|
|
68
|
-
category: args.category || 'general'
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
const data = await response.json();
|
|
73
|
-
|
|
74
|
-
if (!data.success) {
|
|
75
|
-
return { display: `⚠️ Failed to add entry: ${data.error}` };
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const emoji = CATEGORY_EMOJI[data.entry.category] || '📝';
|
|
79
|
-
return {
|
|
80
|
-
display: `${emoji} Added to the board!\n\n"${args.content}"\n\n_Category: ${data.entry.category}_\n\n${divider()}View with \`vibe board\``
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
} catch (error) {
|
|
84
|
-
return { display: `⚠️ Failed to add entry: ${error.message}` };
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Otherwise, read entries
|
|
89
|
-
try {
|
|
90
|
-
const limit = Math.min(args.limit || 10, 50);
|
|
91
|
-
const filter = args.filter && args.filter !== 'all' ? args.filter : null;
|
|
92
|
-
|
|
93
|
-
let url = `${apiUrl}/api/board?limit=${limit}`;
|
|
94
|
-
if (filter) url += `&category=${filter}`;
|
|
95
|
-
|
|
96
|
-
const response = await fetch(url);
|
|
97
|
-
const data = await response.json();
|
|
98
|
-
|
|
99
|
-
if (!data.success || !data.entries || data.entries.length === 0) {
|
|
100
|
-
return {
|
|
101
|
-
display: `${header('Community Board')}\n\n${emptyState('No entries yet.', 'Add one with `vibe board "your idea"`')}`
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
let display = header('Community Board');
|
|
106
|
-
if (filter) display += ` (${filter})`;
|
|
107
|
-
display += '\n\n';
|
|
108
|
-
|
|
109
|
-
data.entries.forEach((entry, i) => {
|
|
110
|
-
const emoji = CATEGORY_EMOJI[entry.category] || '📝';
|
|
111
|
-
const timeAgo = formatTimeAgo(entry.timestamp);
|
|
112
|
-
|
|
113
|
-
display += `${emoji} **@${entry.author}**`;
|
|
114
|
-
if (timeAgo) display += ` _${timeAgo}_`;
|
|
115
|
-
display += '\n';
|
|
116
|
-
display += ` "${entry.content}"\n\n`;
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
display += divider();
|
|
120
|
-
display += 'Add: `vibe board "your idea" --category idea`\n';
|
|
121
|
-
display += 'Filter: `vibe board --filter shipped`';
|
|
122
|
-
|
|
123
|
-
return { display };
|
|
124
|
-
|
|
125
|
-
} catch (error) {
|
|
126
|
-
return { display: `⚠️ Failed to read board: ${error.message}` };
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
module.exports = { definition, handler };
|