Skip to content

Commit 5d06a4f

Browse files
docs(server): clarify supported peer link addresses
1 parent 1a30a19 commit 5d06a4f

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎apps/server/src/cli/environment.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const environmentLinkCommand = Command.make("link", {
7878
...authLocationFlags,
7979
url: Argument.String("url").pipe(
8080
Argument.withDescription(
81-
"Where the other environment answers: its HTTPS address, or HTTP over Tailscale or loopback.",
81+
"Where the other environment answers: HTTPS, or HTTP with loopback, a Tailscale .ts.net name, or Tailscale IPv6.",
8282
),
8383
),
8484
alternateUrl: Flag.String("url").pipe(

‎apps/server/src/peer/PeerLinks.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const failStorage = (cause: unknown) =>
9696
),
9797
);
9898

99-
// Pairing codes and bearer tokens require HTTPS outside loopback and Tailscale.
99+
// Only loopback and Tailscale-specific hosts can use HTTP for credentials.
100100
const peerOrigin = (url: string) => {
101101
const parsed = URL.parse(url);
102102
if (parsed === null || (parsed.protocol !== "https:" && parsed.protocol !== "http:")) {
@@ -115,7 +115,7 @@ const peerOrigin = (url: string) => {
115115
return Effect.fail(
116116
new PeerLinkError({
117117
reason: "unreachable",
118-
message: `${url} is plain http, which would send the link's credentials unencrypted. Use its https address, or its Tailscale address.`,
118+
message: `${url} is plain http, which would send the link's credentials unencrypted. Use HTTPS, or HTTP with loopback, a Tailscale .ts.net name, or Tailscale IPv6.`,
119119
}),
120120
);
121121
}

‎packages/contracts/src/peerLink.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import { AuthMcpClientAccess } from "./auth.ts";
44
import { EnvironmentId, TrimmedNonEmptyString } from "./baseSchemas.ts";
55

66
/**
7-
* A link from this environment to another one (the peer). This environment
8-
* signed in to the peer's `/mcp` as an outside agent, with a pairing code from
9-
* the peer, so its agents can work there. The peer enforces the access chosen
10-
* at linking, and revokes the link from its own Connections.
7+
* An outgoing link authenticated through the peer's MCP pairing flow.
8+
* The peer enforces its access ceiling and can revoke its session in Connections.
119
*/
1210
export const PeerLink = Schema.Struct({
1311
environmentId: EnvironmentId,
@@ -38,11 +36,11 @@ export const PeerLinkSummary = Schema.Struct({
3836
export type PeerLinkSummary = typeof PeerLinkSummary.Type;
3937

4038
export const PeerLinkCreateInput = Schema.Struct({
41-
/** Where the peer answers: an HTTPS base URL, or HTTP over Tailscale or loopback. */
39+
/** HTTPS, or HTTP with loopback, a Tailscale .ts.net name, or Tailscale IPv6. */
4240
url: TrimmedNonEmptyString,
4341
/** More addresses for the same peer, tried after `url`. */
4442
alternateUrls: Schema.optionalKey(Schema.Array(TrimmedNonEmptyString)),
45-
/** A pairing code from the peer (`t3 pair` there, or its Connections settings). */
43+
/** A pairing code from the peer (`t3 auth pairing create`, or its Connections settings). */
4644
pairingCode: TrimmedNonEmptyString,
4745
access: AuthMcpClientAccess,
4846
});

0 commit comments

Comments
 (0)