slashvibe-mcp 0.9.16 → 0.9.17

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 CHANGED
@@ -58,7 +58,8 @@ was marked read, until you chose.
58
58
 
59
59
  **Something leaves.** Type `/vibe`. Your agent finds the question or the result in the
60
60
  session, picks the person it is for, writes it, and shows you the exact message. Send,
61
- Edit or Cancel. Or just say it: `message @sam: ship it`.
61
+ Edit or Cancel. Or just say it: `message @sam: ship it` shows you exactly those words first,
62
+ with the same Send · Edit · Cancel. Nothing your agent does sends without your Send.
62
63
 
63
64
  **Someone who is not here yet.** If the person you are writing to has no /vibe account, the
64
65
  preview says so, and Keep holds your exact message for the GitHub account of that name for
@@ -245,7 +246,7 @@ Ten tools, for the agent (plus `vibe_init` and `vibe_token`, which only handle s
245
246
  | `vibe_people` | who can be reached, and what they say they are working on |
246
247
  | `vibe_thread` | one conversation, in full |
247
248
  | `vibe_prepare` | the agent's words, previewed; sends nothing |
248
- | `vibe_send` | your approval of a preview, or your own exact words |
249
+ | `vibe_send` | your approval of a preview; the only way a message leaves |
249
250
  | `vibe_discard` | cancel a draft |
250
251
  | `vibe_ask` | ask a person's agent, over an open line, and wait for the answer |
251
252
  | `vibe_answer` | answer a person's agent, over an open line |
@@ -17,4 +17,4 @@ The person wants to reach someone on /vibe from the work in this session. They s
17
17
 
18
18
  If the person has no line saying what they are working on (`vibe_start` says so), offer once to set one from this session's work, in their words, and set it only if they agree.
19
19
 
20
- If they dictate exact words ("message @sam: ship it"), that is not this flow: send their words as they said them with `vibe_send` (`handle` + `message`).
20
+ If they dictate exact words ("message @sam: ship it"), skip steps 1-3: call `vibe_prepare` with their words exactly as they said them, show the preview, and offer the same three choices. Nothing sends without a preview the person chose to send.
package/index.js CHANGED
@@ -13,7 +13,7 @@
13
13
  * vibe_people who can be reached, and what they say they are doing
14
14
  * vibe_thread one conversation, in full
15
15
  * vibe_prepare the agent's words, previewed; sends nothing
16
- * vibe_send the approval (a prepared draft), or the person's own words
16
+ * vibe_send the approval: sends a prepared draft, and nothing else
17
17
  * vibe_discard cancel a draft
18
18
  * vibe_ask ask a person's agent, over an open line (line.js)
19
19
  * vibe_answer answer a person's agent, over an open line
@@ -96,10 +96,14 @@ const tools = {
96
96
  vibe_bump: require('./tools/bump'),
97
97
  };
98
98
 
99
- // Before sign-in the whole surface is visible except the draft plumbing, so a
100
- // newcomer's first request ("message @sam ...") meets the sign-in gate instead
101
- // of a missing tool. After sign-in, tools/list_changed reveals the rest.
102
- const PRE_AUTH_TOOLS = new Set(['vibe_start', 'vibe_init', 'vibe_token', 'vibe_people', 'vibe_thread', 'vibe_send']);
99
+ // Before sign-in a newcomer's first request ("message @sam ...") must meet the
100
+ // sign-in gate instead of a missing tool. Every gated call does the same thing
101
+ // (sign in, send nothing), so this list only decides which verb the model
102
+ // reaches for. The messaging verb listed is vibe_prepare, the start of every
103
+ // send (prepare, preview, Send): vibe_send sends only a draft, and a draft id
104
+ // cannot exist while prepare is hidden. After sign-in, tools/list_changed
105
+ // reveals the rest, vibe_send included.
106
+ const PRE_AUTH_TOOLS = new Set(['vibe_start', 'vibe_init', 'vibe_token', 'vibe_people', 'vibe_thread', 'vibe_prepare']);
103
107
  const NO_AUTH_REQUIRED = new Set(['vibe_start', 'vibe_init', 'vibe_token']);
104
108
 
105
109
  // "Is this session signed in": the credential answers, not a file on disk.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slashvibe-mcp",
3
- "version": "0.9.16",
3
+ "version": "0.9.17",
4
4
  "mcpName": "io.github.vibecodinginc/vibe",
5
5
  "description": "Telepathic messaging between people, from inside Claude Code",
6
6
  "main": "index.js",
package/tools/drafts.js CHANGED
@@ -8,7 +8,10 @@
8
8
  * recipient, exact message, what it answers. NOTHING is
9
9
  * sent. Edit = call it again with new text.
10
10
  * vibe_send with a draft id + rev: the Send choice IS the approval.
11
- * Sends exactly the previewed text, once.
11
+ * Sends exactly the previewed text, once. It is the only
12
+ * way a tool call sends (apart from vibe_ask / vibe_answer
13
+ * over an open line, tools/line.js): without a draft it
14
+ * opens one, exactly as vibe_prepare would, and sends nothing.
12
15
  * vibe_discard cancel. NOTHING is sent.
13
16
  *
14
17
  * Rules this file keeps:
@@ -354,7 +357,7 @@ async function draftHandler(args) {
354
357
  if (to === me) return { display: "You can't draft to yourself." };
355
358
  // @echo is the feedback line with its own path and no receipt shape;
356
359
  // it is not a person to draft to (codex P2).
357
- if (to === 'echo') return { display: '@echo is the feedback line. To write to it, send the person\'s own words with vibe_send (handle + message). Nothing drafted.' };
360
+ if (to === 'echo') return { display: '@echo is the feedback line, not a person to draft to. Nothing drafted, nothing sent.' };
358
361
  // An approval-bound send targets a durable conversation; the live
359
362
  // session route stores nothing and the platform refuses it (CB-007).
360
363
  if (to.endsWith('/claude')) return { display: `Drafts go to a person's durable conversation, not a live session — use @${to.replace(/\/claude$/, '')} instead. Nothing drafted.` };
@@ -461,15 +464,12 @@ async function discardHandler(args) {
461
464
 
462
465
  const sendDefinition = {
463
466
  name: 'vibe_send',
464
- description: "Send a message to a person. Two forms. (1) A prepared draft: pass id AND rev from the preview. Call this only when the person chose Send; that choice is the approval, do not ask again. (2) Words the person themselves stated, verbatim: pass handle + message (and reply_to when answering a specific message). Never use form 2 for words you wrote: prepare those with vibe_prepare so the person sees them first.",
467
+ description: "Send a prepared draft: pass id AND rev from the preview vibe_prepare showed. Call this only when the person chose Send; that choice is the approval, do not ask again. It sends exactly the previewed text, once. There is no other way to send: to write to someone, even in words the person dictated, open a draft with vibe_prepare first.",
465
468
  inputSchema: {
466
469
  type: 'object',
467
470
  properties: {
468
- id: { type: 'string', description: 'Draft id (form 1)' },
469
- rev: { type: 'string', description: 'The rev from the preview the person approved (form 1)' },
470
- handle: { type: 'string', description: 'Recipient (form 2)' },
471
- message: { type: 'string', description: "The person's own words, exactly (form 2)" },
472
- reply_to: { type: 'string', description: 'The id of the message this answers (form 2)' },
471
+ id: { type: 'string', description: 'The draft id from the preview' },
472
+ rev: { type: 'string', description: 'The rev from the preview the person approved' },
473
473
  },
474
474
  },
475
475
  };
@@ -480,23 +480,19 @@ async function sendHandler(args) {
480
480
  const rev = typeof (args && args.rev) === 'string' ? args.rev.trim() : '';
481
481
  const me = config.getHandle();
482
482
 
483
- // Form 2: the person's own words. Their saying them is the approval.
483
+ // No draft id: nothing is sent, ever. Every send from a tool call goes
484
+ // through a preview the person approved (owner decision, 2026-11-20): a
485
+ // handle + message here would otherwise let an injected instruction or an
486
+ // overeager turn send workspace text with no human choice. A call in the
487
+ // old shape is handed to vibe_prepare itself (one code path: the same
488
+ // recipient resolution, held handling and checks), so the person lands on
489
+ // the preview instead of an error.
484
490
  if (!id) {
485
- if (!args || !args.handle || typeof args.message !== 'string' || !args.message.trim()) {
486
- return { display: 'Nothing sent. Pass a draft id and rev, or a handle and the exact message.' };
487
- }
488
- // Addressed by the platform's spelling when the handle has a '-'
489
- // (invite.resolveRecipient). Done here, not in deliver: a draft's digest
490
- // is computed over its `to` before deliver runs, so deliver must not
491
- // change the recipient.
492
- let to = canonicalHandle(args.handle);
493
- if (to && to !== canonicalHandle(me || '') && !to.endsWith('/claude')) {
494
- try { to = (await invite.resolveRecipient(to)).handle; } catch (e) {}
495
- }
496
- const result = await deliver({ to: to || args.handle, message: args.message, replyTo: cleanId(args.reply_to) });
497
- // The thread has moved on: what they say next answers THIS.
498
- if (result.data && result.data.sent) { try { clearReturnBinding(to || args.handle); } catch (e) {} }
499
- return result;
491
+ const asked = args && typeof args.handle === 'string' && args.handle.trim() && typeof args.message === 'string' && args.message.trim();
492
+ if (!asked) return { display: 'Nothing sent. vibe_send sends only a draft the person approved: pass its id and rev. To write to someone, open a draft with vibe_prepare (handle + message).', data: { sent: false, definite: true } };
493
+ const p = await draftHandler({ handle: args.handle, message: args.message, reply_to: args.reply_to });
494
+ const lead = 'Nothing sent. vibe_send sends only a draft the person approved, so this opened one instead. Show the person this preview and send it only if they choose Send.';
495
+ return { ...p, display: `${lead}\n\n${p.display}`, data: { ...(p.data || {}), sent: false, definite: true } };
500
496
  }
501
497
 
502
498
  // 1. Claim under the lock: nothing leaves the machine until this draft is
package/tools/start.js CHANGED
@@ -19,6 +19,7 @@ const reach = require('../reach');
19
19
  const { wroteLastPeople } = require('../arrival');
20
20
  const { isQaHandle } = require('./drafts');
21
21
  const line = require('../line');
22
+ const invite = require('../invite');
22
23
 
23
24
  const definition = {
24
25
  name: 'vibe_start',
@@ -97,8 +98,14 @@ async function handler(args = {}) {
97
98
  if (unreadSenders.length > 5) display += `\n_+${unreadSenders.length - 5} more_`;
98
99
  } else if (inboxRead && threads.length === 0) {
99
100
  // /vibe takes two. A newcomer with nobody to talk to needs the one next
100
- // step that makes it work, in words they can send as they are.
101
- display += '\n\nno conversations yet. /vibe takes two: send the person you work with this, then message them.\n npx slashvibe-mcp setup';
101
+ // step that makes it work, in words they can send as they are. The line
102
+ // comes from invite.js, the one place that builds it, so it names this
103
+ // person (--from): the friend who installs from it then knows them, and
104
+ // the message sent next reaches the friend while they work instead of
105
+ // waiting as "1 person you have not written to". Without a usable handle
106
+ // the bare install still works; it just cannot name anyone.
107
+ const bring = invite.line(myHandle);
108
+ display += `\n\nno conversations yet. /vibe takes two: send the person you work with this, then message them.\n ${bring ? bring.command : 'npx slashvibe-mcp setup'}`;
102
109
  }
103
110
 
104
111
  // Conversations that ended on their words and were read: "unread" alone