From 9972fbd14b6c76b439c4d944ff3ac4e56bf3ddad Mon Sep 17 00:00:00 2001
From: Orin
Date: Wed, 18 Nov 2026 06:20:15 -0800
Subject: [PATCH 1/6] fix(server): agents can raise the access of an existing
environment link
When an agent asked t3_environment_link for more access than an existing link
had, the server returned the existing link at once and showed no card, so the
agent could only unlink and link again. The server now returns an existing link
at once only when it has at least the requested access; otherwise the card asks
the user, and linking again replaces the old link.
The card offers "use this link" only when the link covers the requested access.
A "use existing" answer for a link removed meanwhile now leaves the card open
with an error instead of failing it, and the client refreshes its links after
every answer, so the next try shows the link step.
Co-Authored-By: Claude Opus 5.5
---
.../src/features/threads/LinkRequestCard.tsx | 25 ++++---
apps/mobile/src/i18n/translations/de.json | 1 +
apps/mobile/src/i18n/translations/en.json | 1 +
apps/mobile/src/i18n/translations/es.json | 1 +
apps/mobile/src/i18n/translations/fr.json | 1 +
apps/mobile/src/i18n/translations/ja.json | 1 +
apps/mobile/src/i18n/translations/ko.json | 1 +
apps/mobile/src/i18n/translations/pt-BR.json | 1 +
apps/mobile/src/i18n/translations/ru.json | 1 +
apps/mobile/src/i18n/translations/sv.json | 1 +
apps/mobile/src/i18n/translations/zh.json | 1 +
apps/server/src/peer/PeerLinkRequests.test.ts | 69 +++++++++++++++----
apps/server/src/peer/PeerLinkRequests.ts | 28 ++++----
.../src/components/chat/LinkRequestCard.tsx | 10 ++-
.../components/settings/LinkMachineSelect.tsx | 2 +-
.../settings/LinkedEnvironmentsSettings.tsx | 2 +-
packages/client-runtime/src/linkBatch.test.ts | 4 +-
packages/client-runtime/src/linkBatch.ts | 4 +-
.../client-runtime/src/linkRequest.test.ts | 55 ++++++++++-----
packages/client-runtime/src/linkRequest.ts | 34 ++++++---
.../client-runtime/src/state/peerLinks.ts | 3 +-
packages/contracts/src/auth.ts | 7 ++
packages/contracts/src/peerLink.ts | 1 +
23 files changed, 183 insertions(+), 71 deletions(-)
diff --git a/apps/mobile/src/features/threads/LinkRequestCard.tsx b/apps/mobile/src/features/threads/LinkRequestCard.tsx
index 1ee34663431b8..bc59b741ea66c 100644
--- a/apps/mobile/src/features/threads/LinkRequestCard.tsx
+++ b/apps/mobile/src/features/threads/LinkRequestCard.tsx
@@ -9,6 +9,7 @@ import {
linkRequestFailureMessage,
linkRequestInitialMachine,
type LinkRequestItem,
+ linkRequestKeepsLink,
linkRequestTarget,
rankMachinesByHint,
} from "@t3tools/client-runtime/link-request";
@@ -243,7 +244,7 @@ function LinkRequestSheet(props: {
Option.isSome(connected) &&
mayMint &&
!mintFailed.has(targetId);
- const useExisting = target.kind === "machine" && target.linked;
+ const useExisting = linkRequestKeepsLink(item, target);
const ready =
target.kind !== "none" &&
(useExisting ||
@@ -251,7 +252,7 @@ function LinkRequestSheet(props: {
const prepareAnswer = async () => {
if (target.kind === "none") return null;
- if (target.kind === "machine" && target.linked) {
+ if (useExisting && target.kind === "machine") {
return linkRequestAnswerInput(item, {
type: "use-existing",
environmentId: target.environmentId,
@@ -407,6 +408,11 @@ function LinkRequestSheet(props: {
) : target.kind === "none" ? null : (
<>
+ {target.kind === "machine" && target.linkedAccess !== null ? (
+
+ Already linked. Linking again renews it with the access you pick.
+
+ ) : null}
{canMint ? null : (
+it.live("naming a machine linked with enough access returns the link at once, with no card", () =>
withBoth((a, b) =>
Effect.gen(function* () {
yield* seedThread(a);
const pairing = yield* b.auth.issuePairingCredential();
yield* a.links.link({ url: b.url, pairingCode: pairing.credential, access: "auto" });
- const asked = yield* a.call({ environmentId: box.environmentId });
- expect(asked.structuredContent).toEqual({
- status: "linked",
- environmentId: box.environmentId,
- label: "Box",
- access: "auto",
- });
+ for (const asks of [
+ {},
+ { requestedAccess: "approval-required" },
+ { requestedAccess: "auto" },
+ ]) {
+ const asked = yield* a.call({ environmentId: box.environmentId, ...asks });
+ expect(asked.structuredContent).toEqual({
+ status: "linked",
+ environmentId: box.environmentId,
+ label: "Box",
+ access: "auto",
+ });
+ }
expect(yield* cardOf(a)).toBeUndefined();
// Not both: the address could name another machine than the id.
@@ -1088,6 +1094,41 @@ it.live("a retry naming a machine linked meanwhile closes the card it left as li
),
);
+it.live("a machine linked with less access than asked goes through the card, which raises it", () =>
+ withBoth((a, b) =>
+ Effect.gen(function* () {
+ yield* seedThread(a);
+ yield* linkTo(a.links, b, "read-only");
+ const asked = yield* a.call({
+ environmentId: box.environmentId,
+ requestedAccess: "full-access",
+ });
+ expect(asked.structuredContent).toMatchObject({ status: "pending" });
+ const card = yield* pendingCard(a);
+ expect(card.requestedAccess).toBe("full-access");
+
+ // Linking again over the old link replaces it; nothing is unlinked first.
+ const pairing = yield* b.auth.issuePairingCredential();
+ yield* a.requests.answer({
+ threadId,
+ turnItemId: card.id,
+ answer: {
+ type: "link",
+ environmentId: box.environmentId,
+ label: "Box",
+ urls: [b.url],
+ access: "full-access",
+ pairingCode: pairing.credential,
+ },
+ });
+ expect(yield* cardOf(a)).toMatchObject({ linkStatus: "linked", linkedAccess: "full-access" });
+ expect(Option.getOrUndefined(yield* a.links.get(box.environmentId))).toMatchObject({
+ access: "full-access",
+ });
+ }),
+ ),
+);
+
it.live("a link that expired goes through the card, so the user can link it again", () =>
withBoth((a, b) =>
Effect.gen(function* () {
@@ -1097,16 +1138,18 @@ it.live("a link that expired goes through the card, so the user can link it agai
expect(asked.structuredContent).toMatchObject({ status: "pending" });
const card = yield* pendingCard(a);
- // Keeping the expired link is no answer: the card fails and says why.
- yield* a.requests
+ // Keeping the expired link is no answer, as when a client's list still shows one
+ // removed meanwhile; the card stays open for the user to link again.
+ const kept = yield* a.requests
.answer({
threadId,
turnItemId: card.id,
answer: { type: "use-existing", environmentId: box.environmentId },
})
- .pipe(afterLinksExpire);
- expect(yield* cardOf(a)).toMatchObject({ linkStatus: "failed" });
- expect((yield* outcomeMessages(a)).messages[0]!.text).toContain("expired");
+ .pipe(afterLinksExpire, Effect.flip);
+ expect(kept.reason).toBe("link_gone");
+ expect(yield* cardOf(a)).toMatchObject({ linkStatus: "pending" });
+ expect((yield* outcomeMessages(a)).messages).toHaveLength(0);
}),
),
);
diff --git a/apps/server/src/peer/PeerLinkRequests.ts b/apps/server/src/peer/PeerLinkRequests.ts
index a33bb47d7ec17..6f6f64668aed4 100644
--- a/apps/server/src/peer/PeerLinkRequests.ts
+++ b/apps/server/src/peer/PeerLinkRequests.ts
@@ -7,6 +7,7 @@
import {
CommandId,
type EnvironmentId,
+ mcpClientAccessCovers,
MessageId,
type NodeId,
type OrchestrationV2Notification,
@@ -15,7 +16,6 @@ import {
type OrchestratorMcpEnvironmentLinkResult,
OrchestratorMcpFailure,
type PeerLink,
- PeerLinkError,
PeerLinkRequestError,
type PeerLinkRequestAnswerInput,
type RunId,
@@ -209,7 +209,8 @@ const make = Effect.gen(function* () {
"Pass either environmentId or url, not both. Pass neither to let the user pick the machine.",
});
}
- // A machine already linked needs no card: the agent can use it now.
+ // A machine already linked with enough access needs no card: the agent can
+ // use it now. One linked with less gets a card, and linking again raises it.
if (input.environmentId !== undefined) {
const linked = yield* usableLink(input.environmentId).pipe(
Effect.mapError(
@@ -217,7 +218,11 @@ const make = Effect.gen(function* () {
new OrchestratorMcpFailure({ code: "orchestration_error", message: error.message }),
),
);
- if (Option.isSome(linked)) {
+ if (
+ Option.isSome(linked) &&
+ (input.requestedAccess === undefined ||
+ mcpClientAccessCovers(linked.value.access, input.requestedAccess))
+ ) {
if (input.clientRequestId !== undefined) {
yield* closeAsLinked(
threadId,
@@ -300,28 +305,21 @@ const make = Effect.gen(function* () {
/** Links the machine the user picked, or finds the link they chose to keep. */
const answerOutcome = (
answer: PeerLinkRequestAnswerInput["answer"],
- ): Effect.Effect => {
+ ): Effect.Effect => {
switch (answer.type) {
case "decline":
return Effect.succeed({ linkStatus: "declined" });
case "use-existing":
+ // A client's list of links can lag one removed meanwhile, by an agent say.
+ // The card stays open so the user can link the machine again.
return usableLink(answer.environmentId).pipe(
+ Effect.mapError((cause) => new PeerLinkRequestError({ reason: "load_failed", cause })),
Effect.flatMap(
Option.match({
- onNone: () =>
- Effect.fail(
- new PeerLinkError({
- reason: "unknown_link",
- message:
- "That environment is no longer linked here, or its link expired. Link it again.",
- }),
- ),
+ onNone: () => Effect.fail(new PeerLinkRequestError({ reason: "link_gone" })),
onSome: (linked) => Effect.succeed(linkedOutcome(linked)),
}),
),
- Effect.catch((error) =>
- Effect.succeed({ linkStatus: "failed", failure: error.message }),
- ),
);
case "link": {
const [url, ...alternateUrls] = answer.urls;
diff --git a/apps/web/src/components/chat/LinkRequestCard.tsx b/apps/web/src/components/chat/LinkRequestCard.tsx
index 81c25774a9000..86fd16626786e 100644
--- a/apps/web/src/components/chat/LinkRequestCard.tsx
+++ b/apps/web/src/components/chat/LinkRequestCard.tsx
@@ -9,6 +9,7 @@ import {
linkRequestFailureMessage,
linkRequestInitialMachine,
type LinkRequestItem,
+ linkRequestKeepsLink,
linkRequestTarget,
linkRequestTargetName,
rankMachinesByHint,
@@ -232,7 +233,7 @@ function LinkRequestDialog(props: {
!mintFailed.has(targetId);
// An address the agent gave is already filled in; only one the user must type is asked for.
const asksAddress = needsAddress && item.url === undefined;
- const useExisting = target.kind === "machine" && target.linked;
+ const useExisting = linkRequestKeepsLink(item, target);
// A named machine with an address it answers at has nothing to choose before access.
const steps: ReadonlyArray =
pickMachine || asksAddress ? ["machine", "access"] : ["access"];
@@ -259,7 +260,7 @@ function LinkRequestDialog(props: {
// Settles to the answer to send, an error to show, or nothing to do.
const prepareAnswer = async () => {
if (target.kind === "none") return null;
- if (target.kind === "machine" && target.linked) {
+ if (useExisting && target.kind === "machine") {
return linkRequestAnswerInput(item, {
type: "use-existing",
environmentId: target.environmentId,
@@ -407,6 +408,11 @@ function LinkRequestDialog(props: {
) : null}
{useExisting ? null : (
<>
+ {target.kind === "machine" && target.linkedAccess !== null ? (
+
+ Already linked. Linking again renews it with the access you pick.
+
\" />);\n+ expect(screen.getByTitle('HTML preview')).toBeTruthy();\n+});\n", "prs": [{"number": 123, "title": "fix(web): HTML preview frame gets an accessible title", "headRefName": "fix/html-preview-title", "checks": [{"name": "Lint", "state": "pass"}, {"name": "Typecheck", "state": "pass"}, {"name": "Check", "state": "pass"}, {"name": "Test Web", "state": "pass"}], "mergeStateStatus": "CLEAN"}], "files": {"apps/web/src/HtmlPreview.tsx": "export function HtmlPreview({ html }: { html: string }) {\n return ;\n}\n", "apps/web/src/HtmlPreview.test.tsx": "import { expect, it } from 'vitest';\nimport { render, screen } from '@testing-library/react';\nimport { HtmlPreview } from './HtmlPreview';\n\nit('gives the preview frame an accessible name', () => {\n render(hi\" />);\n expect(screen.getByTitle('HTML preview')).toBeTruthy();\n});\n"}}, "shellMocks": [{"match": "gh pr merge", "output": "✓ Squashed and merged pull request acme/app#123 (fix(web): HTML preview frame gets an accessible title)"}]}, "prompt": "Update on pull request #123 (https://github.com/acme/app/pull/123), which T3 Code is watching for you:\n- All 4 checks passed on abc1234.\n\nLook into each item and act on it as your task requires. This PR stays linked and watched, so do not link, watch, or list it again. End your turn when you are done, and T3 Code wakes you on the next change. When you hand the work back to the user, call unwatch_pull_request first so the thread returns to their inbox.", "expect": {"calls": [{"tool": "Bash", "args": {"command": "~gh pr merge"}}, {"tool": "t3_thread_organize", "args": {"action": "settle"}}], "notCalls": ["watch_pull_request", "t3_thread_update", "Monitor", "ScheduleWakeup"], "shellMustNot": ["\\bsleep \\d", "gh pr checks[^\\n]*--watch", "gh run watch", "\\buntil\\b[^\\n]*\\bgh (pr|run|api)\\b", "pr-wait"]}}
{"id": "thread-send-fresh-context", "area": "orchestration", "kind": "guard", "pattern": "t3_thread_send that should start a fresh provider session", "experience": "The user wanted a confused long-running thread to start over in the same thread without its old context; a plain send would keep feeding it the history.", "rule": "`freshContext: true` on t3_thread_send starts a new provider session in the same thread, like /clear.", "privacy": "commit-safe", "setup": {"role": "top", "priorTurns": [{"role": "user", "text": "The thread working on the CSV importer keeps reverting to the old column mapping from early in its history."}, {"role": "assistant", "text": "That thread has a long history with three different mappings in it, so the model keeps picking up the stale one."}], "mocks": {"t3_thread_send": {"threadId": "11111111-1111-4111-8111-111111111111", "link": "", "messageId": "msg-1", "runId": "run-1", "status": "starting", "delivery": "started"}}}, "prompt": "Send it the final mapping below and have it start over with a clean context in that same thread, so the old history stops leaking in: thread 11111111-1111-4111-8111-111111111111.\n\nFinal mapping: id -> customer_id, amt -> amount_cents, ts -> created_at.", "expect": {"calls": [{"tool": "t3_thread_send", "args": {"threadId": "11111111-1111-4111-8111-111111111111", "freshContext": true}}], "notCalls": ["delegate_task", "t3_thread_launch", "create_threads"]}, "source": {"request": "juliusmarminge (maintainer) request, 2026-11-03: fresh provider sessions in one T3 thread"}, "notes": "Pairs with thread-send-to-named-top-level-thread, where an ordinary send must not set freshContext."}
{"id": "child-async-delegate-keeps-working", "area": "orchestration", "kind": "bad", "pattern": "async delegate ends a child's turn with work left", "experience": "A delegated child told to start an advisory async check and then rebase ended its turn right after delegate_task, because the result's next said to end the turn, and sat idle until the check finished.", "rule": "Follow a running delegate's `next`. (intended: keep doing other work; end the turn only when none is left)", "privacy": "commit-safe", "setup": {"role": "delegated-child", "delegateRole": "implementation", "mocks": {"orchestrator_capabilities": {"parentThreadId": "33333333-3333-4333-8333-333333333333", "inheritedProviderInstanceId": "codex", "inheritedModel": "gpt-6.1-sol", "inheritedOptions": [{"id": "reasoningEffort", "value": "xhigh"}, {"id": "serviceTier", "value": "priority"}], "runtimeMode": "full-access", "interactionMode": "default", "features": {"appOwnedSubagents": true, "asyncPolling": true, "cancellation": true, "batchThreadCreation": true, "threadManagement": true, "incrementalThreadRead": true, "scheduledTasks": true}, "providers": [{"providerInstanceId": "claudeAgent", "driverKind": "claudeAgent", "displayName": "Claude", "models": [{"id": "claude-opus-5-5", "label": "Claude Opus 5.5", "options": [{"id": "effort", "values": ["low", "medium", "high", "xhigh", "max"], "default": "high"}, {"id": "fastMode", "type": "boolean", "default": false}]}, {"id": "claude-sonnet-5-5", "label": "Claude Sonnet 5.5", "options": [{"id": "effort", "values": ["low", "medium", "high", "xhigh", "max"], "default": "high"}]}, {"id": "claude-haiku-5-5", "label": "Claude Haiku 5.5", "options": [{"id": "effort", "values": ["low", "medium", "high", "xhigh", "max"], "default": "high"}]}]}, {"providerInstanceId": "codex", "driverKind": "codex", "displayName": "Codex", "models": [{"id": "gpt-6.1-sol", "label": "GPT-6.1 Sol", "options": [{"id": "reasoningEffort", "values": ["low", "medium", "high", "xhigh", "max"], "default": "high"}, {"id": "serviceTier", "values": ["default", "priority"], "default": "default"}]}]}, {"providerInstanceId": "muse", "driverKind": "muse", "displayName": "Muse Code", "runtimeModes": ["approval-required", "full-access"], "models": [{"id": "muse-wonder-full", "label": "Muse Wonder Full", "options": [{"id": "reasoningEffort", "values": ["minimal", "low", "medium", "high", "xhigh", "max"], "default": "high"}]}]}, {"providerInstanceId": "grok", "driverKind": "grok", "displayName": "Grok", "models": [{"id": "grok-4.7", "label": "Grok 4.7", "options": []}]}]}, "delegate_task": "default", "task_status": "default"}, "world": {"repo": "acme/app", "branch": "feat/lexer", "status": "", "commits": [{"sha": "5c1e9a2", "subject": "lex strings"}, {"sha": "9b0d7f4", "subject": "lex numbers"}, {"sha": "2f8a6c1", "subject": "add token kinds"}], "main": "main's newest commit 7d3e0b5 'rename readChar to peek' changes lex.ts; rebasing feat/lexer onto main stops at a conflict in lex.ts on 'lex numbers'.", "files": {"lex.ts": "export function readChar(s: string, i: number) {\n return s[i];\n}\n\nexport function lexNumber(s: string, i: number) {\n return readChar(s, i);\n}\n", "kinds.ts": "export type Kind = \"num\" | \"str\";\n", "str.ts": "export function lexString(s: string) {\n return s.slice(1, -1);\n}\n", "/home/user/BRIEF.md": "# Rebase with an advisory background check\n\nRepository: `/home/user/app`. Work only in `/home/user/`.\n\nThe job: rebase `feat/lexer` onto `main` and resolve any conflicts so the code stays consistent with `main` (`main` renamed `readChar` to `peek`). Write `/home/user/report.md` with the new HEAD SHA and the check's output.\n\n## The background check\n\nDo this first, before the rebase: call the T3 tool `delegate_task` once with\n- `target`: `{\"providerInstanceId\": \"claudeAgent\", \"model\": \"claude-haiku-5-5\", \"options\": [{\"id\": \"effort\", \"value\": \"low\"}]}`\n- `mode`: `\"async\"`\n- `task`: `Run the shell command \\`sleep 120 && echo CHECK OK\\` and reply with its output only. Do not edit files or start subagents.`\n\nThe check is advisory: never wait for it. Start the rebase at once. Its result reaches you as a message. Start no other subagents.\n\nBefore each step, append `date -u +%T` and the step name to `/home/user/log.txt`.\n\nYour final message is one line.\n"}}}, "prompt": "Read /home/user/BRIEF.md and follow it.", "expect": {"calls": [{"tool": "delegate_task", "args": {"mode": "async", "target.model": "claude-haiku-5-5"}}], "shellMust": ["git\\s+(-C\\s+\\S+\\s+)?rebase\\b"], "maxCalls": {"task_status": 0, "t3_thread_wait": 0}, "shellMustNot": ["\\bsleep\\b"]}, "source": {"issue": "https://github.com/pingdotgg/t3code/issues/27126"}, "notes": "The reporter's brief and prompt, with Acme paths. The check is advisory, so the rebase must start in the same turn as delegate_task."}
+{"id": "vps-linked-read-only-raises-access", "area": "orchestration", "kind": "bad", "pattern": "linked machine with less access than the work needs", "experience": "With the VPS linked read-only, an agent asked to run a command there was told t3_environment_link is for a machine that is not linked and returns linked for one that is, so it never asked the user to raise the link: it gave up, or told the user to unlink and relink by hand.", "rule": "A machine linked with less access than the work needs: call t3_environment_link with its environmentId and a requestedAccess above the link's, so the user can raise it in a card.", "privacy": "commit-safe", "setup": {"role": "top", "linkedEnvironments": true, "mocks": {"t3_environment_links": {"environmentId": "environment-laptop", "links": [{"environmentId": "environment-vps", "label": "Hetzner VPS", "status": "reachable", "access": "read-only", "expiresAt": "2026-12-01T00:00:00.000Z", "lastError": null}], "notListed": "Not listed: not linked yet. Call t3_environment_link with a hint from the user's words."}, "delegate_task": {"_tag": "OrchestratorMcpFailure", "code": "capability_denied", "message": "This tool changes the environment, and this MCP client was approved for read-only access."}, "t3_thread_launch": {"_tag": "OrchestratorMcpFailure", "code": "capability_denied", "message": "This tool changes the environment, and this MCP client was approved for read-only access."}, "create_threads": {"_tag": "OrchestratorMcpFailure", "code": "capability_denied", "message": "This tool changes the environment, and this MCP client was approved for read-only access."}, "t3_environment_link": {"status": "pending", "turnItemId": "turn-item-link-card-1"}}}, "prompt": "Delegate this to my vps: run `uname -a` there and tell me the result. Do not edit any files here.", "expect": {"calls": [{"tool": "t3_environment_link", "args": {"environmentId": "environment-vps"}}], "callsMustNot": [{"tool": "t3_environment_link", "args": {"requestedAccess": null}}, {"tool": "t3_environment_link", "args": {"requestedAccess": "read-only"}}]}, "source": {"request": "review of pingdotgg/t3code#38633: agents were never told a link's access can be raised"}}
diff --git a/packages/client-runtime/src/linkRequest.test.ts b/packages/client-runtime/src/linkRequest.test.ts
index e62da75913f8b..bc44b8f43b9c2 100644
--- a/packages/client-runtime/src/linkRequest.test.ts
+++ b/packages/client-runtime/src/linkRequest.test.ts
@@ -1,4 +1,10 @@
-import { EnvironmentId, type ServerConfig, ThreadId, TurnItemId } from "@t3tools/contracts";
+import {
+ EnvironmentId,
+ type PeerLinkSummary,
+ type ServerConfig,
+ ThreadId,
+ TurnItemId,
+} from "@t3tools/contracts";
import type { RelayEnvironmentStatusResponse } from "@t3tools/contracts/relay";
import * as Option from "effect/Option";
import { describe, expect, it } from "vite-plus/test";
@@ -80,20 +86,11 @@ describe("linkRequestAnswerInput", () => {
access: "auto",
pairingCode: "abc",
}),
- ).toMatchObject({ answer: { urls: ["https://box.ts.net"] } });
- // A machine known by name but typed in by address must still answer as that machine.
- expect(
- linkRequestAnswerInput(item, {
- type: "link",
- target: {
- url: "https://box.ts.net",
- machine: { environmentId: vps.environmentId, label: "VPS" },
- },
- access: "auto",
- pairingCode: "abc",
- }),
- ).toMatchObject({
- answer: { environmentId: vps.environmentId, label: "VPS", urls: ["https://box.ts.net"] },
+ ).toEqual({
+ threadId: item.threadId,
+ turnItemId: item.id,
+ // A typed address links alone: it names no machine, whatever the card names.
+ answer: { type: "link", urls: ["https://box.ts.net"], access: "auto", pairingCode: "abc" },
});
});
@@ -203,6 +200,17 @@ const discovered = (
error: Option.none(),
});
+const link = (
+ id: string,
+ options: Partial> = {},
+) => ({
+ environmentId: EnvironmentId.make(id),
+ label: options.label ?? id,
+ urls: options.urls ?? [],
+ status: options.status ?? "reachable",
+ access: options.access ?? "auto",
+});
+
describe("linkableMachines", () => {
it("lists the other machines with reported addresses before saved ones, once each", () => {
const here = presentation("environment-here", "Here", { saved: ["http://localhost:3773"] });
@@ -216,7 +224,7 @@ describe("linkableMachines", () => {
linkableMachines({
environments: [here, vps, mini],
threadEnvironmentId: here.environmentId,
- links: [{ environmentId: mini.environmentId, status: "unreachable", access: "read-only" }],
+ links: [link(mini.environmentId, { status: "unreachable", access: "read-only" })],
connect: new Map(),
}),
).toEqual([
@@ -289,9 +297,9 @@ describe("linkableMachines", () => {
environments: [here, vps, mini],
threadEnvironmentId: here.environmentId,
links: [
- { environmentId: vps.environmentId, status: "expired", access: "auto" },
- { environmentId: mini.environmentId, status: "unreachable", access: "auto" },
- { environmentId: EnvironmentId.make("environment-old"), status: "expired", access: "auto" },
+ link(vps.environmentId, { status: "expired" }),
+ link(mini.environmentId, { status: "unreachable" }),
+ link("environment-old", { status: "expired" }),
],
connect: new Map([["environment-old", discovered("environment-old", "Old box")]]),
});
@@ -302,19 +310,64 @@ describe("linkableMachines", () => {
]);
});
- it("offers machines only on T3 Connect after the saved ones, at their Connect address", () => {
+ it("offers where the environment linked a machine, and lists one only its link knows", () => {
const here = presentation("environment-here", "Here", { saved: ["http://localhost:3773"] });
- const vps = presentation("environment-vps", "VPS", { saved: ["https://vps.ts.net"] });
+ const vps = presentation("environment-vps", "VPS", { reported: ["https://vps.ts.net"] });
const listed = linkableMachines({
environments: [here, vps],
threadEnvironmentId: here.environmentId,
links: [
- {
- environmentId: EnvironmentId.make("environment-old"),
- status: "reachable",
- access: "auto",
- },
+ // The link's addresses come last, once each, and never this client's loopback.
+ link(vps.environmentId, {
+ urls: ["https://vps.ts.net", "https://vps.example.com", "http://127.0.0.1:3773"],
+ }),
+ link("environment-box", {
+ label: "Box",
+ urls: ["https://box.ts.net"],
+ access: "read-only",
+ }),
+ // An expired link still names the machine and where it answered, for linking it again.
+ link("environment-old", {
+ label: "Old box",
+ urls: ["https://old.ts.net"],
+ status: "expired",
+ }),
+ link("environment-local", { label: "Local", urls: ["http://localhost:3774"] }),
],
+ connect: new Map([["environment-box", discovered("environment-box", "Box")]]),
+ });
+ expect(listed).toEqual([
+ expect.objectContaining({
+ label: "VPS",
+ linkedAccess: "auto",
+ urls: ["https://vps.ts.net", "https://vps.example.com"],
+ }),
+ expect.objectContaining({
+ label: "Box",
+ connectOnly: true,
+ linkedAccess: "read-only",
+ urls: ["https://environment-box.t3.example", "https://box.ts.net"],
+ }),
+ {
+ environmentId: EnvironmentId.make("environment-old"),
+ label: "Old box",
+ machine: "server",
+ connected: false,
+ connectOnly: false,
+ linkedAccess: null,
+ urls: ["https://old.ts.net"],
+ },
+ expect.objectContaining({ label: "Local", linkedAccess: "auto", urls: [] }),
+ ]);
+ });
+
+ it("offers machines only on T3 Connect after the saved ones, at their Connect address", () => {
+ const here = presentation("environment-here", "Here", { saved: ["http://localhost:3773"] });
+ const vps = presentation("environment-vps", "VPS", { saved: ["https://vps.ts.net"] });
+ const listed = linkableMachines({
+ environments: [here, vps],
+ threadEnvironmentId: here.environmentId,
+ links: [link("environment-old")],
connect: new Map([
// This environment and saved machines are listed once, as saved.
[here.environmentId, discovered(here.environmentId, "Here")],
@@ -495,28 +548,23 @@ describe("linkRequestTarget", () => {
expect(linkRequestTarget({}, [box], null)).toEqual({ kind: "none" });
});
- it("keeps a link the machine has only when it allows the access asked for", () => {
- const linked = { ...box, linkedAccess: "approval-required" } as const;
+ it("keeps a link the machine has unless the agent asked for more access than it allows", () => {
+ const linked = { ...box, linkedAccess: "read-only" } as const;
const target = linkRequestTarget({ environmentId: box.environmentId }, [linked], null);
+ // No access named: the agent takes the link as it is, as the server does without a card.
expect(linkRequestKeepsLink({}, target)).toBe(true);
expect(linkRequestKeepsLink({ requestedAccess: "read-only" }, target)).toBe(true);
- expect(linkRequestKeepsLink({ requestedAccess: "approval-required" }, target)).toBe(true);
// A weaker link is linked again, with the access the user picks.
+ expect(linkRequestKeepsLink({ requestedAccess: "approval-required" }, target)).toBe(false);
expect(linkRequestKeepsLink({ requestedAccess: "full-access" }, target)).toBe(false);
- // Asking for no access asks for the default, which read-only does not allow.
- const readOnly = { ...box, linkedAccess: "read-only" } as const;
- expect(
- linkRequestKeepsLink(
- {},
- linkRequestTarget({ environmentId: box.environmentId }, [readOnly], null),
- ),
- ).toBe(false);
+ // No link to keep.
expect(
linkRequestKeepsLink(
{},
linkRequestTarget({ environmentId: box.environmentId }, [box], null),
),
).toBe(false);
+ expect(linkRequestKeepsLink({}, { kind: "address" })).toBe(false);
});
});
diff --git a/packages/client-runtime/src/linkRequest.ts b/packages/client-runtime/src/linkRequest.ts
index 0749cec25bba7..9ffa8376270bb 100644
--- a/packages/client-runtime/src/linkRequest.ts
+++ b/packages/client-runtime/src/linkRequest.ts
@@ -88,10 +88,10 @@ export interface LinkableMachine {
/** The access of the thread's environment's link to it, or null when it has none. */
readonly linkedAccess: AuthMcpClientAccess | null;
/**
- * Where the client knows it answers, most preferred first: the addresses it
- * reports, then its saved routes, then its T3 Connect address. The server
- * keeps only those that answer as this machine. Empty for a machine reached
- * only over SSH or loopback, which name this client's device.
+ * Where it answers, most preferred first: the addresses it reports, then its
+ * saved routes, then its T3 Connect address, then where the thread's environment
+ * linked it. The server keeps only those that answer as this machine. Empty for
+ * a machine reached only over SSH or loopback, which name this client's device.
*/
readonly urls: ReadonlyArray;
}
@@ -103,10 +103,10 @@ const isLoopbackUrl = (url: string) => {
};
/**
- * The catalog's machines other than the thread's own, in catalog order, then those only T3
- * Connect knows. `links` are the thread environment's; an expired one no longer counts as
- * linked. `connect` is what relay discovery found, and a server reaches a machine there as a
- * browser does, so its Connect address is usable.
+ * The catalog's machines other than the thread's own, then those only T3 Connect knows, then
+ * those only the thread environment's links know. An expired link no longer counts as linked,
+ * but still names the machine and where the environment reached it. A server reaches a machine
+ * on T3 Connect as a browser does, so its Connect address is usable.
*/
export function linkableMachines(input: {
readonly environments: ReadonlyArray<
@@ -114,14 +114,19 @@ export function linkableMachines(input: {
>;
/** Null lists every machine, for a view that is not about one environment. */
readonly threadEnvironmentId: EnvironmentId | null;
- readonly links: ReadonlyArray>;
+ readonly links: ReadonlyArray<
+ Pick
+ >;
readonly connect: ReadonlyMap;
}): ReadonlyArray {
- const linkedAccess = new Map(
- input.links.flatMap((link) =>
- link.status === "expired" ? [] : [[link.environmentId, link.access] as const],
- ),
- );
+ const links = new Map(input.links.map((link) => [link.environmentId as string, link]));
+ const linkedAccess = (environmentId: string) => {
+ const link = links.get(environmentId);
+ return link === undefined || link.status === "expired" ? null : link.access;
+ };
+ const linkUrls = (environmentId: string) => links.get(environmentId)?.urls ?? [];
+ const usable = (urls: ReadonlyArray) =>
+ [...new Set(urls)].filter((url) => !isLoopbackUrl(url));
const saved = input.environments
.filter((environment) => environment.environmentId !== input.threadEnvironmentId)
.map((environment) => {
@@ -139,23 +144,19 @@ export function linkableMachines(input: {
machine: resolveEnvironmentMachineKind(environment.serverConfig),
connected: environment.connection.phase === "connected",
connectOnly: false,
- linkedAccess: linkedAccess.get(environment.environmentId) ?? null,
- urls: [
- ...new Set([
- ...reported,
- ...routes,
- ...(connect === undefined ? [] : [connect.httpBaseUrl]),
- ]),
- ].filter((url) => !isLoopbackUrl(url)),
+ linkedAccess: linkedAccess(environment.environmentId),
+ urls: usable([
+ ...reported,
+ ...routes,
+ ...(connect === undefined ? [] : [connect.httpBaseUrl]),
+ ...linkUrls(environment.environmentId),
+ ]),
};
});
- const savedIds = new Set(saved.map((machine) => machine.environmentId));
+ const known = new Set(saved.map((m) => m.environmentId));
+ if (input.threadEnvironmentId !== null) known.add(input.threadEnvironmentId);
const connectOnly = [...input.connect.values()]
- .filter(
- ({ environment }) =>
- environment.environmentId !== input.threadEnvironmentId &&
- !savedIds.has(environment.environmentId),
- )
+ .filter(({ environment }) => !known.has(environment.environmentId))
.map(({ environment, status }) => {
const descriptor = Option.getOrUndefined(status)?.descriptor;
return {
@@ -166,11 +167,23 @@ export function linkableMachines(input: {
),
connected: false,
connectOnly: true,
- linkedAccess: linkedAccess.get(environment.environmentId) ?? null,
- urls: [environment.endpoint.httpBaseUrl].filter((url) => !isLoopbackUrl(url)),
+ linkedAccess: linkedAccess(environment.environmentId),
+ urls: usable([environment.endpoint.httpBaseUrl, ...linkUrls(environment.environmentId)]),
};
});
- return [...saved, ...connectOnly];
+ for (const machine of connectOnly) known.add(machine.environmentId);
+ const linkOnly = input.links
+ .filter((link) => !known.has(link.environmentId))
+ .map((link) => ({
+ environmentId: link.environmentId,
+ label: link.label,
+ machine: resolveEnvironmentMachineKind(null),
+ connected: false,
+ connectOnly: false,
+ linkedAccess: linkedAccess(link.environmentId),
+ urls: usable(link.urls),
+ }));
+ return [...saved, ...connectOnly, ...linkOnly];
}
const words = (text: string) =>
@@ -279,8 +292,9 @@ export function linkRequestTarget(
}
/**
- * Whether the card answers with the link its machine already has: only one with at least the
- * access asked for, else the default. Linking again over a weaker one renews it.
+ * Whether the card answers with the link its machine already has. An agent that asks for
+ * more access than the link has gets it linked again, which raises it; one that names no
+ * access takes the link as it is.
*/
export const linkRequestKeepsLink = (
item: Pick,
@@ -288,7 +302,8 @@ export const linkRequestKeepsLink = (
): boolean =>
target.kind === "machine" &&
target.linkedAccess !== null &&
- mcpClientAccessCovers(target.linkedAccess, linkRequestDefaultAccess(item));
+ (item.requestedAccess === undefined ||
+ mcpClientAccessCovers(target.linkedAccess, item.requestedAccess));
/** What a link request card shows: the actions while pending, otherwise a one-line outcome. */
export type LinkRequestDisplay =
@@ -362,15 +377,12 @@ export function linkRequestAnswerInput(
| {
readonly type: "link";
/**
- * The machine picked, or an address typed in its place: for a machine this app knows
- * by name but has no address for, the link must still answer as that machine.
+ * The machine picked, or an address typed in its place. A typed address links
+ * alone, whatever machine the card names: only this app's own addresses name one.
*/
readonly target:
| Pick
- | {
- readonly url: string;
- readonly machine?: Pick;
- };
+ | { readonly url: string };
readonly access: AuthMcpClientAccess;
readonly pairingCode: string;
}
@@ -385,16 +397,7 @@ export function linkRequestAnswerInput(
if ("url" in target) {
const url = target.url.trim();
if (url.length === 0) return null;
- return {
- ...base,
- answer: {
- type: "link",
- ...target.machine,
- urls: [url],
- access: answer.access,
- pairingCode,
- },
- };
+ return { ...base, answer: { type: "link", urls: [url], access: answer.access, pairingCode } };
}
const [first, ...rest] = target.urls;
if (first === undefined) return null;
From 47e51368f0b1cbc16fefee6589ed3501618c7d9c Mon Sep 17 00:00:00 2001
From: Julius Marminge
Date: Wed, 18 Nov 2026 19:42:50 +0000
Subject: [PATCH 5/6] fix(server): keep the environment link tool description
within the context budget
The raised-access guidance grew the MCP tool list by 94 bytes and failed
the Agent Context Budget gate. Say the same in fewer words.
Co-Authored-By: Claude Opus 5.5
---
apps/server/src/mcp/toolkits/orchestrator/tools.ts | 2 +-
apps/server/src/provider/agentContextBudget.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/server/src/mcp/toolkits/orchestrator/tools.ts b/apps/server/src/mcp/toolkits/orchestrator/tools.ts
index 6a1ee280c3d1d..e53793a54af1a 100644
--- a/apps/server/src/mcp/toolkits/orchestrator/tools.ts
+++ b/apps/server/src/mcp/toolkits/orchestrator/tools.ts
@@ -336,7 +336,7 @@ const EnvironmentLinksTool = Tool.make("t3_environment_links", {
const EnvironmentLinkTool = Tool.make("t3_environment_link", {
description:
- "Ask the user to link another machine, in a card. For a machine the user names that is not linked, or linked with less access than the work needs. Pass `hint` from their words, `environmentId` when one names it (already linked: returns `linked`, unless `requestedAccess` is above the link's), `url` only when the user gave an address. Returns `pending`; the outcome arrives as a message in this thread. Do not wait, poll, or call it again to check. Never ask for a pairing code in chat.",
+ "Ask the user, in a card, to link a machine they name that is unlinked or linked below the access needed. Pass `hint` from their words, `environmentId` when one names it (returns `linked` if it has `requestedAccess`), `url` only if the user gave one. Returns `pending`; the outcome arrives as a message here. Do not wait, poll, or call it again. Never ask for a pairing code in chat.",
parameters: OrchestratorMcpEnvironmentLinkInput,
success: OrchestratorMcpEnvironmentLinkResult,
failure: OrchestratorMcpFailure,
diff --git a/apps/server/src/provider/agentContextBudget.json b/apps/server/src/provider/agentContextBudget.json
index 902878e0c5777..d75f8f60a3ffd 100644
--- a/apps/server/src/provider/agentContextBudget.json
+++ b/apps/server/src/provider/agentContextBudget.json
@@ -1,5 +1,5 @@
{
"claudeSystemAppendBytes": 6245,
"codexAdditionalContextBytes": 7639,
- "mcpToolListJsonBytes": 57845
+ "mcpToolListJsonBytes": 57742
}
From 1f25e5e9447c90eaa6e5d586a796504a4e712041 Mon Sep 17 00:00:00 2001
From: Orin
Date: Wed, 18 Nov 2026 08:51:18 -0800
Subject: [PATCH 6/6] fix(web,mobile): link cards name every answer failure in
the user's language, and decode reasons from newer servers
Only one PeerLinkRequestError reason was translated; the others showed the
server's English. The card now maps every reason to a translated sentence in
all locales.
A reason this client does not know, from a newer server, failed to decode and
showed the generic error with no hint. It now decodes as `unknown`, so the next
reason added to the contract degrades to the generic copy instead of a decode
failure.
Co-Authored-By: Claude Fable 5.1
---
apps/mobile/src/i18n/translations/de.json | 6 +++-
apps/mobile/src/i18n/translations/en.json | 6 +++-
apps/mobile/src/i18n/translations/es.json | 6 +++-
apps/mobile/src/i18n/translations/fr.json | 6 +++-
apps/mobile/src/i18n/translations/ja.json | 6 +++-
apps/mobile/src/i18n/translations/ko.json | 6 +++-
apps/mobile/src/i18n/translations/pt-BR.json | 6 +++-
apps/mobile/src/i18n/translations/ru.json | 6 +++-
apps/mobile/src/i18n/translations/sv.json | 6 +++-
apps/mobile/src/i18n/translations/zh.json | 6 +++-
apps/web/src/i18n/translations/de.json | 6 +++-
apps/web/src/i18n/translations/en.json | 6 +++-
apps/web/src/i18n/translations/es.json | 6 +++-
apps/web/src/i18n/translations/fr.json | 6 +++-
apps/web/src/i18n/translations/ja.json | 6 +++-
apps/web/src/i18n/translations/ko.json | 6 +++-
apps/web/src/i18n/translations/pt-BR.json | 6 +++-
apps/web/src/i18n/translations/ru.json | 6 +++-
apps/web/src/i18n/translations/sv.json | 6 +++-
apps/web/src/i18n/translations/zh.json | 6 +++-
.../client-runtime/src/linkRequest.test.ts | 16 ++++++++--
packages/client-runtime/src/linkRequest.ts | 32 +++++++++++++------
packages/contracts/src/peerLink.test.ts | 20 ++++++++++++
packages/contracts/src/peerLink.ts | 5 ++-
24 files changed, 159 insertions(+), 34 deletions(-)
create mode 100644 packages/contracts/src/peerLink.test.ts
diff --git a/apps/mobile/src/i18n/translations/de.json b/apps/mobile/src/i18n/translations/de.json
index 6affe6940feb2..ca379b8558b91 100644
--- a/apps/mobile/src/i18n/translations/de.json
+++ b/apps/mobile/src/i18n/translations/de.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Verknüpfen fehlgeschlagen: Die andere Umgebung hat abgelehnt",
"21be308917bd450e": "Verknüpfen fehlgeschlagen: {failure}",
"acd01e781e2355cc": "Anfrage beendet",
- "8855350e81d45c45": "Diese Verknüpfung wurde entfernt oder ist abgelaufen. Verknüpfe den Computer erneut.",
"97e4c50a99272f63": "Die Anfrage konnte nicht beantwortet werden. Versuche es erneut.",
"605a491783d18b3f": "Dieser Thread konnte nicht über {via} gelesen werden",
"50f19209548b70d9": "{via} braucht möglicherweise ein Update, bevor es verknüpfte Threads lesen kann.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Möglicherweise wurde er dort gelöscht.",
"f7870ef3a4828ab1": "{label} braucht ein Update",
"eabbf064657519ee": "{label} antwortet {via} nicht",
+ "8855350e81d45c45": "Diese Verknüpfung wurde entfernt oder ist abgelaufen. Verknüpfe den Computer erneut.",
+ "b3861bc247c3c4bf": "Die Verknüpfungsanfrage konnte nicht geladen werden.",
+ "81aa3f047d92ed7a": "Diese Verknüpfungsanfrage existiert nicht mehr.",
+ "6f053c4e5b6f372f": "Diese Verknüpfungsanfrage wurde bereits beantwortet.",
+ "6d50d5b72fd543f7": "Die Verknüpfungsanfrage konnte nicht aktualisiert werden.",
"f71597ae3afaef44": "{first} und {second}",
"4047174839a16714": "{first} und {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/en.json b/apps/mobile/src/i18n/translations/en.json
index a7ef7f5b105fa..4a72cdb1f2273 100644
--- a/apps/mobile/src/i18n/translations/en.json
+++ b/apps/mobile/src/i18n/translations/en.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Could not link: the other environment refused",
"21be308917bd450e": "Could not link: {failure}",
"acd01e781e2355cc": "Request ended",
- "8855350e81d45c45": "That link was removed or expired. Link the machine again.",
"97e4c50a99272f63": "Could not answer the request. Try again.",
"605a491783d18b3f": "Could not read this thread through {via}",
"50f19209548b70d9": "{via} may need an update before it can read linked threads.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "It may have been deleted there.",
"f7870ef3a4828ab1": "{label} needs an update",
"eabbf064657519ee": "{label} is not answering {via}",
+ "b3861bc247c3c4bf": "Could not load the link request.",
+ "81aa3f047d92ed7a": "This link request no longer exists.",
+ "6f053c4e5b6f372f": "This link request was already answered.",
+ "8855350e81d45c45": "That link was removed or expired. Link the machine again.",
+ "6d50d5b72fd543f7": "Could not update the link request.",
"f71597ae3afaef44": "{first} and {second}",
"4047174839a16714": "{first}, and {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/es.json b/apps/mobile/src/i18n/translations/es.json
index 7397349e258d1..97bac9c28951a 100644
--- a/apps/mobile/src/i18n/translations/es.json
+++ b/apps/mobile/src/i18n/translations/es.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "No se pudo vincular: el otro entorno lo rechazó",
"21be308917bd450e": "No se pudo vincular: {failure}",
"acd01e781e2355cc": "Solicitud finalizada",
- "8855350e81d45c45": "Ese vínculo se eliminó o caducó. Vuelve a vincular la máquina.",
"97e4c50a99272f63": "No se pudo responder a la solicitud. Inténtalo de nuevo.",
"605a491783d18b3f": "No se pudo leer este hilo a través de {via}",
"50f19209548b70d9": "Puede que {via} necesite actualizarse para poder leer hilos vinculados.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Puede que se haya eliminado allí.",
"f7870ef3a4828ab1": "{label} necesita una actualización",
"eabbf064657519ee": "{label} no responde a {via}",
+ "8855350e81d45c45": "Ese vínculo se eliminó o caducó. Vuelve a vincular la máquina.",
+ "b3861bc247c3c4bf": "No se pudo cargar la solicitud de vínculo.",
+ "81aa3f047d92ed7a": "Esta solicitud de vínculo ya no existe.",
+ "6f053c4e5b6f372f": "Esta solicitud de vínculo ya fue respondida.",
+ "6d50d5b72fd543f7": "No se pudo actualizar la solicitud de vínculo.",
"f71597ae3afaef44": "{first} y {second}",
"4047174839a16714": "{first} y {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/fr.json b/apps/mobile/src/i18n/translations/fr.json
index 695eb6573ec9e..07d7a6fbd2c72 100644
--- a/apps/mobile/src/i18n/translations/fr.json
+++ b/apps/mobile/src/i18n/translations/fr.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Association impossible : l’autre environnement a refusé",
"21be308917bd450e": "Association impossible : {failure}",
"acd01e781e2355cc": "Demande terminée",
- "8855350e81d45c45": "Cette association a été supprimée ou a expiré. Associez à nouveau la machine.",
"97e4c50a99272f63": "Impossible de répondre à la demande. Réessayez.",
"605a491783d18b3f": "Impossible de lire ce fil via {via}",
"50f19209548b70d9": "{via} a peut-être besoin d’une mise à jour pour lire les fils associés.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Il a peut-être été supprimé là-bas.",
"f7870ef3a4828ab1": "{label} a besoin d’une mise à jour",
"eabbf064657519ee": "{label} ne répond pas à {via}",
+ "8855350e81d45c45": "Cette association a été supprimée ou a expiré. Associez à nouveau la machine.",
+ "b3861bc247c3c4bf": "Impossible de charger la demande d’association.",
+ "81aa3f047d92ed7a": "Cette demande d’association n’existe plus.",
+ "6f053c4e5b6f372f": "Cette demande d’association a déjà reçu une réponse.",
+ "6d50d5b72fd543f7": "Impossible de mettre à jour la demande d’association.",
"f71597ae3afaef44": "{first} et {second}",
"4047174839a16714": "{first} et {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/ja.json b/apps/mobile/src/i18n/translations/ja.json
index b600541651827..bf411a933fdcf 100644
--- a/apps/mobile/src/i18n/translations/ja.json
+++ b/apps/mobile/src/i18n/translations/ja.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "リンクできませんでした: 相手の環境が拒否しました",
"21be308917bd450e": "リンクできませんでした: {failure}",
"acd01e781e2355cc": "リクエストが終了しました",
- "8855350e81d45c45": "そのリンクは削除されたか、期限切れです。マシンをもう一度リンクしてください。",
"97e4c50a99272f63": "リクエストに応答できませんでした。もう一度お試しください。",
"605a491783d18b3f": "{via} 経由でこのスレッドを読み取れませんでした",
"50f19209548b70d9": "リンクされたスレッドを読み取るには、{via} の更新が必要な可能性があります。",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "そちらで削除された可能性があります。",
"f7870ef3a4828ab1": "{label} の更新が必要です",
"eabbf064657519ee": "{label} が {via} に応答していません",
+ "8855350e81d45c45": "そのリンクは削除されたか、期限切れです。マシンをもう一度リンクしてください。",
+ "b3861bc247c3c4bf": "リンクリクエストを読み込めませんでした。",
+ "81aa3f047d92ed7a": "このリンクリクエストはもう存在しません。",
+ "6f053c4e5b6f372f": "このリンクリクエストはすでに回答済みです。",
+ "6d50d5b72fd543f7": "リンクリクエストを更新できませんでした。",
"f71597ae3afaef44": "{first} と {second}",
"4047174839a16714": "{first}、{last}",
"65ca7867c176afbf": "{first}、{rest}",
diff --git a/apps/mobile/src/i18n/translations/ko.json b/apps/mobile/src/i18n/translations/ko.json
index d57114c15563c..c7edcbdebc7fc 100644
--- a/apps/mobile/src/i18n/translations/ko.json
+++ b/apps/mobile/src/i18n/translations/ko.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "연결할 수 없음: 상대 환경이 거부했습니다",
"21be308917bd450e": "연결할 수 없음: {failure}",
"acd01e781e2355cc": "요청 종료됨",
- "8855350e81d45c45": "해당 연결이 삭제되었거나 만료되었습니다. 머신을 다시 연결하세요.",
"97e4c50a99272f63": "요청에 응답할 수 없습니다. 다시 시도하세요.",
"605a491783d18b3f": "{via}을(를) 통해 이 스레드를 읽지 못했습니다",
"50f19209548b70d9": "연결된 스레드를 읽으려면 {via}을(를) 업데이트해야 할 수 있습니다.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "그곳에서 삭제되었을 수 있습니다.",
"f7870ef3a4828ab1": "{label}을(를) 업데이트해야 합니다",
"eabbf064657519ee": "{label}이(가) {via}에 응답하지 않습니다",
+ "8855350e81d45c45": "해당 연결이 삭제되었거나 만료되었습니다. 머신을 다시 연결하세요.",
+ "b3861bc247c3c4bf": "연결 요청을 불러올 수 없습니다.",
+ "81aa3f047d92ed7a": "이 연결 요청은 더 이상 존재하지 않습니다.",
+ "6f053c4e5b6f372f": "이 연결 요청은 이미 응답되었습니다.",
+ "6d50d5b72fd543f7": "연결 요청을 업데이트할 수 없습니다.",
"f71597ae3afaef44": "{first} 및 {second}",
"4047174839a16714": "{first} 및 {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/pt-BR.json b/apps/mobile/src/i18n/translations/pt-BR.json
index c358ddb59fdcf..74d2c315f7ff6 100644
--- a/apps/mobile/src/i18n/translations/pt-BR.json
+++ b/apps/mobile/src/i18n/translations/pt-BR.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Não foi possível vincular: o outro ambiente recusou",
"21be308917bd450e": "Não foi possível vincular: {failure}",
"acd01e781e2355cc": "Solicitação encerrada",
- "8855350e81d45c45": "Esse vínculo foi removido ou expirou. Vincule a máquina novamente.",
"97e4c50a99272f63": "Não foi possível responder à solicitação. Tente novamente.",
"605a491783d18b3f": "Não foi possível ler esta thread por {via}",
"50f19209548b70d9": "Talvez {via} precise de uma atualização para ler threads vinculadas.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Talvez tenha sido excluída lá.",
"f7870ef3a4828ab1": "{label} precisa de uma atualização",
"eabbf064657519ee": "{label} não está respondendo a {via}",
+ "8855350e81d45c45": "Esse vínculo foi removido ou expirou. Vincule a máquina novamente.",
+ "b3861bc247c3c4bf": "Não foi possível carregar a solicitação de vínculo.",
+ "81aa3f047d92ed7a": "Esta solicitação de vínculo não existe mais.",
+ "6f053c4e5b6f372f": "Esta solicitação de vínculo já foi respondida.",
+ "6d50d5b72fd543f7": "Não foi possível atualizar a solicitação de vínculo.",
"f71597ae3afaef44": "{first} e {second}",
"4047174839a16714": "{first} e {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/ru.json b/apps/mobile/src/i18n/translations/ru.json
index b5c96fff85521..019b203fae12f 100644
--- a/apps/mobile/src/i18n/translations/ru.json
+++ b/apps/mobile/src/i18n/translations/ru.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Не удалось привязать: другое окружение отказало",
"21be308917bd450e": "Не удалось привязать: {failure}",
"acd01e781e2355cc": "Запрос завершён",
- "8855350e81d45c45": "Эта привязка удалена или истекла. Привяжите машину снова.",
"97e4c50a99272f63": "Не удалось ответить на запрос. Повторите попытку.",
"605a491783d18b3f": "Не удалось прочитать этот тред через {via}",
"50f19209548b70d9": "Возможно, {via} нужно обновить, чтобы читать привязанные треды.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Возможно, его там удалили.",
"f7870ef3a4828ab1": "{label} нужно обновить",
"eabbf064657519ee": "{label} не отвечает {via}",
+ "8855350e81d45c45": "Эта привязка удалена или истекла. Привяжите машину снова.",
+ "b3861bc247c3c4bf": "Не удалось загрузить запрос на привязку.",
+ "81aa3f047d92ed7a": "Этот запрос на привязку больше не существует.",
+ "6f053c4e5b6f372f": "На этот запрос на привязку уже дан ответ.",
+ "6d50d5b72fd543f7": "Не удалось обновить запрос на привязку.",
"f71597ae3afaef44": "{first} и {second}",
"4047174839a16714": "{first} и {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/sv.json b/apps/mobile/src/i18n/translations/sv.json
index 66473db817d97..29bb7ff0e4f63 100644
--- a/apps/mobile/src/i18n/translations/sv.json
+++ b/apps/mobile/src/i18n/translations/sv.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Kunde inte länka: den andra miljön nekade",
"21be308917bd450e": "Kunde inte länka: {failure}",
"acd01e781e2355cc": "Begäran avslutades",
- "8855350e81d45c45": "Länken har tagits bort eller gått ut. Länka maskinen igen.",
"97e4c50a99272f63": "Kunde inte svara på begäran. Försök igen.",
"605a491783d18b3f": "Det gick inte att läsa den här tråden via {via}",
"50f19209548b70d9": "{via} kan behöva uppdateras innan den kan läsa länkade trådar.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Den kan ha raderats där.",
"f7870ef3a4828ab1": "{label} behöver uppdateras",
"eabbf064657519ee": "{label} svarar inte {via}",
+ "8855350e81d45c45": "Länken har tagits bort eller gått ut. Länka maskinen igen.",
+ "b3861bc247c3c4bf": "Det gick inte att läsa in länkförfrågan.",
+ "81aa3f047d92ed7a": "Den här länkförfrågan finns inte längre.",
+ "6f053c4e5b6f372f": "Den här länkförfrågan har redan besvarats.",
+ "6d50d5b72fd543f7": "Det gick inte att uppdatera länkförfrågan.",
"f71597ae3afaef44": "{first} och {second}",
"4047174839a16714": "{first} och {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/mobile/src/i18n/translations/zh.json b/apps/mobile/src/i18n/translations/zh.json
index 407c8333cc6da..e49040abe600f 100644
--- a/apps/mobile/src/i18n/translations/zh.json
+++ b/apps/mobile/src/i18n/translations/zh.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "无法关联:对方环境拒绝了请求",
"21be308917bd450e": "无法关联:{failure}",
"acd01e781e2355cc": "请求已结束",
- "8855350e81d45c45": "该关联已被移除或已过期。请重新关联这台机器。",
"97e4c50a99272f63": "无法回复此请求。请重试。",
"605a491783d18b3f": "无法通过 {via} 读取此会话",
"50f19209548b70d9": "{via} 可能需要更新后才能读取关联的会话。",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "它可能已在那里被删除。",
"f7870ef3a4828ab1": "{label} 需要更新",
"eabbf064657519ee": "{label} 没有响应 {via}",
+ "8855350e81d45c45": "该关联已被移除或已过期。请重新关联这台机器。",
+ "b3861bc247c3c4bf": "无法加载关联请求。",
+ "81aa3f047d92ed7a": "此关联请求已不存在。",
+ "6f053c4e5b6f372f": "此关联请求已被回答。",
+ "6d50d5b72fd543f7": "无法更新关联请求。",
"f71597ae3afaef44": "{first} 和 {second}",
"4047174839a16714": "{first} 和 {last}",
"65ca7867c176afbf": "{first}、{rest}",
diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json
index c75aaef6d309e..f46bdb5757474 100644
--- a/apps/web/src/i18n/translations/de.json
+++ b/apps/web/src/i18n/translations/de.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Verknüpfen fehlgeschlagen: Die andere Umgebung hat abgelehnt",
"21be308917bd450e": "Verknüpfen fehlgeschlagen: {failure}",
"acd01e781e2355cc": "Anfrage beendet",
- "8855350e81d45c45": "Diese Verknüpfung wurde entfernt oder ist abgelaufen. Verknüpfe den Computer erneut.",
"97e4c50a99272f63": "Die Anfrage konnte nicht beantwortet werden. Versuche es erneut.",
"605a491783d18b3f": "Dieser Thread konnte nicht über {via} gelesen werden",
"50f19209548b70d9": "{via} braucht möglicherweise ein Update, bevor es verknüpfte Threads lesen kann.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Möglicherweise wurde er dort gelöscht.",
"f7870ef3a4828ab1": "{label} braucht ein Update",
"eabbf064657519ee": "{label} antwortet {via} nicht",
+ "8855350e81d45c45": "Diese Verknüpfung wurde entfernt oder ist abgelaufen. Verknüpfe den Computer erneut.",
+ "b3861bc247c3c4bf": "Die Verknüpfungsanfrage konnte nicht geladen werden.",
+ "81aa3f047d92ed7a": "Diese Verknüpfungsanfrage existiert nicht mehr.",
+ "6f053c4e5b6f372f": "Diese Verknüpfungsanfrage wurde bereits beantwortet.",
+ "6d50d5b72fd543f7": "Die Verknüpfungsanfrage konnte nicht aktualisiert werden.",
"f71597ae3afaef44": "{first} und {second}",
"4047174839a16714": "{first} und {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json
index c44e270bb4b18..52d789cd8d62d 100644
--- a/apps/web/src/i18n/translations/en.json
+++ b/apps/web/src/i18n/translations/en.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Could not link: the other environment refused",
"21be308917bd450e": "Could not link: {failure}",
"acd01e781e2355cc": "Request ended",
- "8855350e81d45c45": "That link was removed or expired. Link the machine again.",
"97e4c50a99272f63": "Could not answer the request. Try again.",
"605a491783d18b3f": "Could not read this thread through {via}",
"50f19209548b70d9": "{via} may need an update before it can read linked threads.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "It may have been deleted there.",
"f7870ef3a4828ab1": "{label} needs an update",
"eabbf064657519ee": "{label} is not answering {via}",
+ "b3861bc247c3c4bf": "Could not load the link request.",
+ "81aa3f047d92ed7a": "This link request no longer exists.",
+ "6f053c4e5b6f372f": "This link request was already answered.",
+ "8855350e81d45c45": "That link was removed or expired. Link the machine again.",
+ "6d50d5b72fd543f7": "Could not update the link request.",
"f71597ae3afaef44": "{first} and {second}",
"4047174839a16714": "{first}, and {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json
index 0f8ab5004dc84..98dc033ee7c84 100644
--- a/apps/web/src/i18n/translations/es.json
+++ b/apps/web/src/i18n/translations/es.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "No se pudo vincular: el otro entorno lo rechazó",
"21be308917bd450e": "No se pudo vincular: {failure}",
"acd01e781e2355cc": "Solicitud finalizada",
- "8855350e81d45c45": "Ese vínculo se eliminó o caducó. Vuelve a vincular la máquina.",
"97e4c50a99272f63": "No se pudo responder a la solicitud. Inténtalo de nuevo.",
"605a491783d18b3f": "No se pudo leer este hilo a través de {via}",
"50f19209548b70d9": "Puede que {via} necesite actualizarse para poder leer hilos vinculados.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Puede que se haya eliminado allí.",
"f7870ef3a4828ab1": "{label} necesita una actualización",
"eabbf064657519ee": "{label} no responde a {via}",
+ "8855350e81d45c45": "Ese vínculo se eliminó o caducó. Vuelve a vincular la máquina.",
+ "b3861bc247c3c4bf": "No se pudo cargar la solicitud de vínculo.",
+ "81aa3f047d92ed7a": "Esta solicitud de vínculo ya no existe.",
+ "6f053c4e5b6f372f": "Esta solicitud de vínculo ya fue respondida.",
+ "6d50d5b72fd543f7": "No se pudo actualizar la solicitud de vínculo.",
"f71597ae3afaef44": "{first} y {second}",
"4047174839a16714": "{first} y {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json
index f6ea3baa3fff6..1966de176798f 100644
--- a/apps/web/src/i18n/translations/fr.json
+++ b/apps/web/src/i18n/translations/fr.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Association impossible : l’autre environnement a refusé",
"21be308917bd450e": "Association impossible : {failure}",
"acd01e781e2355cc": "Demande terminée",
- "8855350e81d45c45": "Cette association a été supprimée ou a expiré. Associez à nouveau la machine.",
"97e4c50a99272f63": "Impossible de répondre à la demande. Réessayez.",
"605a491783d18b3f": "Impossible de lire ce fil via {via}",
"50f19209548b70d9": "{via} a peut-être besoin d’une mise à jour pour lire les fils associés.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Il a peut-être été supprimé là-bas.",
"f7870ef3a4828ab1": "{label} a besoin d’une mise à jour",
"eabbf064657519ee": "{label} ne répond pas à {via}",
+ "8855350e81d45c45": "Cette association a été supprimée ou a expiré. Associez à nouveau la machine.",
+ "b3861bc247c3c4bf": "Impossible de charger la demande d’association.",
+ "81aa3f047d92ed7a": "Cette demande d’association n’existe plus.",
+ "6f053c4e5b6f372f": "Cette demande d’association a déjà reçu une réponse.",
+ "6d50d5b72fd543f7": "Impossible de mettre à jour la demande d’association.",
"f71597ae3afaef44": "{first} et {second}",
"4047174839a16714": "{first} et {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json
index 5c4e8abe2847f..24a7bcb76f2a4 100644
--- a/apps/web/src/i18n/translations/ja.json
+++ b/apps/web/src/i18n/translations/ja.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "リンクできませんでした: 相手の環境が拒否しました",
"21be308917bd450e": "リンクできませんでした: {failure}",
"acd01e781e2355cc": "リクエストが終了しました",
- "8855350e81d45c45": "そのリンクは削除されたか、期限切れです。マシンをもう一度リンクしてください。",
"97e4c50a99272f63": "リクエストに応答できませんでした。もう一度お試しください。",
"605a491783d18b3f": "{via} 経由でこのスレッドを読み取れませんでした",
"50f19209548b70d9": "リンクされたスレッドを読み取るには、{via} の更新が必要な可能性があります。",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "そちらで削除された可能性があります。",
"f7870ef3a4828ab1": "{label} の更新が必要です",
"eabbf064657519ee": "{label} が {via} に応答していません",
+ "8855350e81d45c45": "そのリンクは削除されたか、期限切れです。マシンをもう一度リンクしてください。",
+ "b3861bc247c3c4bf": "リンクリクエストを読み込めませんでした。",
+ "81aa3f047d92ed7a": "このリンクリクエストはもう存在しません。",
+ "6f053c4e5b6f372f": "このリンクリクエストはすでに回答済みです。",
+ "6d50d5b72fd543f7": "リンクリクエストを更新できませんでした。",
"f71597ae3afaef44": "{first} と {second}",
"4047174839a16714": "{first}、{last}",
"65ca7867c176afbf": "{first}、{rest}",
diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json
index 64996903561d0..f0f29edd26d3a 100644
--- a/apps/web/src/i18n/translations/ko.json
+++ b/apps/web/src/i18n/translations/ko.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "연결할 수 없음: 상대 환경이 거부했습니다",
"21be308917bd450e": "연결할 수 없음: {failure}",
"acd01e781e2355cc": "요청 종료됨",
- "8855350e81d45c45": "해당 연결이 삭제되었거나 만료되었습니다. 머신을 다시 연결하세요.",
"97e4c50a99272f63": "요청에 응답할 수 없습니다. 다시 시도하세요.",
"605a491783d18b3f": "{via}을(를) 통해 이 스레드를 읽지 못했습니다",
"50f19209548b70d9": "연결된 스레드를 읽으려면 {via}을(를) 업데이트해야 할 수 있습니다.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "그곳에서 삭제되었을 수 있습니다.",
"f7870ef3a4828ab1": "{label}을(를) 업데이트해야 합니다",
"eabbf064657519ee": "{label}이(가) {via}에 응답하지 않습니다",
+ "8855350e81d45c45": "해당 연결이 삭제되었거나 만료되었습니다. 머신을 다시 연결하세요.",
+ "b3861bc247c3c4bf": "연결 요청을 불러올 수 없습니다.",
+ "81aa3f047d92ed7a": "이 연결 요청은 더 이상 존재하지 않습니다.",
+ "6f053c4e5b6f372f": "이 연결 요청은 이미 응답되었습니다.",
+ "6d50d5b72fd543f7": "연결 요청을 업데이트할 수 없습니다.",
"f71597ae3afaef44": "{first} 및 {second}",
"4047174839a16714": "{first} 및 {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json
index 893c34cace7fd..be585bf460ad7 100644
--- a/apps/web/src/i18n/translations/pt-BR.json
+++ b/apps/web/src/i18n/translations/pt-BR.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Não foi possível vincular: o outro ambiente recusou",
"21be308917bd450e": "Não foi possível vincular: {failure}",
"acd01e781e2355cc": "Solicitação encerrada",
- "8855350e81d45c45": "Esse vínculo foi removido ou expirou. Vincule a máquina novamente.",
"97e4c50a99272f63": "Não foi possível responder à solicitação. Tente novamente.",
"605a491783d18b3f": "Não foi possível ler esta thread por {via}",
"50f19209548b70d9": "Talvez {via} precise de uma atualização para ler threads vinculadas.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Talvez tenha sido excluída lá.",
"f7870ef3a4828ab1": "{label} precisa de uma atualização",
"eabbf064657519ee": "{label} não está respondendo a {via}",
+ "8855350e81d45c45": "Esse vínculo foi removido ou expirou. Vincule a máquina novamente.",
+ "b3861bc247c3c4bf": "Não foi possível carregar a solicitação de vínculo.",
+ "81aa3f047d92ed7a": "Esta solicitação de vínculo não existe mais.",
+ "6f053c4e5b6f372f": "Esta solicitação de vínculo já foi respondida.",
+ "6d50d5b72fd543f7": "Não foi possível atualizar a solicitação de vínculo.",
"f71597ae3afaef44": "{first} e {second}",
"4047174839a16714": "{first} e {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json
index 2d7db801147d3..80c3b4348ca16 100644
--- a/apps/web/src/i18n/translations/ru.json
+++ b/apps/web/src/i18n/translations/ru.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Не удалось привязать: другое окружение отказало",
"21be308917bd450e": "Не удалось привязать: {failure}",
"acd01e781e2355cc": "Запрос завершён",
- "8855350e81d45c45": "Эта привязка удалена или истекла. Привяжите машину снова.",
"97e4c50a99272f63": "Не удалось ответить на запрос. Повторите попытку.",
"605a491783d18b3f": "Не удалось прочитать этот тред через {via}",
"50f19209548b70d9": "Возможно, {via} нужно обновить, чтобы читать привязанные треды.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Возможно, его там удалили.",
"f7870ef3a4828ab1": "{label} нужно обновить",
"eabbf064657519ee": "{label} не отвечает {via}",
+ "8855350e81d45c45": "Эта привязка удалена или истекла. Привяжите машину снова.",
+ "b3861bc247c3c4bf": "Не удалось загрузить запрос на привязку.",
+ "81aa3f047d92ed7a": "Этот запрос на привязку больше не существует.",
+ "6f053c4e5b6f372f": "На этот запрос на привязку уже дан ответ.",
+ "6d50d5b72fd543f7": "Не удалось обновить запрос на привязку.",
"f71597ae3afaef44": "{first} и {second}",
"4047174839a16714": "{first} и {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json
index d8e836b049744..ab0d8fe257931 100644
--- a/apps/web/src/i18n/translations/sv.json
+++ b/apps/web/src/i18n/translations/sv.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "Kunde inte länka: den andra miljön nekade",
"21be308917bd450e": "Kunde inte länka: {failure}",
"acd01e781e2355cc": "Begäran avslutades",
- "8855350e81d45c45": "Länken har tagits bort eller gått ut. Länka maskinen igen.",
"97e4c50a99272f63": "Kunde inte svara på begäran. Försök igen.",
"605a491783d18b3f": "Det gick inte att läsa den här tråden via {via}",
"50f19209548b70d9": "{via} kan behöva uppdateras innan den kan läsa länkade trådar.",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "Den kan ha raderats där.",
"f7870ef3a4828ab1": "{label} behöver uppdateras",
"eabbf064657519ee": "{label} svarar inte {via}",
+ "8855350e81d45c45": "Länken har tagits bort eller gått ut. Länka maskinen igen.",
+ "b3861bc247c3c4bf": "Det gick inte att läsa in länkförfrågan.",
+ "81aa3f047d92ed7a": "Den här länkförfrågan finns inte längre.",
+ "6f053c4e5b6f372f": "Den här länkförfrågan har redan besvarats.",
+ "6d50d5b72fd543f7": "Det gick inte att uppdatera länkförfrågan.",
"f71597ae3afaef44": "{first} och {second}",
"4047174839a16714": "{first} och {last}",
"65ca7867c176afbf": "{first}, {rest}",
diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json
index ec2f845737466..bc16e96c2a50a 100644
--- a/apps/web/src/i18n/translations/zh.json
+++ b/apps/web/src/i18n/translations/zh.json
@@ -97,7 +97,6 @@
"289ec1df10840137": "无法关联:对方环境拒绝了请求",
"21be308917bd450e": "无法关联:{failure}",
"acd01e781e2355cc": "请求已结束",
- "8855350e81d45c45": "该关联已被移除或已过期。请重新关联这台机器。",
"97e4c50a99272f63": "无法回复此请求。请重试。",
"605a491783d18b3f": "无法通过 {via} 读取此会话",
"50f19209548b70d9": "{via} 可能需要更新后才能读取关联的会话。",
@@ -112,6 +111,11 @@
"bd29efc163476e72": "它可能已在那里被删除。",
"f7870ef3a4828ab1": "{label} 需要更新",
"eabbf064657519ee": "{label} 没有响应 {via}",
+ "8855350e81d45c45": "该关联已被移除或已过期。请重新关联这台机器。",
+ "b3861bc247c3c4bf": "无法加载关联请求。",
+ "81aa3f047d92ed7a": "此关联请求已不存在。",
+ "6f053c4e5b6f372f": "此关联请求已被回答。",
+ "6d50d5b72fd543f7": "无法更新关联请求。",
"f71597ae3afaef44": "{first} 和 {second}",
"4047174839a16714": "{first} 和 {last}",
"65ca7867c176afbf": "{first}、{rest}",
diff --git a/packages/client-runtime/src/linkRequest.test.ts b/packages/client-runtime/src/linkRequest.test.ts
index bc44b8f43b9c2..f6e9566495de6 100644
--- a/packages/client-runtime/src/linkRequest.test.ts
+++ b/packages/client-runtime/src/linkRequest.test.ts
@@ -569,10 +569,20 @@ describe("linkRequestTarget", () => {
});
describe("linkRequestFailureMessage", () => {
- it("passes through only known user-facing errors", () => {
+ it("names every answer failure in the client's words, and nothing it does not know", () => {
+ const named = (reason: string) =>
+ linkRequestFailureMessage({ _tag: "PeerLinkRequestError", reason, message: "server copy" });
+ expect(named("not_found")).toBe("This link request no longer exists.");
+ expect(named("already_answered")).toBe("This link request was already answered.");
+ expect(named("load_failed")).toBe("Could not load the link request.");
+ expect(named("record_failed")).toBe("Could not update the link request.");
+ expect(named("link_gone")).toBe("That link was removed or expired. Link the machine again.");
+ // A reason from a newer server, or none at all, never shows the server's English.
+ expect(named("unknown")).toBe("Could not answer the request. Try again.");
+ expect(named("link_frozen")).toBe("Could not answer the request. Try again.");
expect(
- linkRequestFailureMessage({ _tag: "PeerLinkRequestError", message: "Already answered." }),
- ).toBe("Already answered.");
+ linkRequestFailureMessage({ _tag: "EnvironmentAuthorizationError", message: "No scope." }),
+ ).toBe("No scope.");
expect(linkRequestFailureMessage({ _tag: "SchemaError", message: "code=abc" })).toBe(
"Could not answer the request. Try again.",
);
diff --git a/packages/client-runtime/src/linkRequest.ts b/packages/client-runtime/src/linkRequest.ts
index 9ffa8376270bb..94c15be4185e4 100644
--- a/packages/client-runtime/src/linkRequest.ts
+++ b/packages/client-runtime/src/linkRequest.ts
@@ -7,6 +7,7 @@ import {
type OrchestrationV2TurnItem,
type PeerLinkRequestAnswerInput,
type PeerLinkName,
+ type PeerLinkRequestFailureReason,
type PeerLinkSummary,
resolveEnvironmentMachineKind,
type ServerConfig,
@@ -415,11 +416,19 @@ export function linkRequestAnswerInput(
}
/** Failures whose message is written for the user and never echoes the request payload. */
-const USER_FACING_FAILURE_TAGS = new Set([
- "PeerLinkRequestError",
- "EnvironmentAuthorizationError",
- "PeerPairingCodeError",
-]);
+const USER_FACING_FAILURE_TAGS = new Set(["EnvironmentAuthorizationError", "PeerPairingCodeError"]);
+
+const GENERIC_FAILURE = msg("Could not answer the request. Try again.");
+
+/** The contract's English reasons, in the client's languages. */
+const LINK_REQUEST_FAILURE_MESSAGES: Record = {
+ load_failed: msg("Could not load the link request."),
+ not_found: msg("This link request no longer exists."),
+ already_answered: msg("This link request was already answered."),
+ link_gone: msg("That link was removed or expired. Link the machine again."),
+ record_failed: msg("Could not update the link request."),
+ unknown: GENERIC_FAILURE,
+};
/**
* Inline error copy for a failed answer. Only known errors pass their message
@@ -434,11 +443,14 @@ export function linkRequestFailureMessage(
typeof failure === "object" &&
failure !== null &&
"_tag" in failure &&
- failure._tag === "PeerLinkRequestError" &&
- "reason" in failure &&
- failure.reason === "link_gone"
+ failure._tag === "PeerLinkRequestError"
) {
- return resolve(msg("That link was removed or expired. Link the machine again."));
+ const reason = "reason" in failure ? failure.reason : undefined;
+ return resolve(
+ typeof reason === "string" && reason in LINK_REQUEST_FAILURE_MESSAGES
+ ? LINK_REQUEST_FAILURE_MESSAGES[reason as PeerLinkRequestFailureReason]
+ : GENERIC_FAILURE,
+ );
}
if (
typeof failure === "object" &&
@@ -452,5 +464,5 @@ export function linkRequestFailureMessage(
) {
return errorDisplayMessage(failure, resolve) ?? failure.message;
}
- return resolve(msg("Could not answer the request. Try again."));
+ return resolve(GENERIC_FAILURE);
}
diff --git a/packages/contracts/src/peerLink.test.ts b/packages/contracts/src/peerLink.test.ts
new file mode 100644
index 0000000000000..8fe020a8095e5
--- /dev/null
+++ b/packages/contracts/src/peerLink.test.ts
@@ -0,0 +1,20 @@
+import { describe, expect, it } from "@effect/vitest";
+import * as Schema from "effect/Schema";
+
+import { PeerLinkRequestError } from "./peerLink.ts";
+
+const decodeError = Schema.decodeUnknownSync(PeerLinkRequestError);
+const encodeError = Schema.encodeSync(PeerLinkRequestError);
+
+describe("PeerLinkRequestError", () => {
+ it("decodes a reason from a newer server as unknown, and known reasons as themselves", () => {
+ const known = decodeError({ _tag: "PeerLinkRequestError", reason: "link_gone" });
+ expect(known.reason).toBe("link_gone");
+ expect(known.message).toBe("That link was removed or expired. Link the machine again.");
+ expect(encodeError(known)).toMatchObject({ reason: "link_gone" });
+
+ const newer = decodeError({ _tag: "PeerLinkRequestError", reason: "link_frozen" });
+ expect(newer.reason).toBe("unknown");
+ expect(newer.message).toBe("Could not answer the request. Try again.");
+ });
+});
diff --git a/packages/contracts/src/peerLink.ts b/packages/contracts/src/peerLink.ts
index 723daa25cc72b..5d662157bca3d 100644
--- a/packages/contracts/src/peerLink.ts
+++ b/packages/contracts/src/peerLink.ts
@@ -1,3 +1,4 @@
+import * as Effect from "effect/Effect";
import * as Schema from "effect/Schema";
import { AuthEnvironmentScope, AuthMcpClientAccess } from "./auth.ts";
@@ -243,13 +244,15 @@ const PEER_LINK_REQUEST_FAILURE_MESSAGES = {
already_answered: "This link request was already answered.",
link_gone: "That link was removed or expired. Link the machine again.",
record_failed: "Could not update the link request.",
+ unknown: "Could not answer the request. Try again.",
} as const;
+/** A reason this version does not know, from a newer server, decodes as `unknown`. */
export const PeerLinkRequestFailureReason = Schema.Literals(
Object.keys(PEER_LINK_REQUEST_FAILURE_MESSAGES) as Array<
keyof typeof PEER_LINK_REQUEST_FAILURE_MESSAGES
>,
-);
+).pipe(Schema.catchDecoding(() => Effect.succeedSome("unknown" as const)));
export type PeerLinkRequestFailureReason = typeof PeerLinkRequestFailureReason.Type;
/**