---
export const prerender = true
import Layout from '../layouts/Layout.astro'
import { LandingHero } from '../components/cro/LandingHero'
import { HowItWorks } from '../components/cro/HowItWorks'
import { LandingFeatures } from '../components/cro/LandingFeatures'
import { ProofBar } from '../components/cro/ProofBar'
import { Testimonials } from '../components/cro/Testimonials'
import { ComparisonTable } from '../components/cro/ComparisonTable'
import { PricingSection } from '../components/cro/PricingSection'
import { FAQSection } from '../components/cro/FAQSection'
import { SecondaryCTA } from '../components/cro/SecondaryCTA'
import { Terminal, Code, Globe, Layers, Zap, FileText } from 'lucide-react'

const features = [
  {
    headline: 'CLI — 29 verbs, no installation',
    body: 'npx oneie. 29 verbs covering substrate operations, deployment, commerce, and observability. Structured JSON output via --output json on every verb. --dry-run on every mutating verb. REPL mode. Shell completion for bash, zsh, fish.',
    icon: Terminal,
    tone: 'primary' as const,
  },
  {
    headline: 'SDK — 6 verbs, fully typed',
    body: '@oneie/sdk. signal, ask, mark, warn, fade, follow — plus read verbs for highways, recall, reveal, forget, frontier, know. Fully typed. MIT licensed. Works in Node, Bun, and Cloudflare Workers. Enforces the 4-outcome contract on every ask().',
    icon: Code,
    tone: 'tertiary' as const,
  },
  {
    headline: 'API — standard REST, no proprietary format',
    body: 'Every substrate operation is a REST endpoint on api.one.ie. POST /api/signal. GET /api/loop/highways. Standard Bearer auth. Standard JSON bodies. A curl command is all the SDK you need for a first integration.',
    icon: Globe,
    tone: 'secondary' as const,
  },
  {
    headline: 'MCP — 42 tools in Claude, Cursor, Windsurf',
    body: '@oneie/mcp. Install once. Point Claude Code, Cursor, or Windsurf at it. 42 substrate tools available as natural-language-callable functions. "Show me the top ten paths by pheromone strength" — the substrate responds.',
    icon: Layers,
    tone: 'primary' as const,
  },
  {
    headline: '107-second deploy — measured',
    body: 'git push → Cloudflare Pages build → Workers deploy via Wrangler → health check. 107 seconds from commit to global edge. Measured across 47 production deploys. p95 under 3 minutes. Verb-surface parity across all four surfaces.',
    icon: Zap,
    tone: 'tertiary' as const,
  },
  {
    headline: 'Spec — ADL, ontology, DSL, dictionary',
    body: 'Four interlocking docs. ADL (agent definition language). Ontology (6 dimensions, locked). DSL (signal grammar — receiver + data, frozen). Dictionary (canonical name list, dead names documented). Any surface that reads them can interoperate.',
    icon: FileText,
    tone: 'secondary' as const,
  },
]

const steps = [
  { label: 'Build', description: 'Three paths to building on ONE. Chat: describe what you want, the substrate scaffolds it. Markdown: edit the agent .md file, save, the substrate syncs within 30 seconds. IDE: TypeScript SDK with full autocompletion against a typed API.', detail: 'chat · markdown · IDE — any team member\'s choice' },
  { label: 'Call', description: 'Four surfaces. CLI: npx oneie, 29 verbs, --output json. API: curl to api.one.ie, Bearer auth, standard JSON. SDK: @oneie/sdk, 6 verbs, fully typed. MCP: 42 substrate tools in Claude Code, Cursor, or Windsurf.', detail: 'CLI · API · SDK · MCP — same substrate behind all four' },
  { label: 'Deploy', description: 'git push. Cloudflare Pages builds. Workers deploy via Wrangler. Health check confirms. 107 seconds from commit to global edge. Measured. p95 under 3 minutes. CI/CD is deterministic.', detail: '107s measured · p95 <3min · CF Pages + Workers + Wrangler' },
  { label: 'Observe', description: 'Substrate dashboard: per-agent success rate, highway status, evolution history. CLI: oneie highways, oneie agents list, oneie skill list --slug my-agency. MCP: "what\'s the pheromone strength on the qualify-lead path?" The data is the same regardless of surface.', detail: 'dashboard · CLI · MCP · verb-surface parity' },
]

