Commit Graph

692 Commits

Author SHA1 Message Date
github-actions[bot] b624a987a3 style: auto-fix formatting 2026-06-24 19:30:30 +00:00
Atai Barkai bc18011da1 docs(shell-docs): fix catch-all highlight ranges 2026-06-24 12:20:39 -07:00
Atai Barkai 8b78ca2911 docs(showcase): cover catch-all renderer variants 2026-06-24 12:20:06 -07:00
Atai Barkai 2b3c54ac4e docs(showcase): label catch-all as default rendering 2026-06-24 12:18:11 -07:00
Atai Barkai 6fc2c3a73c docs(showcase): highlight catch-all renderer snippet 2026-06-24 12:18:11 -07:00
Atai Barkai dfa1b03064 docs(showcase): highlight catch-all opt-out APIs 2026-06-24 12:18:11 -07:00
Atai Barkai a0d7f1cc84 docs(showcase): use hook for catch-all opt-out 2026-06-24 12:18:11 -07:00
Atai Barkai 5243be84cb docs(showcase): inline catch-all suppress example 2026-06-24 12:18:11 -07:00
Atai Barkai 436a5ea610 docs(showcase): move suppress snippet out of live demo 2026-06-24 12:17:19 -07:00
Atai Barkai 75bc9fe300 docs(showcase): show full render opt-out signature 2026-06-24 12:17:19 -07:00
Atai Barkai e56d5fbebe docs(showcase): source catch-all opt-out snippet 2026-06-24 12:17:18 -07:00
Atai Barkai 84b1aa9cf7 docs(shell-docs): trim catch-all tool rendering page 2026-06-24 12:17:18 -07:00
Atai Barkai 167e16e5c5 docs(shell-docs): restore tool rendering snippet highlighting 2026-06-24 12:17:18 -07:00
Atai Barkai 23eaeed648 docs(shell-docs): preserve tool rendering examples 2026-06-24 12:16:40 -07:00
Atai Barkai ff43adce6b docs(shell-docs): rename default rendering to catch-all 2026-06-24 12:15:16 -07:00
Atai Barkai f70658aaea docs(shell-docs): split tool rendering section 2026-06-24 12:14:24 -07:00
Atai Barkai 435c12c297 docs(shell-docs): clarify render opt-out status prop 2026-06-24 12:12:00 -07:00
Sam Julien 93ce311cfb docs: move Threads into chat UI docs (#5653)
## Summary

- Moves the canonical `/threads` guide into the **Build Chat UIs** nav
group, immediately after prebuilt components
- Keeps `/premium/threads-explained` under **Intelligence Platform** as
the architecture/persistence explanation
- Adds contextual cross-links between the Threads guide, Threads
architecture page, and relevant prebuilt chat UI docs
- Shows `Threads` in the authored framework sidebars next to their chat
UI basics

## Why

Threads are primarily discovered by developers adding saved
conversations, history, and thread switching to a chat UI. The
implementation guide belongs with chat UI docs, while the platform page
remains the deeper explanation of persistence, realtime sync, and
Enterprise Intelligence Platform backing.

## Screenshots

**Root docs navigation: `/threads` now appears with the chat UI basics,
immediately after Prebuilt Components.**

![Root docs Threads
navigation](https://raw.githubusercontent.com/CopilotKit/CopilotKit/92e68e787ec0e137124460637549b0df33929389/pr-5653/root-threads-build-chat-uis-nav.png)

**Authored framework navigation: framework-specific docs now show
Threads next to Prebuilt Components too.**

![Authored framework Threads
navigation](https://raw.githubusercontent.com/CopilotKit/CopilotKit/92e68e787ec0e137124460637549b0df33929389/pr-5653/authored-langgraph-threads-nav.png)

**Intelligence Platform navigation: the architecture page stays in the
platform section.**

![Threads architecture in Intelligence Platform
navigation](https://raw.githubusercontent.com/CopilotKit/CopilotKit/92e68e787ec0e137124460637549b0df33929389/pr-5653/threads-architecture-intelligence-nav.png)

## Validation

- `git diff --check origin/main...HEAD`
- `git diff --check`
- `npm run typecheck` from `showcase/shell-docs`
- Local route smoke checks for `/threads`, `/premium/threads-explained`,
`/prebuilt-components`, and `/prebuilt-components/chat` returned 200
- Authored framework route smoke checks returned 200
2026-06-24 11:11:33 -07:00
Sam Julien 5507c75d2d docs: add framework-scoped Threads callouts (#5651)
## Summary

- Adds a `thread_persistence_pattern` manifest flag so shared docs can
render selected-framework Threads guidance.
- Marks LangGraph Python, LangGraph TypeScript, LangGraph FastAPI, and
Google ADK with the appropriate thread persistence pattern.
- Extends `WhenFrameworkHas` support so the shared Threads guide can
show LangGraph-only and ADK-only callouts.
- Clarifies that `useThreads` manages Enterprise Intelligence Platform
thread records, not native framework stores.
- Adds framework-selected callouts to the root/shared Threads guide
without adding a third setup path.

## Notes

The new callouts intentionally avoid claiming external store listing,
lifecycle sync, migration/import tooling, or durable ADK sessions by
default. Those remain product/runtime follow-ups tracked separately.

## Validation

- `git diff --check`
- `npm run pretypecheck` in `showcase/shell-docs`
- `npm run lint` in `showcase/shell-docs` (passes with existing
warnings)
- `npm run typecheck` in `showcase/shell-docs`
- `npm run build` in `showcase/shell-docs` (passes with existing
Turbopack/NFT warning)
- Local route smoke checks:
  - `/threads` hides framework callouts
  - `/langgraph-python/threads` shows LangGraph callout only
  - `/langgraph-typescript/threads` shows LangGraph callout only
  - `/langgraph-fastapi/threads` shows LangGraph callout only
  - `/google-adk/threads` shows ADK callout only
2026-06-24 11:11:22 -07:00
Alem Tuzlak c52985889e Merge branch 'main' into feat/bot-surface-parity 2026-06-24 12:38:39 +02:00
Tyler Slaton a13c3ee663 chore: merge main into PR 5480 2026-06-23 20:50:16 -07:00
Jordan Ritter ec646bbf4f Merge remote-tracking branch 'origin/main' into chore/remove-harness-legacy-ssot
# Conflicts:
#	showcase/scripts/railway-envs.generated.json
#	showcase/scripts/railway-envs.ts
2026-06-23 17:56:18 -07:00
Sam Julien e8c2cd5005 docs(shell-docs): show threads in authored framework nav 2026-06-23 15:42:01 -07:00
Sam Julien 7e54dbe746 docs(shell-docs): place threads with chat UI guides 2026-06-23 15:42:01 -07:00
Tyler Slaton 75611b272c chore: merge main into PR 5480 2026-06-23 15:32:09 -07:00
Tyler Slaton 307a52c8eb Preserve quickstart CTA styling in reference content 2026-06-23 15:26:36 -07:00
Sam Julien 81c716a4aa docs(shell-docs): add framework-scoped threads callouts 2026-06-23 15:07:13 -07:00
Alem Tuzlak 107cdad5af feat(slack-example): reaction/ephemeral/modal feature demos
Add per-feature demos to examples/slack that narrate per-platform degradation
explicitly rather than failing silently:
- emoji triage — 🐛/🔥/✅ reactions file/escalate/ack via the agent
- /preview — ephemeral draft issue (native only-you on Slack, DM fallback on
  Discord/Telegram)
- /file-issue — modal form (Slack rich, Discord text-only, Telegram
  conversational fallback)

Also updates the Slack frontend guide (slack.mdx) with the capability matrix.
2026-06-23 20:49:38 +02:00
Mike Ryan db09796809 fix: gate thread endpoints by runtime capability 2026-06-23 11:32:30 -07:00
Alem Tuzlak 43fdba74aa feat: AG-UI standard interrupt support in useInterrupt + BuiltInAgent
Adds the AG-UI standard interrupt flow (RUN_FINISHED outcome:interrupt + resume array) alongside the legacy on_interrupt path.

- core: forward the standard resume array through runAgent.
- react-core / vue / react-native: useInterrupt handles standard interrupts with resolve()/cancel(), surfaces the primary + full interrupt set, and persists each resolved tool-backed interrupt as a tool-result message so multi-turn conversations stay well-formed (no dangling tool call -> no tool-call loop).
- runtime BuiltInAgent: native interrupts for the aisdk + tanstack factory paths via each SDK's needsApproval primitive (tool-approval-request / CUSTOM approval-requested -> outcome:interrupt); classic interrupt-tool emission + ctx.interrupt() factory primitive; idempotent resume injection mapped to each SDK's native tool-result; getCapabilities advertises humanInTheLoop.interrupts.
- docs: document standard interrupt support.

Verified across core/react-core/runtime unit suites and a real-model multi-turn run on both aisdk and tanstack.
2026-06-23 20:14:17 +02:00
Alem Tuzlak 5f2d7102d5 docs(bot): StateStore, persistence, and transcripts reference + guides 2026-06-23 18:38:47 +02:00
Ran Shemtov e0d6eeaebe Merge branch 'main' into claude/trusting-babbage-f4d48a 2026-06-23 09:21:35 +02:00
Tyler Slaton b77d2710aa feat(bot-whatsapp): WhatsApp Cloud API platform adapter + example + docs (#5449)
## What

Adds **`@copilotkit/bot-whatsapp`** — a WhatsApp Business **Cloud API**
`PlatformAdapter` for the platform-agnostic `@copilotkit/bot` engine —
plus a runnable **`examples/whatsapp`** app and docs. This brings
WhatsApp to the bots ecosystem alongside the existing Slack support,
reusing the engine, the `@copilotkit/bot-ui` IR, and the pluggable
`ActionStore` untouched.

## How it works

- **Ingress:** the adapter owns its own HTTP server — GET verification
handshake (`hub.challenge`) + POST intake validated by
`X-Hub-Signature-256` HMAC (timing-safe), acked `200` immediately then
processed async.
- **No streaming:** WhatsApp messages are immutable, so the run renderer
**buffers** text and sends once on `TEXT_MESSAGE_END`
(`supportsStreaming: false`; `update()` posts fresh, `delete()` no-ops).
- **Interactive mapping:** text/section → text; ≤3 buttons →
reply-button message; `Select` or 4–10 actions → list message; >10 →
numbered-text fallback. A control's `value` round-trips by encoding it
into the reply id (`ck:…::<json>`), since WhatsApp replies carry no
value field; oversized encodings fail loud rather than corrupt silently.
- **Memory:** WhatsApp exposes no readable history, so a pluggable
**`HistoryStore`** (default `InMemoryHistoryStore`) holds it and replays
it into `agent.messages` each turn (fresh threadId per turn, mirroring
`bot-slack`). Swap in a durable backend to persist across restarts.
- **Commands:** leading-keyword matching (`commandPrefix`, default `/`);
the command text is injected via the engine's `runAgent({ prompt })`
path (not persisted at ingress).
- **Inbound media** → AG-UI multimodal content parts; **HITL** via
interactive replies.

## Example

`examples/whatsapp` mirrors `examples/slack`: a CopilotKit
`BuiltInAgent` over MCP (Linear + Notion), with `issue_list`, an
interactive `show_incident`, and a `confirm_write` HITL gate.

## Tests & verification

- 62 unit tests across the package (render mapping, markdown→WhatsApp,
signature verification incl. wrong-but-equal-length, interaction
decode/round-trip, buffered renderer, webhook listener/server, stores,
media, adapter).
- `build` ✅, package `check-types` ✅, `publint`/`attw` (ESM-only) ✅,
example `check-types` ✅. Full `nx run-many -t test
--projects=packages/**` passes.
- Two rounds of code review (APPROVE) — fixed slash-command history
double-append and silent value-truncation; minors (HMAC over raw bytes,
conversationKey invariant, offset-correct Blob, unused-dep pruning,
added tests).

## Docs

Package `README.md` + `ARCHITECTURE.md`, example setup guide (Meta app +
webhook + tunnel), and a `shell-docs` WhatsApp guide page (registered in
`meta.json` + early-access gate).

## Notes / out of scope (v1)

- No template-send path for messaging outside WhatsApp's 24-hour
customer-service window (documented limitation).
- Pre-existing, unrelated `@copilotkit/core` `phoenix-observable.ts`
typecheck error exists on the branch base (missing `@types/phoenix`) —
not introduced here.
2026-06-22 20:34:54 -07:00
Sam Julien b9b08381ba docs: backport Threads guide to authored integrations (#5620)
## Summary

- Backports the generated/root Threads guide content into the shared
authored Threads snippet.
- Adds the CLI “Choose your starting point” path, manual path, thread
lock options, Enterprise Intelligence CTA, and corrected next-step links
to authored Threads docs.
- Standardizes authored integration Threads pages to explicitly import
the shared snippet with `components={props.components}` so authored
routes stay aligned.

## Authored routes covered

- AG2
- Agno
- AWS Strands
- Built-in Agent
- CrewAI Flows
- LangGraph
- LlamaIndex
- Mastra
- Microsoft Agent Framework
- PydanticAI

## Validation

- `npm run pretypecheck` in `showcase/shell-docs`
- `npm run lint` in `showcase/shell-docs` (passes with existing
warnings)
- `npm run test` in `showcase/shell-docs`
- `npm run typecheck` in `showcase/shell-docs`
- `npm run build` in `showcase/shell-docs` (passes with existing
Next/Turbopack warnings)
- `git diff --check`
- Manual MDX link sweep for changed docs links (`/premium/self-hosting`,
`/premium/threads-explained`, `/reference/hooks/useThreads`, and
`http://localhost:3000`)

## Formatter note

- `pnpm run check-format` currently fails on unrelated existing files
under `examples/showcases/arcade-tools/*`,
`examples/v2/react/demo/tsconfig.json`, `migrations.json`, and
`nx.json`.
- Scoped `oxfmt --check` does not treat the changed MDX files as target
files, so there is no formatter-owned MDX change to apply here.
2026-06-22 15:47:07 -07:00
Sam Julien 2fe292e4c7 docs(shell-docs): clarify tailored content selectors (#5621)
## Summary
- restyle TailoredContent selectors as native segmented path buttons
- add a selected check indicator plus hover/focus affordances
- add a rendering test for button semantics and selected state

## Verification
- pnpm exec oxfmt --check
showcase/shell-docs/src/components/react/tailored-content.tsx
showcase/shell-docs/src/components/react/__tests__/tailored-content.test.tsx
- npm run lint (showcase/shell-docs; existing warnings only)
- npm run typecheck (showcase/shell-docs)
- npm run test (showcase/shell-docs)
- npm run build (showcase/shell-docs; existing Turbopack NFT trace
warning)

## Notes
- Repo-wide pnpm check-format currently fails on unrelated pre-existing
files outside this PR; the touched files pass scoped oxfmt check.
2026-06-22 15:46:53 -07:00
Sam Julien 3910d24aab docs(shell-docs): clarify tailored content selectors 2026-06-22 13:52:31 -07:00
Sam Julien fae187b5db docs: backport threads guide to authored integrations 2026-06-22 13:46:32 -07:00
Sam Julien 477b1203c5 docs(shell-docs): correct intelligence docs links 2026-06-22 10:52:05 -07:00
Ran Shem Tov 8768c8a7e7 Merge remote-tracking branch 'origin/main' into claude/trusting-babbage-f4d48a 2026-06-22 16:11:21 +02:00
Alem Tuzlak b2c28a046c Merge branch 'main' into feat/bot-whatsapp 2026-06-22 11:12:54 +02:00
David McKay d351b0dfa1 docs(cookbook): use the official Google ADK logo (PNG via LFS)
Replace the placeholder logo with the official Agent Development Kit mark
from google/adk-python (assets/agent-development-kit.png), committed as an
LFS PNG like the other recipe logos (Daytona, Arcade). Point the card and
sidebar at /logos/google-adk.png and revert the unused google-adk.svg back
to its original state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 19:31:29 -05:00
David McKay fc5c5b244f docs(cookbook): use the real ADK mark for the recipe logo
public/logos/google-adk.svg was a placeholder (a grey tile with the text
"Go"), like the other letter-stub SVGs in that directory. Replace it with
the real ADK glyph, reusing the vector paths from the `AdkIcon` component
(src/components/icons/framework-icons.tsx) on a light tile so it renders
on both light and dark surfaces. Only the new cookbook recipe references
this file, so no other page is affected. Monochrome for now; design can
recolor to official ADK colors at approval.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 19:27:54 -05:00
David McKay 1676e2b725 docs(cookbook): fix ADK user-scoping to use context/state, not forwardedProps
The ADK adapter (ag_ui_adk) builds session state from `dict(input.state)`
plus `input.context` (under `_ag_ui_context`); it does not mirror
`forwarded_props` into session state (it only reads it for the
`injectA2UITool` flag). So a user id sent via CopilotKit `properties`
(-> forwardedProps) never reaches `tool_context.state`, and the documented
scoping silently failed — the exact bug class the section warns about.

Carry the user id as agent context via `connectAgentContext` (or shared
agent state) instead, and read it from `tool_context.state["_ag_ui_context"]`
(or directly from state). Reconcile the contradictory forwardedProps/state
lines and fix the coding-agent prompt to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 18:05:54 -05:00
David McKay 47ffd32976 docs(cookbook): add Angular + Google ADK production recipe
Add a cookbook recipe covering the non-obvious production gotchas when
wiring an Angular frontend to a Google ADK agent over AG-UI, with optional
CopilotKit Intelligence threads and memory: one agent store, run-body user
scoping (not a header), never reconfiguring the runtime mid-submit,
server-side governance, model selection, and graceful platform degradation.

- New recipe at cookbook/angular-adk-agentic-app.mdx
- Register in cookbook nav (meta.json) and add an index card
- Add a custom/google-adk sidebar icon entry
- Cross-link from frontends/angular
- Update the cookbook nav test for the new page

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 13:18:06 -05:00
Tyler Slaton 38b39fccfd docs: polish cookbook navigation and partner logos (#5594)
Adding logos and reworking the cookbook page.
2026-06-19 17:47:57 -07:00
github-actions[bot] 790dfd0a75 style: auto-fix formatting 2026-06-19 17:33:38 -07:00
Tyler Slaton e606bbb9a7 Update frontend docs for Copilot Runtime quickstarts 2026-06-19 17:02:50 -07:00
Tyler Slaton 8f1674a05a docs: polish cookbook navigation and partner logos 2026-06-19 16:23:18 -07:00
Tyler Slaton db2fd6539b fix: address merge conflicts and run formatter 2026-06-19 15:51:03 -07:00
Austin Merrick 4addf64583 fix(core): allow clearing headers via setHeaders with null/undefined (#5542)
## Summary

Fixes #5535.

`CopilotKitCore.setHeaders` was typed `Record<string, string>`, so there
was no type-safe way to clear a header like `Authorization` on logout.
`null` was a TS error, and an empty string leaves the header present
with a blank value.

## Change

- Widen `setHeaders` to `Record<string, string | null | undefined>` and
drop any `null`/`undefined` entry. A shared `normalizeHeaders` helper
enforces the same string-only invariant at both write paths (the
constructor and `setHeaders`).
- `setHeaders` stays a full overwrite, so clearing one header while
keeping the rest uses the spread pattern:
  ```ts
copilotkit.setHeaders({ ...copilotkit.headers, Authorization: token ?
`Bearer ${token}` : null });
  ```
- Update the `react-core` `AuthTokenSync` skill example to show the
logout/clear path, and warn that a header must not be managed via both
the `headers` prop and imperative `setHeaders` (the provider re-applies
its prop-derived headers as a full overwrite whenever its inputs
change).

## Tests

Added `packages/core` coverage: drop `null`/`undefined` keys,
empty-string preservation, overwrite-not-merge semantics, single-header
clear via spread, `onHeadersChanged` notification, and propagation to
local and remote (`ProxiedCopilotRuntimeAgent`) agents.

## Notes

- No API break: `Record<string, string>` is assignable to the widened
type, so existing callers are unaffected.
- The second commit syncs the plugin manifest version (`plugin.json` +
`marketplace.json` `plugins[0].version`) to `1.60.2` via `pnpm
sync:plugin-skills`. This drift pre-existed on `main` and surfaced in CI
only because this PR touches skill files; it is unrelated to the fix.
2026-06-19 15:05:46 -07:00