vibe_inbox
Check unread messages and recent threads to stay updated on developer conversations.
Instructions
See your unread messages and recent threads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/inbox.js:19-62 (handler)Handler function for vibe_inbox - fetches inbox from store, sorts by unread first then recency, and returns formatted display of unread messages or 'all caught up' message.
async function handler(args) { const initCheck = requireInit(); if (initCheck) return initCheck; const myHandle = config.getHandle(); const threads = await store.getInbox(myHandle); // Check for notifications (will handle deduplication internally) notify.checkAll(store); if (!threads || threads.length === 0) { return { display: `No messages yet. Say "dm @someone" to start a conversation.` }; } // Sort: unread first, then by most recent const sorted = threads.sort((a, b) => { if (a.unread > 0 && b.unread === 0) return -1; if (b.unread > 0 && a.unread === 0) return 1; return (b.lastTimestamp || 0) - (a.lastTimestamp || 0); }); const totalUnread = sorted.reduce((sum, t) => sum + (t.unread || 0), 0); const unreadSenders = sorted.filter(t => t.unread > 0); if (totalUnread === 0) { const recentHandles = sorted.slice(0, 3).map(t => `@${t.handle}`).join(', '); return { display: `All caught up. Recent: ${recentHandles}` }; } // Build display let display = `📬 ${totalUnread} unread\n`; display += '───────────────────────────────────\n'; for (const t of unreadSenders) { const preview = truncate(t.lastMessage || '', 60); display += `**@${t.handle}** (${t.unread}) — ${preview}\n`; } return { display }; } - tools/inbox.js:10-17 (schema)Input schema/definition for vibe_inbox - accepts no parameters, just describes it as 'See your unread messages and recent threads.'
const definition = { name: 'vibe_inbox', description: 'See your unread messages and recent threads.', inputSchema: { type: 'object', properties: {} } }; - index.js:164-175 (registration)Tool registration in the main index.js - vibe_inbox is loaded from ./tools/inbox and registered as part of the tools object.
// Load GTM tools (8 core + init) const tools = { vibe_start: require('./tools/start'), vibe_init: require('./tools/init'), vibe_who: require('./tools/who'), vibe_dm: require('./tools/dm'), vibe_inbox: require('./tools/inbox'), vibe_status: require('./tools/status'), vibe_ship: require('./tools/ship'), vibe_discover: require('./tools/discover'), vibe_help: require('./tools/help'), }; - index.js:27-38 (registration)Safety annotations registration for vibe_inbox - declared as readOnlyHint: true (read-only), idempotentHint: true (safe to repeat), openWorldHint: true (network access).
const TOOL_ANNOTATIONS = { // ── GTM: 9 tools (8 core + init) ──────────────────────────── vibe_start: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, vibe_init: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }, vibe_who: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, vibe_dm: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, vibe_inbox: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, vibe_status: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }, vibe_ship: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, vibe_discover: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, vibe_help: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }, }; - intelligence/proactive.js:321-338 (helper)Proactive intelligence helper - vibe_inbox is listed as a social tool that triggers proactive suggestions when called.
async function checkProactiveOpportunities(toolName, args = {}) { // Track away/back transitions if (toolName === 'vibe_away') { markAway(); } else if (toolName === 'vibe_back') { // Don't mark back yet - let ships_in_the_night process } else if (toolName === 'vibe_init' || toolName === 'vibe_start') { setSessionStart(); } // Only generate suggestions for certain tools const socialTools = ['vibe_who', 'vibe_inbox', 'vibe_start']; if (!socialTools.includes(toolName)) { return null; } return await getProactiveSummary(args); }