{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "codex",
  "title": "Codex",
  "description": "A full recreation of an OpenAI Codex CLI session built from the Codex components on shadcn Base UI.",
  "dependencies": [
    "cn"
  ],
  "registryDependencies": [
    "button",
    "card",
    "collapsible",
    "input-group",
    "kbd",
    "scroll-area"
  ],
  "files": [
    {
      "path": "registry/notra/codex/components/codex-terminal.tsx",
      "content": "import { cn } from \"cn\";\n\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\n\nimport type { CodexTerminalProps } from \"../types/codex\";\n\nexport const CodexTerminal = ({\n  children,\n  className,\n  footer,\n  title,\n  ...props\n}: CodexTerminalProps) => (\n  <Card\n    className={cn(\n      \"bg-codex-bg font-codex text-codex-fg ring-codex-ring w-full gap-0 overflow-clip rounded-xl py-0 text-[0.8125rem] leading-[1.3] antialiased shadow-[0_1.5rem_3.5rem_-1rem_var(--codex-shadow)] ring-1\",\n      className\n    )}\n    data-slot=\"codex-terminal\"\n    {...props}\n  >\n    <CardHeader className=\"bg-codex-titlebar relative flex shrink-0 items-center justify-center gap-3 rounded-none px-3 py-2\">\n      <div\n        aria-hidden=\"true\"\n        className=\"absolute start-3 flex items-center gap-2\"\n      >\n        <span className=\"bg-codex-dot size-3 shrink-0 rounded-full\" />\n        <span className=\"bg-codex-dot size-3 shrink-0 rounded-full\" />\n        <span className=\"bg-codex-dot size-3 shrink-0 rounded-full\" />\n      </div>\n      {title && (\n        <CardTitle className=\"text-codex-title truncate px-16 text-xs leading-4 font-normal\">\n          {title}\n        </CardTitle>\n      )}\n    </CardHeader>\n    <ScrollArea className=\"min-h-0 flex-1\">\n      <CardContent className=\"flex flex-col gap-[1.3em] px-0 py-[1.3em]\">\n        {children}\n      </CardContent>\n    </ScrollArea>\n    {footer && <div className=\"shrink-0 pb-[0.65em]\">{footer}</div>}\n  </Card>\n);\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-terminal.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-header.tsx",
      "content": "import { cn } from \"cn\";\n\nimport {\n  CODEX_DEFAULT_CWD,\n  CODEX_DEFAULT_GREETING,\n  CODEX_DEFAULT_VERSION,\n  CODEX_ROW_CLASS,\n} from \"../constants/codex\";\nimport type { CodexHeaderProps } from \"../types/codex\";\n\nexport const CodexHeader = ({\n  className,\n  cwd = CODEX_DEFAULT_CWD,\n  greeting = CODEX_DEFAULT_GREETING,\n  version = CODEX_DEFAULT_VERSION,\n  ...props\n}: CodexHeaderProps) => (\n  <div\n    className={cn(CODEX_ROW_CLASS, \"text-codex-fg\", className)}\n    data-slot=\"codex-header\"\n    {...props}\n  >\n    <p className=\"col-start-2 min-w-0 wrap-break-word\">\n      <span className=\"text-codex-blue\">&gt;_ </span>\n      <span className=\"font-bold\">OpenAI Codex</span>\n      <span className=\"text-codex-muted\"> (v{version})</span>\n    </p>\n    <p className=\"text-codex-muted col-start-2 min-w-0 truncate ps-[3ch]\">\n      {cwd}\n    </p>\n    {greeting && (\n      <p className=\"text-codex-blue col-start-2 mt-[1.3em] min-w-0 wrap-break-word\">\n        {greeting}\n      </p>\n    )}\n  </div>\n);\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-header.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-message.tsx",
      "content": "import { cn } from \"cn\";\n\nimport { CODEX_ROW_CLASS } from \"../constants/codex\";\nimport type { CodexMessageProps } from \"../types/codex\";\n\nexport const CodexMessage = ({\n  children,\n  className,\n  from = \"assistant\",\n  ...props\n}: CodexMessageProps) => {\n  if (from === \"user\") {\n    return (\n      <div\n        className={cn(\n          CODEX_ROW_CLASS,\n          \"bg-codex-band text-codex-fg w-full py-[1.3em]\",\n          className\n        )}\n        data-from=\"user\"\n        data-slot=\"codex-message\"\n        {...props}\n      >\n        <span aria-hidden=\"true\" className=\"text-codex-dim\">\n          ›\n        </span>\n        <div className=\"min-w-0 wrap-break-word whitespace-pre-wrap\">\n          {children}\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <div\n      className={cn(CODEX_ROW_CLASS, \"text-codex-fg w-full\", className)}\n      data-from=\"assistant\"\n      data-slot=\"codex-message\"\n      {...props}\n    >\n      <span aria-hidden=\"true\" className=\"text-codex-muted\">\n        •\n      </span>\n      <div className=\"flex min-w-0 flex-col gap-[1.3em] wrap-break-word\">\n        {children}\n      </div>\n    </div>\n  );\n};\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-message.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-reasoning.tsx",
      "content": "import { cn } from \"cn\";\n\nimport { CODEX_ROW_CLASS } from \"../constants/codex\";\nimport type { CodexReasoningProps } from \"../types/codex\";\n\nexport const CodexReasoning = ({\n  children,\n  className,\n  ...props\n}: CodexReasoningProps) => (\n  <div\n    className={cn(CODEX_ROW_CLASS, \"text-codex-muted\", className)}\n    data-slot=\"codex-reasoning\"\n    {...props}\n  >\n    <span aria-hidden=\"true\">•</span>\n    <p className=\"min-w-0 font-bold wrap-break-word italic\">{children}</p>\n  </div>\n);\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-reasoning.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-exec.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"cn\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n  Collapsible,\n  CollapsibleContent,\n  CollapsibleTrigger,\n} from \"@/components/ui/collapsible\";\n\nimport {\n  CODEX_EXEC_PREVIEW_LINES,\n  CODEX_EXEC_STATUS_CLASS,\n  CODEX_EXEC_STATUS_LABEL,\n  CODEX_ROW_CLASS,\n  CODEX_SHELL_TOKEN_CLASS,\n} from \"../constants/codex\";\nimport { tokenizeShellCommand } from \"../lib/codex-shell\";\nimport type { CodexExecProps } from \"../types/codex\";\n\nexport const CodexShellCommand = ({ command }: { command: string }) =>\n  tokenizeShellCommand(command).map((token, index) => (\n    <span className={CODEX_SHELL_TOKEN_CLASS[token.kind]} key={index}>\n      {token.text}\n    </span>\n  ));\n\nexport const CodexExec = ({\n  className,\n  command,\n  output,\n  previewLines = CODEX_EXEC_PREVIEW_LINES,\n  status = \"ran\",\n  ...props\n}: CodexExecProps) => {\n  const lines = output ? output.split(\"\\n\") : [];\n  const preview = lines.slice(0, previewLines).join(\"\\n\");\n  const rest = lines.slice(previewLines);\n\n  return (\n    <Collapsible\n      className={cn(CODEX_ROW_CLASS, \"text-codex-fg\", className)}\n      data-slot=\"codex-exec\"\n      data-status={status}\n      {...props}\n    >\n      <span aria-hidden=\"true\" className={CODEX_EXEC_STATUS_CLASS[status]}>\n        •\n      </span>\n      <p className=\"min-w-0 truncate\">\n        <span className=\"font-bold\">{CODEX_EXEC_STATUS_LABEL[status]}</span>{\" \"}\n        <CodexShellCommand command={command} />\n      </p>\n      {lines.length > 0 && (\n        <div className=\"text-codex-muted col-start-2 grid min-w-0 grid-cols-[2ch_minmax(0,1fr)]\">\n          <span aria-hidden=\"true\">└</span>\n          <pre className=\"min-w-0 font-[inherit] whitespace-pre-wrap\">\n            {preview}\n          </pre>\n          {rest.length > 0 && (\n            <>\n              <CollapsibleContent className=\"col-start-2 min-w-0\">\n                <pre className=\"font-[inherit] whitespace-pre-wrap\">\n                  {rest.join(\"\\n\")}\n                </pre>\n              </CollapsibleContent>\n              <CollapsibleTrigger\n                className=\"col-start-2 justify-self-start\"\n                render={\n                  <Button\n                    className=\"text-codex-muted hover:text-codex-fg aria-expanded:text-codex-fg focus-visible:ring-codex-blue/60 h-auto rounded-xs p-0 text-start font-[inherit] text-[length:inherit] leading-[inherit] font-normal whitespace-normal hover:bg-transparent focus-visible:border-transparent focus-visible:ring-1 aria-expanded:bg-transparent dark:hover:bg-transparent\"\n                    variant=\"ghost\"\n                  />\n                }\n              >\n                <span className=\"in-data-panel-open:hidden\">\n                  {`+ ${rest.length} lines (click to expand)`}\n                </span>\n                <span className=\"hidden in-data-panel-open:inline\">\n                  − collapse\n                </span>\n              </CollapsibleTrigger>\n            </>\n          )}\n        </div>\n      )}\n    </Collapsible>\n  );\n};\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-exec.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-explored.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"cn\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n  Collapsible,\n  CollapsibleContent,\n  CollapsibleTrigger,\n} from \"@/components/ui/collapsible\";\n\nimport { CODEX_ROW_CLASS } from \"../constants/codex\";\nimport type { CodexExploredItem, CodexExploredProps } from \"../types/codex\";\n\nconst CodexExploredLine = ({\n  first,\n  item,\n}: {\n  first: boolean;\n  item: CodexExploredItem;\n}) => (\n  <li className=\"contents\">\n    <span aria-hidden=\"true\" className=\"text-codex-muted\">\n      {first ? \"└\" : \"\"}\n    </span>\n    <span className=\"min-w-0 truncate\">\n      <span className=\"text-codex-blue\">{item.verb}</span> {item.target}\n      {item.scope && (\n        <>\n          <span className=\"text-codex-muted\"> in </span>\n          {item.scope}\n        </>\n      )}\n    </span>\n  </li>\n);\n\nexport const CodexExplored = ({\n  active = false,\n  className,\n  details = [],\n  items,\n  ...props\n}: CodexExploredProps) => (\n  <Collapsible\n    className={cn(CODEX_ROW_CLASS, \"text-codex-fg\", className)}\n    data-slot=\"codex-explored\"\n    {...props}\n  >\n    <span\n      aria-hidden=\"true\"\n      className={cn(\n        \"text-codex-muted\",\n        active && \"animate-pulse motion-reduce:animate-none\"\n      )}\n    >\n      •\n    </span>\n    <p className=\"font-bold\">{active ? \"Exploring\" : \"Explored\"}</p>\n    <ul className=\"col-start-2 grid min-w-0 grid-cols-[2ch_minmax(0,1fr)]\">\n      {items.map((item, index) => (\n        <CodexExploredLine first={index === 0} item={item} key={item.id} />\n      ))}\n    </ul>\n    {details.length > 0 && (\n      <>\n        <CollapsibleContent className=\"col-start-2 min-w-0\">\n          <ul className=\"grid grid-cols-[2ch_minmax(0,1fr)]\">\n            {details.map((item) => (\n              <CodexExploredLine first={false} item={item} key={item.id} />\n            ))}\n          </ul>\n        </CollapsibleContent>\n        <CollapsibleTrigger\n          className=\"col-start-2 ms-[2ch] justify-self-start\"\n          render={\n            <Button\n              className=\"text-codex-muted hover:text-codex-fg aria-expanded:text-codex-fg focus-visible:ring-codex-blue/60 h-auto rounded-xs p-0 text-start font-[inherit] text-[length:inherit] leading-[inherit] font-normal whitespace-normal hover:bg-transparent focus-visible:border-transparent focus-visible:ring-1 aria-expanded:bg-transparent dark:hover:bg-transparent\"\n              variant=\"ghost\"\n            />\n          }\n        >\n          <span className=\"in-data-panel-open:hidden\">+ Show details</span>\n          <span className=\"hidden in-data-panel-open:inline\">\n            − Hide details\n          </span>\n        </CollapsibleTrigger>\n      </>\n    )}\n  </Collapsible>\n);\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-explored.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-working.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"cn\";\nimport { useEffect, useRef } from \"react\";\n\nimport {\n  CODEX_BULLET_BLINK_MS,\n  CODEX_ROW_CLASS,\n  CODEX_SHIMMER_MS,\n} from \"../constants/codex\";\nimport type { CodexInterruptedProps, CodexWorkingProps } from \"../types/codex\";\n\nexport const CodexWorking = ({\n  className,\n  elapsed = \"0s\",\n  label = \"Working\",\n  ...props\n}: CodexWorkingProps) => {\n  const labelRef = useRef<HTMLSpanElement>(null);\n  const bulletRef = useRef<HTMLSpanElement>(null);\n\n  useEffect(() => {\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) {\n      return;\n    }\n    const shimmer = labelRef.current?.animate(\n      [{ backgroundPosition: \"100% 0\" }, { backgroundPosition: \"0% 0\" }],\n      { duration: CODEX_SHIMMER_MS, iterations: Number.POSITIVE_INFINITY }\n    );\n    const blink = bulletRef.current?.animate(\n      [{ opacity: 1 }, { opacity: 0.35 }, { opacity: 1 }],\n      { duration: CODEX_BULLET_BLINK_MS, iterations: Number.POSITIVE_INFINITY }\n    );\n    return () => {\n      shimmer?.cancel();\n      blink?.cancel();\n    };\n  }, []);\n\n  return (\n    <div\n      className={cn(CODEX_ROW_CLASS, \"text-codex-dim\", className)}\n      data-slot=\"codex-working\"\n      role=\"status\"\n      {...props}\n    >\n      <span aria-hidden=\"true\" className=\"text-codex-fg\" ref={bulletRef}>\n        •\n      </span>\n      <p className=\"min-w-0 truncate\">\n        <span\n          className=\"bg-[linear-gradient(90deg,var(--codex-dim)_35%,var(--codex-fg)_50%,var(--codex-dim)_65%)] bg-size-[300%_100%] bg-clip-text bg-position-[100%_0] text-transparent\"\n          ref={labelRef}\n        >\n          {label}\n        </span>{\" \"}\n        ({elapsed} • <span className=\"text-codex-fg font-bold\">esc</span> to\n        interrupt)\n      </p>\n    </div>\n  );\n};\n\nexport const CodexInterrupted = ({\n  children = \"Conversation interrupted - tell the model what to do differently.\",\n  className,\n  ...props\n}: CodexInterruptedProps) => (\n  <div\n    className={cn(CODEX_ROW_CLASS, \"text-codex-red\", className)}\n    data-slot=\"codex-interrupted\"\n    role=\"status\"\n    {...props}\n  >\n    <span aria-hidden=\"true\">■</span>\n    <p className=\"min-w-0 wrap-break-word\">{children}</p>\n  </div>\n);\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-working.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-markdown.tsx",
      "content": "import { cn } from \"cn\";\nimport type { ComponentProps, ReactNode } from \"react\";\n\nimport type { CodexListProps, CodexTableProps } from \"../types/codex\";\n\nconst withTextKeys = <T,>(items: readonly T[], toText: (item: T) => string) => {\n  const seen = new Map<string, number>();\n  return items.map((item) => {\n    const text = toText(item);\n    const count = (seen.get(text) ?? 0) + 1;\n    seen.set(text, count);\n    return { item, key: `${text}#${count}` };\n  });\n};\n\nconst nodeText = (node: ReactNode): string =>\n  typeof node === \"string\" || typeof node === \"number\" ? String(node) : \"\";\n\nexport const CodexCode = ({ className, ...props }: ComponentProps<\"code\">) => (\n  <code\n    className={cn(\"text-codex-green font-[inherit]\", className)}\n    data-slot=\"codex-code\"\n    {...props}\n  />\n);\n\nexport const CodexList = ({ className, items, ...props }: CodexListProps) => (\n  <ul\n    className={cn(\"grid grid-cols-[2ch_minmax(0,1fr)]\", className)}\n    data-slot=\"codex-list\"\n    {...props}\n  >\n    {withTextKeys(items, nodeText).map(({ item, key }) => (\n      <li className=\"contents\" key={key}>\n        <span aria-hidden=\"true\">•</span>\n        <span className=\"min-w-0\">{item}</span>\n      </li>\n    ))}\n  </ul>\n);\n\nexport const CodexTable = ({\n  className,\n  codeColumns = [],\n  headers,\n  rows,\n  ...props\n}: CodexTableProps) => {\n  const codeColumnSet = new Set(codeColumns);\n\n  return (\n    <div className=\"-ms-[2ch] max-w-[calc(100%+2ch)] overflow-x-auto\">\n      <table\n        className={cn(\n          \"w-auto caption-bottom border-separate border-spacing-x-[2ch] border-spacing-y-0 text-start text-[length:inherit]\",\n          className\n        )}\n        data-slot=\"codex-table\"\n        {...props}\n      >\n        <thead>\n          <tr>\n            {headers.map((header) => (\n              <th\n                className=\"border-codex-rule text-codex-yellow border-b-2 px-[1ch] pb-[0.65em] text-start align-middle font-bold\"\n                key={header}\n                scope=\"col\"\n              >\n                {header}\n              </th>\n            ))}\n          </tr>\n        </thead>\n        <tbody>\n          {withTextKeys(rows, (row) => row.map(nodeText).join(\"|\")).map(\n            ({ item: row, key }) => (\n              <tr className=\"group/codex-row\" key={key}>\n                {row.map((cell, columnIndex) => (\n                  <td\n                    className={cn(\n                      \"border-codex-rule border-b px-[1ch] py-[0.65em] align-top group-last/codex-row:border-b-0\",\n                      codeColumnSet.has(columnIndex) && \"text-codex-green\"\n                    )}\n                    key={headers[columnIndex] ?? `extra-${columnIndex}`}\n                  >\n                    {cell}\n                  </td>\n                ))}\n              </tr>\n            )\n          )}\n        </tbody>\n      </table>\n    </div>\n  );\n};\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-markdown.tsx"
    },
    {
      "path": "registry/notra/codex/components/codex-composer.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"cn\";\nimport { useState } from \"react\";\nimport type { ChangeEvent, FormEvent, KeyboardEvent } from \"react\";\n\nimport {\n  InputGroup,\n  InputGroupAddon,\n  InputGroupInput,\n} from \"@/components/ui/input-group\";\nimport { Kbd } from \"@/components/ui/kbd\";\n\nimport {\n  CODEX_DEFAULT_CWD,\n  CODEX_DEFAULT_MODEL,\n  CODEX_DEFAULT_PLACEHOLDER,\n  CODEX_ROW_CLASS,\n} from \"../constants/codex\";\nimport type { CodexComposerProps } from \"../types/codex\";\n\nconst CodexDot = () => <span className=\"text-codex-dim\"> · </span>;\n\nconst CodexKey = ({ children }: { children: string }) => (\n  <Kbd className=\"text-codex-fg font-codex inline h-auto min-w-0 rounded-none bg-transparent p-0 text-[length:inherit] leading-[inherit] font-bold\">\n    {children}\n  </Kbd>\n);\n\nexport const CodexComposer = ({\n  \"aria-label\": ariaLabel,\n  busy = false,\n  className,\n  context,\n  cwd = CODEX_DEFAULT_CWD,\n  defaultValue,\n  effort,\n  inputClassName,\n  model = CODEX_DEFAULT_MODEL,\n  onChange,\n  onKeyDown,\n  onSend,\n  onStop,\n  placeholder = CODEX_DEFAULT_PLACEHOLDER,\n  task,\n  value,\n  warnings,\n  ...props\n}: CodexComposerProps) => {\n  const [draft, setDraft] = useState(String(defaultValue ?? \"\"));\n  const isControlled = value !== undefined;\n  const text = isControlled ? String(value) : draft;\n  const isEmpty = text.length === 0;\n  const [cursorChar = \" \", ...restChars] = Array.from(placeholder);\n\n  const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n    setDraft(event.target.value);\n    onChange?.(event);\n  };\n\n  const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n    if (event.key === \"Escape\" && busy && onStop) {\n      event.preventDefault();\n      onStop();\n    }\n    onKeyDown?.(event);\n  };\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const message = text.trim();\n    if (!message || busy || !onSend) {\n      return;\n    }\n    onSend(message);\n    if (!isControlled) {\n      setDraft(\"\");\n    }\n  };\n\n  return (\n    <form\n      className={cn(\n        \"font-codex text-codex-dim min-w-0 text-[0.8125rem] leading-[1.3]\",\n        className\n      )}\n      data-slot=\"codex-composer\"\n      onSubmit={handleSubmit}\n    >\n      <InputGroup\n        className={cn(\n          CODEX_ROW_CLASS,\n          \"bg-codex-composer dark:bg-codex-composer h-auto rounded-none border-0 py-[1.3em] has-[[data-slot=input-group-control]:focus-visible]:ring-0\"\n        )}\n      >\n        <InputGroupAddon className=\"text-codex-fg order-none cursor-text justify-start p-0 text-[length:inherit] leading-[inherit] font-bold\">\n          <span aria-hidden=\"true\">›</span>\n        </InputGroupAddon>\n        <div className=\"relative min-w-0\">\n          {isEmpty && (\n            <span\n              aria-hidden=\"true\"\n              className=\"text-codex-placeholder pointer-events-none absolute inset-0 truncate\"\n            >\n              <span className=\"bg-codex-cursor text-codex-fg\">\n                {cursorChar}\n              </span>\n              {restChars.join(\"\")}\n            </span>\n          )}\n          <InputGroupInput\n            aria-label={ariaLabel ?? placeholder}\n            className={cn(\n              \"text-codex-fg caret-codex-cursor h-auto p-0 font-[inherit] text-[0.8125rem] leading-[1.3] md:text-[0.8125rem]\",\n              isEmpty && \"caret-transparent\",\n              inputClassName\n            )}\n            autoComplete=\"off\"\n            enterKeyHint=\"send\"\n            onChange={handleChange}\n            onKeyDown={handleKeyDown}\n            type=\"text\"\n            value={text}\n            {...props}\n          />\n        </div>\n      </InputGroup>\n      <div className={cn(CODEX_ROW_CLASS, \"mt-[0.5em]\")}>\n        <p className=\"col-start-2 min-w-0 truncate\">\n          <span className=\"text-codex-yellow\">\n            {effort ? `${model} ${effort}` : model}\n          </span>\n          <CodexDot />\n          <span className=\"text-codex-green\">{cwd}</span>\n          {task && (\n            <>\n              <CodexDot />\n              <span className=\"text-codex-yellow\">{task}</span>\n            </>\n          )}\n        </p>\n        <div className=\"col-start-2 flex min-w-0 flex-wrap justify-between gap-x-[2ch]\">\n          <p>\n            <CodexKey>←</CodexKey> for agents\n            <CodexDot />\n            <CodexKey>?</CodexKey> for shortcuts\n          </p>\n          {warnings ? (\n            <p>\n              <span className=\"text-codex-amber\">\n                <span aria-hidden=\"true\" className=\"inline-block w-[1ch]\">\n                  ⚠\n                </span>\n                {` ${warnings} ${warnings === 1 ? \"warning\" : \"warnings\"}`}\n              </span>\n              <CodexDot />\n              <CodexKey>f2</CodexKey> to view\n            </p>\n          ) : (\n            context && <p>{context}</p>\n          )}\n        </div>\n      </div>\n    </form>\n  );\n};\n",
      "type": "registry:component",
      "target": "components/codex/components/codex-composer.tsx"
    },
    {
      "path": "registry/notra/codex/lib/codex-shell.ts",
      "content": "import type { CodexShellToken } from \"../types/codex\";\n\nconst SHELL_TOKEN_PATTERN =\n  /(\\s+)|('[^']*'?|\"[^\"]*\"?)|(&&|\\|\\||[|;<>])|([^\\s'\"|;&<>]+|&)/g;\n\nexport const tokenizeShellCommand = (command: string): CodexShellToken[] => {\n  const tokens: CodexShellToken[] = [];\n  let expectsCommand = true;\n\n  for (const match of command.matchAll(SHELL_TOKEN_PATTERN)) {\n    const [text, space, quoted, operator] = match;\n    if (space) {\n      tokens.push({ kind: \"space\", text });\n    } else if (quoted) {\n      tokens.push({ kind: \"string\", text });\n      expectsCommand = false;\n    } else if (operator) {\n      tokens.push({ kind: \"operator\", text });\n      expectsCommand = true;\n    } else if (expectsCommand) {\n      tokens.push({ kind: \"command\", text });\n      expectsCommand = false;\n    } else {\n      tokens.push({ kind: text.startsWith(\"-\") ? \"flag\" : \"argument\", text });\n    }\n  }\n\n  return tokens;\n};\n",
      "type": "registry:lib",
      "target": "components/codex/lib/codex-shell.ts"
    },
    {
      "path": "registry/notra/codex/constants/codex.ts",
      "content": "import type { CodexExecStatus } from \"../types/codex\";\n\nexport const CODEX_DEFAULT_VERSION = \"0.159.2\";\n\nexport const CODEX_DEFAULT_MODEL = \"gpt-6.1-codex\";\n\nexport const CODEX_DEFAULT_CWD = \"~/acme/web\";\n\nexport const CODEX_DEFAULT_PLACEHOLDER = \"Ask Codex to do anything\";\n\nexport const CODEX_DEFAULT_GREETING = \"Anything interesting on the docket?\";\n\nexport const CODEX_EXEC_PREVIEW_LINES = 3;\n\nexport const CODEX_SHIMMER_MS = 2000;\n\nexport const CODEX_BULLET_BLINK_MS = 1200;\n\nexport const CODEX_CHAT_TIMING = {\n  thinkMs: 1100,\n  execMs: 1000,\n  wordMs: 26,\n  reducedMaxMs: 60,\n  tickMs: 1000,\n} as const;\n\nexport const CODEX_EXEC_STATUS_LABEL: Record<CodexExecStatus, string> = {\n  failed: \"Ran\",\n  ran: \"Ran\",\n  running: \"Running\",\n};\n\nexport const CODEX_EXEC_STATUS_CLASS: Record<CodexExecStatus, string> = {\n  failed: \"text-codex-red\",\n  ran: \"text-codex-success\",\n  running: \"text-codex-muted animate-pulse motion-reduce:animate-none\",\n};\n\nexport const CODEX_SHELL_TOKEN_CLASS = {\n  argument: \"text-codex-arg\",\n  command: \"text-codex-command\",\n  flag: \"text-codex-flag\",\n  operator: \"text-codex-operator\",\n  space: \"\",\n  string: \"text-codex-green\",\n} as const;\n\nexport const CODEX_ROW_CLASS =\n  \"grid grid-cols-[2ch_minmax(0,1fr)] px-[1ch] font-codex text-[0.8125rem] leading-[1.3]\";\n",
      "type": "registry:lib",
      "target": "components/codex/constants/codex.ts"
    },
    {
      "path": "registry/notra/codex/constants/codex-demo.ts",
      "content": "import type {\n  CodexDemoExec,\n  CodexDemoSession,\n  CodexReply,\n} from \"../types/codex\";\n\nexport const CODEX_DEMO_SESSION: CodexDemoSession = {\n  composer: {\n    effort: \"low\",\n    model: \"gpt-6.1-codex\",\n    placeholder: \"Ask Codex to do anything\",\n    task: \"Draft changelog\",\n    warnings: 2,\n  },\n  exec: {\n    command:\n      \"git log --oneline --since='1 week' | rg -i 'feat|fix' && cat CHANGELOG.md\",\n    output: [\n      \"a41c9e2 feat(geo): track citations per model\",\n      \"7d02b18 fix(scheduler): retry failed publish jobs\",\n      \"c9e5f11 feat(studio): brand voice presets\",\n      \"4be0a7d fix(api): paginate /v1/posts past 100 items\",\n      \"91f3c20 fix(geo): dedupe prompts across projects\",\n      \"e03d6b4 feat(api): add /v1/citations endpoint\",\n      \"2c7a9f8 fix(ui): focus ring on the composer\",\n      \"## 2026-09-23\",\n      \"- Scheduler v2 with 40% faster builds\",\n    ].join(\"\\n\"),\n  },\n  explored: [\n    {\n      id: \"search-changelog\",\n      scope: \"CHANGELOG.md\",\n      target: \"changelog|release\",\n      verb: \"Search\",\n    },\n    { id: \"read-package\", target: \"package.json\", verb: \"Read\" },\n  ],\n  exploredDetails: [\n    { id: \"list-apps\", target: \"apps\", verb: \"List\" },\n    { id: \"read-readme\", target: \"apps/dashboard/README.md\", verb: \"Read\" },\n  ],\n  followUp: \"Want me to publish it to acme.com/changelog?\",\n  header: {\n    cwd: \"~/acme/web\",\n    version: \"0.159.2\",\n  },\n  highlights: [\n    {\n      id: \"citations\",\n      label: \"GEO citations:\",\n      text: \"See which sources each AI model cites for your tracked prompts.\",\n    },\n    {\n      id: \"voice\",\n      label: \"Brand voice presets:\",\n      text: \"Save a voice once and reuse it for every changelog and post.\",\n    },\n    {\n      id: \"scheduler\",\n      label: \"Scheduler:\",\n      text: \"Failed publish jobs now retry on their own.\",\n    },\n  ],\n  intro:\n    \"I'll check this week's merged commits and the current changelog, then draft the new entry.\",\n  reasoning: \"Grouping commits into features and fixes\",\n  summary: \"This week shipped 3 features and 4 fixes. Here is the draft:\",\n  table: {\n    headers: [\"Folder\", \"Change\"],\n    rows: [\n      [\"apps/dashboard\", \"Citations view on the GEO page\"],\n      [\"packages/geo-core\", \"Citation tracking per model\"],\n      [\"apps/api\", \"New /v1/citations endpoint\"],\n      [\"packages/ui\", \"Brand voice picker\"],\n    ],\n  },\n  tableIntro: \"The changes touch these parts of the repo:\",\n  title: \"codex — ~/acme/web\",\n  userMessage: \"what shipped this week? draft the changelog\",\n};\n\nexport const CODEX_DEMO_EXEC_STATES: CodexDemoExec[] = [\n  {\n    command: \"notra list_events --range week --json | jq '.[].title'\",\n    id: \"ran\",\n    output: [\n      '\"Scheduler v2\"',\n      '\"GEO citations\"',\n      '\"Brand voice presets\"',\n      '\"Paginate /v1/posts\"',\n      '\"Dedupe prompts\"',\n    ].join(\"\\n\"),\n    status: \"ran\",\n  },\n  {\n    command: \"notra create_post --type changelog --voice 'acme'\",\n    id: \"running\",\n    status: \"running\",\n  },\n  {\n    command: \"notra publish_post changelog\",\n    id: \"failed\",\n    output: \"error: missing NOTRA_API_KEY\",\n    status: \"failed\",\n  },\n];\n\nexport const CODEX_REPLIES: CodexReply[] = [\n  {\n    execs: [\n      {\n        command: \"notra publish_post changelog --site acme.com\",\n        id: \"publish\",\n        output: [\n          \"published changelog-2026-09-30\",\n          \"https://acme.com/changelog/2026-09-30\",\n        ].join(\"\\n\"),\n        status: \"ran\",\n      },\n    ],\n    text: \"Published. The entry is live at `acme.com/changelog/2026-09-30` and the RSS feed picked it up.\\n\\nWant a short post for LinkedIn as well?\",\n  },\n  {\n    execs: [\n      {\n        command: \"rg -n 'retry' packages/api/src/jobs\",\n        id: \"grep-retry\",\n        output: [\n          \"publish.ts:41:  const retry = createRetry({ attempts: 3 });\",\n          \"publish.ts:58:  await retry(() => sendToSite(post));\",\n          \"publish.test.ts:12:it('retries a failed publish', async () => {\",\n        ].join(\"\\n\"),\n        status: \"ran\",\n      },\n    ],\n    text: \"The retry lives in `packages/api/src/jobs/publish.ts`. Failed publish jobs retry three times with backoff, and `publish.test.ts` covers it.\",\n  },\n  {\n    execs: [\n      {\n        command: \"bun run test --filter api\",\n        id: \"tests\",\n        output: \"212 pass\\n0 fail\",\n        status: \"ran\",\n      },\n    ],\n    text: \"All 212 tests pass. Nothing is blocking the release.\",\n  },\n];\n",
      "type": "registry:lib",
      "target": "components/codex/constants/codex-demo.ts"
    },
    {
      "path": "registry/notra/codex/types/codex.ts",
      "content": "import type { ComponentProps, ReactNode } from \"react\";\n\nimport type { Card } from \"@/components/ui/card\";\nimport type { Collapsible } from \"@/components/ui/collapsible\";\n\nexport type CodexExecStatus = \"ran\" | \"running\" | \"failed\";\n\nexport type CodexMessageAuthor = \"user\" | \"assistant\";\n\nexport type CodexShellTokenKind =\n  | \"command\"\n  | \"flag\"\n  | \"string\"\n  | \"operator\"\n  | \"argument\"\n  | \"space\";\n\nexport interface CodexShellToken {\n  kind: CodexShellTokenKind;\n  text: string;\n}\n\nexport type CodexExploredVerb = \"Read\" | \"Search\" | \"List\";\n\nexport interface CodexExploredItem {\n  id: string;\n  scope?: string;\n  target: string;\n  verb: CodexExploredVerb;\n}\n\nexport interface CodexTerminalProps extends Omit<\n  ComponentProps<typeof Card>,\n  \"title\"\n> {\n  footer?: ReactNode;\n  title?: ReactNode;\n}\n\nexport interface CodexHeaderProps extends ComponentProps<\"div\"> {\n  cwd?: string;\n  greeting?: ReactNode;\n  version?: string;\n}\n\nexport interface CodexMessageProps extends ComponentProps<\"div\"> {\n  from?: CodexMessageAuthor;\n}\n\nexport interface CodexReasoningProps extends ComponentProps<\"div\"> {\n  children?: ReactNode;\n}\n\nexport interface CodexExecProps extends Omit<\n  ComponentProps<typeof Collapsible>,\n  \"children\"\n> {\n  command: string;\n  output?: string;\n  previewLines?: number;\n  status?: CodexExecStatus;\n}\n\nexport interface CodexExploredProps extends Omit<\n  ComponentProps<typeof Collapsible>,\n  \"children\"\n> {\n  active?: boolean;\n  details?: CodexExploredItem[];\n  items: CodexExploredItem[];\n}\n\nexport interface CodexWorkingProps extends ComponentProps<\"div\"> {\n  elapsed?: string;\n  label?: string;\n}\n\nexport interface CodexInterruptedProps extends ComponentProps<\"div\"> {\n  children?: ReactNode;\n}\n\nexport interface CodexTableProps extends ComponentProps<\"table\"> {\n  codeColumns?: number[];\n  headers: string[];\n  rows: ReactNode[][];\n}\n\nexport interface CodexListProps extends ComponentProps<\"ul\"> {\n  items: ReactNode[];\n}\n\nexport interface CodexComposerProps extends Omit<\n  ComponentProps<\"input\">,\n  \"className\" | \"type\"\n> {\n  /** A turn is running: Enter does not send and Escape calls `onStop`. */\n  busy?: boolean;\n  className?: string;\n  context?: string;\n  cwd?: string;\n  effort?: string;\n  inputClassName?: string;\n  model?: string;\n  /**\n   * Called with the trimmed text on Enter. An uncontrolled composer clears\n   * afterwards; with `value`, clear it yourself here.\n   */\n  onSend?: (text: string) => void;\n  /** Called on Escape while `busy`, to interrupt the running turn. */\n  onStop?: () => void;\n  task?: string;\n  warnings?: number;\n}\n\nexport interface CodexDemoExec {\n  command: string;\n  id: string;\n  output?: string;\n  status: CodexExecStatus;\n}\n\nexport interface CodexDemoHighlight {\n  id: string;\n  label: string;\n  text: string;\n}\n\nexport interface CodexDemoSession {\n  composer: {\n    effort: string;\n    model: string;\n    placeholder: string;\n    task: string;\n    warnings: number;\n  };\n  exec: {\n    command: string;\n    output: string;\n  };\n  explored: CodexExploredItem[];\n  exploredDetails: CodexExploredItem[];\n  followUp: string;\n  header: {\n    cwd: string;\n    version: string;\n  };\n  highlights: CodexDemoHighlight[];\n  intro: string;\n  reasoning: string;\n  summary: string;\n  table: {\n    headers: string[];\n    rows: string[][];\n  };\n  tableIntro: string;\n  title: string;\n  userMessage: string;\n}\n\nexport type CodexTurnStatus = \"working\" | \"streaming\" | \"done\" | \"interrupted\";\n\n/** A scripted answer the demo plays back when you send a prompt. */\nexport interface CodexReply {\n  /** Commands Codex runs before it answers, with their final status. */\n  execs: CodexDemoExec[];\n  /** The answer. Blank lines split paragraphs, backticks mark code. */\n  text: string;\n}\n\nexport interface CodexChatTurn {\n  execs: CodexDemoExec[];\n  id: string;\n  prompt: string;\n  reply: string;\n  status: CodexTurnStatus;\n}\n\nexport interface CodexChat {\n  busy: boolean;\n  /** Whole seconds since the running turn started. */\n  elapsed: number;\n  send: (text: string) => Promise<void>;\n  stop: () => void;\n  turns: CodexChatTurn[];\n}\n",
      "type": "registry:lib",
      "target": "components/codex/types/codex.ts"
    },
    {
      "path": "registry/notra/codex/hooks/use-codex-chat.ts",
      "content": "\"use client\";\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { CODEX_CHAT_TIMING } from \"../constants/codex\";\nimport type { CodexChat, CodexChatTurn, CodexReply } from \"../types/codex\";\n\nconst WORD_PATTERN = /(\\s+)/;\n\nconst REDUCED_MOTION_QUERY = \"(prefers-reduced-motion: reduce)\";\n\nconst wait = (ms: number) =>\n  new Promise<void>((resolve) => {\n    window.setTimeout(resolve, ms);\n  });\n\nexport const useCodexChat = (replies: readonly CodexReply[]): CodexChat => {\n  const [turns, setTurns] = useState<CodexChatTurn[]>([]);\n  const [activeId, setActiveId] = useState<string | null>(null);\n  const [startedAt, setStartedAt] = useState(0);\n  const [now, setNow] = useState(0);\n  const runRef = useRef(0);\n  const activeRef = useRef<string | null>(null);\n  const replyRef = useRef(0);\n\n  useEffect(() => {\n    if (!activeId) {\n      return;\n    }\n    const timer = window.setInterval(() => {\n      setNow(Date.now());\n    }, CODEX_CHAT_TIMING.tickMs);\n    return () => window.clearInterval(timer);\n  }, [activeId]);\n\n  useEffect(\n    () => () => {\n      runRef.current += 1;\n    },\n    []\n  );\n\n  const patch = useCallback(\n    (id: string, next: (turn: CodexChatTurn) => Partial<CodexChatTurn>) => {\n      setTurns((current) =>\n        current.map((turn) =>\n          turn.id === id ? { ...turn, ...next(turn) } : turn\n        )\n      );\n    },\n    []\n  );\n\n  const finish = useCallback(() => {\n    activeRef.current = null;\n    setActiveId(null);\n  }, []);\n\n  const stop = useCallback(() => {\n    const id = activeRef.current;\n    if (!id) {\n      return;\n    }\n    runRef.current += 1;\n    patch(id, (turn) => ({\n      execs: turn.execs.filter((exec) => exec.status !== \"running\"),\n      status: \"interrupted\",\n    }));\n    finish();\n  }, [finish, patch]);\n\n  const send = useCallback(\n    async (text: string) => {\n      const reply = replies[replyRef.current % replies.length];\n      if (activeRef.current || !reply) {\n        return;\n      }\n      replyRef.current += 1;\n      const run = runRef.current + 1;\n      runRef.current = run;\n      const alive = () => runRef.current === run;\n      const reduced = window.matchMedia(REDUCED_MOTION_QUERY).matches;\n      const delay = (ms: number) =>\n        wait(reduced ? Math.min(ms, CODEX_CHAT_TIMING.reducedMaxMs) : ms);\n      const start = Date.now();\n      const id = `turn-${start}`;\n\n      activeRef.current = id;\n      setActiveId(id);\n      setStartedAt(start);\n      setNow(start);\n      setTurns((current) => [\n        ...current,\n        { execs: [], id, prompt: text, reply: \"\", status: \"working\" },\n      ]);\n\n      await delay(CODEX_CHAT_TIMING.thinkMs);\n\n      for (const exec of reply.execs) {\n        if (!alive()) {\n          return;\n        }\n        const execId = `${id}-${exec.id}`;\n        patch(id, (turn) => ({\n          execs: [\n            ...turn.execs,\n            { command: exec.command, id: execId, status: \"running\" },\n          ],\n        }));\n        // react-doctor-disable-next-line react-doctor/async-await-in-loop -- commands run one after another\n        await delay(CODEX_CHAT_TIMING.execMs);\n        if (!alive()) {\n          return;\n        }\n        patch(id, (turn) => ({\n          execs: turn.execs.map((item) =>\n            item.id === execId ? { ...exec, id: execId } : item\n          ),\n        }));\n      }\n\n      if (!alive()) {\n        return;\n      }\n      patch(id, () => ({ status: \"streaming\" }));\n\n      let answer = \"\";\n      const words = reduced ? [reply.text] : reply.text.split(WORD_PATTERN);\n      for (const word of words) {\n        if (!alive()) {\n          return;\n        }\n        answer += word;\n        const snapshot = answer;\n        patch(id, () => ({ reply: snapshot }));\n        // react-doctor-disable-next-line react-doctor/async-await-in-loop -- words stream in order\n        await delay(CODEX_CHAT_TIMING.wordMs);\n      }\n\n      if (!alive()) {\n        return;\n      }\n      patch(id, () => ({ status: \"done\" }));\n      finish();\n    },\n    [finish, patch, replies]\n  );\n\n  return {\n    busy: activeId !== null,\n    elapsed: Math.max(0, Math.floor((now - startedAt) / 1000)),\n    send,\n    stop,\n    turns,\n  };\n};\n",
      "type": "registry:hook",
      "target": "components/codex/hooks/use-codex-chat.ts"
    },
    {
      "path": "registry/notra/codex/examples/codex-demo.tsx",
      "content": "\"use client\";\n\nimport { Fragment, useEffect, useRef } from \"react\";\n\nimport { CodexComposer } from \"../components/codex-composer\";\nimport { CodexExec } from \"../components/codex-exec\";\nimport { CodexExplored } from \"../components/codex-explored\";\nimport { CodexHeader } from \"../components/codex-header\";\nimport { CodexCode, CodexList, CodexTable } from \"../components/codex-markdown\";\nimport { CodexMessage } from \"../components/codex-message\";\nimport { CodexTerminal } from \"../components/codex-terminal\";\nimport { CodexInterrupted, CodexWorking } from \"../components/codex-working\";\nimport { CODEX_DEMO_SESSION, CODEX_REPLIES } from \"../constants/codex-demo\";\nimport { useCodexChat } from \"../hooks/use-codex-chat\";\nimport type { CodexChatTurn } from \"../types/codex\";\n\nconst PARAGRAPH_SEPARATOR = \"\\n\\n\";\n\nconst FOLLOW_THRESHOLD_PX = 48;\n\nconst CODE_PATTERN = /(`[^`]+`)/;\n\nconst CodexInline = ({ text }: { text: string }) => {\n  let offset = 0;\n  return text.split(CODE_PATTERN).map((part) => {\n    const key = `${offset}-${part}`;\n    offset += part.length;\n    return part.length > 2 && part.startsWith(\"`\") && part.endsWith(\"`\") ? (\n      <CodexCode key={key}>{part.slice(1, -1)}</CodexCode>\n    ) : (\n      <Fragment key={key}>{part}</Fragment>\n    );\n  });\n};\n\nconst CodexTurn = ({ turn }: { turn: CodexChatTurn }) => {\n  let offset = 0;\n  const paragraphs = turn.reply.split(PARAGRAPH_SEPARATOR).map((text) => {\n    const key = offset;\n    offset += text.length + PARAGRAPH_SEPARATOR.length;\n    return { key, text };\n  });\n\n  return (\n    <>\n      <CodexMessage from=\"user\">{turn.prompt}</CodexMessage>\n      {turn.execs.map(({ id, ...exec }) => (\n        <CodexExec key={id} {...exec} />\n      ))}\n      {turn.reply && (\n        <CodexMessage>\n          {paragraphs.map((paragraph) => (\n            <p key={paragraph.key}>\n              <CodexInline text={paragraph.text} />\n            </p>\n          ))}\n        </CodexMessage>\n      )}\n      {turn.status === \"interrupted\" && <CodexInterrupted />}\n    </>\n  );\n};\n\nexport default function CodexDemo() {\n  const session = CODEX_DEMO_SESSION;\n  const chat = useCodexChat(CODEX_REPLIES);\n  const terminalRef = useRef<HTMLDivElement>(null);\n  const followRef = useRef(false);\n\n  const viewportOf = () =>\n    terminalRef.current?.querySelector<HTMLElement>(\n      '[data-slot=\"scroll-area-viewport\"]'\n    );\n\n  useEffect(() => {\n    const viewport = viewportOf();\n    if (!viewport) {\n      return;\n    }\n    const handleScroll = () => {\n      followRef.current =\n        viewport.scrollHeight - viewport.scrollTop - viewport.clientHeight <\n        FOLLOW_THRESHOLD_PX;\n    };\n    handleScroll();\n    viewport.addEventListener(\"scroll\", handleScroll, { passive: true });\n    return () => viewport.removeEventListener(\"scroll\", handleScroll);\n  }, []);\n\n  useEffect(() => {\n    if (!followRef.current) {\n      return;\n    }\n    const viewport = viewportOf();\n    viewport?.scrollTo({ top: viewport.scrollHeight });\n  }, [chat.turns, chat.busy]);\n\n  const handleSend = (text: string) => {\n    followRef.current = true;\n    return chat.send(text);\n  };\n\n  return (\n    <div className=\"w-full min-w-0\">\n      <CodexTerminal\n        className=\"h-170\"\n        footer={\n          <>\n            {chat.busy && (\n              <CodexWorking\n                className=\"pb-[0.65em]\"\n                elapsed={`${chat.elapsed}s`}\n              />\n            )}\n            <CodexComposer\n              busy={chat.busy}\n              cwd={session.header.cwd}\n              effort={session.composer.effort}\n              model={session.composer.model}\n              onSend={handleSend}\n              onStop={chat.stop}\n              placeholder={session.composer.placeholder}\n              task={session.composer.task}\n              warnings={session.composer.warnings}\n            />\n          </>\n        }\n        ref={terminalRef}\n        title={session.title}\n      >\n        <CodexHeader {...session.header} />\n        <CodexMessage from=\"user\">{session.userMessage}</CodexMessage>\n        <CodexMessage>{session.intro}</CodexMessage>\n        <CodexExec {...session.exec} />\n        <CodexExplored\n          details={session.exploredDetails}\n          items={session.explored}\n        />\n        <CodexMessage>\n          <p>{session.summary}</p>\n          <CodexList\n            items={session.highlights.map((highlight) => (\n              <Fragment key={highlight.id}>\n                <strong>{highlight.label}</strong> {highlight.text}\n              </Fragment>\n            ))}\n          />\n          <p>{session.tableIntro}</p>\n          <CodexTable codeColumns={[0]} {...session.table} />\n          <p>{session.followUp}</p>\n        </CodexMessage>\n        {chat.turns.map((turn) => (\n          <CodexTurn key={turn.id} turn={turn} />\n        ))}\n      </CodexTerminal>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/codex/examples/codex-demo.tsx"
    }
  ],
  "cssVars": {
    "theme": {
      "color-codex-bg": "var(--codex-bg)",
      "color-codex-titlebar": "var(--codex-titlebar)",
      "color-codex-dot": "var(--codex-dot)",
      "color-codex-title": "var(--codex-title)",
      "color-codex-shadow": "var(--codex-shadow)",
      "color-codex-ring": "var(--codex-ring)",
      "color-codex-fg": "var(--codex-fg)",
      "color-codex-dim": "var(--codex-dim)",
      "color-codex-muted": "var(--codex-muted)",
      "color-codex-rule": "var(--codex-rule)",
      "color-codex-band": "var(--codex-band)",
      "color-codex-composer": "var(--codex-composer)",
      "color-codex-placeholder": "var(--codex-placeholder)",
      "color-codex-cursor": "var(--codex-cursor)",
      "color-codex-blue": "var(--codex-blue)",
      "color-codex-command": "var(--codex-command)",
      "color-codex-arg": "var(--codex-arg)",
      "color-codex-operator": "var(--codex-operator)",
      "color-codex-flag": "var(--codex-flag)",
      "color-codex-green": "var(--codex-green)",
      "color-codex-success": "var(--codex-success)",
      "color-codex-yellow": "var(--codex-yellow)",
      "color-codex-amber": "var(--codex-amber)",
      "color-codex-red": "var(--codex-red)",
      "font-codex": "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace"
    },
    "light": {
      "codex-bg": "#ffffff",
      "codex-titlebar": "#ececec",
      "codex-dot": "#d4d4d4",
      "codex-title": "#00000073",
      "codex-shadow": "#00000026",
      "codex-ring": "#0000001a",
      "codex-fg": "#1a1a1a",
      "codex-dim": "#5c5c5c",
      "codex-muted": "#767676",
      "codex-rule": "#e0e0e0",
      "codex-band": "#f0f0f0",
      "codex-composer": "#f3f3f3",
      "codex-placeholder": "#8a8a8a",
      "codex-cursor": "#d6006a",
      "codex-blue": "#0a6fd6",
      "codex-command": "#1f5fbf",
      "codex-arg": "#3d4f8f",
      "codex-operator": "#0f7f70",
      "codex-flag": "#c0364d",
      "codex-green": "#1f8a3a",
      "codex-success": "#00852a",
      "codex-yellow": "#8f6200",
      "codex-amber": "#8a6420",
      "codex-red": "#d12f2f"
    },
    "dark": {
      "codex-bg": "#0f0f0f",
      "codex-titlebar": "#1c1c1c",
      "codex-dot": "#3a3a3a",
      "codex-title": "#ffffff66",
      "codex-shadow": "#00000033",
      "codex-ring": "#ffffff00",
      "codex-fg": "#f7f7f7",
      "codex-dim": "#909090",
      "codex-muted": "#777777",
      "codex-rule": "#343434",
      "codex-band": "#2d2d2d",
      "codex-composer": "#252525",
      "codex-placeholder": "#868686",
      "codex-cursor": "#fc0076",
      "codex-blue": "#3c9ffc",
      "codex-command": "#70abfa",
      "codex-arg": "#c3cff4",
      "codex-operator": "#6cdfcd",
      "codex-flag": "#f3909f",
      "codex-green": "#85df8d",
      "codex-success": "#00a12e",
      "codex-yellow": "#fcdb9b",
      "codex-amber": "#be9952",
      "codex-red": "#ff6b6b"
    }
  },
  "type": "registry:block"
}