const testimonials = [
  {
    quote: 'I git-pushed at 11:47. Got a coffee. By 11:49 it was live on every edge node. I\'ve worked at companies where that took a sprint.',
    name: 'Ciarán O\'D.',
    role: 'Lead Engineer',
    company: 'Clearwater Digital',
  },
  {
    quote: 'The MCP server means I don\'t switch context. I ask the substrate what\'s working from inside Cursor. The substrate answers. Then I edit the agent file, also in Cursor. Never leave the IDE.',
    name: 'Dean P.',
    role: 'Owner',
    company: 'ClearView Windows, Brisbane',
  },
  {
    quote: 'Six verbs in the SDK. signal, ask, mark, warn, fade, follow. That\'s the whole surface. My team learned it in a morning. By afternoon they were shipping agents.',
    name: 'Marcus J.',
    role: 'Director',
    company: 'Northgate Marketing, Manchester',
  },
]

const comparisonRows = [
  { feature: 'CLI + API + SDK + MCP (4 surfaces)', us: 'yes', alt1: 'partial', alt2: 'partial' },
  { feature: 'Verb-surface parity (same operation, 4 ways)', us: 'yes', alt1: 'no', alt2: 'no' as const },
  { feature: '107-second deploy (measured)', us: 'yes', alt1: 'no', alt2: 'partial' },
  { feature: 'MCP tools in Claude Code / Cursor', us: 'yes', alt1: 'no', alt2: 'no' as const },
  { feature: 'Open-source substrate (auditable)', us: 'yes', alt1: 'no', alt2: 'yes' },
  { feature: '6-verb SDK (signal/ask/mark/warn/fade/follow)', us: 'yes', alt1: 'partial', alt2: 'partial' },
  { feature: 'Total control of infrastructure', us: 'partial', alt1: 'no', alt2: 'yes', note: 'Honesty: self-hosting on your own infrastructure wins on control — costs 1–3 months of DevOps time.' },
]

const tiers = [
  {
    name: 'Starter',
    monthlyPrice: '$625',
    annualPrice: '$500',
    description: 'Full API access · CLI · SDK',
    features: ['5M credits/mo', 'Full REST API access', 'CLI (npx oneie)', '@oneie/sdk', 'Basic MCP server', 'Email support'],
    cta: 'Start building',
    ctaHref: '/get-yours',
  },
  {
    name: 'Agency',
    monthlyPrice: '$6,250',
    annualPrice: '$5,000',
    description: 'All 4 surfaces · 29-verb CLI · 42 MCP tools',
    features: ['60M credits/mo', 'Full 29-verb CLI with --dry-run', 'Full @oneie/mcp (42 tools)', 'Priority API rate limits', 'Custom webhook endpoints', 'Priority support'],
    cta: 'Start my agency',
    ctaHref: '/get-yours',
    popular: true,
  },
  {
    name: 'Scale',
    monthlyPrice: '$62,500',
    annualPrice: '$50,000',
    description: 'Dedicated infrastructure · SOC 2',
    features: ['750M credits/mo', 'Dedicated Cloudflare edge region', 'SOC 2 report access', 'Custom API endpoints', 'Dedicated success manager', 'SLA 99.99%'],
    cta: 'Talk to us',
    ctaHref: '/get-yours',
    enterprise: true,
  },
]

