Commit Graph

1053 Commits

Author SHA1 Message Date
Martha Schumann bcd5a92d32 Merge remote-tracking branch 'origin/main' into fix/restore-mastra-readables-content 2026-04-21 13:16:01 -07:00
Benjamin Taylor ef3b8eeeaa docs(learn): surface Intelligence Platform on the Learn landing page
Add a card for the new Intelligence Platform explainer to the Learn
index card grid, positioned between Architecture and Threads so the
landing page reads overall architecture → platform → features → protocols.
Without this, the page is reachable only via the sidebar and is
invisible to evaluators browsing /learn top-down.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 23:12:52 -05: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 55af709e51 feat(docs): gate Threads docs behind early-access password wrapper
Wrap the Threads documentation surface with the existing
InsecurePasswordProtected component via a thin ThreadsEarlyAccess
wrapper that surfaces Threads-specific splash copy and the shareable
early-access URL. Register the wrapper in both route handlers so the
gate works for docs under both (home) and integrations slug routes.

Wraps learn/threads.mdx and reference/v2/hooks/useThreads.mdx; the
remaining Threads pages are wrapped in the follow-up commit that also
fixes the cross-links to the new Self-Hosting docs.

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
Martha Schumann 857c7bd106 docs(mastra): use requestContext in Agent instructions example
Restores the API-surface change from the original QA PR #3866 (merged
via mirror #4040) that was inadvertently reverted in 804c5d0f. Keeps
Jordan's other fixes (imports, model, null guards, grammar) intact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 13:40:29 -07:00
Alem Tuzlak 8f3c47e72a docs(vscode-extension): restructure as three-feature hub + refresh Hook Explorer page
Persona fix: the landing page at /vs-code-extension only documented the
A2UI catalog preview, so builders using CopilotKit hooks and runtime
debuggers never discovered their respective features. Restructured
into a three-section hub that surfaces Hook Explorer, A2UI Catalog,
and AG-UI Inspector side-by-side, with install steps at the top and
cross-links to the deep-dive pages.

/troubleshooting/hook-explorer refreshed end-to-end:
- Replaced stale TreeDataProvider description with the current webview
  sidebar + row-click-previews + '</>' go-to-source UX.
- Documented the inline '▶️ Preview Component' CodeLens.
- Expanded hook coverage table to include useComponent, useDefaultTool,
  useHumanInTheLoop, useInterrupt, useRenderCustomMessages,
  useRenderActivityMessage, useDefaultRenderTool, useLazyToolRenderer,
  useCopilotAuthenticatedAction_c, useRenderToolCall — all 15 render
  hooks covered with their preview shape.
- Added 'Behavior notes' section: auto-recovery on crash + reset on
  selection change, controls persistence, Tailwind + local CSS flow-
  through.
- Added imported-render support note.

/troubleshooting/event-inspector — added a back-link to Hook Explorer
at the bottom callout so the cross-link is bidirectional.
2026-04-20 18:45:36 +02:00
Alem Tuzlak c2c90e733b refactor(runtime): rename debug-events route to cpk-debug-events
Per PR review suggestion (14) — a cpk- prefix makes collision with a
user-named agent essentially impossible. The earlier change only
documented the route as reserved; renaming it removes the hazard.

Rename scope:
- URL path segment (/debug-events → /cpk-debug-events) in the router,
  handler switch arms, method-not-allowed check, and integration suite.
- RouteInfo union discriminator ('debug-events' → 'cpk-debug-events')
  in hooks.ts and its two consumers in fetch-handler.ts.
- VS Code DebugStream client URL.
- Docs page (event-inspector.mdx) — both the Callout and the Steps copy.

Left unchanged (internal names that describe the feature but aren't the
public route):
- packages/runtime/src/v2/runtime/handlers/handle-debug-events.ts
- packages/runtime/src/v2/runtime/core/debug-event-bus.ts
- packages/shared/src/debug-event-envelope.ts (and the DebugEventEnvelope
  type)
- 'debug-event' (singular) message type in the VS Code webview bridge —
  that's the extension host ↔ webview protocol, not the HTTP route.
