Commit Graph

92 Commits

Author SHA1 Message Date
Benjamin Taylor 1c92a69f58 fix(links): point cloud.copilotkit.ai web links at the Intelligence dashboard
New users were still discovering cloud.copilotkit.ai through docs pages,
the README, example READMEs, and in-app banners/console messages. Replace
all user-facing web links with dashboard.operations.copilotkit.ai (the
destination the marketing-site CTAs already use). Functional API endpoints
(api.cloud.copilotkit.ai) are deliberately untouched since existing cloud
customers depend on them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 11:20:44 -05:00
Maxim 96bfdf4fc9 docs: fix broken links in self-hosting guide
The shared self-hosting snippet renders under every framework section
(built-in-agent, langgraph, ...), and the NavigationLink rewriter makes
absolute links section-relative.

- "Intelligence Platform Works" linked /learn/intelligence-platform,
  which became /<framework>/learn/intelligence-platform (404). The page
  is served at /premium/intelligence-platform in every section.
- The GHCR chart-releases link used the repo-scoped URL for the private
  Intelligence repo (404 for public readers); switched to the public
  org-scoped package URL.
2026-06-03 21:17:12 +02:00
Markus Ecker bdc83fd7aa docs(premium/self-hosting): add user memory closed-beta section
Adds two pieces to the self-hosting docs:

1. A short public Callout in `## What is this?` announcing that the
   Intelligence Platform image includes an opt-in user memory
   capability and pointing readers at the gated configuration section
   below. No implementation details exposed.

2. A password-gated `### User memory (closed beta)` sub-section in
   `## Configuration reference` that describes:
   - The user-visible effect (recall of prior conversations with
     example questions)
   - Scope guarantees (per-user, per-org, per-project; read-only)
   - The two flips required to enable it:
       app-api:  appApi.env: [{ name: SL_ENABLED, value: "true" }]
       runtime:  mcpServer: true on the CopilotKitIntelligence
                 constructor in @copilotkit/runtime/v2
   - A runtime.ts code snippet

The gating uses the existing InsecurePasswordProtected component
already registered as an MDX component on both (home) and
integrations routes. The password is currently hardcoded as
cpki-mem-beta directly on the prop, which keeps the gate working
locally without env-var setup. Swap to an env-var-backed prop before
broader rollout if a different password than the existing LangGraph
Cloud beta is desired.

Scope of this change is the self-hosting snippet only; no
integration-specific docs, no new pages, no nav changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 14:06:04 +02:00
Martha Schumann 7f791238dc docs(telemetry): remove unused snippet and inspector-specific section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:43:17 -05:00
Martha Schumann ce35cba85e feat(inspector/telemetry): propagate telemetryDisabled from runtime env var through inspector
- Add telemetryDisabled to RuntimeInfo from COPILOTKIT_TELEMETRY_DISABLED/DO_NOT_TRACK env vars
- Mirror through AgentRegistry and expose via CopilotKitCore getter
- Guard track calls, URL param appending, and console disclosure on core.telemetryDisabled
- Move maybeShowDisclosure() to onRuntimeConnectionStatusChanged (fires after core attaches)
- Update docs to replace localStorage toggle description with env var approach
- Add telemetryDisabled test suite to get-runtime-info tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:43:17 -05:00
Martha Schumann db17476883 fix(inspector): update wire body shape + typed helpers + full test coverage (OSS-96)
- Move `package` from properties string to top-level `{ name }` object per
  Ben's confirmed IngestPayload schema (telemetry-sink-ingest/index.ts:127-134)
- Add typed per-event helpers trackBannerViewed/trackBannerClicked/trackThreadsTabClicked
  to enforce property shapes at call sites and prevent PII leakage under wrong keys
- Add trackBannerClickedOnce guard in index.ts (per-mount Set keyed by
  banner_id + cta) to prevent banner_clicked inflation on repeated clicks
- Fix handleTelemetryOptOutToggle: replace ?? true fallback with
  instanceof HTMLInputElement guard (wrong fallback was a privacy bug)
- Add threadsTabClicked re-selection guard (skip if already on threads tab)
- Replace getTelemetryDistinctIdForUrl() call on mount with ensureTelemetryDistinctId()
- Add inMemoryFallbackId in persistence.ts for funnel coherence when
  localStorage is unavailable (same UUID returned per page load)
- Add _resetTelemetryPersistenceForTesting() for test isolation
- Remove @copilotkit/shared dep from telemetry-disclosure.ts (inline
  env-var check; keeps module self-contained and testable in isolation)
- Add clearMocks: true to web-inspector vitest config (fixes spy call
  history accumulating across tests)