const faqs = [
  { q: 'What is verb-surface parity?', a: 'Every action is reachable from every surface. The same signal operation runs from CLI (oneie signal), curl (curl /api/signal), TypeScript SDK (one.signal()), or MCP (oneie_signal tool in Claude Code). The substrate does not know which surface was used.' },
  { q: 'How do I get started without installing anything?', a: 'npx oneie — no installation required. Or curl to api.one.ie with a Bearer token. First API call in under a minute.' },
  { q: 'What is the ADL?', a: 'Agent Definition Language. Every agent is an ADL document: name, role, skills, voice contract, pricing, membership, lifecycle status. The ADL parser runs in both the SDK and the CLI. An agent authored in chat and one pushed from the terminal produce the same TypeDB unit.' },
  { q: 'Is the substrate open source?', a: 'Yes. github.com/one-ie/one. The substrate, SDK, MCP server, and CLI are all public. Audit every line. The product layer sits in escrow.' },
  { q: 'Can my engineers use TypeDB directly?', a: 'Yes. The substrate exposes TypeDB via api.one.ie. The SDK wraps the TypeQL surface with typed verbs. For advanced queries, direct TypeQL is available via the API.' },
  { q: 'What is the 107-second deploy?', a: 'git push → Cloudflare Pages build → Workers deploy via Wrangler → health check confirms. The whole chain. Measured across 47 production deploys. p95 is under 3 minutes.' },
  { q: 'Does the MCP server expose sensitive data?', a: 'The MCP server respects the same ABAC/RBAC access model as the REST API. A tool call that would fail via REST also fails via MCP. The session token scopes what data is visible.' },
  { q: 'What languages does the SDK support?', a: '@oneie/sdk is TypeScript, working in Node, Bun, and Cloudflare Workers. A Python client (oneie) is also available via pip install oneie — the same substrate verbs, Python syntax.' },
]
---

<Layout
  title="Developer Platform — CLI, API, SDK, MCP | ONE"
  description="29-verb CLI. Standard REST API. TypeScript SDK. 42 MCP tools in Claude Code and Cursor. 107-second deploy. Verb-surface parity. Build the way your team already works."
  sidebar="none"
  chat="none"
>
  <main>
    <LandingHero
      client:idle
      eyebrow="Developer platform"
      headline="Your engineers. Your IDE."
      highlight="Same substrate."
      subhead="CLI, API, SDK, MCP. 29 verbs. 42 MCP tools. 107-second deploy. The same signal operation runs from every surface. Build the way your team already works."
      primaryCta={{ label: 'Start building', href: '/get-yours' }}
      secondaryCta={{ label: 'Read the docs', href: 'https://github.com/one-ie/one' }}
      frictionText="npx oneie — no install · first API call in 1 minute · MIT licensed"
      visual={`Terminal: npx oneie signal chairman --data '{"tags":["chat"],"content":"New lead"}' | curl /api/signal | @oneie/sdk one.signal() | MCP: oneie_signal`}
    />

    <ProofBar
      client:idle
      stats={[
        { label: 'CLI verbs covering every substrate operation', value: '29' },
        { label: 'MCP tools available in Claude Code / Cursor', value: '42' },
        { label: 'From git push to global edge — measured', value: '107s' },
        { label: 'Minutes to first working API call', value: '1' },
      ]}
      leadQuote={{
        quote: 'The best way to predict the future is to invent it.',
        name: 'Alan Kay',
        role: '',
        company: '',
      }}
    />

    <HowItWorks
      title="Build, call, deploy, observe"
      subtitle="Four operations. Four surfaces. Verb-surface parity throughout."
      steps={steps}
    />

    <LandingFeatures
      title="What the developer platform gives you"
      subtitle="One substrate. Four ways to reach it."
      features={features}
    />

    <Testimonials
      title="Engineers who shipped fast"
      testimonials={testimonials}
    />

    <ComparisonTable
      title="Developer experience vs. the alternatives"
      usLabel="ONE"
      alt1Label="Hosted AI SaaS"
      alt2Label="Self-hosted open source"
      rows={comparisonRows}
    />

    <PricingSection
      client:load
      title="Full developer access on every plan"
      subtitle="Annual billing pre-selected."
      tiers={tiers}
    />

    <FAQSection
      client:load
      title="Developer questions"
      faqs={faqs}
    />

    <SecondaryCTA
      client:idle
      headline="107 seconds from commit to production."
      subhead="29-verb CLI. 42 MCP tools. SDK. REST API. Same operation, four surfaces. Build the way your team already works."
      primaryCta={{ label: 'Start building', href: '/get-yours' }}
      secondaryCta={{ label: 'Read the docs', href: 'https://github.com/one-ie/one' }}
      frictionText="npx oneie — no install · MIT licensed · 14-day free trial"
    />
  </main>
</Layout>
