diff --git a/public/panel.png b/public/panel.png new file mode 100644 index 0000000..045919f Binary files /dev/null and b/public/panel.png differ diff --git a/src/app/docs/layout.tsx b/src/app/docs/layout.tsx index 0c2bc3a..1896535 100644 --- a/src/app/docs/layout.tsx +++ b/src/app/docs/layout.tsx @@ -14,6 +14,10 @@ export default function Layout({ url: "/", }} links={[ + { + text: "Panel", + url: "/panel", + }, { text: "GitHub", url: "https://github.com/agentproto/ts", diff --git a/src/app/global.css b/src/app/global.css index dbcc721..71398d5 100644 --- a/src/app/global.css +++ b/src/app/global.css @@ -1,3 +1,106 @@ @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; } +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 2ade493..8cf7f48 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,19 +1,36 @@ 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 "./global.css" +const plexSans = IBM_Plex_Sans({ + subsets: ["latin"], + weight: ["400", "500", "600"], + variable: "--font-plex-sans", +}) +const plexMono = IBM_Plex_Mono({ + subsets: ["latin"], + weight: ["400", "600"], + variable: "--font-plex-mono", +}) +const plexSerif = IBM_Plex_Serif({ + subsets: ["latin"], + weight: ["600", "700"], + style: ["normal", "italic"], + variable: "--font-plex-serif", +}) + export const metadata: Metadata = { title: { default: "agentproto CLI — install, run, orchestrate agent CLIs", template: "%s — agentproto CLI", }, description: - "Reference host for AgentProto agent-CLI adapters. Install adapters, run a single turn or a persistent session, expose them as a daemon, orchestrate multi-agent swarms.", + "The agentproto binary: install adapters, run a single turn or a persistent session, serve a daemon, watch everything live in the panel.", metadataBase: new URL("https://cli.agentproto.sh"), openGraph: { title: "agentproto CLI", - description: - "The `agentproto` binary — install, run, orchestrate AgentProto agent-CLI adapters.", + description: "Install it. Run an agent. Watch it live.", url: "https://cli.agentproto.sh", siteName: "agentproto CLI", type: "website", @@ -26,7 +43,11 @@ export default function RootLayout({ children: React.ReactNode }): React.ReactElement { return ( - +
{children}
diff --git a/src/app/page.tsx b/src/app/page.tsx index 64ec579..a880643 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,84 +1,177 @@ +import Image from "next/image" import Link from "next/link" +import { CopyCommand } from "@/components/copy-command" +import { HeroTerminal } from "@/components/hero-terminal" +const PATHS = [ + { + cmd: "agentproto run", + title: "Run an agent locally", + body: "Install an adapter (claude-code, hermes, …) and run a single turn or a persistent session.", + href: "/docs/verbs/install", + }, + { + cmd: "agentproto serve", + title: "Share with a hosted agent", + body: "Log in via device flow, then expose your machine as a daemon over an outbound WebSocket tunnel.", + href: "/docs/verbs/serve", + }, + { + cmd: "agentproto run-swarm", + title: "Orchestrate a swarm", + body: "Compose a substrate + dispatcher + participants in a manifest. Kernel-routed, plugin-extensible.", + href: "/docs/verbs/run-swarm", + }, +] + +/** + * Landing page for cli.agentproto.sh — the tool site. The visitor + * has already decided to try the CLI (or is about to): the page's + * one job is a first success in 60 seconds. Terminal first, panel + * second, reference paths third. + */ export default function Home(): React.ReactElement { return ( -
-

- agentproto CLI -

-

- Reference host for AgentProto agent-CLI adapters. Install - adapters, run a single turn or a persistent session, expose - them as a daemon, orchestrate multi-agent swarms. -

- -
- - Get started - - - Browse the docs - - - GitHub - -
+
+ {/* ── 1. Hero — the terminal is the pitch ─────────────────── */} +
+
+

+ + reference host · 9 adapters · v1 on npm +

+

+ Install it. Run an agent.{" "} + Watch it live. +

+

+ The reference host for AgentProto adapters — run a turn, keep a + session, serve a daemon, orchestrate a swarm. One binary. +

+
+ +
+
+ + Get started + + + Open the panel + + + GitHub + +
+
+ +
-
-

Install

-
-          {`npm i -g @agentproto/cli
-agentproto --version`}
-        
+ {/* ── 2. The panel, on stage ──────────────────────────────── */} +
+
+
+

+

+

+ Every session, live, in one dashboard +

+

+ Session sidebar, terminal/chat/JSON/event views per session, + shareable deep-links over a tunnel. It talks to whatever daemon + it finds on ports 18790–18795, local or remote. +

+
+ + Open the panel + +
+
+
+
+ The agentproto panel: a session sidebar on the left, a live terminal view of a running claude-code session on the right. +
-
- - - + {/* ── 3. Three paths ──────────────────────────────────────── */} +
+
+ {PATHS.map(p => ( + + {p.cmd} +

+ {p.title} +

+

+ {p.body} +

+ + ))} +
-
-

Reference docs

-

- Verb-by-verb usage, concepts, and exact on-disk schemas - live under /docs. The pages are synced from{" "} - +

) } - -function PathCard({ - title, - body, - href, -}: { - title: string - body: string - href: string -}): React.ReactElement { - return ( - -

{title}

-

{body}

- - ) -} diff --git a/src/components/copy-command.tsx b/src/components/copy-command.tsx new file mode 100644 index 0000000..c45fbd0 --- /dev/null +++ b/src/components/copy-command.tsx @@ -0,0 +1,59 @@ +"use client" + +import { useState } from "react" +import { cn } from "@/lib/utils" + +interface CopyCommandProps { + /** The command text to copy. */ + command: string + className?: string +} + +/** + * A mono one-liner install command in a bordered pill with a copy + * button. Uses navigator.clipboard; button text flips to "Copied" + * for 1.5s on success. + */ +export function CopyCommand({ + command, + className, +}: CopyCommandProps): React.ReactElement { + const [copied, setCopied] = useState(false) + + async function copy() { + try { + await navigator.clipboard.writeText(command) + setCopied(true) + window.setTimeout(() => setCopied(false), 1500) + } catch { + // Clipboard API may be unavailable (insecure context); no-op. + } + } + + return ( +
+ + {command} + +
+ ) +} diff --git a/src/components/hero-terminal.tsx b/src/components/hero-terminal.tsx new file mode 100644 index 0000000..d4186b1 --- /dev/null +++ b/src/components/hero-terminal.tsx @@ -0,0 +1,100 @@ +/** + * Self-typing hero terminal: the CLI's real first-run, typed in + * sequence (CSS `steps()` width animation staggered via the + * `--type-delay` custom property). No JS — under + * `prefers-reduced-motion` every line renders fully, immediately. + * + * Colors come from the theme-invariant --term-* / --phos tokens: + * this panel stays dark in both themes on purpose — it is the + * "runtime island" of the Paper & Phosphor system. + */ +interface Line { + kind: "cmd" | "out" + delay: string + content: React.ReactNode +} + +const LINES: Line[] = [ + { + kind: "cmd", + delay: "0s", + content: "npm i -g @agentproto/cli", + }, + { + kind: "out", + delay: "1.9s", + content: "+ @agentproto/cli — 9 adapters detected", + }, + { + kind: "cmd", + delay: "2.3s", + content: "agentproto serve", + }, + { + kind: "out", + delay: "4.2s", + content: ( + <> + ● gateway up · + http://127.0.0.1:18790 · panel ready + + ), + }, + { + kind: "cmd", + delay: "4.6s", + content: 'agentproto sessions start claude-code --prompt "fix tests"', + }, + { + kind: "out", + delay: "6.5s", + content: ( + <> + ●{" "} + s_7f2k · claude-code · + running — watch it in the panel + + ), + }, +] + +export function HeroTerminal(): React.ReactElement { + return ( +
+
+
+
+
+ {LINES.map((line, i) => + line.kind === "cmd" ? ( +
+ $ + + {line.content} + +
+ ) : ( +
+ {line.content} +
+ ) + )} +
+
+
+ ) +}