2026-04-20 18:04:50 +02: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
Jordan Ritter 150bb151aa fix(showcase-docs): add TailoredContent component + harden upstream (#4056)
## Summary
Two showcase MDX files reference `<TailoredContent>` +
`<TailoredContentOption>` from
`@/components/react/tailored-content.tsx`, but the component file was
missing in showcase. This PR:

- Adds `showcase/shell/src/components/react/tailored-content.tsx`
(copied from upstream `docs/components/`)
- Inlines a tiny `cn()` helper to avoid pulling `classnames` into
showcase/shell deps
- Hardens BOTH copies (docs + showcase, kept byte-identical) against
real bugs found in CR review

## Bugs fixed in TailoredContent (both copies)
- **Build-breaker:** `useSearchParams()` in Next.js 14+ App Router
requires `<Suspense>` wrapper or `next build` fails. Added internal
Suspense wrapper so consumers don't need to add one.
- **State/URL desync:** `selectedIndex` was stored in useState
initialized once — back/forward nav didn't update. Now derived from
`searchParams` each render.
- **Keyboard a11y broken:** `role="tab"` + `tabIndex={0}` with no
keyboard handler. Added standard ARIA tab pattern: `role="tablist"`,
`role="tabpanel"`, Enter/Space to select, ArrowLeft/Right + Home/End to
navigate, roving tabindex.
- **`cloneElement` clobbered caller's icon className:** now merges via
`cn()`.
- **`TailoredContentOption` rendered `<div>` despite JSDoc saying "won't
render":** now returns `null`.
- **Unvalidated `defaultOptionIndex`:** clamped to `[0, options.length -
1]`.
- **Empty options silently produced broken UI:** now `return null`
(hooks-rules-safe; no throw mid-render).
- **Duplicate option IDs silently collided:** `console.warn` in dev mode
(via `useEffect`, not render body).
- **Hooks rules violation:** conditional hook ordering under state
changes (fixed by running all hooks unconditionally).
- **Side effects during render:** `console.warn` mutation moved to
`useEffect`.
- **`options`/`optionIds` unstable identities:** memoized via `useMemo`.

## Known remaining (non-blocking)
- The 2 copies of `tailored-content.tsx` must be kept in sync manually.
Proper fix is a shared package — out of scope for this PR.
- Stale `searchParams` race on rapid concurrent clicks across multiple
TailoredContent widgets on the same page (pre-existing upstream).
- `useMemo([children])` is ineffective since React.Children identity
changes per parent render (minor perf).

## Test plan
- [ ] CI green
- [ ] showcase-shell builds without Suspense errors
- [ ] Visit docs pages with `<TailoredContent>` — tabs render, keyboard
nav works, URL reflects selection
2026-04-17 22:29:43 -07:00
claudebot ef78561281 Apply PR #3710 2026-04-17 18:36:05 -07:00
Jordan Ritter 10c24ff1d7 fix(tailored-content): obey hooks rules, move warn to effect, memoize derived arrays 2026-04-17 18:32:12 -07:00
Jordan Ritter 62d775f6e7 fix(tailored-content): add Suspense wrapper, URL sync, keyboard a11y, className merge, bounds check 2026-04-17 18:32:12 -07:00
claudebot c34c4232a9 Apply PR #3706 2026-04-17 18:29:46 -07:00
claudebot db99c684dc Apply PR #3757 2026-04-17 18:23:09 -07:00
claudebot 0795de402c Apply PR #3755 2026-04-17 18:19:24 -07:00
Martha Kelly Schumann ee48a69055 docs(langgraph): document runAgent once via useEffect in configurable… (mirror of #3868) (#4052)
Mirror of #3868 by @Abubakar-01.

Wraps `agent.runAgent(...)` in a `useEffect` with an empty dependency
array in both the docs and showcase MDX files, and adds a prose warning
explaining why calling `runAgent` directly in the component body causes
"thread is already processing" errors.
2026-04-17 18:15:02 -07:00
Jordan Ritter 78a7f36447 docs(mastra): fix typo + resolve agent-app-context drift (#4048)
## Summary
Resolves the recurring `docs-sync` manual-review flag on
`integrations/mastra/agent-app-context.mdx` by applying the sync
script's clean-transform to bring the showcase copy in line with
upstream, plus a small typo fix.

- Typo: `useCopilotReadble` → `useCopilotReadable` (both files)
- Clean-transform sync: restores 2 code-block imports
(`useAgentContext`, `useState` — both actually used in the example on
lines 40 + 32), normalizes whitespace
- Bumps `showcase/shell/.docs-sync-sha` from `41b6eb93` to `0e7811402`

## Note
There is an existing auto-generated PR #4044 covering this same file
(plus 2 aws-strands files). Close that PR after merging this one; the
aws-strands files will be handled by a separate future sync run once the
updated workflow (see branch `ci/docs-sync-auto-pr`) is merged.

## Test plan
- [ ] CI green
- [ ] Post-merge: `npx tsx showcase/scripts/sync-docs-from-main.ts
--dry-run` no longer flags this file for review
2026-04-17 18:14:08 -07:00
claudebot d572c12f72 Apply PR #3868 2026-04-17 18:09:09 -07:00
Jordan Ritter e5c2023995 docs(mastra): fix title/prose hook references, null guards, highlight range, grammar 2026-04-17 18:00:32 -07:00
Jordan Ritter 804c5d0f19 docs(mastra): fix grammar, invalid model, missing imports, runtimeContext, type, highlight meta 2026-04-17 17:57:26 -07:00
claudebot d7b0d8b5b4 Apply PR #4009 2026-04-17 17:44:53 -07:00
Jordan Ritter 4c8438e250 docs(mastra): fix useCopilotReadable typo in prose 2026-04-17 17:17:37 -07:00
claudebot 4dd944ef09 Apply in-scope subset of PR #4038 2026-04-17 16:34:34 -07:00
Mike Ryan abfd27ebbf fix(docs): add LangGraph doctest deps 2026-04-17 15:28:41 -07:00
claudebot fc43033efd Apply PR #3866 2026-04-17 14:51:20 -07:00
Alem Tuzlak b9574f9e4c docs: add CopilotKit Hook Explorer guide 2026-04-17 18:50:10 +02:00
Martha Kelly Schumann e3f3bbeaea Merge branch 'main' into doc/fix-langgraph-interrupt-use-interrupt-hook 2026-04-16 12:57:59 -07:00
Martha Schumann 90d1869ead docs(langgraph): clarify useInterrupt agentId mismatch consequence
Add a sentence to the warning callout explaining that if agentId doesn't
match a runtime-registered agent, the interrupt will silently never fire.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 12:57:06 -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 4521872e12 fix(doc-tests): add missing ag-ui-langgraph and python-dotenv deps to langgraph doctest 2026-04-16 17:03:23 +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
Martha Kelly Schumann 4c2ecea372 Merge branch 'main' into docs/2026-04-14-review-fixes 2026-04-15 19:09:40 -07: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
Alem Tuzlak 137e17a278 docs: add VS Code extension guide with fixture format and cross-links 2026-04-15 13:12:38 +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
Abubakar 47ba3c602b Fixed the commenting syntax in MS Agent Framework from # to // in quickstart, for both docs and showcase 2026-04-14 23:18:05 +05:00
Abubakar c066549ba7 Added the imports to load env
variable in langgraph-quicktart in both docs and showcase
2026-04-14 23:10:14 +05:00
Abubakar b569ec7be7 Added the imports to load env variable in langgraph-quicktart in both docs and showcase 2026-04-14 23:05:01 +05:00
Abubakar 40dde47b70 Added the imports to load env variable in langgraph-quicktart in both docs and showcase 2026-04-14 22:56:08 +05: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 09ecf06b5b docs: add useCapabilities hook reference
- New reference page for useCapabilities hook with all 11 AG-UI
  capability categories, usage examples, and behavior notes
- Add capabilities property to useAgent return value docs
- Add useCapabilities to hooks navigation under "Agent & Context"
- Bidirectional cross-links between useAgent and useCapabilities
2026-04-14 15:26:52 +02:00
Jordan Ritter 0ed497d460 docs(mastra): add interrupt-based HITL docs for suspend/resume support (#3634)
## Summary
- Restructures Mastra Human-in-the-Loop docs from a single page into a
subfolder with two approaches
- Adds new **interrupt-flow.mdx** documenting Mastra's native
`suspend()`/`resume` → `useInterrupt` flow (basic + advanced usage with
`enabled` routing and `handler` preprocessing)
- Extracts existing tool-based content into **tool-based.mdx** and
removes the "suspend/resume not supported" warning
- Adds **index.mdx** landing page with CTACards linking both approaches
- Updates Mastra `meta.json` to add a "Mastra" nav section with the HITL
pages

Companion docs for ag-ui-protocol/ag-ui#1359 and
CopilotKit/CopilotKit#3505.

## Test plan
- [ ] Verify docs build locally (`nx run docs:build`)
- [ ] Verify navigation: Mastra sidebar shows "Interrupts" and
"Tool-based" under "Mastra" section
- [ ] Verify root HITL hub (`/human-in-the-loop`) still links to Mastra
via IntegrationGrid
- [ ] Verify cross-links between interrupt-flow and tool-based pages
work
- [ ] Verify CTACards on the index landing page link correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-13 13:31:34 -07:00
Abubakar 63a6a2733f docs(langgraph): warn on useInterrupt agentId and add starterAgent to examples
Add a short callout and agentId: starterAgent across LangGraph interrupt
snippets in docs and the matching showcase interrupt-based page; add the
useInterrupt import to the showcase main snippet.
2026-04-13 20:50:57 +05:00
Martha Schumann a2a422482e docs(CPK-7187): address Christian Bromann feedback on Deep Agents docs
- Fix Deep Agents icon (was identical to LangGraph icon) with official OSS mark
- Rename "LangSmith" tabs to "Deep Agent" throughout quickstart
- Add TypeScript agent tabs (createAgent + langgraph.json) to quickstart Steps 1-3
- Add Annotation deprecation callout on in-app-agent-read TypeScript tab
- Add "Vite + Direct Connection" alternative quickstart section using
  add_langgraph_fastapi_endpoint with langgraph.json http field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 08:13:40 -07:00