- Expand telemetry.test.ts to 22 tests covering wire body shape, opt-out,
  5 error-resilience paths, typed helpers, distinct ID lifecycle (SSR +
  localStorage-throws + funnel coherence), maybeShowDisclosure, and
  getTelemetryDistinctIdForUrl

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:43:17 -05:00
Claude 7914275c99 feat(inspector): add anonymous interaction telemetry (OSS-96)
Three V1 funnel events from the inspector — oss.inspector.banner_viewed,
oss.inspector.banner_clicked, oss.inspector.threads_tab_clicked — plus a
privacy panel for opt-out, a first-run console disclosure on inspector
mount and runtime startup, and inspector content added to the canonical
/telemetry docs page on main.

Inspector POSTs directly from the browser to telemetry.copilotkit.ai/ingest
(per ticket: URL is intentionally clearly named for transparency in DevTools).
Inline fetch POST in lib/telemetry.ts — no @copilotkit/shared dep on the
inspector, no dependency on any non-main branch.

Wire body shape (conservative; needs Ben confirmation):
  POST https://telemetry.copilotkit.ai/ingest
  { event, properties: { ...caller, distinct_id, package }, ts }
If the lambda expects a richer envelope, update the single JSON.stringify
in lib/telemetry.ts.

Privacy invariants:
- Opt-out toggle short-circuits before any network call (verified by test).
- Properties are scoped to event metadata only — no message content, agent
  state, prompts, completions, banner markdown. Negative test pins the wire.
- Anonymous distinct ID (UUID v4 in localStorage) set on inspector load and
  propagated onto banner CTA links as ?posthog_distinct_id=<uuid> so the
  destination site can posthog.alias() and close the
  banner_viewed → banner_clicked → signup_attributed funnel. URL param
  suppressed when opted out.
- Console disclosure on first inspector mount and runtime startup. Both
  link to https://docs.copilotkit.ai/telemetry.

Plan gaps addressed:
- CTA name on banner_clicked: cta:'body'|'dismiss' (click location) plus
  optional cta_label read defensively. Sam: confirm dismiss treatment.
- De-anon opt-out folded into the single toggle. Docs say so explicitly.
- banner_viewed dedup: per-instance Set<string> keyed by timestamp.
- EPIC consent / pixel review: out of scope for this PR; flagged at merge.

Deferred for V1.1:
- Wire body shape (Ben).
- Event-type allowlist for oss.inspector.* (Ben — oss-path-to-production).
- posthog_distinct_id URL-param key name (Ben/Tyler/website team).

