diff --git a/AGENTS.md b/AGENTS.md index 72af505..ab8907d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,7 @@ | `src/adapters/opencode/plugin/` | The opencode plugin. Standalone (node built-ins only): install copies the built file into opencode's plugins folder | | `src/adapters/claude/plugin/` | The Claude plugin: `/bridge` (socket) and `/bridge-monitor` skills sharing `shared/peer-messages.md`, the monitor, and the bypass-guard hook. Registered by install through the repo's `.claude-plugin/marketplace.json` | | `docs/` | User docs (`concepts.md`, `install.md`, `agents/`) and the design record (`decisions.md`, `live-tests.md`, `adding-an-agent.md`, `open-questions.md`). Agent findings live in `docs/agents/.md`; never name a file there `claude.md`, macOS loads it as `CLAUDE.md` | -| `landing/` | The product page at logickoder.dev/agent-bridge. Its own Vite + React + Tailwind project with its own lockfile, deployed by `.github/workflows/site.yml`. Reads the version from the root `package.json`. The favicon and social card are served from `docs/assets` by a plugin in `landing/vite.config.ts`; edit them in `docs/assets`. Not part of the npm package | +| `landing/` | The product page at logickoder.dev/agent-bridge. Its own Vite + React + Tailwind project with its own lockfile, deployed by `.github/workflows/site.yml`. Reads the version from the root `package.json`. The favicon and social card are served from `docs/assets` by a plugin in `landing/vite.config.ts`; edit them in `docs/assets`. `vite build` prerenders the page into `index.html` (`buildApp` in `landing/vite.config.ts`, rendering `landing/src/entry-server.tsx`); title, meta and JSON-LD come from `SEO` there, so components must not touch `window` or `document` while rendering. Not part of the npm package | | `test/` | Tests that touch real files, sockets or processes. `e2e.test.ts` runs against `dist/cli.js`. `net*.test.ts` run several homes as separate users through `harness.ts` (homes, `until`, `socketRequest`, `tty` on a pseudo-terminal), with `proxy.ts` (a recording, tampering stand-in for the tunnel) | ## Rules diff --git a/README.md b/README.md index 81dbc32..6bcc784 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@

Live messaging between agent CLI sessions, as named peers. Claude Code, Antigravity and opencode today. Each message wakes the receiving session in place, even when it is idle. No polling, no headless runs, no tmux.

+

logickoder.dev/agent-bridge · npm

+ ## Quick start ```sh diff --git a/landing/index.html b/landing/index.html index 52d5d9d..d97c589 100644 --- a/landing/index.html +++ b/landing/index.html @@ -3,25 +3,11 @@ - agent-bridge · live messaging between coding agents - - - - - - - - - - -
- + +
diff --git a/landing/src/components/InstallBox.tsx b/landing/src/components/InstallBox.tsx index 867f857..29d8f52 100644 --- a/landing/src/components/InstallBox.tsx +++ b/landing/src/components/InstallBox.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useState, type KeyboardEvent } from 'react'; +import { useEffect, useRef, useState, useSyncExternalStore, type KeyboardEvent } from 'react'; import { INSTALL_NPM, INSTALL_SOURCE } from '../site'; import { CopyIcon } from './Icons'; import { OUTLINE_BUTTON } from './Layout'; @@ -17,13 +17,15 @@ const COPY_LABEL: Record = { failed: 'Copy failed', }; const RESET_MS = 2000; -// Client-only page: the clipboard API either works here or it doesn't, for the whole visit. -const CAN_COPY = Boolean(navigator.clipboard) && window.isSecureContext; +// The clipboard API works here or it doesn't, for the whole visit. Never in the prerendered HTML. +const noSubscribe = () => () => {}; +const canCopy = () => Boolean(navigator.clipboard) && window.isSecureContext; /** Tabbed install commands with a copy button (shown only where the clipboard API works). */ export function InstallBox() { const [active, setActive] = useState('npm'); const [copy, setCopy] = useState('idle'); + const showCopy = useSyncExternalStore(noSubscribe, canCopy, () => false); const tabRefs = useRef>>({}); const method = METHODS.find((m) => m.id === active) ?? METHODS[0]; @@ -104,7 +106,7 @@ export function InstallBox() {