The v2 migration renamed the Mastra agent key to `default` and updated
page.tsx/index.ts, but layout.tsx was missed: it still pinned
`agent="weatherAgent"` (now non-existent) and lacked
`useSingleEndpoint={false}`. The single-endpoint auto-detect races the
lazily-compiled API route, producing a 404 console error on page load
that fails the @interaction smoke leg's zero-console-error assertion.
Match the passing sibling starters (pydantic-ai/adk/ms-agent-framework-python).
Migrate adk, agno, crewai-crews, crewai-flows, mastra, pydantic-ai, ms-agent-framework-dotnet, ms-agent-framework-python, and llamaindex starters to the CopilotKit v2 `@chat` API and float them to 1.59.3 (package.json, runtime route, layout/page source, lockfiles).
The runtime CMD raised the soft nproc limit via
`/bin/sh -c "ulimit -u $(ulimit -Hu) ..."`, but on node:22-bookworm-slim
`/bin/sh` is dash, whose builtin `ulimit` does NOT support the `-u`
(max-user-processes) flag — it errors `ulimit: Illegal option -u`, which the
`2>/dev/null || true` then silently swallows. So #5185's intended PID
protection never applied; the soft limit stayed at the inherited default.
Run the CMD under `/bin/bash` (present at /usr/bin/bash) instead, whose
`ulimit -u` works. Verified against the exact base image under
`--ulimit nproc=512:4096`: bash raises the soft limit 512 -> 4096 (the hard
ceiling) while dash leaves it untouched and errors. Minimal change — only
the interpreter; the command, exec-as-PID-1, and `|| true` fallback are
unchanged.
A browser that is mid-`launch()` is not yet in `this.browsers` and has no
disconnect handler attached, so it is invisible to every teardown path
(shutdown's close pass, recycle, the disconnect handler). Under the
self-heal/relaunch storm introduced by the browser-pool hardening cluster
(#5174/#5185), a concurrent teardown therefore raced an in-flight launch:
the launch escaped teardown accounting entirely — either leaked, or (in
production) the browser was closed underneath the still-resolving
`chromium.launch()`, which then rejected with `browserType.launch: Target
page, context or browser has been closed` (SIGTRAP). The self-heal loop
relaunched forever, each relaunch hitting the same race (336
self-heal-launch-failed events in 4 min), wedging the pool.
Make launches atomic w.r.t. teardown: `launchBrowser()` registers its
launch promise in a new `pendingLaunches` set BEFORE awaiting
`rawLaunchBrowser()` and removes it on settle. `shutdown()` drains
`pendingLaunches` (alongside `inFlightRecycles`) before its close pass, so
it WAITS for every in-flight launch to settle instead of closing the
browser mid-launch. The launch seam re-checks `isShutdown` the instant the
launch settles: if a shutdown intervened it closes the freshly-launched
browser cleanly THEN, exactly once, and throws a shutdown sentinel so the
caller (init / recycle relaunch / self-heal) does not register a browser
into a pool that is going away. The launch-stagger gate still chains off the
raw result, so serialization semantics are unchanged. All #5185 behaviors
(backoff, self-heal, degraded/recovered alarms, waiter draining) preserved.
Adds a red-green test (FIX#13) reproducing an in-flight launch racing a
concurrent shutdown: pre-fix the launching browser escapes teardown
(closeCount 0, leaked); post-fix it is drained + closed cleanly exactly once
with no close-during-launch rejection.
Add a notify job that runs after both publish lanes via always() and
computes release intent directly from the github.event payload,
independent of the build jobs, so an infra failure in a lane can't
swallow the alert. The job posts the builder's rendered message to
#oss-alerts and includes a best-effort self-watchdog Slack post.
Add a pure builder that renders one concise #oss-alerts Slack message
per release from a unit-tested truth table: suppresses canary/dry-run
runs, gates npm/PyPI failure arms on event-derived release intent, and
pages on uncertain state. The CLI wrapper serializes env input to the
builder and writes the result to GITHUB_OUTPUT, failing loud on any
malformed or missing input.
The per-target partial-rollup `runWriter.update` (which advances the durable
`probe_runs.summary.{passed,failed}` counters) ran BEFORE `writer.write`
committed the corresponding `status`/`status_history` detail row, and a
`writer.write` failure is intentionally swallowed so one hiccup can't tank
sibling targets. That ordering opened a run-row-orphan window: the run row
could report `failed: N` for a target whose detail row was never durably
written — the stale-red ingestion artifact.
Reorder so the detail/status row is committed first and the run-row counter
is stamped only after, so the persisted counter can never outrun its backing
detail row. Pure statement-order swap — no schema/migration, dashboard read
path untouched, genuine failures still counted.
CopilotChatInput intentionally diverges while a run is in flight: Enter with
sendable text routes to SEND (the consecutive-interrupt unblock from #5195),
while the send/stop button always routes to STOP. Only a comment bound these
two behaviors together. Add a regression test asserting BOTH at once so a
future refactor cannot silently re-converge them (verified red against both a
button-sends-while-running and an Enter-also-stops mutation).
Replace the brittle `"activeRunCompletionPromise" in agent` probe + double
`as unknown as` casts in CopilotChat with a typed `RunCompletionAware`
contract plus an `isRunCompletionAware` type guard, both exported from core.
IntelligenceAgent now declares the property and implements the interface, so
the in-flight-run await is reachable without a cast and non-Intelligence
agents still degrade safely. Cast sites in the attachments/e2e tests and the
MockStepwiseAgent helper are updated to the typed accessor.
Factor the await-then-send logic into a shared `waitForActiveRunToSettle`
helper and call it from BOTH onSubmitInput and handleSelectSuggestion. This
closes the suggestion-path in-flight gap: selecting a suggestion mid-run no
longer pre-empts/aborts the active run (e.g. an interrupt RESUME) — the same
regression PR #5195 fixed for the typed-Enter path. Adds a red-green
regression test that parks the suggestion send on the in-flight promise.
## Summary
Reverts the four remaining Intelligence/threads merges, completing the
back-out started by #5215 (langgraph-fastapi) and #5216 (agent-spec):
- Revert #5211 — mcp-apps
- Revert #5205 — a2a-middleware
- Revert #5196 — pydantic-ai
- Revert #5151 — north-star foundation + batch 1 (incl. crewai-flows
#5189 and llamaindex #5199, which merged into it)
## End-state verification
- `git diff be20a389cf HEAD -- examples/integrations` is **empty** —
every integration example is byte-identical to pre-#5151 main
(`be20a389cf`, the merge's first parent).
- `scripts/__tests__/integration-intelligence-migration.test.ts`
(introduced by the rollout) is deleted.
- Total scope vs main: examples/integrations + that test file. Nothing
else touched.
## Heads-up: collateral on two follow-up commits
@jpr5 — your agent-key standardization commits (4bf50c7c41, 2103d0c875)
were written against the post-#5151 trees (they update `agentId` refs on
ThreadsDrawer/CopilotChatConfigurationProvider etc.), so this revert
necessarily takes those files back to their pre-#5151 content, undoing
the rename. Keeping the rename only where it auto-applied would have
left broken half-states (e.g. adk route registering `default` while the
restored layout pins `agent="my_agent"`). If you still want the rename
on the pre-threads files, it needs a fresh pass on top of this.
Also note: #5151 carried the starter-smoke heals (v2 label keys, 1.59.1
bumps, `useSingleEndpoint`, parity sync). Reverting it returns main's
starter smoke to its pre-#5151 state (9 starters red).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Summary
- add env-gated CopilotKit Intelligence Threads support to the
`agent-spec` integration
- wire the Threads drawer + thread context around the existing A2UI
chat/canvas experience
- align `agent-spec` CopilotKit/AG-UI package pins with the north-star
set and commit its npm lockfile
- extend the Intelligence migration contract to cover `agent-spec`
## Verification
- `npm run build` from `examples/integrations/agent-spec`
- `pnpm exec vitest run
scripts/__tests__/integration-intelligence-migration.test.ts`
- `pnpm exec oxfmt --check
scripts/__tests__/integration-intelligence-migration.test.ts
examples/integrations/agent-spec/src/app/page.tsx
'examples/integrations/agent-spec/src/app/api/copilotkit/[[...slug]]/route.ts'
examples/integrations/agent-spec/next.config.ts
examples/integrations/agent-spec/src/components/threads-drawer/threads-drawer.module.css
examples/integrations/agent-spec/src/components/threads-drawer/THEME.md`
- pre-commit hook: `pnpm run test && pnpm run check:packages`
## Smoke test
With local Intelligence services and licensed env:
- `GET /api/copilotkit/info` returned `mode: intelligence`,
`licenseStatus: valid`, `a2uiEnabled: true`, and agent `my_a2ui_agent`
- `GET /api/copilotkit/threads?agentId=my_a2ui_agent&limit=20` returned
200
- opened the UI at `http://localhost:3001`, Threads drawer rendered,
sent “Check my inbox”, run endpoints returned 200, the thread persisted,
and the inbox UI rendered five messages
## Notes
- `agent-spec` is not in the parity manifest, so `pnpm parity:verify
--target=agent-spec` reports `unknown instance: agent-spec`; this PR
uses the migration contract instead.
- During smoke, the runtime logged a warning that the `agents` feature
is not licensed, but the Intelligence thread and agent run still
completed successfully.
- The smoke-rendered chat still shows the agent pre-tool sentence twice
around the inbox tool result; that appears to be existing agent/runtime
message behavior rather than Threads wiring.
The gen-ui-interrupt demo across non-LangGraph integrations used
`useInterrupt`, which only renders in response to an AG-UI `on_interrupt`
event emitted by LangGraph's native `interrupt()` primitive. These
backends never emit that event — they expose `schedule_meeting` as a
frontend/HITL tool over the normal tool-call channel (Strategy B) — so
the picker never mounted.
Migrate the 8 clean Strategy-B integrations (ag2, agno, crewai-crews,
mastra, pydantic-ai, spring-ai, llamaindex, claude-sdk-typescript) to
`useHumanInTheLoop`, mirroring the ms-agent-python / ms-agent-dotnet
reference: same `name: "schedule_meeting"`, same zod `{ topic, attendee }`
parameters, same TimePickerCard render, resolving via `respond(...)`.
The framework-specific comment is generalized for accuracy.
The 3 LangGraph integrations keep `useInterrupt` (native interrupt).
built-in-agent and claude-sdk-python already use the equivalent working
`useFrontendTool` pattern and are left unchanged. strands and langroid
are intentionally NOT migrated — their backends declare a
`schedule_meeting(reason)` tool whose param shape conflicts with the
`topic`/`attendee` reference, which needs separate resolution.
Fixes the [skills.sh Snyk
findings](https://www.skills.sh/copilotkit/copilotkit/copilotkit-setup/security/snyk)
on the `copilotkit-setup` skill.
**W007 (HIGH, insecure credential handling) — clears this.**
Removed the exact secret-shaped placeholders Snyk flagged
(`OPENAI_API_KEY=sk-...`, `licenseKey="ck_..."`) across `SKILL.md`, both
runtime assets, and `telemetry-setup.md`; replaced with `<your-...>`.
Made env vars the only path (dropped the inline license-key option), and
added `.gitignore`/secret-manager guidance.
**W011 (MEDIUM, indirect prompt injection) — improves, TBD.**
Added a Security notes section (untrusted chat input, least-privilege
`defineTool` handlers, runtime endpoint auth). CopilotKit's entire
purpose is piping user chat into an LLM, so the flagged data-flow
genuinely exists — we'll have to see whether the added guidance is
enough to satisfy the analyzer.
Also bumps the skill version 1.1.0 → 1.1.1.
## Summary
- add env-gated CopilotKit Intelligence Threads support to the
`mcp-apps` integration
- move the runtime route to `[[...slug]]` with GET/POST/PATCH/DELETE for
thread REST routes
- wire the Threads drawer + locked gate into the existing MCP apps chat
surface
- align CopilotKit/AG-UI versions and commit npm lockfiles for the app
and Three.js MCP server
- extend the Intelligence migration contract to include `mcp-apps`,
including the app-router path differences
## Verification
- `npm run build` from `examples/integrations/mcp-apps`
- `pnpm exec vitest run
scripts/__tests__/integration-intelligence-migration.test.ts`
- `pnpm exec oxfmt --check
scripts/__tests__/integration-intelligence-migration.test.ts
examples/integrations/mcp-apps/app/page.tsx
examples/integrations/mcp-apps/app/components/threads-drawer/threads-drawer.tsx`
## Licensed smoke
With local Intelligence services from
`/Users/mothra/Projects/test-signups4` and the example `.env` exported:
- `docker compose up -d --wait` reported postgres, redis, and
intelligence healthy
- demo users `1_demo-user` and `demo-user` were seeded/no-op present
- `GET /api/copilotkit/info` returned `mode: intelligence`,
`licenseStatus: valid`, and agent `default`
- `GET /api/copilotkit/threads?agentId=default&limit=20` returned 200
and the Threads drawer rendered persisted threads
- started `npm run dev:mcp` and `next dev --turbopack -p 3024`
- created a new thread, sent “Say hello briefly for the smoke test.”,
`/agent/default/run` returned 200, and the assistant rendered “Hello!”
- after restarting the dev servers, selected the persisted “Quick
Greetings for Testing” thread; the prior user prompt and assistant
response restored, with `/agent/default/connect` returning 200
## Notes
- `3000` was occupied by another local example, so smoke used `3024` for
the Next UI.
- The local thread list contained older experimental thread names from
previous mcp-apps smoke runs; this PR now clears the client thread id
for “New thread” instead of minting a random UUID, so new thread
creation/replay works through the runtime.
Post-merge fix: add the missing examples/integrations/mcp-apps/.env.example
(+ .gitignore negation, crewai-flows precedent) — the contract test
'mcp-apps documents the local Intelligence environment' was failing
because the file was never added. 37/37 passing on the merged tree.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rename the registered agent key from each starter's bespoke name
(my_agent / agno_agent / starterAgent / sample_agent) to "default" so the
7 single-agent sidebar starters match the passing langgraph/strands
starters' config exactly: drop the frontend `agent=` prop on <CopilotKit>
(falls back to "default") and update the runtime route registration plus
every agentId reference in page.tsx (ThreadsDrawer,
CopilotChatConfigurationProvider, useAgent/useCoAgent).
The functional `useSingleEndpoint={false}` fix that makes starter chat
reach the agent already landed on main; this change brings the agent-key
config in line with the passing set. mastra is intentionally left on its
framework-derived key (MastraAgent.getLocalAgents) — its keys are not
literals and cannot be forced to "default" without diverging from Mastra.
Verified locally via agno docker-compose.test.yml smoke (aimock): @chat
round-trip passes (assistant streams in ~1.0s) with the standardized
"default" key; removing useSingleEndpoint={false} reproduces the documented
404 / "no assistant response" failure (chat degrades to ~1.1m, @interaction
fails on single-endpoint 404s).
W007 (HIGH, insecure credential handling):
- Replace secret-shaped placeholders (sk-..., ck_...) with descriptive
<your-...> placeholders in SKILL.md, both runtime assets, and
telemetry-setup.md
- Make env vars the only path for API keys and the license key (drop the
inline license-key option); source apiKey from process.env, never a literal
- Add .gitignore / secret-manager guidance for env files
W011 (MEDIUM, indirect prompt injection):
- Add a 'Security notes' section covering untrusted chat input,
least-privilege defineTool handlers, and runtime endpoint auth
Bump skill version 1.1.0 -> 1.1.1.
## Summary
- add env-gated CopilotKit Intelligence runtime wiring to
`examples/integrations/a2a-middleware`
- move the app onto the v2 provider/chat thread context with the
reusable Threads drawer
- preserve the A2A research/analysis/orchestrator URL flow while
isolating runtime agent instances for thread/title generation
- pin the standalone example to the threads-capable CopilotKit/AG-UI
packages and document local Intelligence env vars
- extend the integration migration regression test coverage for
a2a-middleware
## Verification
- `pnpm exec vitest run
scripts/__tests__/integration-intelligence-migration.test.ts`
- `pnpm exec oxfmt --check
scripts/__tests__/integration-intelligence-migration.test.ts
examples/integrations/a2a-middleware/app/page.tsx
examples/integrations/a2a-middleware/components/chat.tsx
'examples/integrations/a2a-middleware/app/api/copilotkit/[[...slug]]/route.ts'
examples/integrations/a2a-middleware/next.config.ts
examples/integrations/a2a-middleware/postcss.config.mjs`
- `npm run build` from `examples/integrations/a2a-middleware`
- local Intelligence stack: `GET
/api/copilotkit/threads?agentId=a2a_chat` returned `200`
- Playwright smoke check: licensed Threads drawer renders on desktop,
mobile has no horizontal overflow after responsive layout fix
## Notes
- The full live A2A agent response path was not exercised locally
because this shell did not have a Google/Gemini key available for the
Python agents. The Next build still completes; missing local A2A
services only produce the existing non-fatal agent-card fetch noise
during static collection.
Conflict resolution: take main's 4-entry migratedIntegrations array and
keep the a2a-middleware-specific contract tests + helper (a2a-middleware
uses app/ root + custom chat, so it doesn't fit the parameterized
src/app contract). 31/31 passing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
## Summary
- add env-gated CopilotKitIntelligence runtime wiring to
langgraph-fastapi while preserving the FastAPI-specific
LangGraphHttpAgent path
- add the shared Threads drawer/locked panel UI and threadId wiring for
the canvas/chat demo
- bump langgraph-fastapi CopilotKit deps to 1.59.1, add its
package-lock, and document local Intelligence env vars
- remove the temporary langgraph-fastapi parity allowances for
now-verbatim Threads/page/next files
- add a focused batch-2 migration contract test for langgraph-fastapi
## Verification
- confirmed the new migration test failed before implementation
- pnpm exec vitest run
scripts/__tests__/integration-intelligence-migration.test.ts
- pnpm parity:verify --target=langgraph-fastapi (90 ok, 1 existing
next-env.d.ts warning, 0 errors)
- npm run build (in examples/integrations/langgraph-fastapi)
- pnpm exec oxfmt --check <touched TS/TSX/JSON files>
- git diff --check
- commit hook: check-binaries, sync-lockfile, lint-fix,
test-and-check-packages, commitlint
- manual licensed Threads smoke test with local Intelligence composite:
- copied /Users/mothra/Projects/test-signups4/.env into the example .env
and supplied a valid local OPENAI_API_KEY
- docker compose up -d --wait from /Users/mothra/Projects/test-signups4
- seeded demo-user / 1_demo-user in cpki.users
- started dev with exported .env: set -a; . ./.env; set +a; npm run dev
- /api/copilotkit/info returned mode=intelligence, licenseStatus=valid,
version=1.59.1
- /api/copilotkit/threads?agentId=default returned 200
- licensed Threads UI visible
- selected/restored persisted thread
- created a fresh thread, sent a todo request, agent response rendered,
todo state updated
- refreshed and selected the named thread again; chat history, tool
calls, assistant response, and todo state restored
## Notes
- Targets the PR #5151 lineage branch because batch-2 depends on the
Intelligence foundation from ENT-679.
- The first manual smoke attempt failed because the copied local env had
an empty OPENAI_API_KEY; after replacing it in the ignored example .env
and restarting, the fresh smoke passed.
Conflict + post-merge resolutions:
- integration test (add/add): fold into the parameterized batch-2 contract
test; migratedIntegrations now includes langgraph-fastapi (24/24 pass).
- _parity/manifest.json: keep her langgraph-fastapi allowance removals
(threads-drawer/page.tsx/next.config now fully tracked), but drop the
stale strands-python shielding her branch added (example-layout +
docker-route-override divergence, @copilotkit 1.56.5 packageJsonOverrides)
— strands is already parity-synced at 1.59.1 on main; those overrides
would have made the next parity:sync rewrite it back to 1.56.5.
- parity verify on the merged tree: langgraph-js 82 ok / langgraph-fastapi
91 ok / strands-python 83 ok, zero drift.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
## Summary
- migrate the pydantic-ai example to the Intelligence-ready v2
CopilotKit setup
- add the shared Threads drawer with REST transport, env-gated
Intelligence runtime, and local env docs
- pin the example to CopilotKit 1.59.1 and add a migration contract test
## Verification
- pnpm exec vitest run
scripts/__tests__/integration-intelligence-migration.test.ts
- pnpm exec oxfmt --check
scripts/__tests__/integration-intelligence-migration.test.ts
examples/integrations/pydantic-ai/src/app/page.tsx
- git diff --check
- npm run build (examples/integrations/pydantic-ai)
- pre-commit hook: package tests plus publint/attw passed
- manual smoke: started local pydantic-ai app with Intelligence env,
loaded http://localhost:3000, verified Threads drawer, sent Read Agent
State, selected persisted thread, and confirmed the
prompt/tool/assistant exchange hydrated from the thread
## Notes
- Targets ben1/ent-679-intelligence-ready-north-star to stack on the PR
5151 Intelligence-ready baseline.
- The local smoke logs include a non-fatal initial THREAD_NOT_FOUND
lookup for a newly minted thread before it is created; the thread is
then created, listed, and hydrates successfully.
Conflict resolutions:
- page.tsx: keep the threads layout; swap the dead v1 sidebar labels
(title/initial) for the v2 keys (modalHeaderTitle 'Popup Assistant' +
welcomeMessageText) the starter smoke asserts, and carry over main's
disableSystemMessage + clickOutsideToClose. Keep her useRenderTool
render({ parameters }) — that is the actual v2 RenderToolProps shape;
main's render({ args }) was a latent runtime bug (args is not a prop).
- package.json: keep the drawer UI deps (class-variance-authority, clsx).
- integration test: fold into the parameterized batch-2 contract test;
migratedIntegrations now crewai-flows + llamaindex + pydantic-ai (18/18).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
## Summary
- Migrates the LlamaIndex example onto the Intelligence/Threads path
from the PR 5151 golden pattern.
- Pins the example to CopilotKit `1.59.1`, switches to the v2
chat/runtime wiring, and adds the shared mobile floating Threads drawer
experience.
- Adds optional Intelligence env wiring with an in-memory fallback when
no license token is configured.
- Adds a contract test covering the LlamaIndex migration surface so
future example migrations can stay red/green.
## Verification
- `pnpm exec vitest run
scripts/__tests__/integration-intelligence-migration.test.ts`
- `pnpm exec oxfmt --check
examples/integrations/llamaindex/src/app/page.tsx
examples/integrations/llamaindex/src/app/layout.tsx
examples/integrations/llamaindex/src/app/api/copilotkit/[[...slug]]/route.ts
examples/integrations/llamaindex/src/components/threads-drawer
examples/integrations/llamaindex/src/components/ui
examples/integrations/llamaindex/src/lib/utils.ts
scripts/__tests__/integration-intelligence-migration.test.ts`
- `git diff --check`
- `npm run build` from `examples/integrations/llamaindex`
- Pre-commit `test-and-check-packages` passed on commit.
## Manual smoke
- Started local Intelligence stack and LlamaIndex example with licensed
env.
- Confirmed Threads drawer loads via `/api/copilotkit/threads` and
persisted threads render/select correctly.
- Verified a backend-tool conversation: “Get the weather in San
Francisco.” created/named a persisted thread, rendered the weather card,
and hydrated correctly after refresh/reselect.
## Notes
- Observed the same non-fatal initial `THREAD_NOT_FOUND` lookup pattern
before thread creation that appears in other migrated examples.
- The LlamaIndex frontend-tool path (`add_proverb`) exposes an
adapter-specific streamed tool-argument issue where two JSON argument
payloads arrive concatenated. I did not address that in this migration;
the backend-tool path and Threads persistence smoke cleanly.
Conflict resolutions:
- page.tsx: keep the threads layout (drawer + gate + provider) and restore
the v2 sidebar labels (modalHeaderTitle 'Popup Assistant' +
welcomeMessageText) the starter smoke asserts, plus clickOutsideToClose.
- layout.tsx: keep the REST-transport explainer comment.
- integration test: keep the parameterized batch-2 contract test from
crewai-flows and add llamaindex to migratedIntegrations (12/12 pass).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Render the `a2ui_recovery` activity the middleware emits — as a pure DATA
CONTRACT, no @ag-ui/a2ui-toolkit dependency on the React client (mirrors how
a2ui-surface / a2ui_operations are consumed by activityType + content keys):
- createA2UIRecoveryRenderer() -> ReactActivityMessageRenderer for
activityType "a2ui_recovery":
- "retrying": a non-disruptive, collapsed "Retrying UI generation…" hint that
only appears once perceptible (after showAfterMs, or once attempts cross
showAfterAttempts) so a fast first retry never flashes; never replaces the
surface, never shows noisy errors inline.
- "failed": a clean, tasteful hard-failure message for end users, with the
structured developer detail tucked into an expandable <details>.
- "resolved"/unknown: renders nothing (the surface renderer owns the UI).
- Timing + debugExposure are client-configurable (A2UIRecoveryRendererOptions),
surfaced via CopilotKitProvider's `a2ui.recovery`.
- Registered as a built-in renderer when runtime A2UI is enabled; exported.
7 renderer unit tests green (jsdom).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Quick-win fixes for the **Build with agents** page from Sam's review.
Stacked on #5187 (retarget to `main` once it lands).
## Changes
- **Skills now shown on every page** — previously only the top-level
`/build-with-agents` (and `built-in-agent`) rendered the Skills section;
every framework integration page used the MCP-only snippet, hiding
Skills. The shared `coding-agents.mdx` now renders the full Skills + MCP
guide, so all 11 build-with-agents pages show Skills (the recommended
path).
- **Skills section** — added a top-three table (`copilotkit-setup`,
`copilotkit-develop`, `copilotkit-integrations`) and a note that
`copilotkit-contribute` is for contributing to CopilotKit, not building
with it.
- **Install step** — clarified to run `npx skills add` from the project
root; any agent there (Claude Code, Codex, Cursor, Gemini CLI) discovers
the skills automatically.
- **MCP headings** — demoted per-tool headers (Cursor, Claude Code, …)
from H2 → H3 so they nest under "MCP Docs Server" in the TOC; "Other"
subsections H3 → H4.
## Screenshots
Skills section + top-three table:

Install step:

Skills now rendering on a framework page (Mastra) that was previously
MCP-only:

TOC nesting (tools now under MCP Docs Server):

## Files
-
`showcase/shell-docs/src/content/snippets/shared/guides/build-with-agents.mdx`
-
`showcase/shell-docs/src/content/snippets/shared/guides/mcp-server-setup.mdx`
- `showcase/shell-docs/src/content/snippets/shared/coding-agents.mdx`
-
`showcase/shell-docs/src/content/docs/integrations/langgraph/build-with-agents.mdx`
## Summary
- add env-gated CopilotKitIntelligence runtime wiring to crewai-flows
- add Threads drawer/locked panel UI and shared threadId wiring for the
CopilotSidebar demo
- bump crewai-flows CopilotKit deps to 1.59.1 and add local Intelligence
env docs
- add a focused batch-2 migration contract test for crewai-flows
- fix two manual-smoke regressions found during the licensed Threads
pass: stale sidebar props and circular frontend-tool deps
## Verification
- confirmed the new migration test failed before implementation
- pnpm exec vitest run
scripts/__tests__/integration-intelligence-migration.test.ts
- npm run build (in examples/integrations/crewai-flows)
- pnpm exec oxfmt --check <touched files>
- git diff --check
- commit hook: check-binaries, sync-lockfile, lint-fix,
test-and-check-packages, commitlint
- manual licensed Threads smoke test with local Intelligence composite:
- Threads licensed UI loads and thread list returns 200
- creating/selecting a thread no longer crashes
- suggestion message runs through the CrewAI agent with a valid OpenAI
key
- agent response renders in chat
- persisted thread appears in the drawer and receives an updated title
## Notes
- Targets the PR #5151 lineage branch because batch-2 depends on the
Intelligence foundation from ENT-679.
labels.title/initial are dead v1 keys in the v2 CopilotSidebar — the header
rendered the default 'CopilotKit Chat' instead of 'Popup Assistant' and the
greeting never showed. Map to the v2 CopilotChatLabels keys
(modalHeaderTitle / welcomeMessageText), matching every other migrated
starter.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Brings in the base-branch fixes (main merge, v2 label keys, parity sync,
starter heals) so this PR's CI reflects its own change rather than the
pre-fix base. No conflicts.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>