Refs https://linear.app/copilotkit/issue/OSS-96
2026-05-11 15:43:17 -05:00
Martha Kelly Schumann d2840ff80c Docs(Programmatic Control): Added missing agentId, fixed imports and useEffect (mirror of #4430) (#4450)
Mirror of #4430 by @MalaikaAbb.

Adds an agentId note for non-default agents, replaces `agent.id` with
`agent.agentId`, corrects the `@copilotkit/shared/v2` import to
`@copilotkit/shared`, and adds the missing `[agent]` dependency to a
useEffect.
2026-05-11 13:29:12 -07:00
Max Korp da6640a16a docs(shell-docs): document llms.txt on coding-agent setup pages
Add an llms.txt section to the shared mcp-server-setup snippet
so /coding-agent-setup and /coding-agents pages tell users
where to find it for tools that don't speak MCP.
2026-05-07 12:29:14 -07:00
Sam Julien 75abdb3a40 fix(docs): repair broken links in shared snippets
Several shared snippets linked to paths that no longer exist:
- /generative-ui/specs/* → /learn/generative-ui/specs/* (specs moved)
- /premium/threads → /threads (page is at root, not under /premium)
- /premium/inspector → /inspector (page is at root, not under /premium)

Because these snippets are inlined into many integration pages,
each broken link multiplied across the site and accounted for the
majority of internal-referrer 404s on docs.copilotkit.ai.
2026-05-06 09:56:09 -07:00
Benjamin Taylor 073ba8cfb9 docs(threads,self-hosting): polish prose and bump version requirement
Threads pages: drop @copilotkit/cli-vnext alias for the canonical
@copilotkit/cli, bump react-core minimum from v1.50 to v1.56, and trim
the redundant "(via Copilot Cloud or self-hosted)" parenthetical from
the Prerequisites bullets.

Self-hosting snippet: restructure the "What is this?" intro into a
labeled "What you bring" / "What the chart deploys" pair (with a
component table for ports), tighten the kubeconfig-check sentence, and
collapse the local-validation Callout into two parallel options (bundled
overlay vs one-shot script). Drop the "If none of these apply, use
Copilot Cloud" line — readers who land on /premium/self-hosting have
already opted in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 05:28:48 -07:00
Dusty d0493f3d0d docs(self-hosting): fix chart name/version/secrets and add
local-validation path
2026-05-05 05:28:48 -07:00
Benjamin Taylor 0ada76b9ac docs: add Intelligence CTAs to restored threads pages
The Threads, Intelligence Platform explainer, multi-conversation
tutorial, useThreads reference, and the shared threads snippet were
restored at their pre-rollout state, so they carried no OpsPlatformCTA
while peer pages picked one up earlier on this branch. Wires each
restored page to the new try_for_free_clicked event with snake_case
surface identifiers, and fixes the "a Enterprise" → "an Enterprise"
article mismatch the rebrand left in both self-hosting pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 05:28:17 -07:00
Sam Julien d8c9d3cc8d docs: rebrand "CopilotKit platform" → "Enterprise Intelligence Platform"
Renames the platform name across docs prose, CTA copy, frontmatter
descriptions, and the Learn landing card. Three patterns were collapsed
into one canonical form:

  - "CopilotKit platform" → "Enterprise Intelligence Platform"
  - "CopilotKit Intelligence Platform" → "Enterprise Intelligence Platform"
  - "Intelligence Platform" → "Enterprise Intelligence Platform"

URL slugs (/learn/intelligence-platform, /premium/intelligence-platform)
are intentionally unchanged. The CTA component button label
("Get Intelligence free") is also unchanged.
2026-05-05 05:28:17 -07:00
Sam Julien 500ac594fa docs: drop early-access password gate from threads pages
The ThreadsEarlyAccess wrapper hid Threads, the multi-conversation
tutorial, useThreads, and the shared snippet behind a client-side
password splash. Threads is now generally available, so remove the
wrapper from the five MDX entry points, drop the component, and unwire
the MDX registry entries in the home and integrations route handlers.
2026-05-05 05:28:17 -07:00
Sam Julien e7faf1d1df Revert "docs: remove Threads + Intelligence Platform docs"
This restores the Threads management surface (useThreads hook, the
multi-conversation tutorial, per-integration Threads how-tos, the
shared snippet), the Intelligence Platform / self-hosting pages, and
the sidebar entries that were dropped in b08da7970.

This reverts commit b08da79700.
2026-05-05 05:28:17 -07:00
Sam Julien fabaedc705 docs(cta): align analytics event with website naming scheme
Renames the docs CTA tracking event from `cta_clicked` to
`try_for_free_clicked` to match the per-event custom event names used
on the marketing website, and uses a single `location` string property
in place of the previous `surface` / `variant` / `target` / `page_path`
shape. Surface identifiers are normalized to underscored snake_case to
match the location values already used on the website.

Same change applies to the docs navbar handler that fires when a
visitor clicks the Free Developer Access link.
2026-05-04 08:27:02 -07:00
Sam Julien e03302df50 docs(cta): extend prebuilt-components and Built-in Agent placements
Adds a sign-up CTA to the shared `prebuilt-components` snippet so it
appears on all twelve per-integration `/{framework}/prebuilt-components`
pages that consume it, and adds a matching CTA to the LangGraph
prebuilt-components page (which uses custom content rather than the
shared snippet).

Moves the Built-in Agent overview CTA from below the features grid to
above the first H2 so it lands above the fold on standard viewports.
2026-05-04 10:00:44 -05:00
Sam Julien c0fa02703c docs: add sign-up CTAs across documentation
Places dashboard sign-up CTAs on topical pages, threads guides,
reference pages, and integration overview pages. Each CTA is tagged
with a stable surface identifier for PostHog attribution and routes to
the dashboard with matching UTM parameters.

Placements include:
- Home and quickstart landing pages
- Prebuilt-components, shared-state, and chat-related reference pages
- Threads how-to, tutorial, reference, and per-integration threads pages
  (via the shared snippet)
- Inspector, event-inspector, and learning explainer pages
- Premium overview, observability, headless-ui, and self-hosting pages
  (via the shared snippets)
- Integration overview pages — placed via the new afterFeatures slot on
  the four FrameworkOverview-based pages (LangGraph, ADK, AWS Strands,
  Microsoft Agent Framework) and below the features grid on Built-in
  Agent
- Manual-setup quickstart pages (a2a, ag2, agent-spec, built-in-agent,
  crewai-flows, deepagents)

Also normalizes platform copy across the affected pages.
2026-05-04 10:00:44 -05:00
Benjamin Taylor b08da79700 docs: remove Threads + Intelligence Platform docs
Removes the unreleased Threads management surface (useThreads hook,
multi-conversation tutorial, the per-integration Threads how-to, the
shared snippet) and the Intelligence Platform / self-hosting pages
introduced alongside them, plus the ThreadsEarlyAccess gate that wrapped
them. The Learn landing page stays; just drops the Threads card and the
Intelligence Platform card. Sidebars (root, learn, reference/v2/hooks,
12 integrations + their premium subsections) are pruned to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 14:56:51 -07:00
claudebot eedc57abfd Apply PR #4430 2026-04-29 19:07:42 -07:00
Jordan Ritter 4b4923561b feat: VS Code extension — Hook Explorer, AG-UI Inspector, webview-first sidebars (#3935)
## Summary

Three connected features land together so the CopilotKit VS Code
extension becomes a coherent debugger/preview surface:

1. **Hook Explorer** — every V1 + V2 render hook can be discovered and
previewed live with auto-generated controls, an inline `▶️ Preview
Component` CodeLens, and a sidebar that lists every captured site.
2. **AG-UI Event Inspector** — live SSE debug stream of all AG-UI
events, filterable and color-coded, in a sidebar view + editor panel.
3. **A2UI Catalog sidebar → webview** — the last native TreeView gets
replaced with a Tailwind-styled webview that matches the other two, now
with a proper **Go to source** action on components and fixtures.

## Hook Explorer

### Discovery + preview
- oxc-based scanner walks the workspace and finds every call-site of any
hook in the registry (17 across V1 + V2, render + data).
- Preview panel bundles the user's source via Rolldown (IIFE format,
React externalized, CSS collected per `@copilotkit/a2ui-renderer`
pattern), executes it in the webview with a capture-only **stub** for
`@copilotkit/react-core` (+ `/v2`), and mounts the user's component just
long enough to record each hook's config.
- Auto-generated form on the left/top drives the `render` prop's
args/parameters/state/event live. V1 parameter arrays and V2 Zod /
Standard Schema all map through a unified `FormSchema` derived at
runtime from the captured config.
- `useCopilotAction`, `useCopilotAuthenticatedAction_c`,
`useCoAgentStateRender`, `useLangGraphInterrupt`, `useRenderTool`,
`useRenderToolCall`, `useDefaultRenderTool`, `useLazyToolRenderer`,
`useRenderCustomMessages`, `useRenderActivityMessage`,
`useHumanInTheLoop`, `useInterrupt`, `useFrontendTool`, `useComponent`,
`useDefaultTool` all previewable.
- Inline `▶️ Preview Component` CodeLens above every render-hook call
site, backed by the same `copilotkit.hooks.preview` command as the
sidebar.
- Imported render components work: rolldown walks transitive imports
from the hook's `render` prop through any number of sibling files.
- Cross-file hook switches are robust: controls are reset on load,
Harness only mounts once the real HostRoot is ready, a top-level error
boundary auto-recovers when you pick a different hook.

### Why the stub approach
Bundling the real `@copilotkit/react-core` through rolldown's IIFE
output hit a `__commonJSMin` TDZ chain (`require_clipboard`,
`require_graphql`, `require_context_helpers`, …) because the
chat/runtime-client/markdown graph has circular imports. Externalizing
react-core + routing to a Proxy-backed stub that captures hook configs
avoids the whole CJS wrapping problem, shrinks the preview bundle from
~24 MB to ~1.3 KB, and keeps the preview runtime path completely
runnable without a live CopilotKit backend. Tradeoff documented in
`copilotkit-stubs.ts`.

### Weather-themed fixtures
14+ fixtures under `packages/vscode-extension/test-workspace/hooks`,
each a distinct visual scenario (forecast card, severity-palette alerts
with imported CSS, forecast strip, live radar grid, conic-gradient
precipitation gauge, air-quality badge with imported render, pollen
report with a 2-hop import graph, HITL evacuation confirm,
sunrise/sunset gradient, etc.). Used both as regression fixtures and as
the demo surface for video.

### Styling
- Tailwind-via-CDN + VS Code CSS variables for theme-aware chrome.
- User-provided CSS imports collected by rolldown and injected as a
`<style>` tag per load.
- Controls + form fields converted to Tailwind; textarea matches input
styling.
- Framed "Rendered output" card so the render prop is visually
unmistakable.

## AG-UI Event Inspector

### Runtime (`@copilotkit/runtime` + `@copilotkit/shared`)
- `DebugEventBus` — in-memory pub/sub on `BaseCopilotRuntime`, only
instantiated when `NODE_ENV != production`.
- Event tap in `createSseEventResponse` broadcasts every AG-UI event
with metadata (agentId, threadId, runId, timestamp).
- `GET /debug-events` SSE endpoint — returns 404 in production, streams
`DebugEventEnvelope` JSON to connected clients, initial `: connected`
comment flushes headers immediately.

### VSCode Extension
- `DebugStream` — Node SSE client with auto-reconnect, exponential
backoff, URL validation, error surfacing.
- `InspectorPanel` (editor panel, command `CopilotKit: Open AG-UI
Inspector`) and `InspectorViewProvider` (sidebar view) both use a shared
`DebugStream` instance — events persist when switching tabs.
- Inspector React app: `ConnectionBar`, `FilterBar`, `EventList`,
`EventDetail`.
- Color scheme: purple (lifecycle), red (errors), blue (text), orange
(tools), green (reasoning), teal (state), yellow (activity), gray
(unknown).

## A2UI Catalog → webview

- Replaces `ComponentPreviewProvider` (native TreeDataProvider) with
`CatalogListViewProvider` (WebviewViewProvider), matching the Hooks and
Inspector sidebars.
- New React webview with refresh header, component rows (name + relative
path + `auto` badge when no fixture), expandable fixtures list.
- Click a component row → preview (or toggle if it has fixtures); click
a fixture row → preview that fixture.
- Hover action buttons: `▷` preview + `</>` go-to-source on every row.
- "Go to source" opens the component file for component rows; for
fixture rows it opens the fixture file and jumps the cursor to the named
fixture key.

## Test coverage
- Runtime: DebugEventBus unit tests (8), handleDebugEvents endpoint (5),
fetch-router routes (4), integration across Express/Hono/Node/Fetch (9).
- Hooks: scanner + 16 fixture bundle-smoke test, regression guard
against `node_<builtin>` self-references, CSS collector test, stub-based
capture E2E, cross-kind controls remount, FormRenderer defensive
rendering.
- Inspector + webview: DebugStream reconnect (10), inspector components
(17), colors (9).
- Total: **178 tests** passing for the vscode-extension package; runtime
suite unchanged.

## Test plan

- [ ] `pnpm nx run copilotkit-vscode-extension:build` and `pnpm nx run
copilotkit-vscode-extension:test` both green
- [ ] F5 launches the Extension Dev Host with `test-workspace` open
- [ ] Hooks sidebar lists every fixture hook; click a row → preview
opens; `</>` button opens the source
- [ ] `▶️ Preview Component` CodeLens shows above every render hook in a
`.tsx` file; clicking it opens the preview
- [ ] Form controls drive the render live; cross-kind hook switches
(action ↔ custom-message) don't crash; a forced render-prop throw
recovers when a different hook is picked
- [ ] Imported-render fixtures (`ImportedAirQuality`,
`ImportedPollenReport`) bundle and preview correctly
- [ ] A2UI Catalog sidebar is the new webview, refresh works, `</>` on a
fixture opens the fixture file and reveals the named key
- [ ] AG-UI Inspector connects to `GET /debug-events`, filters + detail
work, events survive sidebar/panel switch, invalid URL shows red error
2026-04-21 17:09:45 -07:00
Benjamin Taylor f23eebea06 docs(intelligence-platform): add self-hosting how-to and platform architecture explainer
Add the documentation kit for self-hosted CopilotKit Intelligence:

- (root)/premium/self-hosting.mdx — canonical how-to covering platform
  prerequisites, values file configuration (AWS ALB/IRSA and on-prem
  nginx paths), secret delivery via External Secrets or direct
  Kubernetes Secrets, install/verify/upgrade/uninstall steps, and an
  inline values.yaml reference
- learn/intelligence-platform.mdx — Diataxis explanation covering the
  app-api / app-frontend / realtime-gateway workloads, the
  control-plane/data-plane split, the multi-tenancy model
  (organization/project/user with auth.deploymentMode postures), the
  platform-layer vs application-layer split for self-hosted installs,
  secret rotation, scaling, upgrade, error handling, and the
  hosted-vs-self-hosted decision
- snippets/shared/premium/self-hosting.mdx — shared snippet that
  mirrors the canonical how-to for integration pointer pages
- integrations/*/premium/self-hosting.mdx (12 frameworks) — thin
  pointer pages that import the shared snippet, so Self-Hosting is
  discoverable from every integration sidebar (a2a has no /premium/
  subdir and is intentionally skipped)
- meta.json nav entries in (root)/premium, learn, and every integration
  premium sidebar

Also wraps the remaining Threads docs with the ThreadsEarlyAccess gate
(root threads.mdx, shared threads snippet, multi-conversation-chat
tutorial) and replaces the previous "self-hosted Enterprise, configure
your database connection per the Enterprise setup guide" placeholders
with real /premium/self-hosting links — the Threads docs referenced a
setup guide that did not exist until now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 23:12:52 -05:00
Benjamin Taylor 14e751e644 docs(threads): align pagination API names and document lock tuning options
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 23:12:52 -05:00
Benjamin Taylor cc260e372f docs(threads): rewrite for developer-facing surface, add error handling, fix JSX highlight
- Rewrite explanation page: remove internal class names (IntelligenceAgent, AgentRunner),
  Phoenix channel references, and internal metadata fields (cpki_event_id)
- Add error handling section: mutation failures, WebSocket disconnection, thread locked (409)
- Add auto-naming, archive vs delete, and thread switching details across all pages
- Fix [!code highlight] in JSX (use {/* */} syntax)
- Fix tutorial What's Next suggesting auto-naming as extension (already built in)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 23:12:52 -05:00
Benjamin Taylor 7db5d068ac docs(threads): Add initial docs for Threads, plus a Learn landing page 2026-04-20 23:12:52 -05:00
Alem Tuzlak 9496984449 Merge remote-tracking branch 'origin/main' into worktree-mutable-discovering-valiant
# Conflicts:
#	docs/content/docs/integrations/langgraph/doctest.json
#	lefthook.yml
#	pnpm-lock.yaml
2026-04-20 17:03:47 +02:00
claudebot ef78561281 Apply PR #3710 2026-04-17 18:36:05 -07:00
Markus Ecker 9c93ef38f0 docs(a2ui): recommend injectA2UITool in shared snippet, drop it from fixed-schema
Most framework integrations don't ship their own A2UI rendering tool, so the
shared snippet now guides users to inject `render_a2ui` via
`a2ui: { injectA2UITool: true }`. The LangGraph fixed-schema guide returns A2UI
operations directly from a Python tool, so the middleware auto-detects them and
tool injection is unnecessary — switched to `a2ui: {}` there with a note.
2026-04-16 18:20:35 +02:00
Alem Tuzlak 1eb4a154ad Merge origin/main into feature branch: resolve 7 conflicts 2026-04-16 16:16:48 +02:00
Alem Tuzlak b89e95af3a docs: add AG-UI Event Inspector guide 2026-04-16 13:07:40 +02:00
Alem Tuzlak b7e009c56b fix: correct verbose default in docs and remove stray vscode-extension README
The docs table and prose claimed `debug: true` sets `verbose: true`,
but the implementation intentionally defaults verbose to false (PII
safety). Fixed the table and explanatory text to match.

Also removed packages/vscode-extension/README.md which was committed
on this branch by mistake — it describes an unrelated VS Code extension
and has nothing to do with debug mode.
2026-04-15 17:18:09 +02:00
Jordan Ritter 39b4ea6ecc docs: clarify client-side debug prop behavior
Updated JSDoc and troubleshooting docs to accurately describe that
the client-side debug prop forwards config to the AG-UI transport
layer, not CopilotKit's own logging. Removed fabricated console.debug
output examples that don't exist.
2026-04-14 14:58:44 -07:00
Alem Tuzlak 97004c88b7 docs: improve debug mode page with problem-oriented opening and cross-links
- Rewrite opening to address the user's problem (missing events, broken
  state) rather than describing the feature
