@devries-cameron20 / t3code-1 / commits / 6689a04af8
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(server): t3 connect status no longer reports a publish-only link as exposed (#33967)

Julius Marminge committed Nov 13, 2026 at 16:11 UTC 6689a04af84d561c0c595103d9023b29172a0543
2 files changed +34 -10
apps/server/src/cli/connect.test.ts
+18 -2
@@ -64,7 +64,11 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
64 (it) => {
65 const runConnect = (
66 recordedPid: number,
67 - options?: { readonly portFreed?: boolean; readonly command?: "unlink" | "status" },
67 + options?: {
68 + readonly portFreed?: boolean;
69 + readonly command?: "unlink" | "status";
70 + readonly linkMode?: "managed" | "publish_only";
71 + },
72 ) =>
73 Effect.gen(function* () {
74 const requests: Array<string> = [];
@@ -105,7 +109,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
109 yield* fs.makeDirectory(`${baseDir}/userdata/secrets`, { recursive: true });
110 yield* fs.writeFileString(
111 `${baseDir}/userdata/secrets/${CLOUD_CLI_DESIRED_LINK_SECRET}.bin`,
108 - "managed",
112 + options.linkMode ?? "managed",
113 );
114 }
115
@@ -179,6 +183,18 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
183 }),
184 );
185
186 + it.effect("status does not report a publish-only link as exposed", () =>
187 + Effect.gen(function* () {
188 + const { printed } = yield* runConnect(process.pid, {
189 + command: "status",
190 + linkMode: "publish_only",
191 + });
192 +
193 + assert.include(printed, "Exposure: publish-only");
194 + assert.notInclude(printed, "Other devices can reach this machine");
195 + }),
196 + );
197 +
198 it.effect("asks a running server to stop its tunnel", () =>
199 Effect.gen(function* () {
200 const { requests, printed, warnings } = yield* runConnect(process.pid);
apps/server/src/cli/connect.ts
+16 -8
@@ -196,6 +196,7 @@ function formatCloudStatus(status: CloudCliStatus, options?: { readonly json?: b
196 : status.desired && status.authenticated
197 ? "pending server startup"
198 : "not provisioned";
199 + const publishOnly = status.desired && status.linkMode === "publish_only";
200 const nextStep = !status.authenticated
201 ? "Run `t3 connect link` to authorize and enable T3 Connect."
202 : status.revoked
@@ -203,30 +204,37 @@ function formatCloudStatus(status: CloudCliStatus, options?: { readonly json?: b
204 : !status.desired
205 ? "Run `t3 connect link` to enable T3 Connect."
206 : !status.linked
206 - ? "Start T3 to provision the environment link and launch its managed tunnel."
207 + ? publishOnly
208 + ? "Start T3 to provision the environment link."
209 + : "Start T3 to provision the environment link and launch its managed tunnel."
210 : undefined;
211
212 return [
213 "T3 Connect",
211 - ` Exposure: ${status.desired ? "enabled" : "disabled"}`,
214 + ` Exposure: ${publishOnly ? "publish-only" : status.desired ? "enabled" : "disabled"}`,
215 ` Authorization: ${status.authenticated ? "stored credential" : "missing"}`,
216 ` Environment link: ${provisioned}`,
217 ` Relay: ${status.relayUrl ?? "not provisioned"}`,
218 ` Publish agent activity: ${status.publishAgentActivity ? "enabled" : "disabled"}`,
219 ...formatRelayClientStatus(status.relayClient),
217 - ...(!status.desired || status.linkMode !== "managed"
220 + ...(!status.desired
221 ? []
219 - : status.reachability === null
222 + : publishOnly
223 ? [
224 "",
222 - "No running server answered, so reachability was not checked. Check the background service with `t3 service status`.",
225 + "This link only publishes agent activity. Remote access through T3 Connect is off, so other devices need their own route to this machine, such as LAN or Tailscale.",
226 ]
224 - : status.reachability.status === "reachable"
227 + : status.reachability === null
228 ? [
229 "",
227 - `✓ Other devices can reach this machine · ${formatConnectReachable(status.reachability)}`,
230 + "No running server answered, so reachability was not checked. Check the background service with `t3 service status`.",
231 ]
229 - : ["", formatReachabilityFailure(status.reachability)]),
232 + : status.reachability.status === "reachable"
233 + ? [
234 + "",
235 + `✓ Other devices can reach this machine · ${formatConnectReachable(status.reachability)}`,
236 + ]
237 + : ["", formatReachabilityFailure(status.reachability)]),
238 ...(nextStep ? ["", `Next: ${nextStep}`] : []),
239 ].join("\n");
240 }