Commit Graph

33 Commits

Author SHA1 Message Date
Tyler Slaton e711ff8e00 docs(channels): restore global reference 2026-07-28 21:03:55 -04:00
Tyler Slaton 7fb85c5958 fix(docs): address Channels review feedback 2026-07-28 17:00:08 -04:00
Tyler Slaton 6c15645b6b docs: organize Channels guides by provider and framework 2026-07-27 23:50:31 -04:00
Tyler Slaton 440e3acd4f docs(channels): use Channels SDK naming 2026-07-13 13:08:24 -07:00
Benjamin Taylor b394f06fdc refactor(channels): rename @copilotkit/bot* packages to @copilotkit/channels* (OSS-438)
Renames the Bots SDK to the Channels SDK. Names only — no behavior change.

- 8 packages @copilotkit/bot* -> @copilotkit/channels* (git mv dirs, names,
  workspace: cross-deps). Now includes @copilotkit/bot-intelligence ->
  @copilotkit/channels-intelligence (landed on main via #5761; unpublished, so
  renamed fresh with the family).
- release.config.json scope keys + versionSource; ReleaseScope union;
  canary/stable-release/publish-release scope dropdowns; verify script
- examples/slack (Kite) + examples/teams: deps, jsxImportSource, imports
- showcase/shell-docs: content dirs docs/bots->docs/channels and
  reference/bot->reference/channels, nav registry, redirects

createBot and other API names unchanged. Old @copilotkit/bot* to be deprecated
after the new packages publish (bot-intelligence was never published).