- Add cross-link callout from error-debugging → debug-mode and vice versa
- Fix [VERIFY] log format (remove incorrect colon)
- Move troubleshooting scenarios before reference tables since debugging
  is the primary use case
2026-04-14 18:35:33 +02:00
Alem Tuzlak e977a49972 fix: address CR findings for debug mode feature
- Fix clone() dropping debug config on ProxiedCopilotRuntimeAgent
- Pass raw DebugConfig to agents instead of collapsing to boolean
- Clamp verbose to false when enabled is false
- Fix pino-pretty log format in docs (parentheses, timestamps, levels)
- Add loggedEventCount to doc example
- Fix "Agent run started/finished" → actual log messages in arch docs
2026-04-14 18:35:32 +02:00
Alem Tuzlak 6f13ed287f docs: add debug mode documentation to troubleshooting section 2026-04-14 18:34:48 +02:00
Alem Tuzlak 3dd17c1c5b Merge branch 'main' into worktree-fancy-mapping-valley 2026-04-09 20:40:27 +02:00
Jordan Ritter 25f3f70ab2 fix(docs): update stale model names, fix broken quickstart examples
- gpt-5.2/gpt-5.2-mini → gpt-5.4/gpt-5.4-mini across 70 files
- Anthropic model IDs: dots → hyphens (claude-sonnet-4-5, not 4.5)
- LangGraph FastAPI: add missing uvicorn import, MemorySaver checkpointer,
  fix port string→int
