diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8aeeb97..0782fea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # Paper & Phosphor brand tokens are an identical copy in both + # site repos (no shared package yet — the sites build standalone + # in Docker). Fail fast when this copy drifts from the sibling's + # main branch. Skips while the sibling doesn't have the file yet. + - name: Brand tokens in sync with site + run: | + if curl -fsSL https://raw.githubusercontent.com/agentproto/site/main/src/app/brand.css -o /tmp/sibling-brand.css; then + diff -u /tmp/sibling-brand.css src/app/brand.css + else + echo "sibling brand.css not found on site main — skipping" + fi + - name: Setup pnpm uses: pnpm/action-setup@v4 with: diff --git a/src/app/brand.css b/src/app/brand.css new file mode 100644 index 0000000..60256a6 --- /dev/null +++ b/src/app/brand.css @@ -0,0 +1,105 @@ +/* ═══════════════════════════════════════════════════════════════════ + agentproto brand — "Paper & Phosphor" tokens. + + IDENTICAL COPY in agentproto/site and agentproto/cli-site, both at + src/app/brand.css. CI diffs this file against the sibling repo's + main branch — edit BOTH repos or the check fails. + + The page is an engineering document: cool paper, ink, ultramarine + accent, IBM Plex serif display. The dark terminal panels are the + only place the phosphor green / amber status colors appear — the + paper ↔ phosphor contrast IS the brand ("the spec is a document, + the daemon is alive"). Terminal tokens are theme-invariant. + ═══════════════════════════════════════════════════════════════════ */ + +@theme inline { + --font-sans: var(--font-plex-sans), system-ui, sans-serif; + --font-mono: var(--font-plex-mono), ui-monospace, "SF Mono", Menlo, monospace; + --font-serif: var(--font-plex-serif), Charter, Georgia, serif; +} + +:root { + --color-fd-background: #f5f6f3; + --color-fd-foreground: #171a1e; + --color-fd-muted: #eceee9; + --color-fd-muted-foreground: #5c6470; + --color-fd-popover: #ffffff; + --color-fd-popover-foreground: #171a1e; + --color-fd-card: #ffffff; + --color-fd-card-foreground: #171a1e; + --color-fd-border: #dde0da; + --color-fd-primary: #2c46d8; + --color-fd-primary-foreground: #ffffff; + --color-fd-secondary: #e9ebe6; + --color-fd-secondary-foreground: #171a1e; + --color-fd-accent: #e7eaf9; + --color-fd-accent-foreground: #1b2b90; + --color-fd-ring: #2c46d8; + + /* runtime island — theme-invariant */ + --term-bg: #0d1512; + --term-line: #21302a; + --term-text: #c9d6ce; + --term-dim: #6d7f76; + --phos: #3edc81; + --amber: #f0b429; +} + +.dark { + --color-fd-background: #101214; + --color-fd-foreground: #e8eaed; + --color-fd-muted: #1b1f24; + --color-fd-muted-foreground: #99a2ad; + --color-fd-popover: #16191d; + --color-fd-popover-foreground: #e8eaed; + --color-fd-card: #16191d; + --color-fd-card-foreground: #e8eaed; + --color-fd-border: #272c33; + --color-fd-primary: #8296ff; + --color-fd-primary-foreground: #10141f; + --color-fd-secondary: #1b1f24; + --color-fd-secondary-foreground: #e8eaed; + --color-fd-accent: #232a3d; + --color-fd-accent-foreground: #c9d2ff; + --color-fd-ring: #8296ff; +} + +/* ── status blink (running dots, hero cursor) ──────────────────── */ + +@keyframes session-blink { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.25; } +} +.session-blink { + animation: session-blink 2s ease-in-out infinite; +} + +/* ── self-typing terminal lines ────────────────────────────────── */ + +@keyframes type-in { + from { width: 0; } + to { width: 100%; } +} +@keyframes appear { + to { opacity: 1; } +} +.type-line { + display: inline-block; + overflow: hidden; + white-space: nowrap; + vertical-align: bottom; + max-width: 100%; + animation: type-in 1.8s steps(36, end) both; + animation-delay: var(--type-delay, 0s); +} +.type-out { + opacity: 0; + animation: appear 0.01s both; + animation-delay: var(--type-delay, 0s); +} + +@media (prefers-reduced-motion: reduce) { + .session-blink { animation: none; } + .type-line { animation: none; width: 100%; } + .type-out { animation: none; opacity: 1; } +} diff --git a/src/app/global.css b/src/app/global.css index 71398d5..1be8880 100644 --- a/src/app/global.css +++ b/src/app/global.css @@ -1,106 +1,4 @@ @import "tailwindcss"; @import "fumadocs-ui/css/neutral.css"; @import "fumadocs-ui/css/preset.css"; - -/* ═══════════════════════════════════════════════════════════════════ - Paper & Phosphor — agentproto brand tokens (shared with - agentproto.sh; keep the two files in sync until a shared brand - package exists). - - The page is an engineering document: cool paper, ink, ultramarine - accent. The dark terminal panels are the only place the phosphor - green / amber status colors appear. Terminal tokens are - theme-invariant. - ═══════════════════════════════════════════════════════════════════ */ - -@theme inline { - --font-sans: var(--font-plex-sans), system-ui, sans-serif; - --font-mono: var(--font-plex-mono), ui-monospace, "SF Mono", Menlo, monospace; - --font-serif: var(--font-plex-serif), Charter, Georgia, serif; -} - -:root { - --color-fd-background: #f5f6f3; - --color-fd-foreground: #171a1e; - --color-fd-muted: #eceee9; - --color-fd-muted-foreground: #5c6470; - --color-fd-popover: #ffffff; - --color-fd-popover-foreground: #171a1e; - --color-fd-card: #ffffff; - --color-fd-card-foreground: #171a1e; - --color-fd-border: #dde0da; - --color-fd-primary: #2c46d8; - --color-fd-primary-foreground: #ffffff; - --color-fd-secondary: #e9ebe6; - --color-fd-secondary-foreground: #171a1e; - --color-fd-accent: #e7eaf9; - --color-fd-accent-foreground: #1b2b90; - --color-fd-ring: #2c46d8; - - /* runtime island — theme-invariant */ - --term-bg: #0d1512; - --term-line: #21302a; - --term-text: #c9d6ce; - --term-dim: #6d7f76; - --phos: #3edc81; - --amber: #f0b429; -} - -.dark { - --color-fd-background: #101214; - --color-fd-foreground: #e8eaed; - --color-fd-muted: #1b1f24; - --color-fd-muted-foreground: #99a2ad; - --color-fd-popover: #16191d; - --color-fd-popover-foreground: #e8eaed; - --color-fd-card: #16191d; - --color-fd-card-foreground: #e8eaed; - --color-fd-border: #272c33; - --color-fd-primary: #8296ff; - --color-fd-primary-foreground: #10141f; - --color-fd-secondary: #1b1f24; - --color-fd-secondary-foreground: #e8eaed; - --color-fd-accent: #232a3d; - --color-fd-accent-foreground: #c9d2ff; - --color-fd-ring: #8296ff; -} - -/* ── status blink (running dots) ───────────────────────────────── */ - -@keyframes session-blink { - 0%, 100% { opacity: 1; } - 50% { opacity: 0.25; } -} -.session-blink { - animation: session-blink 2s ease-in-out infinite; -} - -/* ── self-typing hero terminal ─────────────────────────────────── */ - -@keyframes type-in { - from { width: 0; } - to { width: 100%; } -} -@keyframes appear { - to { opacity: 1; } -} -.type-line { - display: inline-block; - overflow: hidden; - white-space: nowrap; - vertical-align: bottom; - max-width: 100%; - animation: type-in 1.8s steps(36, end) both; - animation-delay: var(--type-delay, 0s); -} -.type-out { - opacity: 0; - animation: appear 0.01s both; - animation-delay: var(--type-delay, 0s); -} - -@media (prefers-reduced-motion: reduce) { - .session-blink { animation: none; } - .type-line { animation: none; width: 100%; } - .type-out { animation: none; opacity: 1; } -} +@import "./brand.css"; diff --git a/src/app/icon.svg b/src/app/icon.svg new file mode 100644 index 0000000..b8c960b --- /dev/null +++ b/src/app/icon.svg @@ -0,0 +1 @@ + diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 8cf7f48..f5819e8 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next" import { IBM_Plex_Mono, IBM_Plex_Sans, IBM_Plex_Serif } from "next/font/google" import { RootProvider } from "fumadocs-ui/provider/next" +import { BrandRibbon } from "@/components/brand-ribbon" import "./global.css" const plexSans = IBM_Plex_Sans({ @@ -50,6 +51,7 @@ export default function RootLayout({ > +
{children}
diff --git a/src/app/opengraph-image.alt.txt b/src/app/opengraph-image.alt.txt new file mode 100644 index 0000000..8658b8f --- /dev/null +++ b/src/app/opengraph-image.alt.txt @@ -0,0 +1 @@ +agentproto CLI — install it, run an agent, watch it live. A terminal running npm install, agentproto serve, and a session start. diff --git a/src/app/opengraph-image.png b/src/app/opengraph-image.png new file mode 100644 index 0000000..ffd13d7 Binary files /dev/null and b/src/app/opengraph-image.png differ diff --git a/src/components/brand-ribbon.tsx b/src/components/brand-ribbon.tsx new file mode 100644 index 0000000..2e9aade --- /dev/null +++ b/src/components/brand-ribbon.tsx @@ -0,0 +1,50 @@ +"use client" + +import { usePathname } from "next/navigation" + +/** + * Cross-site ribbon: the one element that stitches the agentproto + * surfaces (protocol site, CLI site, live panel) into a single brand. + * + * IDENTICAL COPY in agentproto/site and agentproto/cli-site, both at + * src/components/brand-ribbon.tsx — only the `current` prop differs + * at the call site. Hidden on /panel, which is a full-height app. + */ +const SURFACES = [ + { key: "protocol", label: "protocol", host: "agentproto.sh", url: "https://agentproto.sh" }, + { key: "cli", label: "cli", host: "cli.agentproto.sh", url: "https://cli.agentproto.sh" }, + { key: "panel", label: "panel", host: "/panel", url: "https://cli.agentproto.sh/panel" }, +] as const + +export type BrandSurface = (typeof SURFACES)[number]["key"] + +export function BrandRibbon({ + current, +}: { + current: BrandSurface +}): React.ReactElement | null { + const pathname = usePathname() + if (pathname?.startsWith("/panel")) return null + + return ( +
+
+ {SURFACES.map(s => + s.key === current ? ( + + {s.label} {s.host} + + ) : ( + + {s.label} {s.host} + + ) + )} +
+
+ ) +}