Re-derived onto latest main (was conflicting after #5761 landed).

Refs OSS-438
2026-07-08 13:27:35 -05:00
Sam Julien 4d90fb7f11 docs(shell-docs): ungate Slack and Teams docs 2026-06-26 14:33:19 -07:00
Austin Merrick fb246ebbd7 docs(angular): add @copilotkit/angular reference documentation
Add an Angular SDK section to the reference docs (OSS-251), mirroring the
React and Vue references. Registers Angular in the reference infrastructure
(new Services and Directives categories, version selector label, subdir map,
overview card) and adds an index plus 17 pages covering provideCopilotKit and
the config/label functions, the CopilotKit service, injectAgentStore and
context APIs, tool registration (frontend, render, human-in-the-loop), the
CopilotKitAgentContext directive, and the prebuilt chat components.

All pages are written against the actual @copilotkit/angular source, use the
correct package name and top-level imports, and surface in llms.txt and
llms-full.txt.
2026-06-19 13:36:34 -07:00
Austin Merrick 0c59e6bf60 feat(docs): add @copilotkit/vue reference documentation (OSS-323)
Adds the @copilotkit/vue v2 API reference to shell-docs: 9 component pages
(CopilotKitProvider, CopilotChat, CopilotChatView, CopilotChatInput,
CopilotChatMessageView, CopilotChatAssistantMessage, CopilotChatUserMessage,
CopilotPopup, CopilotSidebar) and 14 composable pages (useAgent, useAgentContext,
useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration,
useCopilotKit, useDefaultRenderTool, useFrontendTool, useHumanInTheLoop,
useInterrupt, useRenderTool, useSuggestions, useThreads), an index page, and
wiring into the reference version selector. Every documented API was verified
against packages/vue/src/v2.
2026-06-18 13:04:28 -07:00
Austin Merrick cf5126a04e docs(shell-docs): add @copilotkit/react-native reference documentation
Adds a "React Native" SDK to the reference section, documenting the full
public surface of @copilotkit/react-native at /reference/react-native.

Navigation wiring:
- Register `react-native` in REFERENCE_VERSIONS / VERSION_SUBDIRS
- Add the "React Native" label to the SDK version selector
- Add a React Native card to the reference overview page

Content (22 pages, sourced from package source for accuracy):
- index: install, polyfills, provider setup, and the headless vs prebuilt
  two-tier model
- components: CopilotKitProvider, CopilotChat, CopilotModal, CopilotSidebar,
  CopilotPopup, CopilotMarkdown, AssistantMessage, UserMessage — disambiguating
  the headless (root) and prebuilt-UI (/components) variants of CopilotChat and
  CopilotModal by import path
- hooks: RN-specific useAttachments and useRenderTool, plus the platform-
  agnostic hooks re-exported from react-core/v2 adapted to RN imports and
  primitives (useAgent, useCopilotKit, useFrontendTool, useAgentContext,
  useThreads, useCapabilities, useComponent, useHumanInTheLoop, useInterrupt,
  useSuggestions, useConfigureSuggestions)

Content is picked up automatically by llms.txt / llms-full.txt via the
reference content walker.

OSS-250
2026-06-12 11:37:55 -07:00
Tyler Slaton a028b5fb91 feat(shell-docs): gate Slack docs behind early-access password
Blur the Slack guide (/slack and its framework-scoped variants) and the
entire bot reference section behind a client-side unlock card. The card
follows the scroll in a sticky scrollport-height frame, persists unlock
state in localStorage, and leaves the sidebar and top nav usable. Doc
pages opt in via earlyAccess frontmatter; the bot reference gates on
version === "bot". Visitors without the password get a product shot
(light/dark variants in git LFS, shown beside the form on wide cards
via container query) and a link to the beyond-the-web early-access
form.
2026-06-11 13:18:11 -07:00
Tyler Slaton d980837075 Merge branch 'main' of github.com:CopilotKit/CopilotKit into codex/shell-docs-latest-main
# Conflicts:
#	showcase/shell-docs/src/lib/reference-items.ts
2026-06-10 21:33:24 -07:00
Tyler Slaton 63e3557af5 fix(shell-docs): polish docs UI pass 2026-06-10 21:17:40 -07:00
Tyler Slaton a8d43a9c2e docs(shell-docs): Slack platform quickstart + Bots API reference
- New Platforms entry: /platform/slack quickstart — manifest-based app
  creation, Socket Mode tokens, minimal createBot bot run with tsx,
  interactive JSX with inline onClick, slash commands, production split
- New "Bots" SDK tab in the reference picker with per-symbol pages for
  @copilotkit/bot, @copilotkit/bot-ui, and @copilotkit/bot-slack
  (Components / Functions / Classes / Types)
- Rename reference picker labels to React (V2) / React (V1)
- Remove the retired /reference/sdk pages (LangGraph/CrewAI SDK,
  Remote Endpoints); search/sitemap/llms indexes derive from the
  content tree, so they de-index with the deletion
- Retarget the one inbound link to its /reference/v1 copy

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-10 16:33:15 -07:00
Tyler Slaton ca6115850b docs: unify theme (#5269)
Our previous doc site had a fumadocs/shadcn theme that was a bit
hodge-podge. This brings all of it into one clean and visually appealing
design. The border radii are standardized, colors are standardized and
bunch of passes for mobile/tablet have been done. An added bonus is that
the header nav has been redone to feel more natural to the eyes.

<img width="1850" height="1256" alt="Screenshot 2026-06-05 at 7 48
00 AM"
src="https://github.com/user-attachments/assets/0c6032f2-e406-4e51-9c31-d69a9d258d61"
/>
2026-06-05 08:19:55 -07:00
Tyler Slaton 563d8a7986 docs(shell-docs): align docs page rendering
Updates the shell-docs route wrappers, MDX component chrome, page actions, snippets, and registry rendering so content pages inherit the refreshed theme and responsive sizing consistently.

Call-site enumeration:

- DocsPageView and mdx-components remain the route-level rendering path for docs, framework, AG-UI, and reference pages.

- CopyButton/Snippet/PropertyReference changes stay within MDX-rendered content surfaces.
2026-06-05 07:38:53 -07:00
github-actions[bot] 601e7f17dc style: auto-fix formatting 2026-06-02 18:49:04 +00:00
Austin Merrick 83769e17ee fix(shell-docs): render reference code blocks with syntax highlighting
The reference route rendered fenced code blocks as bare, unstyled
<pre> (no highlighting, no copy button) because its MDXRemote call
omitted the rehypeCode plugin and the pre: MdxCodeBlock override that
the main docs pipeline uses. Wire both in (verbatim from the framework
route) so reference code blocks match the rest of the docs. Fixes
rendering for all reference SDKs (React v2/v1 + Core).
2026-06-02 11:46:44 -07:00
Austin Merrick 987d4892d6 feat(shell-docs): add @copilotkit/core to the reference SDK picker
Introduces a third SDK in the reference docs alongside React v2 and v1:
- reference-items.ts: add the 'core' version, generalize root-vs-nested
  routing, add 'types'/'enums' subdirs + categories, recognize a core/
  slug prefix (literal strip), and emit its static params
- reference-version-selector.tsx: relabel the picker as an SDK switch
  (React v2 / React v1 / Core (TypeScript)), import ReferenceVersion from
  reference-items, give listbox options role=option/aria-selected
- app/reference/page.tsx: rename 'API Reference' to 'Overview' and add a
  'Choose your SDK' card chooser
2026-06-02 09:12:16 -07:00
github-actions[bot] 70cb273edb style: auto-fix formatting 2026-05-28 20:43:26 +00:00
Tyler Slaton ec239b15f7 Add v1 reference selector and content 2026-05-28 13:25:39 -07:00
Sam Julien e8957c66f0 fix(shell-docs): emit full per-page metadata, fix OG fonts, return real 404
Three post-cutover SEO/social gaps surfaced once docs.copilotkit.ai
pointed at shell-docs:

- `generateMetadata` in the four catch-all routes returned only the
  canonical link, so every page inherited the layout's generic title
  and description and zero og/twitter tags shipped. Every share unfurled
  bare. Routes now build full Metadata via a shared helper
  (`src/lib/seo-metadata.ts`) that reads MDX frontmatter for title and
  description and emits openGraph + twitter card with absolute URLs.

- The `/og/<slug>` route fetched Inter TTFs from fonts.gstatic.com on
  every request. Any failure tripped the catch block, which 307'd to a
  broken CDN fallback. Removed the runtime font fetch and let Satori
  fall back to its built-in sans-serif; also broadened the slug
  resolution to try the framework-scoped `integrations/<folder>/<slug>`
  path so OG images render for framework variants too. Catch block now
  surfaces real failures as 500 instead of redirecting to a broken PNG.

- Unknown URLs returned HTTP 200 with a not-found UI body (soft-404).
  Root cause was a `<Suspense fallback={null}>` wrapper in the root
  layout that committed the response stream before page-level
  `notFound()` could set the 404 status. Removed the Suspense, added an
  explicit `src/app/not-found.tsx`, and marked the catch-all routes
  `force-dynamic` so unknown slugs always re-evaluate at request time.
  Verified locally: `/this-clearly-does-not-exist` returns HTTP 404,
  `/built-in-agent/quickstart` returns HTTP 200 with full meta tags.
2026-05-22 16:36:17 -07:00
Tyler Slaton b30e01ad81 feat(shell-docs): adopt Fumadocs UI + floating sidebar + Shiki code chrome
Rebuild the shell-docs chrome on top of Fumadocs UI primitives and ship the
visual polish pass that replaces the legacy custom chrome.

- Fumadocs adoption: route every docs page (home, framework-scoped, ag-ui)
  through a shared ShellDocsLayout that wraps DocsLayout / DocsPage with
  the project's nav slot, sidebar config, scroll preserver, and content
  wrapper. Swap custom tabs/code-block components for Fumadocs's Tabs,
  CodeBlock, Pre, CodeBlockTabs, DynamicCodeBlock — Snippet and DemoSource
  now share the same chrome as authored fenced blocks.
- Syntax highlighting: replace rehype-highlight + hand-rolled hljs CSS
  with Fumadocs's Shiki-based rehypeCode in all three MDX renderers and
  in mdx-registry-loader. A tiny `transformerMeta` Shiki transformer
  surfaces fence title= / language as data-attrs so MdxCodeBlock can
  render the file-path figcaption + floating copy button.
- Sidebar: floats on all four viewport edges (rounded-2xl, 0.75rem inset,
  light-gray border), framework picker pill is rounded-xl with symmetric
  padding above/below, sticky picker bg matches the panel surface.
  Section headers render in normal caps (no more uppercase shouting), with
  scroll position preserved across navigations via SidebarScrollPreserver.
- Navbar: bg flips to `--bg`, full-width inset matches the sidebar,
  search trigger drops its border and the entire right-wing pill is the
  click target.
- Code chrome: figure surface forced to plain white in light and the
  matching dark in dark, shadow stripped, figcaption divider uses
  `--border` (was `currentColor` from `text-fd-muted-foreground`). Scoped
  the `.reference-content code` chip-bg rule to `:not(pre)` so block
  code bodies no longer pick up the gray inline-chip background.
- Content area: 49px (3.0625rem) of left/right padding so the article
  column has visible breathing room from both the floating sidebar and
  the viewport edge.
- IA: meta.json restructure for /docs (Build Generative UI section,
  controlled/declarative/open-ended folders, A2UI lifted to its own
  folder with an index page, Migrate moved under Other), Concepts content
  rewrite, snippet/region cleanups.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 18:20:48 -07:00
Sam Julien a00c4bf9b8 fix(shell-docs): replicate canonical page layout architecture (fixed-height body, internal scroll on content wrapper, sidebar pinning, TOC inside wrapper, route shells) 2026-05-08 11:49:04 -07:00
Sam Julien aa65c89213 feat(shell-docs): add sitemap, robots, and per-framework self-canonical metadata
Phase 3 of the docs.copilotkit.ai cutover: surface a complete sitemap,
basic robots config, and per-framework self-canonical metadata so each
URL variant (bare /quickstart, /langgraph-python/quickstart,
/agno/quickstart, etc.) is indexed under its own canonical rather than
collapsing onto a single root.

- src/app/sitemap.ts: emit one entry per (root URL, framework variant)
  pair plus reference and AG-UI sections. lastModified resolves from
  MDX frontmatter `lastmod`, then file mtime, then now. Strips Next.js
  route-group `(name)` segments and trailing `/index` so URLs match
  what the routers actually serve.
- src/app/robots.ts: allow all, disallow /api/, sitemap pointer at
  ${NEXT_PUBLIC_BASE_URL}/sitemap.xml.
- src/lib/sitemap-helpers.ts: shared MDX walking + base-URL resolution
  used by both metadata routes.
- generateMetadata() on the four catch-all docs routes
  ([[...slug]], [framework]/[[...slug]], reference/[...slug],
  ag-ui/[[...slug]]) sets `alternates.canonical` to the page's own
  full URL. Per-framework self-canonical, NOT root canonical.
- .env.example: document NEXT_PUBLIC_BASE_URL and NEXT_PUBLIC_SHELL_URL.
- next.config.ts: extend the existing NEXT_PUBLIC_BASE_URL doc comment
  with the new sitemap/robots/canonical consumers.
2026-05-07 09:55:33 -07:00
Sam Julien 14469bedf4 feat(shell-docs): add useThreads at canonical reference path + content parity
The useThreads page existed in shell-docs at
\`src/content/docs/reference/v2/hooks/useThreads.mdx\` but that tree
isn't routed — the canonical reference renderer reads from
\`src/content/reference/\`, not \`src/content/docs/reference/\`. As a
result \`/reference/hooks/useThreads\` 404'd while the upstream docs
have had a working useThreads page for weeks.

Moves the page to the canonical location so it resolves at
\`/reference/hooks/useThreads\`, and pulls the rest of the threads
content stack into parity with upstream:

- Add \`OpsPlatformCTA\` to the reference renderer's component map so
  hook reference pages can host sign-up CTAs (used here on useThreads
  itself).
- Recreate useThreads at the canonical path. Drops the
  \`<ThreadsEarlyAccess>\` wrapper (canonical reference dir doesn't use
  it — threads is GA, no banner) and the \`doc_type: reference\`
  frontmatter field (canonical hooks use plain title + description).
  Keeps the local additions: \`<OpsPlatformCTA>\` placement and the
  \`lastRunAt\` PropertyReference (deliberately kept per commit
  9f18b50f0).
- Fix cross-links to useThreads in threads.mdx and the shared snippet
  to point at the canonical \`/reference/hooks/useThreads\` instead of
  the broken \`/reference/v2/hooks/useThreads\`.
- Bump the prerequisite from \`@copilotkit/react-core v1.50+\` to
  \`v1.56+\` in threads.mdx and the shared snippet to match upstream.

Out of scope: the broader \`/reference/v2/hooks/\<Name\>\` broken-link
problem across other shell-docs pages (useFrontendTool, useAgent,
etc. — same dirname mismatch but for hooks unrelated to this PR).
That's tracked under PDX-103 / PDX-84.

Page-structure differences from upstream are preserved per the
shell-docs IA decision to drop the \`learn/\` concept: \`learn/threads\`
stays \`premium/threads-explained\`, \`learn/intelligence-platform\`
stays \`premium/intelligence-platform\`, \`learn/tutorials/...\` stays
\`tutorials/...\`.
2026-05-05 11:55:02 -07:00
Jordan Ritter 9b05ed41b3 feat(showcase/shell-docs): error boundary consolidation + docs components
Drop error-boundary-card in favour of Next.js error.tsx at each route,
refresh docs components (brand-nav, docs-callout, docs-page-view,
docs-steps, docs-tabs, framework-provider/selector/tabs,
property-reference, router-pivot, sidebar-link, snippet), update
docs-render + mdx-registry + reference-items for the new QA shape.
2026-04-22 11:00:46 -07:00
Jordan Ritter e84f1f34cd fix(shell-docs): route-level content handling and navigation correctness
A cluster of UX correctness fixes across the page handlers and
the shared brand nav:

- Filter out undeployed frameworks before rendering so the route
  doesn't produce blank pages that users can reach via stale links.
- Strip the leading body H1 with a CRLF-safe regex that only matches
  when the body H1 equals the frontmatter title — mirrors ag-ui
  route behavior so two stacked titles never render.
- Reference routes now titleCase the slug and resolve via the
  index.mdx fallback, matching the directory-plus-index layout the
  docs source uses.
- ag-ui title resolver gains a fallback so deep slugs without a
  matching registry entry still produce a reasonable title instead
  of crashing.
- brand-nav builds the mobile link href dynamically so it points at
  the current framework rather than a hard-coded placeholder.
2026-04-20 22:20:44 -07:00
Jordan Ritter 4ca108ada0 fix(showcase/shell-docs): reference breadcrumb Title-Cases; category list derived from items
- Replace the className="capitalize" breadcrumb span (which only
  cased the first character, rendering my-component as
  My-component) with an explicit titleCase helper that splits on
  hyphens and capitalizes each segment (finding #12).
- Derive the sidebar category list from loadAllReferenceItems
  instead of hardcoding ["Components", "Hooks"]. A new
  REFERENCE_SUBDIRS entry in reference-items.ts now shows up
  automatically without a second edit here (finding #13).
2026-04-20 19:41:50 -07:00
github-actions[bot] 1e5dfb4b4b style: auto-fix formatting 2026-04-21 00:28:09 +00:00
Jordan Ritter 9a978efec6 refactor(showcase/shell-docs): reuse docs-render stripLeadingImports instead of fence-aware duplicate
The ag-ui and reference pages each carried their own near-identical
stripImportsFenceAware copy with a TODO(dedup) flag. The canonical
implementation already exists in docs-render.tsx as stripLeadingImports
and has better semantics — it only strips imports that appear in the
top-of-file header region (before the first non-import content line),
rather than any import anywhere outside a fence. That distinction
matters for doc bodies that legitimately discuss imports in prose
outside code fences.

Export stripLeadingImports from docs-render and point both pages at it;
remove the local duplicates.
2026-04-20 17:17:37 -07:00
Jordan Ritter 6edd8836ad fix(showcase/shell-docs): docs-render CRLF-safe frontmatter + fence marker stored fully
Accept \r?\n in extractFrontmatter so Windows-authored MDX files
don't silently skip frontmatter extraction. In stripLeadingImports,
store the full fence marker (``` or ~~~) rather than its first
character so a stray single backtick inside a fenced block doesn't
prematurely close it.
2026-04-20 17:13:09 -07:00
Jordan Ritter a21efbdcc6 refactor(showcase/shell-docs): reference pages share loadItems helper + recursive static params + guarded reads
- Extract duplicated loadItems/getAllItems into @/lib/reference-items so the
  /reference index page and the /reference/[...slug] page read the same
  tree the same way (same subdirs, same walker, same gray-matter path,
  same caching).
- Walker is now recursive: subfolder files like components/inputs/textarea.mdx
  are indexed and statically generated. Previously only top-level .mdx
  files under components/ and hooks/ were picked up.
- Wrap gray-matter and fs reads in try/catch per file: a single malformed
  frontmatter block no longer crashes the whole static-generation pass —
  we log the offending path and skip that file.
- Fence-aware import stripper in the slug page so code samples containing
  import ... lines inside fences are not corrupted. (Duplicated inline
  here and in ag-ui page with a TODO(dedup) marker pointing at a future
  shared helper in @/lib/docs-render.)
- loadReferenceItems memoizes in production (module-scope cache keyed by
  subdir). Dev bypasses the cache so edits show up without a server
  restart.
2026-04-20 16:53:03 -07:00
Jordan Ritter fc80501048 feat(showcase): move MDX docs routes + components + libs + content into shell-docs
Extracts everything that exists to render MDX documentation (docs/[[...slug]],
[framework]/[[...slug]], ag-ui/[[...slug]], reference/[...slug]) out of shell
into the new shell-docs package that will serve docs.showcase.copilotkit.ai.

Moves (git mv preserves history):
  - App routes: /docs, /[framework], /ag-ui, /reference
  - Docs-only components: docs-page-view, docs-callout, docs-steps, docs-tabs,
    mdx-components, framework-tabs, framework-selector, sidebar-*, snippet,
    property-reference, router-pivot, stored-framework-highlight, react/*
  - Docs-only libs: lib/docs-render, lib/mdx-registry
  - All content: content/docs, content/ag-ui, content/reference, content/snippets
  - .docs-sync-sha marker (follows the content)

Duplicates into shell-docs (both shells need them):
  - brand-nav, search-modal, search-trigger, copy-button, framework-provider
  - lib/registry.ts, data/registry.json, data/demo-content.json,
    data/search-index.json
  - app/layout.tsx + globals.css + public/{images,logos}

shell-docs gets its own minimal middleware (PostHog-only — no SEO redirect
table, docs host never served legacy URLs). shell keeps seo-redirects.ts
for the legacy-URL migration table; framework-scope protection in its
middleware is now effectively dead but harmless (next.config.ts redirects
fire before middleware ever sees /<framework>/ paths).

InlineDemo updated for cross-host context: 'Open full demo' link points
at the shell host (showcase.copilotkit.ai) since the integration profile
route only exists there.
2026-04-20 14:00:28 -07:00