- AG2: ContextVariables import moved to autogen.agentchat
- CrewAI Flows: comment out deprecated CLI option
- Pydantic: pin Starlette 0.45.3 (1.0.0 is incompatible)
- CopilotChat: add missing default export
- All quickstarts: add globals.css import to layout examples
- LangGraph quickstart tagged with doctest="server" for Phase 1

Supersedes #3655, #3656, #3658, #3660, #3661, #3665, #3667, #3669.
2026-04-08 18:55:11 -07:00
Markus Ecker 316c9c5102 docs: A2UI v0.9 guides, Open Generative UI reference, BYOC examples 2026-04-08 12:50:46 -07:00
Alem Tuzlak 990acb46ab fix(runtime): address CR round 1 findings
- Fix all doc imports to use @copilotkit/runtime/v2 (symbols only
  exported from v2 entry point)
- Replace v1 copilotRuntimeNextJSAppRouterEndpoint with v2 pattern
  (CopilotRuntime + createCopilotEndpoint + InMemoryAgentRunner)
- Add warning callout on TanStack reasoning example (reasoning events
  not surfaced by TanStack converter)
- Fix randomUUID imports in converters: use @copilotkit/shared instead
  of Node.js crypto to match codebase convention
- Fix collectEvents timer leak in test-helpers.ts (add clearTimeout)
- Fix JSDoc/comments: convertInputToTanStackAI accurately describes
  role allowlist, TanStackInputResult.messages comment updated
