The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
web: harness.autonomous.ai opens the Hub; the web app moves to /web (#1288)
Jacob Pham92e1e5bfbbdd
diff --git a/desktop/README.md b/desktop/README.mdindex ceb96f829..8fcecfa2a 100644--- a/desktop/README.md+++ b/desktop/README.md@@ -9,7 +9,8 @@ the browser renders managed viewers on their connected machine.`hn view` can open a viewer companion at `/?viewer=1&machine=<id>&agent=<id>`.This owner-only destination uses normal sign-in and machine linking. It does not restore orsave the workspace, join the shared desk, or attach a terminal. OAuth returns to the same-viewer after sign-in. The existing website root rewrite serves it without a new route.+viewer after sign-in. The website root serves it while `machine` is in the query; any other+visit to `/` redirects to the Hub, and the hosted workspace is at `/web`, where sign-in returns.Publish the browser build before the corresponding native hn release so the entry pointrecognizes the viewer destination.diff --git a/desktop/lib/app_shell.dart b/desktop/lib/app_shell.dartindex 9023a4570..fbe3fc134 100644--- a/desktop/lib/app_shell.dart+++ b/desktop/lib/app_shell.dart@@ -389,7 +389,10 @@ class _RootShellState extends ConsumerState<RootShell>// three buttons beside it, which is the one strip of this window that// must stay reachable.// Device bands, most urgent first: a removal (red before neutral), a key that joined and left,- // a new device, a held computer id. The mobile app stacks them in the same order.+ // a new device, a held computer id. The mobile app stacks them in the same order. They are+ // the workspace's: a shared harness (`/s/…`, web only) is someone's session, not the place+ // to review your own devices.+ final deviceBands = home && shared == null;return Column(children: [// The app's commands as a menu strip (Linux only; macOS carries@@ -402,13 +405,13 @@ class _RootShellState extends ConsumerState<RootShell>app.status != AppStatus.checkingEnvironment &&app.status != AppStatus.preparingEnvironment)UpdateNotice(notifier: app),- if (app.visibleDeviceRemovals.isNotEmpty && home)+ if (app.visibleDeviceRemovals.isNotEmpty && deviceBands)DeviceRemovalNoticeBand(notifier: app),- if (app.departedDevices.isNotEmpty && home)+ if (app.departedDevices.isNotEmpty && deviceBands)DeviceDepartedNoticeBand(notifier: app),- if (app.newDevices.isNotEmpty && home)+ if (app.newDevices.isNotEmpty && deviceBands)NewDeviceNotice(notifier: app),- if (app.deviceConflict != null && home)+ if (app.deviceConflict != null && deviceBands)DeviceConflictNoticeBand(notifier: app),Expanded(child: framed),],diff --git a/desktop/lib/viewer/browser_login.dart b/desktop/lib/viewer/browser_login.dartindex 33101e064..52de0c575 100644--- a/desktop/lib/viewer/browser_login.dart+++ b/desktop/lib/viewer/browser_login.dart@@ -49,6 +49,11 @@ class BrowserLogin implements SignInClient, PhoneSignInClient {static String _callbackPath(Uri location) =>_isLoopback(location) ? '/callback' : '/auth/callback';+ // The hosted workspace lives at /web (its origin's / opens the Hub, owner 2026-10-13); a local+ // build serves the app at its root.+ static String _workspacePath(Uri location) =>+ _isLoopback(location) ? '/' : '/web';+@overrideFuture<CliAuthStatus> checkStatus() =>_checking ??= _checkStatus().whenComplete(() {@@ -62,7 +67,7 @@ class BrowserLogin implements SignInClient, PhoneSignInClient {final raw = browser.transaction;browser.transaction = null;// Remove the one-use code before any API call or application telemetry.- browser.replaceLocation('/');+ browser.replaceLocation(_workspacePath(uri));try {final saved = raw == null ? null : jsonDecode(raw);final now = _clock().millisecondsSinceEpoch;diff --git a/desktop/test/browser_login_test.dart b/desktop/test/browser_login_test.dartindex b8f847dfa..6c927a38f 100644--- a/desktop/test/browser_login_test.dart+++ b/desktop/test/browser_login_test.dart@@ -303,18 +303,18 @@ void main() {expect(browser.transaction, isNull);});- for (final (origin, path) in [- ('https://harness.example', '/auth/callback'),- ('http://127.0.0.1:54732', '/callback'),+ for (final (origin, path, workspace) in [+ ('https://harness.example', '/auth/callback', '/web'),+ ('http://127.0.0.1:54732', '/callback', '/'),]) {test(- 'callback on $origin cleans the URL, exchanges once, and persists the session',+ 'callback on $origin cleans the URL to the workspace ($workspace), exchanges once, and persists the session',() async {callback(origin: origin, path: path);final first = login.checkStatus();final second = login.checkStatus();expect(identical(first, second), isTrue);- expect(browser.uri.toString(), '$origin/');+ expect(browser.uri.toString(), '$origin$workspace');expect(browser.transaction, isNull);expect(api.requests.single, (code: 'one-use',diff --git a/website/README.md b/website/README.mdindex 6a75e6905..f96b0f7c2 100644--- a/website/README.md+++ b/website/README.md@@ -10,7 +10,8 @@ retired; only the host routes below were kept.| Route | What ||---|---|-| `/`, `/s/:id`, `/auth/callback`, `/callback` | The Flutter app (`public/harness-web/index.html`, via `rewrites()` in `next.config.js`) |+| `/` | Redirects (307) to `/hub`, the front door (owner, 2026-10-13). An `hn view` link (`/?machine=…&agent=…`) still opens the Flutter viewer here |+| `/web`, `/s/:id`, `/auth/callback`, `/callback` | The Flutter app (`public/harness-web/index.html`, via `rewrites()` in `next.config.js`); `/web` is the workspace, where sign-in returns (`src/lib/webApp.ts`) || `/download` (and `/install` → it) | Install page: CLI command and desktop downloads || `/app` | The phone app's download code: an iPhone or iPad is redirected to the App Store and an Android device to Google Play, by user agent (`src/lib/phoneApp.ts`); anything else gets both stores || `/pair` | Phone setup guidance — the mobile app and the desktop "add phone" dialog link here |diff --git a/website/next.config.js b/website/next.config.jsindex 5bb7a9287..431508bc9 100644--- a/website/next.config.js+++ b/website/next.config.js@@ -30,6 +30,9 @@ module.exports = {destination: 'https://harness.autonomous.ai/:path*',permanent: true,})),+ // The front door is the Hub (owner, 2026-10-13); the workspace moved to /web. Temporary, so a+ // browser does not cache it. `hn view` links (/?machine=…&agent=…) still open the viewer here.+ { source: '/', missing: [{ type: 'query', key: 'machine' }], destination: '/hub', permanent: false },{ source: '/install', destination: '/download', permanent: true },{ source: '/explore', destination: '/hub', permanent: true },{ source: '/explore/:id', destination: '/hub/:id', permanent: true },@@ -64,7 +67,9 @@ module.exports = {// Older desktop builds consume snapshots without following redirects.{ source: '/explore/:id/snapshot', destination: '/hub/:id/snapshot' },{ source: '/explore/:id/download', destination: '/hub/:id/download' },+ // `/` reaches here only as an `hn view` link; everything else there redirects to the Hub.{ source: '/', destination: '/harness-web/index.html' },+ { source: '/web', destination: '/harness-web/index.html' },{ source: '/s/:id', destination: '/harness-web/index.html' },{ source: '/auth/callback', destination: '/harness-web/index.html' },// Local website previews use the SSO service's native loopback callback.@@ -127,7 +132,7 @@ module.exports = {{ key: 'Cache-Control', value: 'public, max-age=31536000, immutable' },],},- ...['/', '/s/:id', '/auth/callback', '/callback', '/harness-web', '/harness-web/index.html', '/harness-web/release.json'].map((source) => ({+ ...['/', '/web', '/s/:id', '/auth/callback', '/callback', '/harness-web', '/harness-web/index.html', '/harness-web/release.json'].map((source) => ({source,headers: [{ key: 'Cache-Control', value: 'no-store' },diff --git a/website/scripts/check-harness-web.mjs b/website/scripts/check-harness-web.mjsindex 2acf066b0..139aeb7b0 100644--- a/website/scripts/check-harness-web.mjs+++ b/website/scripts/check-harness-web.mjs@@ -5,7 +5,11 @@ import { releaseAssetBase } from './harness-web-assets.mjs';const base = new URL(process.argv[2] || 'http://127.0.0.1:3000');const release = JSON.parse(await readFile(new URL('../harness-web-release.json', import.meta.url), 'utf8'));const assetBase = releaseAssetBase(release);-for (const route of ['/', '/s/11111111-1111-4111-8111-111111111111', '/auth/callback?code=fixture-code&state=fixture-state', '/callback', '/harness-web']) {+// The front door is the Hub: `/` redirects there, temporarily, unless it is an `hn view` link.+const front = await fetch(new URL('/', base), { redirect: 'manual' });+assert.equal(front.status, 307, '/ must redirect to the Hub');+assert.equal(new URL(front.headers.get('location'), base).pathname, '/hub');+for (const route of ['/web', '/?viewer=1&machine=fixture-machine&agent=fixture-agent', '/s/11111111-1111-4111-8111-111111111111', '/auth/callback?code=fixture-code&state=fixture-state', '/callback', '/harness-web']) {const response = await fetch(new URL(route, base));assert.equal(response.status, 200, route);assert.match(response.headers.get('content-type'), /text\/html/);diff --git a/website/src/app/download/page.spec.tsx b/website/src/app/download/page.spec.tsxindex eff6ca458..753dca202 100644--- a/website/src/app/download/page.spec.tsx+++ b/website/src/app/download/page.spec.tsx@@ -20,7 +20,7 @@ describe("/download", () => {expect(screen.getByRole("heading", { name: "Download Harness" })).toBeInTheDocument();// Downloads stay public; entering the separate Flutter workspace is an ordinary link.- expect(screen.getByRole("link", { name: "[ Open web app ]" })).toHaveAttribute("href", "/");+ expect(screen.getByRole("link", { name: "[ Open web app ]" })).toHaveAttribute("href", "/web");expect(screen.queryByRole("link", { name: /sign in/i })).not.toBeInTheDocument();});diff --git a/website/src/app/download/page.tsx b/website/src/app/download/page.tsxindex 077cdfbd3..bbdef1379 100644--- a/website/src/app/download/page.tsx+++ b/website/src/app/download/page.tsx@@ -1,12 +1,14 @@"use client";-// The root is a separate Flutter app; workspace links need a full document navigation.+// The web app at /web is a separate Flutter app; workspace links need a full document navigation.+import Link from "next/link";import { useEffect, useRef, useState } from "react";import styles from "./page.module.css";import { buildsFor } from "@/lib/desktopPlatform";import { INSTALL_COMMAND } from "@/lib/installCommand";import { useVisitorPlatform } from "@/lib/useVisitorPlatform";+import { webAppPath } from "@/lib/webApp";const commands = [{ id: "install", label: "1. Install", value: INSTALL_COMMAND },@@ -16,7 +18,7 @@ const commands = [type CommandId = (typeof commands)[number]["id"];-/** Public /download page. The root route serves the shared Flutter workspace. */+/** Public /download page. The web app (the shared Flutter workspace) is at /web; the root opens the Hub. */export default function Page() {const [copied, setCopied] = useState<CommandId | null>(null);const [copyError, setCopyError] = useState(false);@@ -45,10 +47,10 @@ export default function Page() {<div className={styles.page}><header className={styles.bar}><nav className={styles.navigation} aria-label="Harness">- <a className={styles.brand} href="/">Harness</a>+ <Link className={styles.brand} href="/hub">Harness</Link><span className={styles.activeTab} aria-current="page">Downloads</span></nav>- <a className={styles.textAction} href="/">[ Open web app ]</a>+ <a className={styles.textAction} href={webAppPath}>[ Open web app ]</a></header><main className={styles.main}>diff --git a/website/src/app/hub/components/Header.tsx b/website/src/app/hub/components/Header.tsxindex b88f7f91c..837112840 100644--- a/website/src/app/hub/components/Header.tsx+++ b/website/src/app/hub/components/Header.tsx@@ -2,6 +2,7 @@import Link from 'next/link';import { ArrowUpRight } from 'lucide-react';import { rememberHubReturn } from '@/lib/community/session';+import { webAppPath } from '@/lib/webApp';import { SearchField, type SearchFieldProps } from './SearchField';import { useSignedIn } from './useSignedIn';import styles from '../community.module.css';@@ -9,8 +10,8 @@ import styles from '../community.module.css';/** One way out to the app: sign in (and come back) while signed out, open it once signed in. */function AccountLink({ signedIn }: { signedIn: boolean | null }) {if (signedIn === null) return null;- if (!signedIn) return <a href="/" onClick={rememberHubReturn}>Sign in</a>;- return <a href="/" className={styles.openApp}>Open Harness <ArrowUpRight /></a>;+ if (!signedIn) return <a href={webAppPath} onClick={rememberHubReturn}>Sign in</a>;+ return <a href={webAppPath} className={styles.openApp}>Open Harness <ArrowUpRight /></a>;}export type HubTab = 'explore' | 'following' | 'yours';@@ -34,5 +35,5 @@ export function Header({ tab, search }: { tab?: HubTab; search?: SearchFieldProp}export function SignIn({ action = 'join the conversation' }: { action?: string }) {- return <p className={styles.signin}><a href="/" onClick={rememberHubReturn}>Sign in to Harness</a> to {action}. You’ll return here afterward.</p>;+ return <p className={styles.signin}><a href={webAppPath} onClick={rememberHubReturn}>Sign in to Harness</a> to {action}. You’ll return here afterward.</p>;}diff --git a/website/src/lib/webApp.ts b/website/src/lib/webApp.tsnew file mode 100644index 000000000..e64bd31ea--- /dev/null+++ b/website/src/lib/webApp.ts@@ -0,0 +1,2 @@+/** Where the Harness web app (the Flutter workspace) lives: `/` opens the Hub (owner, 2026-10-13). */+export const webAppPath = '/web';