Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.
TypeScript ai-agentsanthropicclaude-codeclicode-graphcodexcontext-engineeringcursordeveloper-toolsgeminiknowledge-graphllmmcpmcp-serveropen-sourceopenaitree-sitter
fix(brain): send signup to Trail's own front end, not the shared agents host
anirudhkumar-nanonets1e352a3fbee9
diff --git a/src/brain/signup.ts b/src/brain/signup.tsindex db2740f5..2ec8582b 100644--- a/src/brain/signup.ts+++ b/src/brain/signup.ts@@ -25,8 +25,13 @@ import { randomBytes, timingSafeEqual } from "node:crypto";import type { AddressInfo } from "node:net";import type { BrainLink } from "./link.js";-/** Default web host. Overridden by GRAFT_BRAIN_URL, for staging and self-hosted. */-const DEFAULT_WEB_BASE_URL = "https://agents.nanonets.com";+/** Default web host. Overridden by GRAFT_BRAIN_URL, for staging and self-hosted.+ *+ * Trail's own front end, not the shared `agents.nanonets.com` one that `link.ts`+ * calls for the API. Both are served by the same backend, so either would mint a+ * working token — but this URL is the one a person looks at, and it has to be+ * the Trail-branded build, with Trail's Auth0 redirect behind the signup. */+const DEFAULT_WEB_BASE_URL = "https://app.trailhq.com";/** How long the listener waits for the browser before giving up. A signup can* involve reading an email, so this is minutes rather than seconds. */diff --git a/test/brain-signup.test.ts b/test/brain-signup.test.tsindex a4be8169..ef7f2773 100644--- a/test/brain-signup.test.ts+++ b/test/brain-signup.test.ts@@ -69,7 +69,9 @@ test("handoff: the wait gives up rather than hanging forever", async () => {test("signup url: carries the repo, the port and the state", () => {const url = new URL(signupUrl({ repo: "NanoNets/Graft", port: 51234, state: "s-t-a-t-e" }));- assert.equal(url.origin, "https://agents.nanonets.com");+ // Trail's front end, not the shared agents host link.ts calls for the API:+ // the signup a person walks through has to be the Trail-branded build.+ assert.equal(url.origin, "https://app.trailhq.com");assert.equal(url.pathname, "/get-started");assert.equal(url.searchParams.get("graft_repo"), "NanoNets/Graft");assert.equal(url.searchParams.get("graft_port"), "51234");