Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
[codex] Rebrand T3 Cloud as T3 Connect (#3011)
Julius Marminge22f9f3058b7e
diff --git a/.env.example b/.env.exampleindex c80886a8b..067aad9cc 100644--- a/.env.example+++ b/.env.example@@ -1,5 +1,5 @@-# Optional: T3 Cloud source builds-# Leave these unset to disable optional T3 Cloud features in local source builds.+# Optional: T3 Connect source builds+# Leave these unset to disable optional T3 Connect features in local source builds.# Release builds inject their public values at build time. Do not add server-side# secrets to this file.diff --git a/.github/workflows/deploy-relay.yml b/.github/workflows/deploy-relay.ymlindex 1f777ed29..94d4af17e 100644--- a/.github/workflows/deploy-relay.yml+++ b/.github/workflows/deploy-relay.yml@@ -1,4 +1,4 @@-name: Deploy T3 Cloud relay+name: Deploy T3 Connect relayon:push:diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 67e6aeb51..e1fb92163 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -167,7 +167,7 @@ jobs:--github-outputrelay_public_config:- name: Resolve T3 Cloud public config+ name: Resolve T3 Connect public configneeds: preflightif: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}runs-on: blacksmith-8vcpu-ubuntu-2404diff --git a/apps/desktop/src/window/DesktopWindow.test.ts b/apps/desktop/src/window/DesktopWindow.test.tsindex 271b35095..5e977de2d 100644--- a/apps/desktop/src/window/DesktopWindow.test.ts+++ b/apps/desktop/src/window/DesktopWindow.test.ts@@ -165,7 +165,7 @@ describe("DesktopWindow", () => {assert.isTrue(DesktopWindow.isSameOriginRendererNavigation({applicationUrl: "http://127.0.0.1:3773/",- navigationUrl: "http://127.0.0.1:3773/settings/cloud",+ navigationUrl: "http://127.0.0.1:3773/settings/connections",}),);assert.isFalse(diff --git a/apps/mobile/README.md b/apps/mobile/README.mdindex f5be27c6c..ad0242c27 100644--- a/apps/mobile/README.md+++ b/apps/mobile/README.md@@ -16,7 +16,7 @@ This app has three variants:Run commands from `apps/mobile`.-T3 Cloud is optional and disabled in a fresh clone. Public configuration belongs in the+T3 Connect is optional and disabled in a fresh clone. Public configuration belongs in therepository-root `.env` or `.env.local`, not an `apps/mobile/.env` file. See[`../../.env.example`](../../.env.example).diff --git a/apps/mobile/src/features/cloud/linkEnvironment.test.ts b/apps/mobile/src/features/cloud/linkEnvironment.test.tsindex 16a7a7453..36544cf46 100644--- a/apps/mobile/src/features/cloud/linkEnvironment.test.ts+++ b/apps/mobile/src/features/cloud/linkEnvironment.test.ts@@ -572,7 +572,7 @@ describe("mobile cloud link environment client", () => {if (String(url).endsWith("/v1/client/environment-link-challenges")) {return Promise.resolve(Response.json(validLinkChallengeResponse()));}- if (String(url).endsWith("/api/cloud/link-proof")) {+ if (String(url).endsWith("/api/connect/link-proof")) {return Promise.resolve(Response.json(validLinkProof()));}return Promise.resolve(Response.json(validLinkResponse("env-other")));@@ -631,7 +631,7 @@ describe("mobile cloud link environment client", () => {if (String(url).endsWith("/v1/client/environment-link-challenges")) {return Promise.resolve(Response.json(validLinkChallengeResponse()));}- if (String(url).endsWith("/api/cloud/link-proof")) {+ if (String(url).endsWith("/api/connect/link-proof")) {return Promise.resolve(Response.json(validLinkProof()));}return Promise.resolve(@@ -669,7 +669,7 @@ describe("mobile cloud link environment client", () => {if (String(url).endsWith("/v1/client/environment-link-challenges")) {return Promise.resolve(Response.json(validLinkChallengeResponse()));}- if (String(url).endsWith("/api/cloud/link-proof")) {+ if (String(url).endsWith("/api/connect/link-proof")) {return Promise.resolve(Response.json(validLinkProof()));}return Promise.resolve(@@ -713,7 +713,7 @@ describe("mobile cloud link environment client", () => {if (String(url).endsWith("/v1/client/environment-link-challenges")) {return Promise.resolve(Response.json(validLinkChallengeResponse()));}- if (String(url).endsWith("/api/cloud/link-proof")) {+ if (String(url).endsWith("/api/connect/link-proof")) {return Promise.resolve(Response.json(validLinkProof()));}if (String(url).endsWith("/v1/client/environment-links")) {diff --git a/apps/mobile/src/features/cloud/linkEnvironment.ts b/apps/mobile/src/features/cloud/linkEnvironment.tsindex f72b35d17..bca1ac21b 100644--- a/apps/mobile/src/features/cloud/linkEnvironment.ts+++ b/apps/mobile/src/features/cloud/linkEnvironment.ts@@ -301,7 +301,7 @@ export function linkEnvironmentToCloud(input: {),);const environmentClient = yield* makeEnvironmentHttpApiClient(input.connection.httpBaseUrl);- const proof = yield* environmentClient.cloud+ const proof = yield* environmentClient.connect.linkProof({headers: { authorization: `Bearer ${localBearerToken}` },payload: {@@ -336,7 +336,7 @@ export function linkEnvironmentToCloud(input: {link,});- yield* environmentClient.cloud+ yield* environmentClient.connect.relayConfig({headers: { authorization: `Bearer ${localBearerToken}` },payload: {diff --git a/apps/server/src/bin.test.ts b/apps/server/src/bin.test.tsindex 5911bfd98..27a1d55e9 100644--- a/apps/server/src/bin.test.ts+++ b/apps/server/src/bin.test.ts@@ -38,11 +38,11 @@ import { environmentAuthenticatedAuthLayer } from "./auth/http.ts";const CliRuntimeLayer = Layer.mergeAll(NodeServices.layer, NetService.layer);class ProjectCliHttpApi extends HttpApi.make("environment").add(EnvironmentOrchestrationHttpApi) {}-const cloudCli = makeCli({ cloudEnabled: true });-const noCloudCli = makeCli({ cloudEnabled: false });+const connectCli = makeCli({ cloudEnabled: true });+const noConnectCli = makeCli({ cloudEnabled: false });const runCli = (args: ReadonlyArray<string>, command = cli) =>Command.runWith(command, { version: "0.0.0" })(args);-const runCloudCli = (args: ReadonlyArray<string>) => runCli(args, cloudCli);+const runConnectCli = (args: ReadonlyArray<string>) => runCli(args, connectCli);const runCliWithRuntime = (args: ReadonlyArray<string>) =>runCli(args).pipe(Effect.provide(CliRuntimeLayer));@@ -179,9 +179,9 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {}),);- it.effect("rejects cloud commands when public cloud configuration is missing", () =>+ it.effect("rejects connect commands when public configuration is missing", () =>Effect.gen(function* () {- const error = yield* runCli(["cloud", "status"], noCloudCli).pipe(Effect.flip);+ const error = yield* runCli(["connect", "status"], noConnectCli).pipe(Effect.flip);if (!CliError.isCliError(error)) {assert.fail(`Expected CliError, got ${String(error)}`);@@ -189,20 +189,20 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {if (error._tag !== "ShowHelp") {assert.fail(`Expected ShowHelp, got ${error._tag}`);}- assert.deepEqual(error.commandPath, ["t3", "cloud"]);- assert.include(error.errors[0]?.message ?? "", "missing T3 Cloud public configuration");+ assert.deepEqual(error.commandPath, ["t3", "connect"]);+ assert.include(error.errors[0]?.message ?? "", "missing T3 Connect public configuration");const output = (yield* TestConsole.errorLines).join("\n");assert.include(output, "ERROR");- assert.include(output, "missing T3 Cloud public configuration");+ assert.include(output, "missing T3 Connect public configuration");}).pipe(Effect.provide(Layer.mergeAll(CliRuntimeLayer, TestConsole.layer))),);- it.effect("reports fresh headless cloud state without requiring local configuration", () =>+ it.effect("reports fresh headless connect state without requiring local configuration", () =>Effect.gen(function* () {const baseDir = mkdtempSync(join(tmpdir(), "t3-cli-cloud-status-test-"));const { output } = yield* captureStdout(- runCloudCli(["cloud", "status", "--base-dir", baseDir, "--json"]),+ runConnectCli(["connect", "status", "--base-dir", baseDir, "--json"]),);// @effect-diagnostics-next-line preferSchemaOverJson:off - CLI JSON output is decoded as a presentation DTO.const status = JSON.parse(output) as {@@ -221,21 +221,21 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {}),);- it.effect("reports actionable human-readable headless cloud state", () =>+ it.effect("reports actionable human-readable headless connect state", () =>Effect.gen(function* () {const baseDir = mkdtempSync(join(tmpdir(), "t3-cli-cloud-status-human-test-"));const { output } = yield* captureStdout(- runCloudCli(["cloud", "status", "--base-dir", baseDir]),+ runConnectCli(["connect", "status", "--base-dir", baseDir]),);- assert.include(output, "T3 Cloud\n Exposure: disabled");+ assert.include(output, "T3 Connect\n Exposure: disabled");assert.include(output, " Authorization: missing");assert.include(output, " Environment link: not provisioned");- assert.include(output, "Next: Run `t3 cloud link` to authorize and enable cloud exposure.");+ assert.include(output, "Next: Run `t3 connect link` to authorize and enable T3 Connect.");}),);- it.effect("logs in to headless cloud without enabling exposure", () =>+ it.effect("logs in to headless connect without enabling access", () =>Effect.gen(function* () {const baseDir = mkdtempSync(join(tmpdir(), "t3-cli-cloud-login-test-"));const { secretsDir } = yield* deriveServerPaths(baseDir, undefined);@@ -250,9 +250,11 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {}),);- const login = yield* captureStdout(runCloudCli(["cloud", "login", "--base-dir", baseDir]));+ const login = yield* captureStdout(+ runConnectCli(["connect", "login", "--base-dir", baseDir]),+ );const status = yield* captureStdout(- runCloudCli(["cloud", "status", "--base-dir", baseDir, "--json"]),+ runConnectCli(["connect", "status", "--base-dir", baseDir, "--json"]),);// @effect-diagnostics-next-line preferSchemaOverJson:off - CLI JSON output is decoded as a presentation DTO.const decoded = JSON.parse(status.output) as {@@ -260,24 +262,24 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {readonly authenticated: boolean;};- assert.equal(login.output, "Signed in to T3 Cloud.");+ assert.equal(login.output, "Signed in to T3 Connect.");assert.isFalse(decoded.desired);assert.isTrue(decoded.authenticated);}),);- it.effect("disables headless cloud exposure without a running server", () =>+ it.effect("disables headless connect without a running server", () =>Effect.gen(function* () {const baseDir = mkdtempSync(join(tmpdir(), "t3-cli-cloud-unlink-test-"));const { output } = yield* captureStdout(- runCloudCli(["cloud", "unlink", "--base-dir", baseDir]),+ runConnectCli(["connect", "unlink", "--base-dir", baseDir]),);- assert.equal(output, "T3 Cloud exposure is disabled locally.");+ assert.equal(output, "T3 Connect is disabled locally.");}),);- it.effect("logs out of headless cloud and removes the stored CLI authorization", () =>+ it.effect("logs out of headless connect and removes the stored CLI authorization", () =>Effect.gen(function* () {const baseDir = mkdtempSync(join(tmpdir(), "t3-cli-cloud-logout-test-"));const { secretsDir } = yield* deriveServerPaths(baseDir, undefined);@@ -286,10 +288,10 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {writeFileSync(tokenPath, "invalid persisted token");const { output } = yield* captureStdout(- runCloudCli(["cloud", "logout", "--base-dir", baseDir]),+ runConnectCli(["connect", "logout", "--base-dir", baseDir]),);- assert.equal(output, "Signed out of T3 Cloud locally.");+ assert.equal(output, "Signed out of T3 Connect locally.");assert.isFalse(existsSync(tokenPath));}),);diff --git a/apps/server/src/bin.ts b/apps/server/src/bin.tsindex 04d5bdfad..ddfbf5e3e 100644--- a/apps/server/src/bin.ts+++ b/apps/server/src/bin.ts@@ -8,7 +8,7 @@ import * as CliError from "effect/unstable/cli/CliError";import * as NetService from "@t3tools/shared/Net";import packageJson from "../package.json" with { type: "json" };import { authCommand } from "./cli/auth.ts";-import { cloudCommand } from "./cli/cloud.ts";+import { connectCommand } from "./cli/connect.ts";import { hasCloudPublicConfig } from "./cloud/publicConfig.ts";import { sharedServerCommandFlags } from "./cli/config.ts";import { projectCommand } from "./cli/project.ts";@@ -16,23 +16,23 @@ import { runServerCommand, serveCommand, startCommand } from "./cli/server.ts";const CliRuntimeLayer = Layer.mergeAll(NodeServices.layer, NetService.layer);-const cloudPublicConfigMissingMessage =- "T3 Cloud commands are unavailable: this build is missing T3 Cloud public configuration.";+const connectPublicConfigMissingMessage =+ "T3 Connect commands are unavailable: this build is missing T3 Connect public configuration.";-class CloudPublicConfigMissingError extends CliError.UserError {+class ConnectPublicConfigMissingError extends CliError.UserError {override get message() {- return cloudPublicConfigMissingMessage;+ return connectPublicConfigMissingMessage;}}-const cloudUnavailableCommand = Command.make("cloud").pipe(- Command.withDescription("T3 Cloud is unavailable in builds without public cloud configuration."),+const connectUnavailableCommand = Command.make("connect").pipe(+ Command.withDescription("T3 Connect is unavailable in builds without public configuration."),Command.withHidden,Command.withHandler(() =>Effect.fail(new CliError.ShowHelp({- commandPath: ["t3", "cloud"],- errors: [new CloudPublicConfigMissingError({ cause: cloudPublicConfigMissingMessage })],+ commandPath: ["t3", "connect"],+ errors: [new ConnectPublicConfigMissingError({ cause: connectPublicConfigMissingMessage })],}),),),@@ -47,7 +47,7 @@ export const makeCli = ({ cloudEnabled = hasCloudPublicConfig } = {}) =>serveCommand,authCommand,projectCommand,- cloudEnabled ? cloudCommand : cloudUnavailableCommand,+ cloudEnabled ? connectCommand : connectUnavailableCommand,]),);diff --git a/apps/server/src/cli/cloud.test.ts b/apps/server/src/cli/connect.test.tssimilarity index 98%rename from apps/server/src/cli/cloud.test.tsrename to apps/server/src/cli/connect.test.tsindex 4dda50c0c..5fce3bc1c 100644--- a/apps/server/src/cli/cloud.test.ts+++ b/apps/server/src/cli/connect.test.ts@@ -3,7 +3,7 @@ import { assert, it } from "@effect/vitest";import * as Effect from "effect/Effect";import * as Option from "effect/Option";-import { acquireRelayClientForLink } from "./cloud.ts";+import { acquireRelayClientForLink } from "./connect.ts";const managedExecutable = {status: "available",diff --git a/apps/server/src/cli/cloud.ts b/apps/server/src/cli/connect.tssimilarity index 87%rename from apps/server/src/cli/cloud.tsrename to apps/server/src/cli/connect.tsindex 78027d1e8..167fb75a3 100644--- a/apps/server/src/cli/cloud.ts+++ b/apps/server/src/cli/connect.ts@@ -89,15 +89,15 @@ function formatCloudStatus(status: CloudCliStatus, options?: { readonly json?: b? "pending server startup": "not provisioned";const nextStep = !status.authenticated- ? "Run `t3 cloud link` to authorize and enable cloud exposure."+ ? "Run `t3 connect link` to authorize and enable T3 Connect.": !status.desired- ? "Run `t3 cloud link` to enable cloud exposure."+ ? "Run `t3 connect link` to enable T3 Connect.": !status.linked? "Start T3 to provision the environment link and launch its managed tunnel.": undefined;return [- "T3 Cloud",+ "T3 Connect",` Exposure: ${status.desired ? "enabled" : "disabled"}`,` Authorization: ${status.authenticated ? "stored credential" : "missing"}`,` Environment link: ${provisioned}`,@@ -112,7 +112,7 @@ const CLOUD_CLI_LIVE_SERVER_TIMEOUT = Duration.seconds(5);const confirmRelayClientInstall = (version: string) =>Prompt.run(Prompt.confirm({- message: `The T3 relay client is required for T3 Cloud exposure. Download and install version ${version}?`,+ message: `The T3 relay client is required for T3 Connect. Download and install version ${version}?`,initial: false,}),);@@ -169,7 +169,7 @@ const withCloudCliSessionToken = <A, E, R>(environmentAuth.issueSession({scopes: [AuthRelayWriteScope],subject: "cloud-cli",- label: "t3 cloud cli",+ label: "t3 connect cli",}),(issued) => run(issued.token),(issued) => environmentAuth.revokeSession(issued.sessionId).pipe(Effect.ignore({ log: true })),@@ -194,7 +194,7 @@ const runLiveCloudUnlink = Effect.fn("cloud.cli.run_live_unlink")(function* () {baseUrl: runtimeState.value.origin,}).pipe(Effect.flatMap((client) =>- client.cloud.unlink({ headers: { authorization: `Bearer ${token}` } }),+ client.connect.unlink({ headers: { authorization: `Bearer ${token}` } }),),Effect.timeout(CLOUD_CLI_LIVE_SERVER_TIMEOUT),),@@ -249,24 +249,24 @@ const disconnectCloud = Effect.fn("cloud.cli.disconnect")(function* (options: {if (liveResult.status === "failed") {yield* Console.warn(- `T3 Cloud exposure is disabled, but the running server could not stop its tunnel: ${String(liveResult.cause)}\nRestart that server to stop the connector.`,+ `T3 Connect is disabled, but the running server could not stop its tunnel: ${String(liveResult.cause)}\nRestart that server to stop the connector.`,);} else {- yield* Console.log("T3 Cloud exposure is disabled locally.");+ yield* Console.log("T3 Connect is disabled locally.");}if (Exit.isFailure(relayResult)) {yield* Console.warn(options.clearAuthorization? `Could not revoke the relay-side environment record before signing out: ${String(relayResult.cause)}\nThe stored CLI authorization was still removed locally.`- : `Could not revoke the relay-side environment record yet: ${String(relayResult.cause)}\nRun \`t3 cloud unlink\` again when the relay is reachable.`,+ : `Could not revoke the relay-side environment record yet: ${String(relayResult.cause)}\nRun \`t3 connect unlink\` again when the relay is reachable.`,);} else if (relayResult.value.status === "revoked") {yield* Console.log("Revoked the relay-side environment record.");}if (options.clearAuthorization) {- yield* Console.log("Signed out of T3 Cloud locally.");+ yield* Console.log("Signed out of T3 Connect locally.");}});@@ -307,26 +307,26 @@ const runCloudCommand = <A, E>(return yield* run.pipe(Effect.provide(runtimeLayer));});-const cloudLoginCommand = Command.make("login", {+const connectLoginCommand = Command.make("login", {...projectLocationFlags,}).pipe(- Command.withDescription("Authorize the T3 Cloud CLI without enabling cloud exposure."),+ Command.withDescription("Authorize the T3 Connect CLI without enabling remote access."),Command.withHandler((flags) =>runCloudCommand(flags,Effect.gen(function* () {const tokens = yield* CliTokenManager.CloudCliTokenManager;yield* tokens.get;- yield* Console.log("Signed in to T3 Cloud.");+ yield* Console.log("Signed in to T3 Connect.");}),),),);-const cloudLinkCommand = Command.make("link", {+const connectLinkCommand = Command.make("link", {...projectLocationFlags,}).pipe(- Command.withDescription("Authorize this environment for T3 Cloud and expose it on next start."),+ Command.withDescription("Authorize this environment for T3 Connect on next start."),Command.withHandler((flags) =>runCloudCommand(flags,@@ -338,7 +338,7 @@ const cloudLinkCommand = Command.make("link", {reportRelayClientInstallProgress,);if (Option.isNone(installed)) {- yield* Console.log("T3 Cloud link cancelled. The relay client was not installed.");+ yield* Console.log("T3 Connect setup cancelled. The relay client was not installed.");return;}yield* Console.log(@@ -349,18 +349,18 @@ const cloudLinkCommand = Command.make("link", {yield* tokens.get;yield* CliState.setCliDesiredCloudLink(true);yield* Console.log(- "This T3 environment will be available over T3 Cloud the next time T3 starts.",+ "This T3 environment will be available through T3 Connect the next time T3 starts.",);}),),),);-const cloudStatusCommand = Command.make("status", {+const connectStatusCommand = Command.make("status", {...projectLocationFlags,json: jsonFlag,}).pipe(- Command.withDescription("Show persisted T3 Cloud and relay client state."),+ Command.withDescription("Show persisted T3 Connect and relay client state."),Command.withHandler((flags) =>runCloudCommand(flags,@@ -395,31 +395,31 @@ const cloudStatusCommand = Command.make("status", {),);-const cloudUnlinkCommand = Command.make("unlink", {+const connectUnlinkCommand = Command.make("unlink", {...projectLocationFlags,}).pipe(- Command.withDescription("Disable T3 Cloud exposure while retaining the stored authorization."),+ Command.withDescription("Disable T3 Connect while retaining the stored authorization."),Command.withHandler((flags) =>runCloudCommand(flags, disconnectCloud({ clearAuthorization: false })),),);-const cloudLogoutCommand = Command.make("logout", {+const connectLogoutCommand = Command.make("logout", {...projectLocationFlags,}).pipe(- Command.withDescription("Disable T3 Cloud exposure and clear the stored CLI authorization."),+ Command.withDescription("Disable T3 Connect and clear the stored CLI authorization."),Command.withHandler((flags) =>runCloudCommand(flags, disconnectCloud({ clearAuthorization: true })),),);-export const cloudCommand = Command.make("cloud").pipe(- Command.withDescription("Manage headless T3 Cloud exposure."),+export const connectCommand = Command.make("connect").pipe(+ Command.withDescription("Manage headless T3 Connect access."),Command.withSubcommands([- cloudLoginCommand,- cloudLinkCommand,- cloudStatusCommand,- cloudUnlinkCommand,- cloudLogoutCommand,+ connectLoginCommand,+ connectLinkCommand,+ connectStatusCommand,+ connectUnlinkCommand,+ connectLogoutCommand,]),);diff --git a/apps/server/src/cloud/CliTokenManager.ts b/apps/server/src/cloud/CliTokenManager.tsindex c10b89229..765ef0583 100644--- a/apps/server/src/cloud/CliTokenManager.ts+++ b/apps/server/src/cloud/CliTokenManager.ts@@ -96,7 +96,7 @@ const make = Effect.gen(function* () {const clear = secrets.remove(CLOUD_CLI_OAUTH_TOKEN_SECRET)- .pipe(wrapError("Could not remove the stored T3 Cloud CLI credential."));+ .pipe(wrapError("Could not remove the stored T3 Connect CLI credential."));const read = Effect.fn("cloud.cli_token.read")(function* () {const encoded = yield* secrets.get(CLOUD_CLI_OAUTH_TOKEN_SECRET);@@ -146,7 +146,7 @@ const make = Effect.gen(function* () {const url = new URL(request.originalUrl, metadata.redirectUri);const code = url.searchParams.get("code");if (url.searchParams.get("state") !== state || !code) {- return HttpServerResponse.text("Invalid T3 Cloud authorization callback.", {+ return HttpServerResponse.text("Invalid T3 Connect authorization callback.", {status: 400,});}@@ -154,7 +154,7 @@ const make = Effect.gen(function* () {return yield* HttpServerResponse.html`<html><body style="font-family: sans-serif; text-align: center; margin-top: 50px;">- <h1>T3 Cloud authorization complete</h1>+ <h1>T3 Connect authorization complete</h1><p>You can close this window and return to your terminal.</p></body></html>@@ -182,13 +182,13 @@ const make = Effect.gen(function* () {authorizationUrl.searchParams.set("state", state);authorizationUrl.searchParams.set("code_challenge", challenge);authorizationUrl.searchParams.set("code_challenge_method", "S256");- yield* Console.log(`Open this URL to authorize T3 Cloud:\n${authorizationUrl.toString()}\n`);+ yield* Console.log(`Open this URL to authorize T3 Connect:\n${authorizationUrl.toString()}\n`);const code = yield* Deferred.await(callback).pipe(Effect.timeout(CLOUD_CLI_OAUTH_CALLBACK_TIMEOUT),Effect.catchTag("TimeoutError", () =>Effect.fail(new CloudCliTokenManagerError({- message: "Timed out waiting for T3 Cloud authorization.",+ message: "Timed out waiting for T3 Connect authorization.",}),),),@@ -213,12 +213,12 @@ const make = Effect.gen(function* () {});const getExisting = semaphore.withPermits(1)(- getExistingNoLock().pipe(wrapError("Could not refresh the T3 Cloud CLI credential.")),+ getExistingNoLock().pipe(wrapError("Could not refresh the T3 Connect CLI credential.")),);const hasCredential = semaphore.withPermits(1)(read().pipe(Effect.map(Option.isSome),- wrapError("Could not read the stored T3 Cloud CLI credential."),+ wrapError("Could not read the stored T3 Connect CLI credential."),),);const get = semaphore.withPermits(1)(@@ -227,7 +227,7 @@ const make = Effect.gen(function* () {return Option.isSome(token)? token.value: yield* Effect.scoped(login()).pipe(Effect.flatMap(persist));- }).pipe(wrapError("Could not authorize the T3 Cloud CLI.")),+ }).pipe(wrapError("Could not authorize the T3 Connect CLI.")),);return CloudCliTokenManager.of({ get, getExisting, hasCredential, clear });diff --git a/apps/server/src/cloud/http.test.ts b/apps/server/src/cloud/http.test.tsindex 2b7e7d249..799ab609f 100644--- a/apps/server/src/cloud/http.test.ts+++ b/apps/server/src/cloud/http.test.ts@@ -76,7 +76,7 @@ describe("reconcileDesiredCloudLink", () => {expect(error).toMatchObject({_tag: "EnvironmentHttpUnauthorizedError",- message: "Run `t3 cloud link` to authorize this environment.",+ message: "Run `t3 connect link` to authorize this environment.",});}).pipe(Effect.provideService(diff --git a/apps/server/src/cloud/http.ts b/apps/server/src/cloud/http.tsindex 38203dae3..896990849 100644--- a/apps/server/src/cloud/http.ts+++ b/apps/server/src/cloud/http.ts@@ -509,7 +509,7 @@ const relayClientRequest = <A>(Effect.mapError((cause) =>new EnvironmentHttpInternalServerError({- message: `T3 Cloud relay request failed: ${String(cause)}`,+ message: `T3 Connect relay request failed: ${String(cause)}`,}),),);@@ -535,7 +535,7 @@ const reconcileDesiredCloudLinkWith = Effect.fn("environment.cloud.reconcileDesionNone: () =>Effect.fail(new EnvironmentHttpUnauthorizedError({- message: "Run `t3 cloud link` to authorize this environment.",+ message: "Run `t3 connect link` to authorize this environment.",}),),onSome: Effect.succeed,@@ -595,7 +595,7 @@ const reconcileDesiredCloudLinkWith = Effect.fn("environment.cloud.reconcileDesiCloudCliTokenManagerError: (error) =>failEnvironmentCloudInternalError(error.message)(error.cause),SecretStoreError: failEnvironmentCloudInternalError(- "Could not persist desired T3 Cloud link state.",+ "Could not persist desired T3 Connect link state.",),}),);@@ -874,7 +874,7 @@ const cloudMintCredentialHandler = Effect.fn("environment.cloud.mintCredential")scopes: AuthStandardClientScopes,subject: "cloud-connect",ttl: Duration.minutes(2),- label: "T3 Cloud connect",+ label: "T3 Connect connect",proofKeyThumbprint: proof.clientProofKeyThumbprint,});const responsePayload = {@@ -924,9 +924,9 @@ const cloudMintCredentialHandler = Effect.fn("environment.cloud.mintCredential")}),);-export const cloudHttpApiLayer = HttpApiBuilder.group(+export const connectHttpApiLayer = HttpApiBuilder.group(EnvironmentHttpApi,- "cloud",+ "connect",Effect.fnUntraced(function* (handlers) {const dependencies = yield* cloudHttpDependencies;return handlersdiff --git a/apps/server/src/relay/AgentAwarenessRelay.ts b/apps/server/src/relay/AgentAwarenessRelay.tsindex 6266a39b7..960f27e75 100644--- a/apps/server/src/relay/AgentAwarenessRelay.ts+++ b/apps/server/src/relay/AgentAwarenessRelay.ts@@ -303,7 +303,7 @@ const make = Effect.gen(function* () {}const relayConfig = yield* readRelayConfig.pipe(Effect.orElseSucceed(() => null));if (!relayConfig) {- yield* Effect.logDebug("agent activity publish skipped; T3 Cloud config missing", {+ yield* Effect.logDebug("agent activity publish skipped; T3 Connect config missing", {threadId,});return;@@ -421,7 +421,7 @@ const make = Effect.gen(function* () {}const relayConfig = yield* readRelayConfig.pipe(Effect.orElseSucceed(() => null));if (!relayConfig) {- yield* Effect.logDebug("agent activity snapshot skipped; T3 Cloud config missing");+ yield* Effect.logDebug("agent activity snapshot skipped; T3 Connect config missing");return false;}const environmentId = yield* serverEnvironment.getEnvironmentId;@@ -459,7 +459,7 @@ const make = Effect.gen(function* () {function* () {const relayConfig = yield* readRelayConfig.pipe(Effect.orElseSucceed(() => null));if (!relayConfig) {- yield* Effect.logInfo("agent activity publishing standby; T3 Cloud config missing");+ yield* Effect.logInfo("agent activity publishing standby; T3 Connect config missing");} else {yield* Effect.logInfo("agent activity publishing enabled", {relayUrl: relayConfig.url,diff --git a/apps/server/src/server.test.ts b/apps/server/src/server.test.tsindex d061578ca..0bf2f6589 100644--- a/apps/server/src/server.test.ts+++ b/apps/server/src/server.test.ts@@ -782,7 +782,7 @@ const buildAppUnderTest = (options?: {),Layer.provide(Layer.mock(CloudCliTokenManager.CloudCliTokenManager)({- get: Effect.die(new Error("Unexpected T3 Cloud CLI authorization request.")),+ get: Effect.die(new Error("Unexpected T3 Connect CLI authorization request.")),getExisting: Effect.succeed(Option.none()),hasCredential: Effect.succeed(false),clear: Effect.void,@@ -1713,7 +1713,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {yield* buildAppUnderTest();const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const linkProofUrl = yield* getHttpServerUrl("/api/cloud/link-proof");+ const linkProofUrl = yield* getHttpServerUrl("/api/connect/link-proof");const linkProofResponse = yield* fetchEffect(linkProofUrl, {method: "POST",headers: {@@ -1750,7 +1750,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {yield* buildAppUnderTest();const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const linkProofUrl = yield* getHttpServerUrl("/api/cloud/link-proof");+ const linkProofUrl = yield* getHttpServerUrl("/api/connect/link-proof");const serverPort = Number(new URL(linkProofUrl).port);const linkProofResponse = yield* fetchEffect(linkProofUrl, {method: "POST",@@ -1762,10 +1762,10 @@ it.layer(NodeServices.layer)("server router seam", (it) => {challenge: "relay-link-challenge",relayIssuer: "https://relay.example.test",endpoint: {- httpBaseUrl: linkProofUrl.replace("/api/cloud/link-proof", ""),+ httpBaseUrl: linkProofUrl.replace("/api/connect/link-proof", ""),wsBaseUrl: linkProofUrl.replace("http://", "ws://")- .replace("/api/cloud/link-proof", "/ws"),+ .replace("/api/connect/link-proof", "/ws"),providerKind: "manual",},origin: {@@ -1789,9 +1789,9 @@ it.layer(NodeServices.layer)("server router seam", (it) => {Effect.gen(function* () {yield* buildAppUnderTest();- const linkProofUrl = yield* getHttpServerUrl("/api/cloud/link-proof");+ const linkProofUrl = yield* getHttpServerUrl("/api/connect/link-proof");const serverPort = Number(new URL(linkProofUrl).port);- const linkProofResponse = yield* HttpClient.post("/api/cloud/link-proof", {+ const linkProofResponse = yield* HttpClient.post("/api/connect/link-proof", {headers: {cookie: yield* getAuthenticatedSessionCookieHeader(),"content-type": "application/json",@@ -1833,9 +1833,9 @@ it.layer(NodeServices.layer)("server router seam", (it) => {Effect.gen(function* () {yield* buildAppUnderTest();- const linkProofUrl = yield* getHttpServerUrl("/api/cloud/link-proof");+ const linkProofUrl = yield* getHttpServerUrl("/api/connect/link-proof");const serverPort = Number(new URL(linkProofUrl).port);- const linkProofResponse = yield* HttpClient.post("/api/cloud/link-proof", {+ const linkProofResponse = yield* HttpClient.post("/api/connect/link-proof", {headers: {cookie: yield* getAuthenticatedSessionCookieHeader(),"content-type": "application/json",@@ -1875,9 +1875,9 @@ it.layer(NodeServices.layer)("server router seam", (it) => {Effect.gen(function* () {yield* buildAppUnderTest();- const linkProofUrl = yield* getHttpServerUrl("/api/cloud/link-proof");+ const linkProofUrl = yield* getHttpServerUrl("/api/connect/link-proof");const serverPort = Number(new URL(linkProofUrl).port);- const linkProofResponse = yield* HttpClient.post("/api/cloud/link-proof", {+ const linkProofResponse = yield* HttpClient.post("/api/connect/link-proof", {headers: {cookie: yield* getAuthenticatedSessionCookieHeader(),"content-type": "application/json",@@ -1918,7 +1918,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {yield* buildAppUnderTest();const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const linkProofUrl = yield* getHttpServerUrl("/api/cloud/link-proof");+ const linkProofUrl = yield* getHttpServerUrl("/api/connect/link-proof");const serverPort = Number(new URL(linkProofUrl).port);const linkProofResponse = yield* fetchEffect(linkProofUrl, {method: "POST",@@ -1962,7 +1962,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {});const credential = (yield* credentialResponse.json) as { readonly credential: string };const pairedCookie = yield* getAuthenticatedSessionCookieHeader(credential.credential);- const linkStateUrl = yield* getHttpServerUrl("/api/cloud/link-state");+ const linkStateUrl = yield* getHttpServerUrl("/api/connect/link-state");const response = yield* fetchEffect(linkStateUrl, {headers: { cookie: pairedCookie },});@@ -2028,7 +2028,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {yield* buildAppUnderTest();const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const preferencesUrl = yield* getHttpServerUrl("/api/cloud/preferences");+ const preferencesUrl = yield* getHttpServerUrl("/api/connect/preferences");const ownerResponse = yield* fetchEffect(preferencesUrl, {method: "POST",headers: {@@ -2072,7 +2072,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {yield* buildAppUnderTest();const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2107,7 +2107,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const postRelayConfig = (body: {readonly relayUrl: string;readonly relayIssuer?: string;@@ -2184,7 +2184,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const postRelayConfig = (cloudUserId: string, environmentCredential: string) =>fetchEffect(relayConfigUrl, {method: "POST",@@ -2227,8 +2227,8 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const linkStateUrl = yield* getHttpServerUrl("/api/cloud/link-state");- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const linkStateUrl = yield* getHttpServerUrl("/api/connect/link-state");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const initialResponse = yield* fetchEffect(linkStateUrl, {headers: {@@ -2284,7 +2284,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {Effect.gen(function* () {yield* buildAppUnderTest();- const reconcileUrl = yield* getHttpServerUrl("/api/cloud/reconcile");+ const reconcileUrl = yield* getHttpServerUrl("/api/connect/reconcile");const response = yield* fetchEffect(reconcileUrl, {method: "POST",});@@ -2321,9 +2321,9 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");- const unlinkUrl = yield* getHttpServerUrl("/api/cloud/unlink");- const linkStateUrl = yield* getHttpServerUrl("/api/cloud/link-state");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");+ const unlinkUrl = yield* getHttpServerUrl("/api/connect/unlink");+ const linkStateUrl = yield* getHttpServerUrl("/api/connect/link-state");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",@@ -2398,7 +2398,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2424,7 +2424,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {issuedAt: DateTime.formatIso(now),expiresAt: DateTime.formatIso(DateTime.add(now, { minutes: 5 })),});- const mintUrl = yield* getHttpServerUrl("/api/cloud/mint-credential");+ const mintUrl = yield* getHttpServerUrl("/api/connect/mint-credential");const postMint = () =>fetchEffect(mintUrl, {method: "POST",@@ -2448,7 +2448,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {}).pipe(Effect.provide(NodeHttpServer.layerTest)),);- it.effect("serves the documented T3 Cloud mint credential endpoint", () =>+ it.effect("serves the documented T3 Connect mint credential endpoint", () =>Effect.gen(function* () {yield* buildAppUnderTest();@@ -2457,7 +2457,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2484,7 +2484,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {issuedAt: DateTime.formatIso(now),expiresAt: DateTime.formatIso(DateTime.add(now, { minutes: 5 })),});- const mintUrl = yield* getHttpServerUrl("/api/t3-cloud/mint-credential");+ const mintUrl = yield* getHttpServerUrl("/api/t3-connect/mint-credential");const response = yield* fetchEffect(mintUrl, {method: "POST",headers: {@@ -2507,7 +2507,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {}).pipe(Effect.provide(NodeHttpServer.layerTest)),);- it.effect("serves signed T3 Cloud environment health checks", () =>+ it.effect("serves signed T3 Connect environment health checks", () =>Effect.gen(function* () {yield* buildAppUnderTest();@@ -2516,7 +2516,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2542,7 +2542,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {issuedAt: DateTime.formatIso(now),expiresAt: DateTime.formatIso(DateTime.add(now, { minutes: 5 })),});- const healthUrl = yield* getHttpServerUrl("/api/t3-cloud/health");+ const healthUrl = yield* getHttpServerUrl("/api/t3-connect/health");const response = yield* fetchEffect(healthUrl, {method: "POST",headers: {@@ -2576,7 +2576,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2602,7 +2602,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {issuedAt: DateTime.formatIso(now),expiresAt: DateTime.formatIso(DateTime.add(now, { minutes: 5 })),});- const healthUrl = yield* getHttpServerUrl("/api/t3-cloud/health");+ const healthUrl = yield* getHttpServerUrl("/api/t3-connect/health");const postHealth = () =>fetchEffect(healthUrl, {method: "POST",@@ -2637,7 +2637,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2656,7 +2656,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {assert.equal(relayConfigResponse.status, 200);const now = yield* DateTime.now;- const mintUrl = yield* getHttpServerUrl("/api/t3-cloud/mint-credential");+ const mintUrl = yield* getHttpServerUrl("/api/t3-connect/mint-credential");const postMint = (request: ReturnType<typeof makeCloudMintCredentialRequest>) =>fetchEffect(mintUrl, {method: "POST",@@ -2717,7 +2717,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2756,7 +2756,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {issuedAt: DateTime.formatIso(now),expiresAt: DateTime.formatIso(DateTime.add(now, { minutes: 5 })),});- const healthUrl = yield* getHttpServerUrl("/api/t3-cloud/health");+ const healthUrl = yield* getHttpServerUrl("/api/t3-connect/health");const healthResponse = yield* fetchEffect(healthUrl, {method: "POST",headers: {@@ -2786,7 +2786,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2804,7 +2804,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {assert.equal(relayConfigResponse.status, 200);const now = yield* DateTime.now;- const mintUrl = yield* getHttpServerUrl("/api/cloud/mint-credential");+ const mintUrl = yield* getHttpServerUrl("/api/connect/mint-credential");const postMint = (request: ReturnType<typeof makeCloudMintCredentialRequest>) =>fetchEffect(mintUrl, {method: "POST",@@ -2853,7 +2853,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2871,7 +2871,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {assert.equal(relayConfigResponse.status, 200);const now = yield* DateTime.now;- const mintUrl = yield* getHttpServerUrl("/api/t3-cloud/mint-credential");+ const mintUrl = yield* getHttpServerUrl("/api/t3-connect/mint-credential");const response = yield* fetchEffect(mintUrl, {method: "POST",headers: {@@ -2904,7 +2904,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2922,7 +2922,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {assert.equal(relayConfigResponse.status, 200);const now = yield* DateTime.now;- const mintUrl = yield* getHttpServerUrl("/api/t3-cloud/mint-credential");+ const mintUrl = yield* getHttpServerUrl("/api/t3-connect/mint-credential");const response = yield* fetchEffect(mintUrl, {method: "POST",headers: {@@ -2955,7 +2955,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -2973,7 +2973,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {assert.equal(relayConfigResponse.status, 200);const now = yield* DateTime.now;- const healthUrl = yield* getHttpServerUrl("/api/t3-cloud/health");+ const healthUrl = yield* getHttpServerUrl("/api/t3-connect/health");const postHealth = (request: ReturnType<typeof makeCloudEnvironmentHealthRequest>) =>fetchEffect(healthUrl, {method: "POST",@@ -3020,7 +3020,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -3038,7 +3038,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {assert.equal(relayConfigResponse.status, 200);const now = yield* DateTime.now;- const healthUrl = yield* getHttpServerUrl("/api/t3-cloud/health");+ const healthUrl = yield* getHttpServerUrl("/api/t3-connect/health");const response = yield* fetchEffect(healthUrl, {method: "POST",headers: {@@ -3070,7 +3070,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {publicKeyEncoding: { format: "pem", type: "spki" },});const ownerCookie = yield* getAuthenticatedSessionCookieHeader();- const relayConfigUrl = yield* getHttpServerUrl("/api/cloud/relay-config");+ const relayConfigUrl = yield* getHttpServerUrl("/api/connect/relay-config");const relayConfigResponse = yield* fetchEffect(relayConfigUrl, {method: "POST",headers: {@@ -3088,7 +3088,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {assert.equal(relayConfigResponse.status, 200);const now = yield* DateTime.now;- const healthUrl = yield* getHttpServerUrl("/api/t3-cloud/health");+ const healthUrl = yield* getHttpServerUrl("/api/t3-connect/health");const response = yield* fetchEffect(healthUrl, {method: "POST",headers: {@@ -3280,7 +3280,7 @@ it.layer(NodeServices.layer)("server router seam", (it) => {config: { devUrl: new URL(crossOriginClientOrigin) },});- const linkProofUrl = yield* getHttpServerUrl("/api/cloud/link-proof");+ const linkProofUrl = yield* getHttpServerUrl("/api/connect/link-proof");const response = yield* fetchEffect(linkProofUrl, {method: "OPTIONS",headers: {diff --git a/apps/server/src/server.ts b/apps/server/src/server.tsindex 98bef90bb..94b6cb753 100644--- a/apps/server/src/server.ts+++ b/apps/server/src/server.ts@@ -69,7 +69,7 @@ import { ServerEnvironmentLive } from "./environment/Layers/ServerEnvironment.tsimport { authHttpApiLayer, environmentAuthenticatedAuthLayer } from "./auth/http.ts";import * as ServerSecretStore from "./auth/ServerSecretStore.ts";import * as EnvironmentAuth from "./auth/EnvironmentAuth.ts";-import { cloudHttpApiLayer, reconcileDesiredCloudLink } from "./cloud/http.ts";+import { connectHttpApiLayer, reconcileDesiredCloudLink } from "./cloud/http.ts";import * as CloudManagedEndpointRuntime from "./cloud/ManagedEndpointRuntime.ts";import * as CloudCliTokenManager from "./cloud/CliTokenManager.ts";import * as CloudCliState from "./cloud/CliState.ts";@@ -321,7 +321,7 @@ const RuntimeServicesLive = ServerRuntimeStartupLive.pipe(export const makeRoutesLayer = Layer.mergeAll(HttpApiBuilder.layer(EnvironmentHttpApi).pipe(Layer.provide(authHttpApiLayer),- Layer.provide(cloudHttpApiLayer),+ Layer.provide(connectHttpApiLayer),Layer.provide(orchestrationHttpApiLayer),Layer.provide(serverEnvironmentHttpApiLayer),Layer.provide(environmentAuthenticatedAuthLayer),@@ -429,9 +429,9 @@ export const makeServerLayer = Layer.unwrap(Effect.sleep("250 millis").pipe(Effect.andThen(reconcileDesiredCloudLink(`http://127.0.0.1:${address.port}`)),Effect.retry({ times: 4 }),- Effect.tap(() => Effect.logInfo("T3 Cloud desired link reconciled on startup")),+ Effect.tap(() => Effect.logInfo("T3 Connect desired link reconciled on startup")),Effect.catch((cause) =>- Effect.logWarning("Failed to reconcile T3 Cloud desired link on startup", {+ Effect.logWarning("Failed to reconcile T3 Connect desired link on startup", {cause,}),),diff --git a/apps/web/src/cloud/linkEnvironment.test.ts b/apps/web/src/cloud/linkEnvironment.test.tsindex 9baae20a6..dc09a7fa0 100644--- a/apps/web/src/cloud/linkEnvironment.test.ts+++ b/apps/web/src/cloud/linkEnvironment.test.ts@@ -514,7 +514,7 @@ describe("web cloud link environment client", () => {expect(fetchMock.mock.calls[0]?.[1]?.credentials).not.toBe("include");expect(String(fetchMock.mock.calls[1]?.[0])).toBe(- "http://127.0.0.1:3000/api/cloud/link-proof",+ "http://127.0.0.1:3000/api/connect/link-proof",);expect(fetchMock.mock.calls[1]?.[1]).toMatchObject({method: "POST",@@ -553,7 +553,7 @@ describe("web cloud link environment client", () => {});expect(String(fetchMock.mock.calls[3]?.[0])).toBe(- "http://127.0.0.1:3000/api/cloud/relay-config",+ "http://127.0.0.1:3000/api/connect/relay-config",);expect(fetchMock.mock.calls[3]?.[1]).toMatchObject({method: "POST",@@ -615,7 +615,7 @@ describe("web cloud link environment client", () => {publishAgentActivity: false,});expect(String(fetchMock.mock.calls[0]?.[0])).toBe(- "http://127.0.0.1:3000/api/cloud/link-state",+ "http://127.0.0.1:3000/api/connect/link-state",);expect(fetchMock.mock.calls[0]?.[1]).toMatchObject({method: "GET",@@ -654,7 +654,7 @@ describe("web cloud link environment client", () => {}),);- expect(String(fetchMock.mock.calls[0]?.[0])).toBe("http://127.0.0.1:3000/api/cloud/unlink");+ expect(String(fetchMock.mock.calls[0]?.[0])).toBe("http://127.0.0.1:3000/api/connect/unlink");expect(fetchMock.mock.calls[0]?.[1]).toMatchObject({method: "POST",credentials: "include",@@ -698,7 +698,7 @@ describe("web cloud link environment client", () => {);expect(fetchMock).toHaveBeenCalledTimes(2);- expect(String(fetchMock.mock.calls[0]?.[0])).toBe("http://127.0.0.1:3000/api/cloud/unlink");+ expect(String(fetchMock.mock.calls[0]?.[0])).toBe("http://127.0.0.1:3000/api/connect/unlink");expect(fetchMock.mock.calls[0]?.[1]).toMatchObject({method: "POST",credentials: "include",diff --git a/apps/web/src/cloud/linkEnvironment.ts b/apps/web/src/cloud/linkEnvironment.tsindex f68849e27..b13b324a4 100644--- a/apps/web/src/cloud/linkEnvironment.ts+++ b/apps/web/src/cloud/linkEnvironment.ts@@ -451,7 +451,7 @@ export function readPrimaryCloudLinkState(): Effect.Effect<return null;}const client = yield* makeEnvironmentHttpApiClient(resolvePrimaryEnvironmentHttpUrl("/"));- return yield* client.cloud+ return yield* client.connect.linkState({ headers: {} }).pipe(withPrimaryEnvironmentRequestInit,@@ -465,7 +465,7 @@ export function updatePrimaryCloudPreferences(input: {}): Effect.Effect<CloudLinkState, CloudEnvironmentLinkError, HttpClient.HttpClient> {return Effect.gen(function* () {const client = yield* makeEnvironmentHttpApiClient(resolvePrimaryEnvironmentHttpUrl("/"));- return yield* client.cloud+ return yield* client.connect.preferences({headers: {},payload: input,@@ -488,7 +488,7 @@ export function unlinkPrimaryEnvironmentFromCloud(input: {});}const client = yield* makeEnvironmentHttpApiClient(resolvePrimaryEnvironmentHttpUrl("/"));- yield* client.cloud+ yield* client.connect.unlink({ headers: {} }).pipe(withPrimaryEnvironmentRequestInit,@@ -568,7 +568,7 @@ export function linkEnvironmentToCloud(input: {),),);- const proof = yield* environmentClient.cloud+ const proof = yield* environmentClient.connect.linkProof({headers,payload: {@@ -604,7 +604,7 @@ export function linkEnvironmentToCloud(input: {link,});- yield* environmentClient.cloud+ yield* environmentClient.connect.relayConfig({headers,payload: {@@ -656,7 +656,7 @@ export function linkPrimaryEnvironmentToCloud(input: {),),);- const proof = yield* environmentClient.cloud+ const proof = yield* environmentClient.connect.linkProof({headers: {},payload: {@@ -695,7 +695,7 @@ export function linkPrimaryEnvironmentToCloud(input: {link,});- yield* environmentClient.cloud+ yield* environmentClient.connect.relayConfig({headers: {},payload: {diff --git a/apps/web/src/cloud/primaryCloudLinkState.ts b/apps/web/src/cloud/primaryCloudLinkState.tsindex ecc229759..095ca8422 100644--- a/apps/web/src/cloud/primaryCloudLinkState.ts+++ b/apps/web/src/cloud/primaryCloudLinkState.ts@@ -55,7 +55,7 @@ export function usePrimaryCloudLinkState() {let error: string | null = null;if (result._tag === "Failure") {const cause = Cause.squash(result.cause);- error = cause instanceof Error ? cause.message : "Could not read T3 Cloud link state.";+ error = cause instanceof Error ? cause.message : "Could not read T3 Connect link state.";}return {diff --git a/apps/web/src/components/clerk/T3ConnectSidebarSignIn.tsx b/apps/web/src/components/clerk/T3ConnectSidebarSignIn.tsxnew file mode 100644index 000000000..d3f906ef4--- /dev/null+++ b/apps/web/src/components/clerk/T3ConnectSidebarSignIn.tsx@@ -0,0 +1,60 @@+import { UserButton, useAuth } from "@clerk/react";+import { LogInIcon } from "lucide-react";++import { hasCloudPublicConfig } from "../../cloud/publicConfig";+import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "../ui/sidebar";+import { useT3ConnectAuthPrompt } from "./useT3ConnectAuthPrompt";++export function T3ConnectSidebarSignIn() {+ if (!hasCloudPublicConfig()) return null;++ return <ConfiguredT3ConnectSidebarSignIn />;+}++export function T3ConnectSidebarAvatar() {+ if (!hasCloudPublicConfig()) return null;++ return <ConfiguredT3ConnectSidebarAvatar />;+}++function ConfiguredT3ConnectSidebarAvatar() {+ const { isLoaded, isSignedIn } = useAuth();++ if (!isLoaded || !isSignedIn) return null;++ return (+ <UserButton+ appearance={{+ elements: {+ avatarBox: "size-7",+ userButtonTrigger: "rounded-lg p-1 hover:bg-sidebar-accent",+ },+ }}+ />+ );+}++function ConfiguredT3ConnectSidebarSignIn() {+ const { isLoaded, isSignedIn } = useAuth();+ const { authPrompt, openAuthPrompt } = useT3ConnectAuthPrompt();++ if (!isLoaded || isSignedIn) return null;++ return (+ <>+ <SidebarMenu>+ <SidebarMenuItem>+ <SidebarMenuButton+ size="sm"+ className="gap-2 px-2 py-2 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"+ onClick={openAuthPrompt}+ >+ <LogInIcon className="size-4" />+ <span>Sign in to T3 Connect</span>+ </SidebarMenuButton>+ </SidebarMenuItem>+ </SidebarMenu>+ {authPrompt}+ </>+ );+}diff --git a/apps/web/src/components/clerk/useT3ConnectAuthPrompt.tsx b/apps/web/src/components/clerk/useT3ConnectAuthPrompt.tsxnew file mode 100644index 000000000..b38d630df--- /dev/null+++ b/apps/web/src/components/clerk/useT3ConnectAuthPrompt.tsx@@ -0,0 +1,29 @@+import { useClerk } from "@clerk/react";+import { useState } from "react";++import { isElectron } from "../../env";+import { Dialog, DialogPopup } from "../ui/dialog";+import { DesktopClerkWaitlist } from "./DesktopClerkWaitlist";++export function useT3ConnectAuthPrompt() {+ const clerk = useClerk();+ const [desktopAuthOpen, setDesktopAuthOpen] = useState(false);++ const openAuthPrompt = () => {+ if (isElectron) {+ setDesktopAuthOpen(true);+ return;+ }+ clerk.openWaitlist();+ };++ const authPrompt = isElectron ? (+ <Dialog open={desktopAuthOpen} onOpenChange={setDesktopAuthOpen}>+ <DialogPopup className="max-w-md border-0 bg-transparent shadow-none" showCloseButton={false}>+ <DesktopClerkWaitlist />+ </DialogPopup>+ </Dialog>+ ) : null;++ return { authPrompt, openAuthPrompt };+}diff --git a/apps/web/src/components/cloud/RelayClientInstallDialog.tsx b/apps/web/src/components/cloud/RelayClientInstallDialog.tsxindex 1ccdf4b10..78282f659 100644--- a/apps/web/src/components/cloud/RelayClientInstallDialog.tsx+++ b/apps/web/src/components/cloud/RelayClientInstallDialog.tsx@@ -69,8 +69,8 @@ export function RelayClientInstallDialog() {</DialogTitle><DialogDescription>{isInstalling- ? "T3 Code is preparing this environment for secure access through T3 Cloud."- : "T3 Code needs the relay client to make this environment available through T3 Cloud."}+ ? "T3 Code is preparing this environment for secure access through T3 Connect."+ : "T3 Code needs the relay client to make this environment available through T3 Connect."}</DialogDescription></DialogHeader><DialogPanel scrollFade={false}>diff --git a/apps/web/src/components/settings/CloudSettings.tsx b/apps/web/src/components/settings/CloudSettings.tsxdeleted file mode 100644index c2a1541b1..000000000--- a/apps/web/src/components/settings/CloudSettings.tsx+++ /dev/null@@ -1,197 +0,0 @@-import { UserButton, Waitlist, useAuth } from "@clerk/react";-import { AuthRelayWriteScope } from "@t3tools/contracts";-import { CloudIcon, RefreshCwIcon, SmartphoneIcon } from "lucide-react";-import { useEffect, useState } from "react";--import { updatePrimaryCloudPreferences } from "../../cloud/linkEnvironment";-import { hasCloudPublicConfig } from "../../cloud/publicConfig";-import { useManagedRelayDevices } from "../../cloud/managedRelayState";-import { usePrimaryCloudLinkState } from "../../cloud/primaryCloudLinkState";-import { isElectron } from "../../env";-import { usePrimarySessionState } from "../../environments/primary";-import { webRuntime } from "../../lib/runtime";-import { cn } from "../../lib/utils";-import { DesktopClerkWaitlist } from "../clerk/DesktopClerkWaitlist";-import { Button } from "../ui/button";-import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../ui/empty";-import { Skeleton } from "../ui/skeleton";-import { Switch } from "../ui/switch";-import { toastManager } from "../ui/toast";-import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";-import { SettingsPageContainer, SettingsRow, SettingsSection } from "./settingsLayout";--const NOTIFICATION_DEVICE_SKELETON_ROWS = ["primary", "secondary"] as const;--function NotificationDevicesSkeleton() {- return NOTIFICATION_DEVICE_SKELETON_ROWS.map((row) => (- <div key={row} className="border-t border-border/60 px-4 py-3.5 first:border-t-0 sm:px-5">- <div className="space-y-2">- <Skeleton className="h-4 w-32 rounded-full" />- <Skeleton className="h-3 w-44 rounded-full" />- <Skeleton className="h-3 w-56 rounded-full" />- </div>- </div>- ));-}--function EmptyNotificationDevices() {- return (- <Empty className="min-h-52">- <EmptyMedia variant="icon">- <SmartphoneIcon />- </EmptyMedia>- <EmptyHeader>- <EmptyTitle>No notification devices</EmptyTitle>- <EmptyDescription>- Sign in on the mobile app to register a device for account-level notifications.- </EmptyDescription>- </EmptyHeader>- </Empty>- );-}--function cloudErrorMessage(error: unknown, fallback: string): string {- return error instanceof Error ? error.message : fallback;-}--export function CloudSettingsPanel() {- if (!hasCloudPublicConfig()) return null;-- return <ConfiguredCloudSettingsPanel />;-}--function ConfiguredCloudSettingsPanel() {- const { isLoaded, isSignedIn } = useAuth();-- if (!isLoaded) {- return null;- }-- return isSignedIn ? <CloudSettingsPanelInner /> : <CloudWaitlistPanel />;-}--function CloudWaitlistPanel() {- return (- <SettingsPageContainer className="min-h-full items-center justify-center">- {isElectron ? <DesktopClerkWaitlist /> : <Waitlist />}- </SettingsPageContainer>- );-}--function CloudSettingsPanelInner() {- const primaryLinkState = usePrimaryCloudLinkState();- const primarySessionState = usePrimarySessionState();- const devicesState = useManagedRelayDevices();- const [isUpdatingPreference, setIsUpdatingPreference] = useState(false);- const devices = devicesState.data ?? [];- const canManageRelay =- primarySessionState.data?.authenticated === true &&- Boolean(primarySessionState.data.scopes?.includes(AuthRelayWriteScope));-- useEffect(() => {- if (devicesState.error) {- toastManager.add({- type: "error",- title: "Cloud devices unavailable",- description: devicesState.error,- });- }- }, [devicesState.error]);-- const updatePublishAgentActivity = async (enabled: boolean) => {- setIsUpdatingPreference(true);- try {- await webRuntime.runPromise(updatePrimaryCloudPreferences({ publishAgentActivity: enabled }));- primaryLinkState.refresh();- toastManager.add({- type: "success",- title: enabled ? "Agent activity enabled" : "Agent activity disabled",- description: enabled- ? "This environment can publish agent activity to your notification devices."- : "This environment will stop publishing agent activity.",- });- } catch (error) {- toastManager.add({- type: "error",- title: "Cloud preference update failed",- description: cloudErrorMessage(error, "Could not update cloud preferences."),- });- } finally {- setIsUpdatingPreference(false);- }- };-- return (- <SettingsPageContainer>- <SettingsSection title="T3 Cloud" icon={<CloudIcon className="size-3.5" />}>- <SettingsRow- title="Cloud account"- description="Manage your private-beta T3 Cloud session."- control={<UserButton />}- />- </SettingsSection>- <SettingsSection title="Preferences">- <SettingsRow- title="Publish agent activity"- description="Allow this environment to send agent activity to your notification devices."- status={- !primaryLinkState.data?.linked ? "Link this environment from Connections first." : null- }- control={- <Switch- aria-label="Publish agent activity"- checked={primaryLinkState.data?.publishAgentActivity ?? false}- disabled={!primaryLinkState.data?.linked || !canManageRelay || isUpdatingPreference}- onCheckedChange={(enabled) => void updatePublishAgentActivity(enabled)}- />- }- />- </SettingsSection>- <SettingsSection- title="Notification devices"- headerAction={- <Tooltip>- <TooltipTrigger- render={- <Button- size="icon-xs"- variant="ghost"- className="size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground"- disabled={devicesState.isPending}- onClick={devicesState.refresh}- aria-label="Refresh notification devices"- >- <RefreshCwIcon- className={cn("size-3", devicesState.isPending && "animate-spin")}- />- </Button>- }- />- <TooltipPopup side="top">Refresh notification devices</TooltipPopup>- </Tooltip>- }- >- {devicesState.data === null ? (- <NotificationDevicesSkeleton />- ) : devices.length > 0 ? (- devices.map((device) => (- <SettingsRow- key={device.deviceId}- title={device.label}- description={`iOS ${device.iosMajorVersion}${device.appVersion ? ` · T3 Code ${device.appVersion}` : ""}`}- status={- device.notifications.enabled- ? device.liveActivities.enabled- ? "Notifications and Live Activities enabled"- : "Notifications enabled · Live Activities disabled"- : "Notifications disabled on device"- }- />- ))- ) : (- <EmptyNotificationDevices />- )}- </SettingsSection>- </SettingsPageContainer>- );-}diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsxindex 9dab7b61f..bbffddebf 100644--- a/apps/web/src/components/settings/ConnectionsSettings.tsx+++ b/apps/web/src/components/settings/ConnectionsSettings.tsx@@ -76,6 +76,7 @@ import { stackedThreadToast, toastManager } from "../ui/toast";import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";import { Button } from "../ui/button";import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../ui/empty";+import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";import { Group, GroupSeparator } from "../ui/group";import { AnimatedHeight } from "../AnimatedHeight";import {@@ -121,6 +122,7 @@ import {connectManagedCloudEnvironment,linkPrimaryEnvironmentToCloud,unlinkPrimaryEnvironmentFromCloud,+ updatePrimaryCloudPreferences,} from "~/cloud/linkEnvironment";import {refreshManagedRelayEnvironments,@@ -1614,7 +1616,7 @@ function CloudLinkSwitch({}) {const control = (<Switch- aria-label="Enable T3 Cloud"+ aria-label="Enable T3 Connect"checked={checked}disabled={disabled}{...(onCheckedChange ? { onCheckedChange } : {})}@@ -1632,9 +1634,11 @@ function CloudLinkSwitch({function ConfiguredCloudLinkRow({ canManageRelay }: { readonly canManageRelay: boolean }) {const { getToken, isSignedIn } = useAuth();+ const { authPrompt, openAuthPrompt } = useT3ConnectAuthPrompt();const primaryCloudLinkState = usePrimaryCloudLinkState();const [operationError, setOperationError] = useState<string | null>(null);const [isUpdating, setIsUpdating] = useState(false);+ const [isUpdatingPreference, setIsUpdatingPreference] = useState(false);const updateLink = async (enabled: boolean) => {setIsUpdating(true);@@ -1643,7 +1647,7 @@ function ConfiguredCloudLinkRow({ canManageRelay }: { readonly canManageRelay: bconst clerkToken = await getToken(resolveRelayClerkTokenOptions());if (enabled) {if (!clerkToken) {- throw new Error("Sign in from T3 Cloud settings before linking this environment.");+ throw new Error("Sign in to T3 Connect before linking this environment.");}await webRuntime.runPromise(linkPrimaryEnvironmentToCloud({ clerkToken }));} else {@@ -1655,48 +1659,103 @@ function ConfiguredCloudLinkRow({ canManageRelay }: { readonly canManageRelay: brefreshManagedRelayEnvironments();toastManager.add({type: "success",- title: enabled ? "T3 Cloud linked" : "T3 Cloud unlinked",+ title: enabled ? "T3 Connect linked" : "T3 Connect unlinked",description: enabled- ? "This environment is available through T3 Cloud."- : "This environment is no longer available through T3 Cloud.",+ ? "This environment is available through T3 Connect."+ : "This environment is no longer available through T3 Connect.",});} catch (cause) {- const message = cause instanceof Error ? cause.message : "Could not update T3 Cloud access.";+ const message =+ cause instanceof Error ? cause.message : "Could not update T3 Connect access.";setOperationError(message);toastManager.add({type: "error",- title: "Could not update T3 Cloud",+ title: "Could not update T3 Connect",description: message,});} finally {setIsUpdating(false);}};+ const updatePublishAgentActivity = async (enabled: boolean) => {+ setIsUpdatingPreference(true);+ try {+ await webRuntime.runPromise(updatePrimaryCloudPreferences({ publishAgentActivity: enabled }));+ primaryCloudLinkState.refresh();+ toastManager.add({+ type: "success",+ title: enabled ? "Agent activity enabled" : "Agent activity disabled",+ description: enabled+ ? "This environment can publish agent activity to your notification devices."+ : "This environment will stop publishing agent activity.",+ });+ } catch (cause) {+ toastManager.add({+ type: "error",+ title: "Could not update T3 Connect preferences",+ description:+ cause instanceof Error ? cause.message : "Could not update agent activity publishing.",+ });+ } finally {+ setIsUpdatingPreference(false);+ }+ };const disabledReason = !isSignedIn- ? "Sign in from T3 Cloud settings to manage this environment."+ ? "Sign in to T3 Connect": !canManageRelay- ? "Your session does not have permission to manage T3 Cloud access."+ ? "Your session does not have permission to manage T3 Connect access.": null;const linked = primaryCloudLinkState.data?.linked ?? false;return (- <SettingsRow- title="T3 Cloud"- description={- linked- ? "This environment is available to your other devices through T3 Cloud."- : "Make this environment available to your other devices through T3 Cloud."- }- status={operationError ?? primaryCloudLinkState.error}- control={- <CloudLinkSwitch- checked={linked}- disabled={!canManageRelay || !isSignedIn || primaryCloudLinkState.isPending || isUpdating}- disabledReason={disabledReason}- onCheckedChange={(enabled) => void updateLink(enabled)}+ <>+ <SettingsRow+ title="T3 Connect"+ description={+ linked+ ? "This environment is available to your other devices through T3 Connect."+ : "Make this environment available to your other devices through T3 Connect."+ }+ status={operationError ?? primaryCloudLinkState.error}+ control={+ <CloudLinkSwitch+ checked={linked}+ disabled={+ (isSignedIn && !canManageRelay) || primaryCloudLinkState.isPending || isUpdating+ }+ disabledReason={disabledReason}+ onCheckedChange={(enabled) => {+ if (!isSignedIn) {+ openAuthPrompt();+ return;+ }+ void updateLink(enabled);+ }}+ />+ }+ />+ {linked ? (+ <SettingsRow+ title="Publish agent activity"+ description="Send agent activity from this environment to your notification devices."+ className="bg-muted/20 pl-7 sm:pl-8"+ control={+ <Switch+ aria-label="Publish agent activity"+ checked={primaryCloudLinkState.data?.publishAgentActivity ?? false}+ disabled={+ !canManageRelay ||+ !isSignedIn ||+ primaryCloudLinkState.isPending ||+ isUpdatingPreference+ }+ onCheckedChange={(enabled) => void updatePublishAgentActivity(enabled)}+ />+ }/>- }- />+ ) : null}+ {authPrompt}+ </>);}@@ -1704,7 +1763,13 @@ function CloudLinkRow({ canManageRelay }: { readonly canManageRelay: boolean })return hasCloudPublicConfig() ? <ConfiguredCloudLinkRow canManageRelay={canManageRelay} /> : null;}-function EmptyRemoteEnvironments({ cloudEnabled = true }: { readonly cloudEnabled?: boolean }) {+function EmptyRemoteEnvironments({+ cloudEnabled = true,+ onConnectFromCloud,+}: {+ readonly cloudEnabled?: boolean;+ readonly onConnectFromCloud?: () => void;+}) {return (<Empty className="min-h-52"><EmptyMedia variant="icon">@@ -1713,9 +1778,24 @@ function EmptyRemoteEnvironments({ cloudEnabled = true }: { readonly cloudEnable<EmptyHeader><EmptyTitle>No saved remote environments</EmptyTitle><EmptyDescription>- {cloudEnabled- ? "Click “Add environment” to pair another environment, or connect one from T3 Cloud."- : "Click “Add environment” to pair another environment."}+ Click “Add environment” to pair another environment+ {cloudEnabled ? (+ <>+ , or connect one from{" "}+ {onConnectFromCloud ? (+ <button+ type="button"+ className="border-b border-dotted border-current text-foreground/80 hover:text-foreground"+ onClick={onConnectFromCloud}+ >+ T3 Connect+ </button>+ ) : (+ "T3 Connect"+ )}+ </>+ ) : null}+ .</EmptyDescription></EmptyHeader></Empty>@@ -1743,7 +1823,8 @@ function ConfiguredCloudRemoteEnvironmentRows({readonly primaryEnvironmentId: EnvironmentId | null;readonly savedEnvironmentIds: ReadonlyArray<EnvironmentId>;}) {- const { getToken } = useAuth();+ const { getToken, isSignedIn } = useAuth();+ const { authPrompt, openAuthPrompt } = useT3ConnectAuthPrompt();const environmentsState = useManagedRelayEnvironments();const [connectingEnvironmentId, setConnectingEnvironmentId] = useState<EnvironmentId | null>(null,@@ -1755,7 +1836,7 @@ function ConfiguredCloudRemoteEnvironmentRows({try {const clerkToken = await getToken(resolveRelayClerkTokenOptions());if (!clerkToken) {- throw new Error("Sign in from T3 Cloud settings before connecting this environment.");+ throw new Error("Sign in to T3 Connect before connecting this environment.");}const connection = await webRuntime.runPromise(connectManagedCloudEnvironment({ clerkToken, environment }),@@ -1764,14 +1845,14 @@ function ConfiguredCloudRemoteEnvironmentRows({toastManager.add({type: "success",title: "Environment connected",- description: `${connection.label} is available through T3 Cloud.`,+ description: `${connection.label} is available through T3 Connect.`,});} catch (cause) {toastManager.add({type: "error",title: "Could not connect environment",description:- cause instanceof Error ? cause.message : "Could not connect the T3 Cloud environment.",+ cause instanceof Error ? cause.message : "Could not connect the T3 Connect environment.",});} finally {setConnectingEnvironmentId(null);@@ -1789,7 +1870,12 @@ function ConfiguredCloudRemoteEnvironmentRows({}if (savedEnvironmentIds.length === 0 && connectableEnvironments.length === 0) {- return <EmptyRemoteEnvironments />;+ return (+ <>+ <EmptyRemoteEnvironments {...(!isSignedIn ? { onConnectFromCloud: openAuthPrompt } : {})} />+ {authPrompt}+ </>+ );}return connectableEnvironments.map((environment) => (@@ -1799,11 +1885,11 @@ function ConfiguredCloudRemoteEnvironmentRows({<div className="flex items-center gap-2"><ConnectionStatusDotdotClassName="bg-muted-foreground/35"- tooltipText="Available through T3 Cloud"+ tooltipText="Available through T3 Connect"/><p className="truncate text-sm font-medium">{environment.label}</p></div>- <p className="mt-1 truncate text-xs text-muted-foreground">T3 Cloud</p>+ <p className="mt-1 truncate text-xs text-muted-foreground">T3 Connect</p></div><Buttonsize="sm"diff --git a/apps/web/src/components/settings/SettingsSidebarNav.tsx b/apps/web/src/components/settings/SettingsSidebarNav.tsxindex c0238a465..6774b6f33 100644--- a/apps/web/src/components/settings/SettingsSidebarNav.tsx+++ b/apps/web/src/components/settings/SettingsSidebarNav.tsx@@ -3,7 +3,6 @@ import {ArchiveIcon,ArrowLeftIcon,BotIcon,- CloudIcon,GitBranchIcon,KeyboardIcon,Link2Icon,@@ -21,15 +20,13 @@ import {SidebarSeparator,useSidebar,} from "../ui/sidebar";-import { Badge } from "../ui/badge";-import { hasCloudPublicConfig } from "../../cloud/publicConfig";+import { T3ConnectSidebarAvatar, T3ConnectSidebarSignIn } from "../clerk/T3ConnectSidebarSignIn";export type SettingsSectionPath =| "/settings/general"| "/settings/keybindings"| "/settings/providers"| "/settings/source-control"- | "/settings/cloud"| "/settings/connections"| "/settings/archived";@@ -37,13 +34,11 @@ export const SETTINGS_NAV_ITEMS: ReadonlyArray<{label: string;to: SettingsSectionPath;icon: ComponentType<{ className?: string }>;- badgeLabel?: string;}> = [{ label: "General", to: "/settings/general", icon: Settings2Icon },{ label: "Keybindings", to: "/settings/keybindings", icon: KeyboardIcon },{ label: "Providers", to: "/settings/providers", icon: BotIcon },{ label: "Source Control", to: "/settings/source-control", icon: GitBranchIcon },- { label: "T3 Cloud", to: "/settings/cloud", icon: CloudIcon, badgeLabel: "Private Beta" },{ label: "Connections", to: "/settings/connections", icon: Link2Icon },{ label: "Archive", to: "/settings/archived", icon: ArchiveIcon },];@@ -77,9 +72,7 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {<SidebarContent className="overflow-x-hidden"><SidebarGroup className="px-2 py-3"><SidebarMenu>- {SETTINGS_NAV_ITEMS.filter(- (item) => item.to !== "/settings/cloud" || hasCloudPublicConfig(),- ).map((item) => {+ {SETTINGS_NAV_ITEMS.map((item) => {const Icon = item.icon;const isActive = pathname === item.to;return (@@ -102,11 +95,6 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {}/><span className="truncate">{item.label}</span>- {item.badgeLabel ? (- <Badge variant="warning" size="sm" className="ml-auto">- {item.badgeLabel}- </Badge>- ) : null}</SidebarMenuButton></SidebarMenuItem>);@@ -117,18 +105,22 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {<SidebarSeparator /><SidebarFooter className="p-2">- <SidebarMenu>- <SidebarMenuItem>- <SidebarMenuButton- size="sm"- className="gap-2 px-2 py-2 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"- onClick={handleBackClick}- >- <ArrowLeftIcon className="size-4" />- <span>Back</span>- </SidebarMenuButton>- </SidebarMenuItem>- </SidebarMenu>+ <T3ConnectSidebarSignIn />+ <div className="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1">+ <SidebarMenu className="min-w-0">+ <SidebarMenuItem>+ <SidebarMenuButton+ size="sm"+ className="gap-2 px-2 py-2 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"+ onClick={handleBackClick}+ >+ <ArrowLeftIcon className="size-4" />+ <span>Back</span>+ </SidebarMenuButton>+ </SidebarMenuItem>+ </SidebarMenu>+ <T3ConnectSidebarAvatar />+ </div></SidebarFooter></>);diff --git a/apps/web/src/environments/runtime/service.ts b/apps/web/src/environments/runtime/service.tsindex 38c62f55a..45aef9bac 100644--- a/apps/web/src/environments/runtime/service.ts+++ b/apps/web/src/environments/runtime/service.ts@@ -1582,7 +1582,7 @@ async function ensureSavedEnvironmentConnection(await removeSavedEnvironmentBearerToken(activeRecord.environmentId);throw new Error(activeCredential.current.method === "dpop"- ? "Managed tunnel credential expired. Connect it again from T3 Cloud."+ ? "Managed tunnel credential expired. Connect it again from T3 Connect.": "Saved environment credential expired. Pair it again.",{cause: error,diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsxindex f791f998d..320eaa30e 100644--- a/apps/web/src/main.tsx+++ b/apps/web/src/main.tsx@@ -27,7 +27,6 @@ if (isElectron) {document.title = APP_DISPLAY_NAME;const clerkPublishableKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY as string | undefined;-const cloudWaitlistUrl = "/settings/cloud";const app = <RouterProvider router={router} />;@@ -39,7 +38,7 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(<ManagedRelayAuthProvider>{app}</ManagedRelayAuthProvider></DesktopClerkProvider>) : (- <ClerkProvider publishableKey={clerkPublishableKey} waitlistUrl={cloudWaitlistUrl}>+ <ClerkProvider publishableKey={clerkPublishableKey}><ManagedRelayAuthProvider>{app}</ManagedRelayAuthProvider></ClerkProvider>)diff --git a/apps/web/src/routeTree.gen.ts b/apps/web/src/routeTree.gen.tsindex cafba0f82..3a9140e27 100644--- a/apps/web/src/routeTree.gen.ts+++ b/apps/web/src/routeTree.gen.ts@@ -19,7 +19,6 @@ import { Route as SettingsKeybindingsRouteImport } from './routes/settings.keybiimport { Route as SettingsGeneralRouteImport } from './routes/settings.general'import { Route as SettingsDiagnosticsRouteImport } from './routes/settings.diagnostics'import { Route as SettingsConnectionsRouteImport } from './routes/settings.connections'-import { Route as SettingsCloudRouteImport } from './routes/settings.cloud'import { Route as SettingsArchivedRouteImport } from './routes/settings.archived'import { Route as ChatDraftDraftIdRouteImport } from './routes/_chat.draft.$draftId'import { Route as ChatEnvironmentIdThreadIdRouteImport } from './routes/_chat.$environmentId.$threadId'@@ -73,11 +72,6 @@ const SettingsConnectionsRoute = SettingsConnectionsRouteImport.update({path: '/connections',getParentRoute: () => SettingsRoute,} as any)-const SettingsCloudRoute = SettingsCloudRouteImport.update({- id: '/cloud',- path: '/cloud',- getParentRoute: () => SettingsRoute,-} as any)const SettingsArchivedRoute = SettingsArchivedRouteImport.update({id: '/archived',path: '/archived',@@ -100,7 +94,6 @@ export interface FileRoutesByFullPath {'/pair': typeof PairRoute'/settings': typeof SettingsRouteWithChildren'/settings/archived': typeof SettingsArchivedRoute- '/settings/cloud': typeof SettingsCloudRoute'/settings/connections': typeof SettingsConnectionsRoute'/settings/diagnostics': typeof SettingsDiagnosticsRoute'/settings/general': typeof SettingsGeneralRoute@@ -114,7 +107,6 @@ export interface FileRoutesByTo {'/pair': typeof PairRoute'/settings': typeof SettingsRouteWithChildren'/settings/archived': typeof SettingsArchivedRoute- '/settings/cloud': typeof SettingsCloudRoute'/settings/connections': typeof SettingsConnectionsRoute'/settings/diagnostics': typeof SettingsDiagnosticsRoute'/settings/general': typeof SettingsGeneralRoute@@ -131,7 +123,6 @@ export interface FileRoutesById {'/pair': typeof PairRoute'/settings': typeof SettingsRouteWithChildren'/settings/archived': typeof SettingsArchivedRoute- '/settings/cloud': typeof SettingsCloudRoute'/settings/connections': typeof SettingsConnectionsRoute'/settings/diagnostics': typeof SettingsDiagnosticsRoute'/settings/general': typeof SettingsGeneralRoute@@ -149,7 +140,6 @@ export interface FileRouteTypes {| '/pair'| '/settings'| '/settings/archived'- | '/settings/cloud'| '/settings/connections'| '/settings/diagnostics'| '/settings/general'@@ -163,7 +153,6 @@ export interface FileRouteTypes {| '/pair'| '/settings'| '/settings/archived'- | '/settings/cloud'| '/settings/connections'| '/settings/diagnostics'| '/settings/general'@@ -179,7 +168,6 @@ export interface FileRouteTypes {| '/pair'| '/settings'| '/settings/archived'- | '/settings/cloud'| '/settings/connections'| '/settings/diagnostics'| '/settings/general'@@ -269,13 +257,6 @@ declare module '@tanstack/react-router' {preLoaderRoute: typeof SettingsConnectionsRouteImportparentRoute: typeof SettingsRoute}- '/settings/cloud': {- id: '/settings/cloud'- path: '/cloud'- fullPath: '/settings/cloud'- preLoaderRoute: typeof SettingsCloudRouteImport- parentRoute: typeof SettingsRoute- }'/settings/archived': {id: '/settings/archived'path: '/archived'@@ -316,7 +297,6 @@ const ChatRouteWithChildren = ChatRoute._addFileChildren(ChatRouteChildren)interface SettingsRouteChildren {SettingsArchivedRoute: typeof SettingsArchivedRoute- SettingsCloudRoute: typeof SettingsCloudRouteSettingsConnectionsRoute: typeof SettingsConnectionsRouteSettingsDiagnosticsRoute: typeof SettingsDiagnosticsRouteSettingsGeneralRoute: typeof SettingsGeneralRoute@@ -327,7 +307,6 @@ interface SettingsRouteChildren {const SettingsRouteChildren: SettingsRouteChildren = {SettingsArchivedRoute: SettingsArchivedRoute,- SettingsCloudRoute: SettingsCloudRoute,SettingsConnectionsRoute: SettingsConnectionsRoute,SettingsDiagnosticsRoute: SettingsDiagnosticsRoute,SettingsGeneralRoute: SettingsGeneralRoute,diff --git a/apps/web/src/routes/_chat.index.tsx b/apps/web/src/routes/_chat.index.tsxindex 50ca6c4b3..896f66b3e 100644--- a/apps/web/src/routes/_chat.index.tsx+++ b/apps/web/src/routes/_chat.index.tsx@@ -1,4 +1,4 @@-import { createFileRoute } from "@tanstack/react-router";+import { createFileRoute, Link } from "@tanstack/react-router";import { LinkIcon, PlusIcon } from "lucide-react";import { NoActiveThreadState } from "../components/NoActiveThreadState";@@ -52,16 +52,13 @@ function HostedStaticOnboardingState() {</EmptyTitle><EmptyDescription className="mt-2 text-sm leading-relaxed text-muted-foreground/78">{cloudEnabled- ? "Sign in to T3 Cloud to connect a linked environment through its managed tunnel, or add a reachable backend manually."+ ? "Sign in to T3 Connect to connect a linked environment through its managed tunnel, or add a reachable backend manually.": "Add a reachable backend manually to start working from this browser."}</EmptyDescription><div className="mt-6 flex justify-center">- <Button- render={<a href={cloudEnabled ? "/settings/cloud" : "/settings/connections"} />}- size="sm"- >+ <Button render={<Link to="/settings/connections" />} size="sm"><PlusIcon className="size-4" />- {cloudEnabled ? "Open T3 Cloud" : "Add environment"}+ {cloudEnabled ? "Open Connections" : "Add environment"}</Button></div></EmptyHeader>diff --git a/apps/web/src/routes/settings.cloud.tsx b/apps/web/src/routes/settings.cloud.tsxdeleted file mode 100644index a2854e971..000000000--- a/apps/web/src/routes/settings.cloud.tsx+++ /dev/null@@ -1,13 +0,0 @@-import { createFileRoute, redirect } from "@tanstack/react-router";--import { CloudSettingsPanel } from "../components/settings/CloudSettings";-import { hasCloudPublicConfig } from "../cloud/publicConfig";--export const Route = createFileRoute("/settings/cloud")({- beforeLoad: () => {- if (!hasCloudPublicConfig()) {- throw redirect({ to: "/settings/general", replace: true });- }- },- component: CloudSettingsPanel,-});diff --git a/docs/README.md b/docs/README.mdindex f1b7f94fd..db32ff846 100644--- a/docs/README.md+++ b/docs/README.md@@ -2,7 +2,7 @@- [Getting started](./getting-started/quick-start.md)- [Architecture](./architecture/overview.md)-- [Cloud](./cloud/t3-cloud-clerk.md)+- [T3 Connect](./cloud/t3-connect-clerk.md)- [Integrations](./integrations/source-control-providers.md)- [Mobile](./mobile/app.md)- [Operations](./operations/ci.md)diff --git a/docs/cloud/t3-code-cloud-auth-flow.html b/docs/cloud/t3-code-connect-auth-flow.htmlsimilarity index 96%rename from docs/cloud/t3-code-cloud-auth-flow.htmlrename to docs/cloud/t3-code-connect-auth-flow.htmlindex 030a9c15d..038132ee5 100644--- a/docs/cloud/t3-code-cloud-auth-flow.html+++ b/docs/cloud/t3-code-connect-auth-flow.html@@ -3,7 +3,7 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>T3 Code Cloud Architecture</title>+ <title>T3 Connect Architecture</title><style>:root {color-scheme: light;@@ -253,10 +253,10 @@<main class="shell"><header><div class="eyebrow">Implemented architecture</div>- <h1>T3 Code Cloud Control Plane and Managed Endpoint Flow</h1>+ <h1>T3 Connect Control Plane and Managed Endpoint Flow</h1><p class="lede">- T3 Cloud links a locally authorized T3 environment to a signed-in cloud user, provisions a- managed HTTPS/WSS endpoint for that environment, and brokers proof-bound remote+ T3 Connect links a locally authorized T3 environment to a signed-in cloud user, provisions+ a managed HTTPS/WSS endpoint for that environment, and brokers proof-bound remoteconnections. The local environment remains the authority that issues environment accesscredentials. The hosted relay stores links, reconciles managed endpoint resources,validates signed proofs, and delivers agent-activity notifications.@@ -279,7 +279,7 @@following:</p><ul>- <li>a Clerk-authenticated T3 Cloud user;</li>+ <li>a Clerk-authenticated T3 Connect user;</li><li>an active relay link for that user and environment;</li><li>a DPoP proof key held by the remote client;</li><li>a relay-signed mint request accepted by the linked local environment; and</li>@@ -547,7 +547,7 @@ sequenceDiagramparticipant CF as Cloudflare APIsparticipant RC as Local relay client- U->>C: Enable T3 Cloud for a locally paired environment+ U->>C: Enable T3 Connect for a locally paired environmentC->>E: Check relay client availabilityalt relay client is missingC->>U: Prompt before download and install@@ -557,7 +557,7 @@ sequenceDiagramendC->>R: POST /v1/client/environment-link-challenges (Clerk bearer)R-->>C: Short-lived challenge- C->>E: POST /api/cloud/link-proof (local relay:write bearer)+ C->>E: POST /api/connect/link-proof (local relay:write bearer)E->>E: Authenticate, reject forwarded authority, get or create key pair, validate loopback originE-->>C: Environment-signed link proofC->>R: POST /v1/client/environment-links (Clerk bearer + proof)@@ -565,7 +565,7 @@ sequenceDiagramR->>CF: Reconcile tunnel, ingress, and CNAMER->>R: Upsert user/environment link and issue environment bearerR-->>C: Managed endpoint, relay config, and connector token- C->>E: POST /api/cloud/relay-config (local relay:write bearer)+ C->>E: POST /api/connect/relay-config (local relay:write bearer)E->>RC: Start relay client with TUNNEL_TOKEN</pre><div class="callout">@@ -585,13 +585,13 @@ sequenceDiagram<pre class="diagram mermaid">sequenceDiagramparticipant U as Operator- participant CLI as t3 cloud CLI+ participant CLI as t3 connect CLIparticipant Clerk as Clerk OAuthparticipant S as Environment server on next startparticipant R as Relay Workerparticipant RC as Local relay client- U->>CLI: t3 cloud link+ U->>CLI: t3 connect linkCLI->>CLI: Resolve relay clientalt relay client is missingCLI->>U: Confirm managed relay-client install@@ -607,9 +607,9 @@ sequenceDiagramS->>RC: Start relay client</pre><p>- <code>t3 cloud login</code> stores authorization without enabling exposure.- <code>t3 cloud unlink</code> disables exposure while retaining authorization.- <code>t3 cloud logout</code> also removes the stored CLI authorization.+ <code>t3 connect login</code> stores authorization without enabling exposure.+ <code>t3 connect unlink</code> disables exposure while retaining authorization.+ <code>t3 connect logout</code> also removes the stored CLI authorization.</p></article>@@ -626,7 +626,7 @@ sequenceDiagramC->>R: POST /v1/client/dpop-token (Clerk JWT + DPoP proof)R-->>C: Relay DPoP access tokenC->>R: POST /v1/environments/:id/connect (relay DPoP)- R->>E: POST /api/t3-cloud/mint-credential (relay-signed proof)+ R->>E: POST /api/t3-connect/mint-credential (relay-signed proof)E->>E: Verify relay signer, linked user, scope, lifetime, cnf, and replay guardsE-->>R: Bootstrap credential + environment-signed proofR->>R: Verify environment signature, nonce, endpoint, and DPoP binding@@ -941,37 +941,37 @@ sequenceDiagram</thead><tbody><tr>- <td><code>POST /api/cloud/link-proof</code></td>+ <td><code>POST /api/connect/link-proof</code></td><td>Local environment token with <code>relay:write</code></td><td>Validate local origin and sign an environment link proof.</td></tr><tr>- <td><code>POST /api/cloud/relay-config</code></td>+ <td><code>POST /api/connect/relay-config</code></td><td>Local environment token with <code>relay:write</code></td><td>Persist linked relay configuration and start the relay client.</td></tr><tr>- <td><code>GET /api/cloud/link-state</code></td>+ <td><code>GET /api/connect/link-state</code></td><td>Local environment token with <code>relay:read</code></td>- <td>Read the environment's current T3 Cloud link state.</td>+ <td>Read the environment's current T3 Connect link state.</td></tr><tr>- <td><code>POST /api/cloud/preferences</code></td>+ <td><code>POST /api/connect/preferences</code></td><td>Local environment token with <code>relay:write</code></td><td>Enable or disable agent-activity publication.</td></tr><tr>- <td><code>POST /api/cloud/unlink</code></td>+ <td><code>POST /api/connect/unlink</code></td><td>Local environment token with <code>relay:write</code></td>- <td>Stop the relay client and clear local T3 Cloud configuration.</td>+ <td>Stop the relay client and clear local T3 Connect configuration.</td></tr><tr>- <td><code>POST /api/t3-cloud/health</code></td>+ <td><code>POST /api/t3-connect/health</code></td><td>Relay-signed proof</td><td>Return a signed environment health response.</td></tr><tr>- <td><code>POST /api/t3-cloud/mint-credential</code></td>+ <td><code>POST /api/t3-connect/mint-credential</code></td><td>Relay-signed proof</td><td>Mint a DPoP-bound one-time bootstrap credential for a remote client.</td></tr>diff --git a/docs/cloud/t3-cloud-clerk.md b/docs/cloud/t3-connect-clerk.mdsimilarity index 85%rename from docs/cloud/t3-cloud-clerk.mdrename to docs/cloud/t3-connect-clerk.mdindex e95c64535..d768c3874 100644--- a/docs/cloud/t3-cloud-clerk.md+++ b/docs/cloud/t3-connect-clerk.md@@ -1,12 +1,12 @@-# T3 Cloud Clerk Setup+# T3 Connect Clerk Setup-T3 Cloud uses one Clerk application for web, desktop, and mobile authentication. The relay accepts+T3 Connect uses one Clerk application for web, desktop, and mobile authentication. The relay acceptsClerk JWTs only when they are generated from the `t3-relay` template with the shared`t3-code-relay` audience.## Application Keys-T3 Cloud is disabled in a fresh clone. To enable it for source builds, add a repository-root `.env`+T3 Connect is disabled in a fresh clone. To enable it for source builds, add a repository-root `.env`or `.env.local` file:```dotenv@@ -36,7 +36,7 @@ production builds only need the Clerk publishable key, JWT template name, and reenvironment.When any client-facing public value is absent, cloud UI is omitted. When the CLI public values are-absent, the `t3 cloud` CLI command group is omitted. The bundled server still accepts runtime+absent, the `t3 connect` CLI command group is omitted. The bundled server still accepts runtimeoverrides for self-hosted or operator-manageddeployments.@@ -56,7 +56,7 @@ personal developer stage.## Headless CLI OAuth Application-The `t3 cloud` commands authorize a headless environment with a separate Clerk OAuth application.+The `t3 connect` commands authorize a headless environment with a separate Clerk OAuth application.This uses an OAuth public client with PKCE, so the CLI stores no client secret.In **Clerk Dashboard > OAuth applications**:@@ -75,25 +75,25 @@ handshake; it only validates the issued Clerk bearer token when the CLI managesThe CLI supports these headless operations:```sh-t3 cloud login-t3 cloud link-t3 cloud status-t3 cloud unlink-t3 cloud logout+t3 connect login+t3 connect link+t3 connect status+t3 connect unlink+t3 connect logoutt3 serve```-`t3 cloud login` opens the Clerk authorization flow and stores the CLI credential without enabling-cloud exposure. `t3 cloud link` installs the pinned managed `cloudflared` binary when needed,+`t3 connect login` opens the Clerk authorization flow and stores the CLI credential without enabling+cloud exposure. `t3 connect link` installs the pinned managed `cloudflared` binary when needed,authorizes when needed, and records durable intent to expose the environment. It works without arunning T3 server. The next `t3 serve` or `t3 start` reconciles the relay link and launches the-managed tunnel. `t3 cloud unlink` records disabled intent immediately, stops a reachable running+managed tunnel. `t3 connect unlink` records disabled intent immediately, stops a reachable runningconnector, and attempts to revoke the relay-side environment record. It retains the stored CLI-authorization so `t3 cloud link` can re-enable exposure without another browser flow. `t3 cloud+authorization so `t3 connect link` can re-enable exposure without another browser flow. `t3 connectlogout` performs the same cleanup and removes the stored CLI authorization.The current OAuth callback listener binds to loopback port `34338`. When running the CLI over SSH,-forward that port before running `t3 cloud login` or `t3 cloud link`:+forward that port before running `t3 connect login` or `t3 connect link`:```shssh -L 34338:127.0.0.1:34338 <host>@@ -145,9 +145,9 @@ For a private beta where people should request access, use **Clerk Dashboard > W1. Toggle on **Enable waitlist** and save.2. Review requests on the same page and select **Invite** or **Deny**.-Signed-out web and desktop users see Clerk's waitlist enrollment as the T3 Cloud page content,-while approved signed-in users see cloud settings. The browser app also uses `/settings/cloud` as-its Clerk waitlist URL.+Approved signed-in users manage T3 Connect under **Connections**. The web and desktop sidebars do+not expose a dedicated account or waitlist control. Signed-out users reach Clerk's waitlist and+sign-in flow contextually from the T3 Connect controls on the Connections page.On mobile, signed-out users open **Settings > T3 Account** to reach `/settings/waitlist` within theSettings form sheet. It submits enrollment through Clerk's `useWaitlist()` flow because the prebuiltdiff --git a/docs/operations/release.md b/docs/operations/release.mdindex c9b70f215..8f149446b 100644--- a/docs/operations/release.md+++ b/docs/operations/release.md@@ -10,7 +10,7 @@ This document covers the unified release workflow for stable and nightly desktop- scheduled nightly check every three hours- manual `workflow_dispatch` for either channel- Runs quality gates first: lint, typecheck, test.-- Reads the shared production T3 Cloud relay URL and Clerk client configuration before packaging clients.+- Reads the shared production T3 Connect relay URL and Clerk client configuration before packaging clients.- Builds four artifacts in parallel for both channels:- macOS `arm64` DMG- macOS `x64` DMG@@ -30,7 +30,7 @@ This document covers the unified release workflow for stable and nightly desktop- nightly releases are aliased to the `nightly` hosted app channel- Signing is optional and auto-detected per platform from secrets.-## T3 Cloud relay deployment+## T3 Connect relay deploymentThe relay is a shared control plane versioned separately from client releases. Stable and nightlyclient builds must point at the same relay so users see the same linked environments when switchingdiff --git a/infra/relay/README.md b/infra/relay/README.mdindex 44831cb4c..697fa30ca 100644--- a/infra/relay/README.md+++ b/infra/relay/README.md@@ -1,15 +1,15 @@-# T3 Code Cloud Relay+# T3 Connect Relay> [!WARNING]-> T3 Code Cloud is currently in private beta. Join the waitlist in the app under Settings > T3 Cloud.+> T3 Connect is currently in private beta. Join the waitlist in the app under Settings > T3 Connect.-The relay is the hosted control plane for T3 Code Cloud. It helps clients discover and connect to+The relay is the hosted control plane for T3 Connect. It helps clients discover and connect toremote environments, manages the cloud-side records needed for those connections, and deliversoptional mobile notifications and Live Activities.The relay is intentionally not in the hot path for normal T3 Code traffic. After a client connects,regular API and WebSocket traffic goes directly between that client and the selected environment.-See the [cloud architecture overview](../../docs/t3-code-cloud-auth-flow.html) for the larger system+See the [T3 Connect architecture overview](../../docs/cloud/t3-code-connect-auth-flow.html) for the larger systemdesign.## Responsibilities@@ -159,8 +159,8 @@ and hosted web builds.See:-- [T3 Cloud Clerk Setup](../../docs/t3-cloud-clerk.md) for Clerk keys, JWT templates, and waitlist+- [T3 Connect Clerk Setup](../../docs/cloud/t3-connect-clerk.md) for Clerk keys, JWT templates, and waitlistsetup.- [Relay Observability](../../docs/relay-observability.md) for deployment tracing and diagnostics.-- [Cloud Architecture Overview](../../docs/t3-code-cloud-auth-flow.html) for the full link,+- [T3 Connect Architecture Overview](../../docs/cloud/t3-code-connect-auth-flow.html) for the full link,connect, endpoint, and notification flows.diff --git a/infra/relay/src/environments/EnvironmentConnector.test.ts b/infra/relay/src/environments/EnvironmentConnector.test.tsindex d79344a0a..c6bec6d4b 100644--- a/infra/relay/src/environments/EnvironmentConnector.test.ts+++ b/infra/relay/src/environments/EnvironmentConnector.test.ts@@ -300,7 +300,7 @@ describe("EnvironmentConnector", () => {environmentId: "env-connector-test",});- expect(seenUrls).toEqual(["https://env.example.test/api/t3-cloud/health"]);+ expect(seenUrls).toEqual(["https://env.example.test/api/t3-connect/health"]);expect(seenProofs[0]).toMatchObject({iss: "https://relay.example.test",aud: "t3-env:env-connector-test",@@ -663,7 +663,7 @@ describe("EnvironmentConnector", () => {deviceId: "device-123",});- expect(seenUrls).toEqual(["https://env.example.test/api/t3-cloud/mint-credential"]);+ expect(seenUrls).toEqual(["https://env.example.test/api/t3-connect/mint-credential"]);expect(seenProofs[0]).toMatchObject({iss: "https://relay.example.test",aud: "t3-env:env-connector-test",diff --git a/infra/relay/src/environments/EnvironmentConnector.ts b/infra/relay/src/environments/EnvironmentConnector.tsindex 0eb063a30..c62d11669 100644--- a/infra/relay/src/environments/EnvironmentConnector.ts+++ b/infra/relay/src/environments/EnvironmentConnector.ts@@ -458,7 +458,7 @@ const make = Effect.gen(function* () {);const checkedAt = DateTime.formatIso(now);const environmentClient = yield* makeEnvironmentClient(endpoint.httpBaseUrl);- const responseOption = yield* environmentClient.cloud.health({ payload: { proof } }).pipe(+ const responseOption = yield* environmentClient.connect.health({ payload: { proof } }).pipe(withoutRedirects,Effect.match({onFailure: (cause) => ({ _tag: "Failure" as const, cause }),@@ -591,30 +591,32 @@ const make = Effect.gen(function* () {),);const environmentClient = yield* makeEnvironmentClient(endpoint.httpBaseUrl);- const decoded = yield* environmentClient.cloud.t3MintCredential({ payload: { proof } }).pipe(- withoutRedirects,- Effect.mapError(- (cause) =>- new EnvironmentMintRequestFailed({- environmentId: input.environmentId,- operation: "connect",- cause,+ const decoded = yield* environmentClient.connect+ .t3MintCredential({ payload: { proof } })+ .pipe(+ withoutRedirects,+ Effect.mapError(+ (cause) =>+ new EnvironmentMintRequestFailed({+ environmentId: input.environmentId,+ operation: "connect",+ cause,+ }),+ ),+ Effect.timeoutOption(Duration.millis(ENVIRONMENT_MINT_REQUEST_TIMEOUT_MS)),+ Effect.flatMap(+ Option.match({+ onNone: () =>+ Effect.fail(+ new EnvironmentMintRequestTimedOut({+ environmentId: input.environmentId,+ timeoutMs: ENVIRONMENT_MINT_REQUEST_TIMEOUT_MS,+ }),+ ),+ onSome: Effect.succeed,}),- ),- Effect.timeoutOption(Duration.millis(ENVIRONMENT_MINT_REQUEST_TIMEOUT_MS)),- Effect.flatMap(- Option.match({- onNone: () =>- Effect.fail(- new EnvironmentMintRequestTimedOut({- environmentId: input.environmentId,- timeoutMs: ENVIRONMENT_MINT_REQUEST_TIMEOUT_MS,- }),- ),- onSome: Effect.succeed,- }),- ),- );+ ),+ );const verified = yield* verifyEnvironmentResponse({response: decoded,environmentId: input.environmentId,diff --git a/packages/client-runtime/src/managedRelayState.ts b/packages/client-runtime/src/managedRelayState.tsindex 7d50f0fdb..f9cfab825 100644--- a/packages/client-runtime/src/managedRelayState.ts+++ b/packages/client-runtime/src/managedRelayState.ts@@ -53,7 +53,7 @@ export function createManagedRelaySession(input: {try: input.readClerkToken,catch: (cause) =>new ManagedRelaySessionError({- message: "Could not obtain the T3 Cloud session token.",+ message: "Could not obtain the T3 Connect session token.",cause,}),}),@@ -76,7 +76,7 @@ function readSessionClerkToken(? Effect.succeed(token): Effect.fail(new ManagedRelaySessionError({- message: "The T3 Cloud session token is unavailable.",+ message: "The T3 Connect session token is unavailable.",}),),),@@ -121,7 +121,7 @@ function requireClerkToken(if (!session || session.accountId !== accountId) {return Effect.fail(new ManagedRelaySessionError({- message: "Sign in to T3 Cloud before loading relay data.",+ message: "Sign in to T3 Connect before loading relay data.",}),);}@@ -190,7 +190,7 @@ export function readManagedRelaySnapshotState<A>(let error: string | null = null;if (result._tag === "Failure") {const cause = Cause.squash(result.cause);- error = cause instanceof Error ? cause.message : "Could not load T3 Cloud data.";+ error = cause instanceof Error ? cause.message : "Could not load T3 Connect data.";}return {data: Option.getOrNull(AsyncResult.value(result)),diff --git a/packages/contracts/src/environmentHttp.ts b/packages/contracts/src/environmentHttp.tsindex 10c9587a0..adc5f149c 100644--- a/packages/contracts/src/environmentHttp.ts+++ b/packages/contracts/src/environmentHttp.ts@@ -439,9 +439,9 @@ export class EnvironmentOrchestrationHttpApi extends HttpApiGroup.make("orchestr}).middleware(EnvironmentAuthenticatedAuth),) {}-export class EnvironmentCloudHttpApi extends HttpApiGroup.make("cloud")+export class EnvironmentConnectHttpApi extends HttpApiGroup.make("connect").add(- HttpApiEndpoint.post("linkProof", "/api/cloud/link-proof", {+ HttpApiEndpoint.post("linkProof", "/api/connect/link-proof", {headers: OptionalBearerHeaders,payload: RelayLinkProofRequest,success: RelayEnvironmentLinkProof,@@ -449,7 +449,7 @@ export class EnvironmentCloudHttpApi extends HttpApiGroup.make("cloud")}).middleware(EnvironmentAuthenticatedAuth),).add(- HttpApiEndpoint.post("relayConfig", "/api/cloud/relay-config", {+ HttpApiEndpoint.post("relayConfig", "/api/connect/relay-config", {headers: OptionalBearerHeaders,payload: RelayEnvironmentConfigRequest,success: EnvironmentCloudRelayConfigResult,@@ -457,21 +457,21 @@ export class EnvironmentCloudHttpApi extends HttpApiGroup.make("cloud")}).middleware(EnvironmentAuthenticatedAuth),).add(- HttpApiEndpoint.get("linkState", "/api/cloud/link-state", {+ HttpApiEndpoint.get("linkState", "/api/connect/link-state", {headers: OptionalBearerHeaders,success: EnvironmentCloudLinkStateResult,error: EnvironmentHttpCloudErrors,}).middleware(EnvironmentAuthenticatedAuth),).add(- HttpApiEndpoint.post("unlink", "/api/cloud/unlink", {+ HttpApiEndpoint.post("unlink", "/api/connect/unlink", {headers: OptionalBearerHeaders,success: EnvironmentCloudRelayConfigResult,error: EnvironmentHttpCloudErrors,}).middleware(EnvironmentAuthenticatedAuth),).add(- HttpApiEndpoint.post("preferences", "/api/cloud/preferences", {+ HttpApiEndpoint.post("preferences", "/api/connect/preferences", {headers: OptionalBearerHeaders,payload: EnvironmentCloudPreferencesRequest,success: EnvironmentCloudLinkStateResult,@@ -479,21 +479,21 @@ export class EnvironmentCloudHttpApi extends HttpApiGroup.make("cloud")}).middleware(EnvironmentAuthenticatedAuth),).add(- HttpApiEndpoint.post("health", "/api/t3-cloud/health", {+ HttpApiEndpoint.post("health", "/api/t3-connect/health", {payload: RelayCloudEnvironmentHealthRequest,success: RelayEnvironmentHealthResponse,error: EnvironmentHttpCloudErrors,}),).add(- HttpApiEndpoint.post("mintCredential", "/api/cloud/mint-credential", {+ HttpApiEndpoint.post("mintCredential", "/api/connect/mint-credential", {payload: RelayCloudMintCredentialRequest,success: RelayEnvironmentMintResponse,error: EnvironmentHttpCloudErrors,}),).add(- HttpApiEndpoint.post("t3MintCredential", "/api/t3-cloud/mint-credential", {+ HttpApiEndpoint.post("t3MintCredential", "/api/t3-connect/mint-credential", {payload: RelayCloudMintCredentialRequest,success: RelayEnvironmentMintResponse,error: EnvironmentHttpCloudErrors,@@ -504,4 +504,4 @@ export class EnvironmentHttpApi extends HttpApi.make("environment").add(EnvironmentMetadataHttpApi).add(EnvironmentAuthHttpApi).add(EnvironmentOrchestrationHttpApi)- .add(EnvironmentCloudHttpApi) {}+ .add(EnvironmentConnectHttpApi) {}diff --git a/packages/contracts/src/relay.ts b/packages/contracts/src/relay.tsindex eaec8314f..5c8cc1ad0 100644--- a/packages/contracts/src/relay.ts+++ b/packages/contracts/src/relay.ts@@ -537,7 +537,7 @@ export class RelayEnvironmentPrincipal extends Context.Service<const RelayClientBearerAuthorization = HttpApiSecurity.http({ scheme: "bearer" }).pipe(HttpApiSecurity.annotate(OpenApi.Description,- "Clerk session or OAuth bearer token for the signed-in T3 Cloud user.",+ "Clerk session or OAuth bearer token for the signed-in T3 Connect user.",),);