2026-04-08 18:03:44 +02:00
Alem Tuzlak 9b15a7c378 fix(runtime): address PR review feedback
- Close TOCTOU window: set abortController synchronously before Observable
  creation in classic run(), matching factory run() pattern (M3)
- Add concurrent run guard to classic run() (C1)
- Add threadId/runId to RUN_ERROR events in classic mode (I2)
- Check both 'output' and 'result' property names in classic tool-result (C2/M2)
- Add try/catch around JSON.stringify in classic tool-result (I4/M2)
- Add undefined guards before emitting state snapshot/delta events (I3)
- Guard assignToolsToAgents against factory-mode agent configs (M1)
- Improve error handling in classic error case with proper fallback (C3)
- Improve TanStack converter TODO comment with known gap details (M5)
- Document @ts-expect-error on clone() middlewares access (S1)
- Add JSDoc to AgentFactoryContext.abortController (M4)
- Fix duplicate import and clean up react-router example
- Update docs AgentFactoryContext reference
2026-04-08 17:32:50 +02:00
Alem Tuzlak 48f1f2ce01 docs: merge Agent docs into BuiltInAgent, rename to Factory Mode 2026-04-08 17:15:02 +02:00
Alem Tuzlak 7e69300537 fix(runtime): address CR loop round 1 findings
Source fixes:
- Fix TOCTOU race in concurrent run guard — set abortController
  synchronously before Observable creation, closing the window where
  two run() calls could both pass the guard
