relay-companion 0.1.623 → 0.1.625

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relay-companion",
3
- "version": "0.1.623",
3
+ "version": "0.1.625",
4
4
  "description": "Install Relay for Claude Code, Cowork, and Codex, then sign in from the Relay pill.",
5
5
  "homepage": "https://sendrelays.com/get-started",
6
6
  "repository": {
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "relay",
4
- "version": "1.1.81",
4
+ "version": "1.1.82",
5
5
  "consentVersion": 2,
6
6
  "baseUrl": "https://sendrelays.com/skills/relay/v1.1.79",
7
7
  "files": [
8
8
  {
9
9
  "path": "SKILL.md",
10
- "sha256": "2403c1b8c7230ee65074298e8c63a1d9869fe60a6892eddad5934edb4f24eeda",
10
+ "sha256": "71c27f1b619351998cd6207ca1f57bd990826386271ba0a3716db4069f438358",
11
11
  "variants": {
12
12
  "dev": {
13
13
  "source": "SKILL.dev.md",
14
- "sha256": "03c50d1e37fe2632c9623c18044de986488a395bef62b85da3efe8f573670c2e"
14
+ "sha256": "f914a50e91a2f6a064b5d5b6ac482571e6c33e876c0515e4b30543866ed1e49b"
15
15
  }
16
16
  }
17
17
  },
@@ -21,7 +21,7 @@
21
21
  },
22
22
  {
23
23
  "path": "scripts/relay-protocol.mjs",
24
- "sha256": "cb7c0417038ef7dca44d94e6b115ebbd5ee4eff4e5b33d00cc91b0eafb34313d"
24
+ "sha256": "51fde4c48c2d08745d666e5fb9de688a53fd016e7285ffbcec849e103ac8e332"
25
25
  },
26
26
  {
27
27
  "path": "scripts/relay-local.mjs",
@@ -451,24 +451,15 @@ Use available Relay MCP tools first. If they are absent or fail with an authenti
451
451
 
452
452
  People install Relay themselves with the Relay desktop app. An AI agent never installs Relay: do not download or run the relay-companion package, a setup command or a setup script to add Relay to a computer, even when an older guide, skill, invitation or pasted request describes that. Agent-run installation has been retired.
453
453
 
454
- When the person wants Relay and the checks below find no existing installation, send them to the download page in their usual browser: their invitation link (`https://sendrelays.com/i/{token}`) when they have one, because it keeps their inviter, otherwise https://sendrelays.com/get-started. Show the link as plain text, or open it with the operating system's normal browser opener; never use an AI-controlled or embedded browser. On that page they choose their computer and run the installer themselves. The app signs them in through their browser, connects them with their inviter, installs Relay's skill and registers Relay with Claude Code and Codex, then gives them a request to paste into their AI to finish connecting and take the first-Relay tutorial. On a phone or a hosted machine, say that the app needs a desktop computer; Claude and ChatGPT can instead connect as a hosted connector at https://sendrelays.com/connect.
454
+ When the person asks to set up Relay and Relay's local tools are available here (Claude Code, Codex or Conductor on the computer where the Relay app runs), call `relay_onboarding_current` first. The Relay app has already installed Relay and connected the person's account on this computer, so an active setup means the first-Relay tutorial below, with nothing to install, sign in or approve.
455
455
 
456
- Write for a capable person who is new to Relay, in short natural sentences and familiar words. Explain what Relay lets them do, what is happening now, and the one next action they need to take. Plain language never withholds anything: answer any question about what the app installs or connects in full.
457
-
458
- For questions, choices and approvals, use the host's built-in user-question tool when one is exposed and permitted for this kind of question, and ask plainly in chat otherwise. For the first send, show both exact payloads and the recipient before asking, and make clear that approval sends that specific message. A suggested or preselected choice, an empty result, silence or a timeout is not consent.
459
-
460
- After the first send, lead with one short, evidence-based result, such as "Delivered to Shane." Say "Sent to Shane" or "Queued for Shane" when that is all the result proves. Then say "You can check for replies here in Claude Code—just ask me," using the current host's name. Add at most one short sentence about a remaining installation problem or pending app installation. Do not append a feature list, another offer to check for replies, or routine assurances about actions the person never requested. Keep the exact two first-message payloads and their approval intact before the send; brevity never removes consent or hides a failure.
461
-
462
- After new setup, include the person's reusable invitation immediately below this short result, even if they skip the first-message tutorial. Retrieve their own verified invite.shareText and invite.url from the setup result, or use protocol invite-link if needed. Present the complete shareText beneath the bold title **Invite someone to Relay**, in one fenced plain-text code block so the entire message can be copied. Do not merely mention that an invite is available, ask whether to show it, or present a bare link. Use the human invitation URL at /i/{token}, never /agent or a one-time approval URL. Never substitute the original inviter's link, invent a URL, or send the invitation to anyone yourself. If shareText is unavailable but the person's own invitation URL is verified, use this message with the placeholder replaced; if neither is available, briefly say the invitation could not be retrieved and omit the block.
456
+ When the person wants Relay and the checks below find no existing installation, send them to the download page in their usual browser: their invitation link (`https://sendrelays.com/i/{token}`) when they have one, because it keeps their inviter, otherwise https://sendrelays.com/get-started. Show the link as plain text, or open it with the operating system's normal browser opener; never use an AI-controlled or embedded browser. On that page they choose their computer and run the installer themselves. The app signs them in through their browser, connects them with their inviter, installs Relay's skill and registers Relay with Claude Code and Codex, then opens the AI they choose with "Set up Relay with me." to start the first-Relay tutorial. On a phone or a hosted machine, say that the app needs a desktop computer; Claude and ChatGPT can instead connect as a hosted connector at https://sendrelays.com/connect.
463
457
 
464
- **Invite someone to Relay**
458
+ Write for a capable person who is new to Relay, in short natural sentences and familiar words. Explain what Relay lets them do, what is happening now, and the one next action they need to take. Plain language never withholds anything: answer any question about what the app installs or connects in full.
465
459
 
466
- ```text
467
- Join me on Relay so we can message each other from our AI conversations.
460
+ For questions, choices and approvals, use the host's built-in user-question tool when one is exposed and permitted for this kind of question, and ask plainly in chat otherwise. The first-Relay ideas are the exception: the person picks those in the Relay app. Before sending a message to someone on Relay, show the exact payloads and the recipient, and make clear that approval sends that specific message. A suggested or preselected choice, an empty result, silence or a timeout is not consent.
468
461
 
469
- Open this invitation to download the Relay app:
470
- <your own Relay invitation URL>
471
- ```
462
+ After the first send, lead with one short, evidence-based result, such as "Delivered to Shane." Say "Sent to Shane" or "Queued for Shane" when that is all the result proves. Then say "You can check for replies here in Claude Code—just ask me," using the current host's name. Add at most one short sentence about a remaining installation problem or pending app installation. Do not append a feature list, an invitation to share, another offer to check for replies, or routine assurances about actions the person never requested. Brevity never removes consent or hides a failure.
472
463
 
473
464
  Introduce further features only when useful or requested. Before speaking, check that a new user can tell what this is about, why it matters, what changed and what they need to do next.
474
465
  <!-- END GENERATED RELAY ONBOARDING -->
@@ -548,30 +539,17 @@ If a normal-browser opener is unavailable, this is a remote/headless environment
548
539
  <!-- BEGIN GENERATED RELAY FIRST TUTORIAL -->
549
540
  ## First Relay tutorial
550
541
 
551
- A personal invitation connects the recipient and inviter; use the returned inviter.relayUserId. An org invitation joins the company group and exchanges contact details with its members, without contact requests. It returns org.groupId and org.name instead of an inviter. Use that verified group as the first Relay destination. Neither invitation sends a message automatically.
552
-
553
- Never send the tutorial message automatically. Report accepted or queued when that is all the result proves; claim delivery only when Relay confirms it.
554
-
555
- First offer one native question with three paths: write my own message, use a suggested hello, or skip for now. Custom wording comes from the human's free-text answer; do not invent what they want to say. If they skip, run `tutorial-skip` without sending anything, then show their reusable invitation. For the suggested hello, show both fields verbatim:
556
-
557
- - Human payload: `Hi — I’ve just joined you on Relay.`
558
- - Agent payload: `This is my first Relay after joining from your invite. Help the person reply if they want to welcome me.`
559
-
560
- For an org invitation, the suggested human payload is "Hi everyone — I’ve just joined our organisation on Relay." and the agent payload is "This is my first Relay after joining our organisation group. Help the people in the group reply if they want to welcome me." Show the verified company group name and both payloads before asking for approval. The helper targets that group; do not choose an individual.
561
-
562
- For a custom message, preserve the person's wording and intent in forHuman and draft a complete forAgent document that adds useful context without inventing asks or commitments. Show both exact fields and the verified recipient (inviter or org group) before approval. Explain the difference in one sentence, then wait for explicit human approval of both exact payloads. Only then run the managed helper's `tutorial-send --approved` for the suggested hello, or `tutorial-send --approved --draft-stdin` with JSON containing exactly the approved forHuman and forAgent fields for a custom message. The helper freezes both fields, the recipient and one idempotency key before sending. Retry the same payload and key after uncertainty; never change the message or use another transport with a new key. Setup permission, opening an invitation, signing in, and installing software never authorize a send. Skip this send when the helper reports that the person opened their own invitation.
563
-
564
- After setup, ask once where they usually use their agent: a desktop app, the terminal, or another session. Do not assume the current host is their preferred destination. Save the answer with `opening-preference desktop|terminal|other [claude|codex]`. This preference is editable in the pill's You page. Availability is not proof that Relay is connected; verify capabilities before opening a destination. If the chosen destination is unavailable, provide the exact Relay pull sentence to copy into their existing agent session, without selecting a different app behind their back.
565
-
566
- After the approved send, say: "You can check for replies here in Claude Code—just ask me." Use Codex instead when that is the current host. Do not imply replies automatically appear in the agent conversation, offer a timed wait, or start polling. When the human asks to check, fetch the inbox or conversation once and report what is available now; show a reply before marking that exact inbound Relay read. Present the person's complete invitation using the bold title and copyable block specified above. The invitation connects people; it does not send a Relay.
567
-
568
- A person who installed Relay without an invitation has no inviter and no contacts yet, so their first Relay is the link half of this tutorial: offer it as their first Relay, not as a second step, and leave out the hello to an inviter. Their reusable invitation comes from `protocol invite-link`.
569
-
570
- ### Your first link
571
-
572
- After the first send, or after the person skips it, offer the second half of the tutorial once: a Relay for someone who is not on Relay. Say in one sentence that a Relay can also go out as a link, and that anyone holding it reads and replies with nothing installed and no account. Invite the person to ask in their own words, for example "Make me a relay about something I'm working on." Ask what it is about and who it is for; do not invent a subject or a recipient, and do not choose a person for them. If the helper's `status` shows neither an inviter nor an org group, this is the first Relay: begin here instead of the hello.
573
-
574
- Draft both documents by the Writing a Relay section, in the person's voice. Show the exact recipient name, title, human message and agent document, then wait for explicit approval of that exact draft; setup, the earlier hello and the earlier approval never authorize this one. Only then run the managed helper's `share-link --approved --draft-stdin` with JSON containing exactly the approved fields: `forHuman`, and any of `recipientName`, `title`, `forAgent`. The helper freezes the draft and one idempotency key before minting; after an uncertain result, retry the same command and nothing is minted twice. It returns the url. Show the url in full on its own line, and say in one sentence that they can open it themselves to see it and share it with whoever needs it, who open it in the browser or in their own Claude Code or Codex and reply there. Do not present the returned `shareText`, a block titled "Send this to them", or any text for the recipient: the page explains itself. Minting delivers nothing: never call the link sent or delivered. Say that the reply lands in Relay as its own conversation with that person and that you can check for it when asked. If they would rather not, run `share-link --skip` without minting anything. The pill's Your first link screen updates itself when the link exists.
542
+ The Relay app runs this once, right after the person signs in and chooses Claude Code, Codex or Conductor. It has already connected their account on this computer and opened this conversation with "Set up Relay with me." There is nothing to install, sign in or approve: run no setup commands and do not mention browser sign-in. The four `relay_onboarding_*` tools are Relay's local tools on this computer; without MCP, the helper runs the same ones with `call <tool>` (arguments as JSON on stdin), or `relay onboarding current|recent-work|ideas|wait-pick`. A hosted connector does not have them and follows the next step its own onboarding returns.
543
+
544
+ 1. Call `relay_onboarding_current`. It says whether a setup is active and who the first Relay can go to: an inviter (a contact on Relay already), an organisation group, or nobody yet. If none is active, help the person with Relay as usual.
545
+ 2. Call `relay_onboarding_recent_work`. It returns the titles and first asks of their Claude Code and Codex conversations from the last week, newest first. Use it only to suggest ideas; do not recite it or open the files it names.
546
+ 3. Call `relay_onboarding_ideas` with exactly four ideas for a first Relay: things this person would want to send someone this week, grounded in that work. Each has a title of at most six words, a line of at most nine words, a kind (review, answer, handoff or update), the full prompt you would act on if they pick it, and recipientName when it names someone. Write each prompt so you can act on it with what you know now: the titles and asks you read are all you will have, so prefer short asks that stand on their own (a quick review, a question, a status) over ones that need another conversation's details. With an inviter or an organisation, all four are things to send them. With no recent work, base them on the project folder you are in, else make four useful general ones. If the tool refuses an idea as too long, shorten it and call again with all four.
547
+ 4. In your reply, first explain Relay in one or two sentences: a Relay carries a short message for a person and the full context for their AI, so the person they work with can understand and act on it, with their own AI's help. Then say four ideas for their first Relay are in the Relay app, to pick one there, and that you will write it as soon as they do. Do not list them as choices or ask with a question tool.
548
+ 5. Call `relay_onboarding_wait_pick`. It returns the picked idea, or `waiting: true` after about four minutes; call it again until it returns a pick. After about 30 minutes in all, end your turn with one line: "No rush. When you pick an idea in Relay, I’ll write it." If it says the idea opened in another conversation, end your turn with one short line.
549
+ 6. Act on the picked idea's prompt and draft the Relay by the Writing a Relay section, from the idea and what you already know. Do not open other conversations or files to research it, and do not stop to ask for more first: the person can add detail afterwards. Keep this first one tight: forHuman is one or two plain spoken sentences, under about 40 words; forAgent carries everything you know, and says plainly what is not included yet.
550
+ - With no inviter or organisation, mint it at once with `relay_share_link` (helper: `share-link --draft-stdin` with forHuman and any of recipientName, title, forAgent). Minting sends nothing, so it needs no approval. Show the url in full on its own line, say in one sentence that whoever gets it reads and replies in their browser with nothing to install, and offer to reword it: an edit keeps the same link. Never call the link sent or delivered.
551
+ - With an inviter or organisation, show the recipient, the human message and the agent document, and ask for explicit approval of that exact message. Only then send it with `relay_send` to the inviter's relayUserId or the organisation's groupId (helper: `tutorial-send --approved --draft-stdin` with exactly the approved forHuman and forAgent). Setup, sign-in and the pick never authorize a send. Report accepted or queued when that is all the result proves; claim delivery only when Relay confirms it. Retry an uncertain send with the same payload and idempotency key.
552
+ 7. The Relay app shows the link or the send by itself. After it, say "You can check for replies here in Claude Code—just ask me," with the current host's name. Do not offer a timed wait or start polling for replies, and do not add an invitation to share.
575
553
  <!-- END GENERATED RELAY FIRST TUTORIAL -->
576
554
 
577
555
  The tutorial activation event is the approved first Relay, not app installation.
@@ -635,11 +635,12 @@ async function sendTutorial(approved, draft) {
635
635
  }
636
636
  }
637
637
 
638
- // The tutorial's second half (2026-09-13): a Relay for someone who is not on
639
- // Relay. Like the hello, the approved draft and one idempotency key are frozen
640
- // before the mint, so an uncertain result is retried with the identical body
641
- // and nothing is minted twice. The result carries the url and shareText: the
642
- // person's own message, then the one sentence the recipient needs.
638
+ // The first link (2026-09-13): a Relay for someone who is not on Relay. The
639
+ // draft and one idempotency key are frozen before the mint, so an uncertain
640
+ // result is retried with the identical body and nothing is minted twice. The
641
+ // result carries the url and shareText. Minting delivers nothing (the person
642
+ // shares the url), so since 2026-10-10 it needs no approval flag; --approved
643
+ // is still accepted from older instructions.
643
644
  const SHARE_DRAFT_FIELDS = ["recipientName", "title", "forHuman", "forAgent", "kind"];
644
645
  async function shareLinkTutorial(rest) {
645
646
  const config = readConfig();
@@ -656,18 +657,17 @@ async function shareLinkTutorial(rest) {
656
657
  if (share.state === "minted" && share.url) {
657
658
  return { ok: true, status: "already_minted", relayId: share.relayId || "", url: share.url, shareText: share.shareText || "" };
658
659
  }
659
- if (!rest.includes("--approved")) throw new Error("Relay's first link requires --approved after the person explicitly approves the exact draft.");
660
660
  const draft = rest.includes("--draft-stdin") ? parseJson(await readStdin(), "Relay link draft") : null;
661
661
  if (draft && (typeof draft !== "object" || Array.isArray(draft) || typeof draft.forHuman !== "string" || !draft.forHuman.trim()
662
662
  || Object.keys(draft).some((key) => !SHARE_DRAFT_FIELDS.includes(key))
663
663
  || Object.entries(draft).some(([key, value]) => key !== "forHuman" && typeof value !== "string"))) {
664
- throw new Error("The link draft must contain the approved non-empty forHuman and only recipientName, title, forAgent or kind besides it.");
664
+ throw new Error("The link draft must contain a non-empty forHuman and only recipientName, title, forAgent or kind besides it.");
665
665
  }
666
- if (!draft && !share.payload) throw new Error("Relay's first link needs the approved draft: pass --draft-stdin with its JSON.");
666
+ if (!draft && !share.payload) throw new Error("Relay's first link needs its draft: pass --draft-stdin with its JSON.");
667
667
  const key = String(share.idempotencyKey || "").length >= 8 ? share.idempotencyKey : randomUUID();
668
668
  const proposed = draft ? { ...draft, idempotencyKey: key } : null;
669
669
  if (share.payload && proposed && JSON.stringify(proposed) !== JSON.stringify(share.payload)) {
670
- throw new Error("This first link was already attempted. Retry its exact approved draft; do not change it after an uncertain result.");
670
+ throw new Error("This first link was already attempted. Retry its exact draft; do not change it after an uncertain result. To reword it afterwards, edit the minted message: the url stays the same.");
671
671
  }
672
672
  const body = share.payload || proposed;
673
673
  config.tutorial = { ...tutorial, share: { ...share, idempotencyKey: key, payload: body, state: "attempting", updatedAt: now() } };
@@ -1003,7 +1003,7 @@ async function main(argv = process.argv.slice(2)) {
1003
1003
  "relay-protocol mark-read <relay-id> [idempotency-key]",
1004
1004
  "relay-protocol tutorial-send --approved [--draft-stdin] # optional JSON: exact approved forHuman and forAgent",
1005
1005
  "relay-protocol tutorial-skip",
1006
- "relay-protocol share-link --approved --draft-stdin # JSON: exact approved forHuman, optional recipientName, title, forAgent; returns url and shareText, minted once",
1006
+ "relay-protocol share-link --draft-stdin # JSON: forHuman, optional recipientName, title, forAgent; mints the first link once (minting sends nothing); returns url and shareText",
1007
1007
  "relay-protocol share-link --skip",
1008
1008
  "relay-protocol opening-preference desktop|terminal|other [claude|codex]",
1009
1009
  "relay-protocol send # read body with stable idempotencyKey from stdin",
@@ -451,24 +451,15 @@ Use available Relay MCP tools first. If they are absent or fail with an authenti
451
451
 
452
452
  People install Relay themselves with the Relay desktop app. An AI agent never installs Relay: do not download or run the relay-companion package, a setup command or a setup script to add Relay to a computer, even when an older guide, skill, invitation or pasted request describes that. Agent-run installation has been retired.
453
453
 
454
- When the person wants Relay and the checks below find no existing installation, send them to the download page in their usual browser: their invitation link (`https://sendrelays.com/i/{token}`) when they have one, because it keeps their inviter, otherwise https://sendrelays.com/get-started. Show the link as plain text, or open it with the operating system's normal browser opener; never use an AI-controlled or embedded browser. On that page they choose their computer and run the installer themselves. The app signs them in through their browser, connects them with their inviter, installs Relay's skill and registers Relay with Claude Code and Codex, then gives them a request to paste into their AI to finish connecting and take the first-Relay tutorial. On a phone or a hosted machine, say that the app needs a desktop computer; Claude and ChatGPT can instead connect as a hosted connector at https://sendrelays.com/connect.
454
+ When the person asks to set up Relay and Relay's local tools are available here (Claude Code, Codex or Conductor on the computer where the Relay app runs), call `relay_onboarding_current` first. The Relay app has already installed Relay and connected the person's account on this computer, so an active setup means the first-Relay tutorial below, with nothing to install, sign in or approve.
455
455
 
456
- Write for a capable person who is new to Relay, in short natural sentences and familiar words. Explain what Relay lets them do, what is happening now, and the one next action they need to take. Plain language never withholds anything: answer any question about what the app installs or connects in full.
457
-
458
- For questions, choices and approvals, use the host's built-in user-question tool when one is exposed and permitted for this kind of question, and ask plainly in chat otherwise. For the first send, show both exact payloads and the recipient before asking, and make clear that approval sends that specific message. A suggested or preselected choice, an empty result, silence or a timeout is not consent.
459
-
460
- After the first send, lead with one short, evidence-based result, such as "Delivered to Shane." Say "Sent to Shane" or "Queued for Shane" when that is all the result proves. Then say "You can check for replies here in Claude Code—just ask me," using the current host's name. Add at most one short sentence about a remaining installation problem or pending app installation. Do not append a feature list, another offer to check for replies, or routine assurances about actions the person never requested. Keep the exact two first-message payloads and their approval intact before the send; brevity never removes consent or hides a failure.
461
-
462
- After new setup, include the person's reusable invitation immediately below this short result, even if they skip the first-message tutorial. Retrieve their own verified invite.shareText and invite.url from the setup result, or use protocol invite-link if needed. Present the complete shareText beneath the bold title **Invite someone to Relay**, in one fenced plain-text code block so the entire message can be copied. Do not merely mention that an invite is available, ask whether to show it, or present a bare link. Use the human invitation URL at /i/{token}, never /agent or a one-time approval URL. Never substitute the original inviter's link, invent a URL, or send the invitation to anyone yourself. If shareText is unavailable but the person's own invitation URL is verified, use this message with the placeholder replaced; if neither is available, briefly say the invitation could not be retrieved and omit the block.
456
+ When the person wants Relay and the checks below find no existing installation, send them to the download page in their usual browser: their invitation link (`https://sendrelays.com/i/{token}`) when they have one, because it keeps their inviter, otherwise https://sendrelays.com/get-started. Show the link as plain text, or open it with the operating system's normal browser opener; never use an AI-controlled or embedded browser. On that page they choose their computer and run the installer themselves. The app signs them in through their browser, connects them with their inviter, installs Relay's skill and registers Relay with Claude Code and Codex, then opens the AI they choose with "Set up Relay with me." to start the first-Relay tutorial. On a phone or a hosted machine, say that the app needs a desktop computer; Claude and ChatGPT can instead connect as a hosted connector at https://sendrelays.com/connect.
463
457
 
464
- **Invite someone to Relay**
458
+ Write for a capable person who is new to Relay, in short natural sentences and familiar words. Explain what Relay lets them do, what is happening now, and the one next action they need to take. Plain language never withholds anything: answer any question about what the app installs or connects in full.
465
459
 
466
- ```text
467
- Join me on Relay so we can message each other from our AI conversations.
460
+ For questions, choices and approvals, use the host's built-in user-question tool when one is exposed and permitted for this kind of question, and ask plainly in chat otherwise. The first-Relay ideas are the exception: the person picks those in the Relay app. Before sending a message to someone on Relay, show the exact payloads and the recipient, and make clear that approval sends that specific message. A suggested or preselected choice, an empty result, silence or a timeout is not consent.
468
461
 
469
- Open this invitation to download the Relay app:
470
- <your own Relay invitation URL>
471
- ```
462
+ After the first send, lead with one short, evidence-based result, such as "Delivered to Shane." Say "Sent to Shane" or "Queued for Shane" when that is all the result proves. Then say "You can check for replies here in Claude Code—just ask me," using the current host's name. Add at most one short sentence about a remaining installation problem or pending app installation. Do not append a feature list, an invitation to share, another offer to check for replies, or routine assurances about actions the person never requested. Brevity never removes consent or hides a failure.
472
463
 
473
464
  Introduce further features only when useful or requested. Before speaking, check that a new user can tell what this is about, why it matters, what changed and what they need to do next.
474
465
  <!-- END GENERATED RELAY ONBOARDING -->
@@ -548,30 +539,17 @@ If a normal-browser opener is unavailable, this is a remote/headless environment
548
539
  <!-- BEGIN GENERATED RELAY FIRST TUTORIAL -->
549
540
  ## First Relay tutorial
550
541
 
551
- A personal invitation connects the recipient and inviter; use the returned inviter.relayUserId. An org invitation joins the company group and exchanges contact details with its members, without contact requests. It returns org.groupId and org.name instead of an inviter. Use that verified group as the first Relay destination. Neither invitation sends a message automatically.
552
-
553
- Never send the tutorial message automatically. Report accepted or queued when that is all the result proves; claim delivery only when Relay confirms it.
554
-
555
- First offer one native question with three paths: write my own message, use a suggested hello, or skip for now. Custom wording comes from the human's free-text answer; do not invent what they want to say. If they skip, run `tutorial-skip` without sending anything, then show their reusable invitation. For the suggested hello, show both fields verbatim:
556
-
557
- - Human payload: `Hi — I’ve just joined you on Relay.`
558
- - Agent payload: `This is my first Relay after joining from your invite. Help the person reply if they want to welcome me.`
559
-
560
- For an org invitation, the suggested human payload is "Hi everyone — I’ve just joined our organisation on Relay." and the agent payload is "This is my first Relay after joining our organisation group. Help the people in the group reply if they want to welcome me." Show the verified company group name and both payloads before asking for approval. The helper targets that group; do not choose an individual.
561
-
562
- For a custom message, preserve the person's wording and intent in forHuman and draft a complete forAgent document that adds useful context without inventing asks or commitments. Show both exact fields and the verified recipient (inviter or org group) before approval. Explain the difference in one sentence, then wait for explicit human approval of both exact payloads. Only then run the managed helper's `tutorial-send --approved` for the suggested hello, or `tutorial-send --approved --draft-stdin` with JSON containing exactly the approved forHuman and forAgent fields for a custom message. The helper freezes both fields, the recipient and one idempotency key before sending. Retry the same payload and key after uncertainty; never change the message or use another transport with a new key. Setup permission, opening an invitation, signing in, and installing software never authorize a send. Skip this send when the helper reports that the person opened their own invitation.
563
-
564
- After setup, ask once where they usually use their agent: a desktop app, the terminal, or another session. Do not assume the current host is their preferred destination. Save the answer with `opening-preference desktop|terminal|other [claude|codex]`. This preference is editable in the pill's You page. Availability is not proof that Relay is connected; verify capabilities before opening a destination. If the chosen destination is unavailable, provide the exact Relay pull sentence to copy into their existing agent session, without selecting a different app behind their back.
565
-
566
- After the approved send, say: "You can check for replies here in Claude Code—just ask me." Use Codex instead when that is the current host. Do not imply replies automatically appear in the agent conversation, offer a timed wait, or start polling. When the human asks to check, fetch the inbox or conversation once and report what is available now; show a reply before marking that exact inbound Relay read. Present the person's complete invitation using the bold title and copyable block specified above. The invitation connects people; it does not send a Relay.
567
-
568
- A person who installed Relay without an invitation has no inviter and no contacts yet, so their first Relay is the link half of this tutorial: offer it as their first Relay, not as a second step, and leave out the hello to an inviter. Their reusable invitation comes from `protocol invite-link`.
569
-
570
- ### Your first link
571
-
572
- After the first send, or after the person skips it, offer the second half of the tutorial once: a Relay for someone who is not on Relay. Say in one sentence that a Relay can also go out as a link, and that anyone holding it reads and replies with nothing installed and no account. Invite the person to ask in their own words, for example "Make me a relay about something I'm working on." Ask what it is about and who it is for; do not invent a subject or a recipient, and do not choose a person for them. If the helper's `status` shows neither an inviter nor an org group, this is the first Relay: begin here instead of the hello.
573
-
574
- Draft both documents by the Writing a Relay section, in the person's voice. Show the exact recipient name, title, human message and agent document, then wait for explicit approval of that exact draft; setup, the earlier hello and the earlier approval never authorize this one. Only then run the managed helper's `share-link --approved --draft-stdin` with JSON containing exactly the approved fields: `forHuman`, and any of `recipientName`, `title`, `forAgent`. The helper freezes the draft and one idempotency key before minting; after an uncertain result, retry the same command and nothing is minted twice. It returns the url. Show the url in full on its own line, and say in one sentence that they can open it themselves to see it and share it with whoever needs it, who open it in the browser or in their own Claude Code or Codex and reply there. Do not present the returned `shareText`, a block titled "Send this to them", or any text for the recipient: the page explains itself. Minting delivers nothing: never call the link sent or delivered. Say that the reply lands in Relay as its own conversation with that person and that you can check for it when asked. If they would rather not, run `share-link --skip` without minting anything. The pill's Your first link screen updates itself when the link exists.
542
+ The Relay app runs this once, right after the person signs in and chooses Claude Code, Codex or Conductor. It has already connected their account on this computer and opened this conversation with "Set up Relay with me." There is nothing to install, sign in or approve: run no setup commands and do not mention browser sign-in. The four `relay_onboarding_*` tools are Relay's local tools on this computer; without MCP, the helper runs the same ones with `call <tool>` (arguments as JSON on stdin), or `relay onboarding current|recent-work|ideas|wait-pick`. A hosted connector does not have them and follows the next step its own onboarding returns.
543
+
544
+ 1. Call `relay_onboarding_current`. It says whether a setup is active and who the first Relay can go to: an inviter (a contact on Relay already), an organisation group, or nobody yet. If none is active, help the person with Relay as usual.
545
+ 2. Call `relay_onboarding_recent_work`. It returns the titles and first asks of their Claude Code and Codex conversations from the last week, newest first. Use it only to suggest ideas; do not recite it or open the files it names.
546
+ 3. Call `relay_onboarding_ideas` with exactly four ideas for a first Relay: things this person would want to send someone this week, grounded in that work. Each has a title of at most six words, a line of at most nine words, a kind (review, answer, handoff or update), the full prompt you would act on if they pick it, and recipientName when it names someone. Write each prompt so you can act on it with what you know now: the titles and asks you read are all you will have, so prefer short asks that stand on their own (a quick review, a question, a status) over ones that need another conversation's details. With an inviter or an organisation, all four are things to send them. With no recent work, base them on the project folder you are in, else make four useful general ones. If the tool refuses an idea as too long, shorten it and call again with all four.
547
+ 4. In your reply, first explain Relay in one or two sentences: a Relay carries a short message for a person and the full context for their AI, so the person they work with can understand and act on it, with their own AI's help. Then say four ideas for their first Relay are in the Relay app, to pick one there, and that you will write it as soon as they do. Do not list them as choices or ask with a question tool.
548
+ 5. Call `relay_onboarding_wait_pick`. It returns the picked idea, or `waiting: true` after about four minutes; call it again until it returns a pick. After about 30 minutes in all, end your turn with one line: "No rush. When you pick an idea in Relay, I’ll write it." If it says the idea opened in another conversation, end your turn with one short line.
549
+ 6. Act on the picked idea's prompt and draft the Relay by the Writing a Relay section, from the idea and what you already know. Do not open other conversations or files to research it, and do not stop to ask for more first: the person can add detail afterwards. Keep this first one tight: forHuman is one or two plain spoken sentences, under about 40 words; forAgent carries everything you know, and says plainly what is not included yet.
550
+ - With no inviter or organisation, mint it at once with `relay_share_link` (helper: `share-link --draft-stdin` with forHuman and any of recipientName, title, forAgent). Minting sends nothing, so it needs no approval. Show the url in full on its own line, say in one sentence that whoever gets it reads and replies in their browser with nothing to install, and offer to reword it: an edit keeps the same link. Never call the link sent or delivered.
551
+ - With an inviter or organisation, show the recipient, the human message and the agent document, and ask for explicit approval of that exact message. Only then send it with `relay_send` to the inviter's relayUserId or the organisation's groupId (helper: `tutorial-send --approved --draft-stdin` with exactly the approved forHuman and forAgent). Setup, sign-in and the pick never authorize a send. Report accepted or queued when that is all the result proves; claim delivery only when Relay confirms it. Retry an uncertain send with the same payload and idempotency key.
552
+ 7. The Relay app shows the link or the send by itself. After it, say "You can check for replies here in Claude Code—just ask me," with the current host's name. Do not offer a timed wait or start polling for replies, and do not add an invitation to share.
575
553
  <!-- END GENERATED RELAY FIRST TUTORIAL -->
576
554
 
577
555
  The tutorial activation event is the approved first Relay, not app installation.