- Add JSON.stringify try/catch in TanStack TOOL_CALL_RESULT handler
  (matching existing aisdk.ts protection against circular refs)
- Use role allowlist (user/assistant/tool) instead of denylist in
  convertInputToTanStackAI to exclude activity/reasoning roles
- Change error+abort handler from break to return in aisdk converter
  to stop processing after error during abort
- Fix version-pinned comments (remove "AI SDK 5.0" reference)

Test fixes:
- Add timedOut flag to collectEventsIncludingErrors to distinguish
  hung observables from normal completion
- Add clearTimeout on success/error to prevent timer leaks
- Remove timing-dependent setTimeout in concurrent run guard test

Docs fixes:
- Split imports: copilotRuntimeNextJSAppRouterEndpoint from
  @copilotkit/runtime, Agent/converters from @copilotkit/runtime/v2
- Fix forwardedProps example: use CopilotKit properties prop
- Fix useCopilotChat → useCoAgent for state management reference
- Fix model syntax colon → slash (openai/gpt-4o)
2026-04-08 17:14:55 +02:00
Alem Tuzlak b344d08e17 fix(runtime): address code review feedback on Agent class
Critical fixes:
- Guard concurrent run() calls — throw if agent is already running
- Check both "output" and "result" properties on AI SDK tool-result events
  for compatibility with older AI SDK versions
- Handle undefined/missing error in AI SDK error events with proper
  Error wrapping instead of throwing undefined

Important fixes:
- Add TOOL_CALL_RESULT handling to TanStack converter (was silently dropped)
- Include threadId and runId in RUN_ERROR events for run correlation
- Guard state tool events (STATE_SNAPSHOT/STATE_DELTA) against undefined
  snapshot/delta fields before emitting
- Wrap JSON.stringify in tool-result with try/catch to handle circular refs
- Fix collectEventsIncludingErrors to distinguish error vs normal completion

Test coverage:
- Add tests for convertInputToTanStackAI (message filtering, tool call
  mapping, context injection, state serialization)
- Add tests for state management tool results in AI SDK converter
- Add tests for async factory (Promise-returning) paths
- Add tests for tool-result property compatibility (output vs result)
- Add tests for error event handling edge cases
- Add tests for concurrent run guard and RUN_ERROR correlation fields
- Replace flaky setTimeout-based abort test with signal-based sync

Other:
- Add exhaustiveness check (default: never) in config type switch
- Document clone() @ts-expect-error coupling with AbstractAgent.middlewares
- Fix docs: remove incorrect "v6" version reference, fix wrong hook name
2026-04-08 17:14:52 +02:00
Alem Tuzlak 9a7ca0e814 docs: move custom-agent to shared snippet, add to root nav, add cross-references 2026-04-08 17:14:51 +02:00
Alem Tuzlak 0fd3ddf960 refactor(docs): create migration-guides section, move migration pages from troubleshooting
- New docs/(root)/migration-guides/ section with migrate-to-v2, migrate-attachments,
  migrate-to-1.10.X, migrate-to-1.8.2
- Troubleshooting now only contains error-debugging, observability-connectors, common-issues
- Update all @deprecated JSDoc URLs from /troubleshooting/ to /migration-guides/
- Update doc cross-links (multimodal-attachments page, snippet import)
- Move snippet to snippets/shared/migration-guides/
- Set minimum version to v1.56.0 (was vX.Y.Z placeholder)
2026-04-06 14:55:09 +02:00
Alem Tuzlak 18c7a6001d feat: multimodal attachments — UI polish, deprecations, docs, codemod
Attachment queue & previews:
- Image lightbox with View Transition API morph animation
- Video lightbox with native controls and play button overlay
- Document lightbox (PDF via blob URL, text inline, info card fallback)
- Drop zone overlay with upload icon
- Filename preservation via InputContent metadata
- Proper video thumbnail sizing and play/pause indicator
- Fix attachment queue positioning (max-w-3xl constraint)
- Padding between X button and content for audio/document cards
- Document filenames wrap instead of truncating

Attachments config:
- onUploadFailed callback for validation/upload errors (file-too-large, invalid-type, upload-failed)
- onUpload accepts sync or async returns
- AttachmentUploadResult discriminated union with explicit interfaces
- Metadata field on Attachment and onUpload return type

AG-UI version bump:
- Bump @ag-ui/client, @ag-ui/core, @ag-ui/encoder, @ag-ui/proto to 0.0.51
- Remove process.env Vite workaround (fixed upstream in 0.0.51)

Deprecation lifecycle:
- @deprecated JSDoc on all legacy image upload APIs
- ImageRenderer, ImageRendererProps, ImageUpload type, imageUploadsEnabled prop,
  inputFileAccept prop, ImageRenderer prop, AIMessage.image, ImageData
- Codemod at codemods/migrate-attachments.ts (15 tests)
- Migration guide updated with codemod instructions and new type shapes

Docs:
- New guide: docs/(root)/multimodal-attachments.mdx
- Updated migration guide with onUpload return type, metadata, codemod section
- Cross-links from prebuilt-components and migration guide
- Label change: "Add photos or files" → "Add attachments"

Tests:
- CopilotChat.attachments.test.tsx — 5 tests for onUploadFailed
- migrate-attachments codemod — 15 tests
2026-04-06 14:55:06 +02:00
Alem Tuzlak e92dcb9686 docs: add multimodal attachments migration guide and deprecation callouts 2026-04-06 14:54:35 +02:00
Maxim b039983f59 docs: extract performance tip into shared snippet
Moves the streaming performance tip into a reusable snippet and imports
it on both the root headless page and the v2 basics headless-ui snippet
(used by built-in-agent and a2a framework pages).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 20:00:02 +02:00
Claude ad629e1779 docs: rebrand LangGraph integration to LangChain across documentation
Update user-facing references from "LangGraph" to "LangChain" per CPK-7186.
The integration label, descriptions, and agent terminology now use "LangChain"
while preserving "LangGraph" for technical references (Platform, Studio, CLI,
StateGraph, code/package names, and API references).

- Rename integration label in integrations.ts, meta.json, integration-grid,
  feature-matrix, quickstart-dropdown, and link-validation
- Update ~47 MDX docs: "LangGraph agent(s)" → "LangChain agent(s)"
- Update FAQ, snippets, and learn section references
- Keep URL paths (/langgraph) unchanged for backward compatibility
- Keep all code imports, package names, and LangGraph Platform/Studio/CLI as-is

https://claude.ai/code/session_01JAQ7P3GEeP2bGZtc6V45WY
2026-04-02 17:21:00 +02:00