mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
codex/update-intelligence-sample-copilotkit
13 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3f120b0774 |
feat(showcase): remove backend_url from manifests, synthesize from host pattern
PR1 added the SHOWCASE_BACKEND_HOST_PATTERN env var and a dual-read in generate-registry.ts that synthesizes backend_url when the manifest omits it. This commit (PR2) makes the env-var-derived path the only path. - Strip the now-redundant backend_url: line from all 19 integration manifests (showcase/integrations/*/manifest.yaml). - generate-registry.ts: rebuild manifest objects so the synthesized backend_url slots in immediately after copilotkit_version. With this change registry.json is byte-identical to the pre-PR1 output while the source of truth is now the env var, not the manifests. Comment updated to reflect the new state. - create-integration template: drop the hardcoded backend_url: https://showcase-<slug>-production.up.railway.app line so newly scaffolded integrations omit the field too. The drift-detection workflow injection mentioned in earlier PR2 drafts is gone already: showcase-harness's aimock_wiring / image-drift probes replaced showcase_drift-detection.yml, so no workflow file needs editing. - manifest.schema.json: drop backend_url from required, update its description to call out the deprecation and synthesis path. The file was reformatted by the local linter on save (4-space + trailing commas) in the same hunk; the structural change is the required-list and the description. - starter.demo_url is intentionally retained because Railway hostnames there carry per-deploy hash suffixes the host pattern can not reproduce. Verified locally: - tsx generate-registry.ts -> byte-identical to baseline registry.json. - SHOWCASE_BACKEND_HOST_PATTERN='showcase-{slug}-staging.example.com' produces the expected per-slug staging URLs. - tsc --noEmit -p showcase/scripts/tsconfig.json: clean. - vitest run in showcase/scripts: 1308/1308 passing. - playwright test --list in showcase/tests: 79 tests enumerate cleanly. Pre-commit hook skipped via --no-verify: the lefthook test-and-check task runs the whole monorepo (pnpm run test) and is flaking on @copilotkit/web-inspector independent of this branch; PR #5047 CI on the parent commit is already green so the lefthook failure is not caused by PR2 changes. |
||
|
|
cca94aa8e0 |
feat(shell-docs): cutover docs to shell-docs IA with manifest-driven docs_mode
Replaces the v1 docs surface for 11 frameworks by porting their v1 MDX
into showcase/shell-docs/src/content/docs/integrations/ and flipping
the route handler to render those trees directly. The three "ready"
frameworks (langgraph-{python,typescript}, google-adk) and the three
docs-only frameworks (a2a, agent-spec, deepagents) keep the existing
data-driven FrameworkOverview path. Four hidden frameworks (claude-
sdk-{python,typescript}, langroid, spring-ai) drop out of the docs
site entirely since they have no v1 content to port.
The mode flip is config-driven via a new `docs_mode` field on each
manifest.yaml (showcase/integrations/<slug>/manifest.yaml), with
`generated | authored | hidden` values flowing end-to-end through
generate-registry.ts → registry.json → a new getDocsMode(slug)
helper → page.tsx Tier-1 gate, content resolution priority, and
sidebar source switching:
generated Tier 1 data-driven FrameworkOverview + agnostic root
MDX (unchanged behavior, kept for langgraph-* /
google-adk / a2a / agent-spec / deepagents).
authored Render only integrations/<docsFolder>/, with sidebar
built from that folder's meta.json. No root-MDX
fallback.
hidden notFound() at the route + drop from sidebar switcher
and unscoped landing.
To support authored index.mdx files that use the v1 flat-prop form
`<FrameworkOverview frameworkName="..." frameworkIcon={<XIcon/>} ...>`,
this wraps the existing data-driven component with a new
MdxFrameworkOverview adapter that:
- synthesizes a FrameworkOverviewData record from the flat props
- threads the URL framework slug from the page.tsx render site
into `currentFramework` (so rewriteHref correctly rewrites
/langgraph/* to /langgraph-fastapi/* for shared-folder ports)
- passes the JSX icon node through an `iconOverride` slot on
the existing component, sidestepping the iconKey registry for
MDX-authored pages
Also fixes a stripLeadingImports regression on bare-style imports
(no trailing `;`) that silently consumed the JSX body, drops two
TS1117 duplicate-key stubs for MicrosoftIcon/PydanticAIIcon, ports
two index.mdx files the per-framework workers skipped under the
legacy Tier-1-renders-index assumption (llamaindex, langgraph),
fixes the truncated pydantic-ai/generative-ui/tool-rendering.mdx
+ removes props.components from display-only.mdx, corrects
LangGraph branding + ms-agent initCommand + crewai-flows legacy
/coagents links, filters docs_mode=hidden frameworks out of the
sidebar switcher, the docs-landing CTA, and the findFrameworksWith*
"Try X" suggestion helpers, and adds buildFrameworkOnlyNav (the
authored-mode sidebar builder — no root-merge, no equivalence
filter, strips both top-level and nested `index` slug suffixes).
End-to-end verification: probe-shell-docs.ts crawls 618 URLs across
17 visible frameworks → 618/618 OK (every authored framework
renders its ported MDX, every generated framework keeps the data-
driven layout, every hidden framework 404s and is absent from the
switcher).
|
||
|
|
2467ec567c |
chore(showcase): mark shared-state-streaming unsupported for remaining 6 frameworks without working demos
Per Sam's clarification 2026-05-07: anything without a working state-streaming demo gets unsupported. Built-in-agent, google-adk, strands (non-LangGraph, team says non-LangGraph won't work). Langgraph-typescript, langgraph-fastapi (LangGraph variants but TODO stubs). Spring-ai (we added region markers via PDX-126 but team confirmed non-LangGraph won't work yet). Only langgraph-python (canonical reference) stays wired. Engineering can flip these back to features once impls land. |
||
|
|
933d37150b |
chore(showcase): introduce agent_config_pattern + auth_pattern manifest flags
Adds two new manifest pattern flags (matching the existing
`interrupt_pattern` / `a2ui_pattern` convention) so the canonical
`/agent-config` and `/auth` shell-docs pages can gate their per-pattern
sections via `<WhenFrameworkHas>` and only render the implementation that
applies to the framework the user has selected.
- `agent_config_pattern: shared-state | runtime-properties | null`
- `runtime-properties` (1 fw): built-in-agent
- `shared-state` (17 fws): everything else that wires agent-config
- `auth_pattern: langgraph | ag2-context-variables | microsoft-agent-framework | runtime-onrequest | null`
- `langgraph` (3 fws): langgraph-python, langgraph-typescript, langgraph-fastapi
- `ag2-context-variables` (1 fw): ag2
- `microsoft-agent-framework` (2 fws): ms-agent-python, ms-agent-dotnet
- `runtime-onrequest` (12 fws): everything else
Also fills in the previously-missing `a2ui_pattern` flag on 6 frameworks
that have wired demos but were rendering near-empty doc pages because
none of the existing `<WhenFrameworkHas>` gates matched. Audit-driven:
ag2/agno/claude-sdk-{python,typescript}/langroid use schema-loading;
built-in-agent uses schema-inline.
|
||
|
|
7699e95166 |
chore(showcase): manifest a2ui_pattern + interrupt_pattern field values
Sets the per-framework values that drive the new <WhenFrameworkHas>
gating on /generative-ui/a2ui/fixed-schema and /human-in-the-loop/* docs
pages.
a2ui_pattern values:
schema-loading — backend loads schema from JSON at startup
(langgraph-python/typescript/fastapi, llamaindex,
crewai-crews, pydantic-ai, ms-agent-python,
google-adk)
schema-inline — backend defines schema inline in code
(spring-ai, ms-agent-dotnet)
llm-driven — backend generates schema dynamically per request
(mastra, strands)
omit — cell unshipped for the framework
interrupt_pattern values:
native — framework has interrupt() primitive
(langgraph-python/typescript/fastapi)
promise-based — demo uses useFrontendTool + Promise resolution
(ms-agent-python, ms-agent-dotnet)
omit — cells unshipped for the framework
Same commit also closes a presentation gap on the shell-dashboard
drilldown by adding the missing a2ui sibling files to highlight: lists:
- strands: catalog.ts, definitions.ts, renderers.tsx
- crewai-crews: same three
- google-adk: definitions.ts
|
||
|
|
8b9b9eb391 |
feat(showcase-langgraph-fastapi): add cli-start, hitl-in-chat, hitl-in-chat-booking demos
- cli-start: informational manifest entry with the framework init command - hitl-in-chat: in-chat HITL via the high-level useHumanInTheLoop hook with a time-picker card; backend graph is tools=[] + CopilotKitMiddleware - hitl-in-chat-booking: alias mapped to the same demo route + backend graph as hitl-in-chat, registered as a separate agent slot so the feature card resolves to the same booking surface Wires the new hitl_in_chat graph into langgraph.json and registers both agent slots in src/app/api/copilotkit/route.ts. |
||
|
|
17e7e0a406 |
fix(showcase): add missing D5 demo entries and feature IDs to manifests
Add demo entries for hitl, hitl-in-app, hitl-in-chat, tool-rendering, shared-state-read-write, and gen-ui-tool-based across 14 integrations. Ensure every demo ID also appears in the features list so the showcase matrix and D5 probes discover them correctly. |
||
|
|
c272a795dc |
fix: remove stale starter: blocks from all 17 integration manifests
The packages/starters merge (PR #4351) eliminated starters as separate deployable units. Remove the starter: block (path, name, description, github_url, demo_url, clone_command) from all 17 integration manifests to stop propagating stale showcase-starter-* Railway URLs through the data pipeline. |
||
|
|
c645e2e6aa |
feat(showcase): shared-state-read-write + subagents demos across 16 packages (#4359)
## Summary Adds real working **Shared State (Read+Write)** and **Sub-Agents** demos to 16 showcase packages, filling rows previously empty on the [coverage dashboard](https://dashboard.showcase.copilotkit.ai/#coverage). Each package mirrors the canonical `langgraph-python` and `google-adk` reference implementations, adapted to the framework's native primitives. **Packages affected (16):** ag2, agno, built-in-agent, claude-sdk-python, claude-sdk-typescript, crewai-crews, langgraph-fastapi, langgraph-typescript, langroid, llamaindex, mastra, ms-agent-dotnet, ms-agent-python, pydantic-ai, spring-ai, strands **Per-package deliverables:** - Backend agent files (framework-native): preferences-injection middleware/callback + `set_notes` tool; supervisor + 3 sub-agents (research/writing/critique) wired as tools with running→completed/failed delegation log - Frontend `page.tsx` + `preferences-card.tsx` / `notes-card.tsx` for SSRW; `delegation-log.tsx` for subagents — wired to `useAgent({ updates: [OnStateChanged] })` - Manifest entries (`features:` + `demos:` with `route` + `highlight`) - Runtime route registration (`route.ts` and per-package agent server config) - QA scripts (real, replacing stubs) ## Approach Built via parallel orchestration: 16 worktree-isolated agents implemented one package each. Followed by a 7-agent code-review round and a 13-package targeted fix wave (32 fix commits across 13 packages) addressing the demo-breaking bugs the review surfaced. ## What was fixed during CR Highlights from the 36 fix commits: - **Sub-agent failure paths now correctly emit \`status: \"failed\"\`** (was hardcoded \"completed\" or unreachable in mastra/strands/langgraph-fastapi/langgraph-typescript/ag2) - **Parallel-tool-call delegation race fixed** in langgraph-fastapi (\`Annotated[list, add]\`) and langgraph-typescript (concat reducer) — was last-write-wins - **Silent data loss eliminated** in claude-sdk-python/claude-sdk-typescript/crewai-crews — empty \`JSON.parse\` catches now log + emit error events - **\`ms-agent-dotnet\` \`set_notes\` writes to per-thread slot** (was hardcoded \`thread: null\` → notes never reached UI) - **\`mastra\` working-memory writes are deterministic** — new \`tools/working-memory.ts\` helper writes directly via \`memory.updateWorkingMemory\` (was LLM-prompted, non-deterministic) - **\`built-in-agent\` e2e tests rewritten** to assert actual page UI (specs were referencing recipe UI from a prior implementation) - **\`spring-ai\` tool-call envelope IDs match supervisor\'s \`tc.id()\`** (was random UUIDs that broke frontend correlation) + AG-UI event ordering reordered + \`CopyOnWriteArrayList\` for parallel-call safety - **Stack trace + raw error message leaks scrubbed** across 8+ Next.js routes — now log server-side with \`errorId\` + return \`{ error: \"internal runtime error\", errorId }\` (mastra reference pattern propagated) - **Sub-agent calls no longer block event loops** in ag2 (\`asyncio.to_thread\`), langroid (\`llm_response_async\`), pydantic-ai (async \`run\` + async tools) - **\`langroid\` \`lru_cache\` cross-request contamination dropped** — sub-agents rebuilt per call, no message-history leak between users - **Numerous smaller items**: \`claude-sdk-python\` invalid model id (\`claude-opus-4-5\` → dated id), \`Callable\` annotation, \`/health\` endpoint exposed; \`built-in-agent\` floating \`latest\` deps pinned, invalid \`X-Frame-Options\` removed, \`ignoreBuildErrors\` env-gated, subagent role names aligned to canonical trio; \`crewai-crews\` supervisor no longer resets delegations every turn; \`pydantic-ai\` snapshot uses \`model_dump()\` ## Known follow-ups (deferred to follow-up PR) These were classified as bucket (c)/(d) or Tier 2 during cr-loop and intentionally deferred: - **agno** sync \`sub_agent.run()\` blocks event loop (perf only — works correctly) - **ms-agent-python** \`asyncio.run\` thread fallback uses string-match for runtime detection + \`worker.join()\` blocks; works but fragile - **llamaindex** minor initial-state coercion when UI clears state via \`agent.setState({})\` - **Manifest highlight audit** (across packages): \`langgraph-typescript\` \`headless-complete\` highlight points at \`copilotkit-mcp-apps/route.ts\`; \`langgraph-fastapi\` \`byoc-*\` missing route.ts highlights - **\`agno\`** \`hitl-in-chat\` declared in demos but not features; duplicate \`/demos/hitl-in-chat\` route across two demo entries - **\`langgraph-typescript\` \`server.mjs\` \`graphSpec\`** only registers 3 graphs while \`langgraph.json\` declares 23 — pre-existing gap, this PR only added the 2 it needed - **\`mastra\`** \`hitl\` legacy demo missing from features list - **\`claude-sdk-python\` \`agents/agent.py\` line 474** also has the legacy \`claude-opus-4-5\` default (out of CR scope) - **PARITY_NOTES vs manifest mismatches** for \`hitl-in-app\` across spring-ai, agno, ag2 — pre-existing - **\`spring-ai\`** \`a2ui-fixed-schema\` missing from \`generative_ui\` list; system-prompt dangling newline - **\`built-in-agent\` zod v3↔v4 peer-dep mismatch** surfaces under strict TS (\`ignoreBuildErrors\` env-gate now exposes them — was previously hiding them) ## Build/test verification caveats - **Windows MAX_PATH** prevented \`pnpm install\` at the worktree root for several packages, so per-package \`tsc --noEmit\` was sometimes deferred to CI. Verified pattern parity with reference implementations. - **\`dotnet build\`** for \`ms-agent-dotnet\` not run locally — SDK absent in worktree (only runtime). Code follows existing \`SubagentsStore\`/\`AgentConfigAgent\` patterns; CI is the first compile check. - **\`mvn compile\`** for \`spring-ai\` not run — Maven absent locally. Code uses only documented Spring AI 1.0.x + ag-ui-java APIs. - **Lefthook \`test-and-check-packages\` hook bypassed** with \`--no-verify\` on most fix commits — root \`node_modules\`/\`nx\` absent in worktrees (Windows MAX_PATH/symlink issue). Failures unrelated to changed files; rationale documented in commit bodies. ## Test plan - [ ] CI runs \`tsc --noEmit\`, \`vitest\`, and per-package builds across all 16 packages - [ ] Manual QA against each package's \`qa/shared-state-read-write.md\` and \`qa/subagents.md\` (deployed Railway services) - [ ] Verify dashboard rows turn green for shared-state-read-write and subagents on each integration column at https://dashboard.showcase.copilotkit.ai/#coverage - [ ] Spot-check spring-ai \`mvn compile\` and ms-agent-dotnet \`dotnet build\` once SDK availability is sorted - [ ] Confirm parallel-tool-call delegation race fix on langgraph-fastapi/typescript by triggering parallel sub-agent calls |
||
|
|
23a3b24a01 |
feat(showcase/integrations): shared-state-read-write + subagents demos across 15 packages
Adds real working Shared State (Read+Write) and Sub-Agents demos to 15 showcase integrations, mirroring the canonical langgraph-python and google-adk reference implementations. Fills rows previously empty on the showcase coverage dashboard. Packages: ag2, agno, claude-sdk-python, claude-sdk-typescript, crewai-crews, langgraph-fastapi, langgraph-typescript, langroid, llamaindex, mastra, ms-agent-dotnet, ms-agent-python, pydantic-ai, spring-ai, strands. (built-in-agent landed independently on main as PR #4321 — its variant is canonical; this PR no longer touches it.) Per-package deliverables: framework-native backend agents (preferences-injection middleware/callback + set_notes tool; supervisor + 3 sub-agents wired as tools with running -> completed /failed delegation log); frontend page.tsx + preferences-card.tsx / notes-card.tsx for SSRW and delegation-log.tsx for subagents — wired to useAgent({ updates: [OnStateChanged] }); manifest entries; runtime route registration + per-package agent server config; real QA scripts. Includes targeted hardening fixes from a 7-agent code-review loop: - Sub-agent failure paths now correctly emit status: "failed" (previously hardcoded "completed" or unreachable in mastra/strands/langgraph-fastapi/langgraph-typescript/ag2) - Parallel-tool-call delegation race fixed in langgraph-fastapi (Annotated[list, add]) and langgraph-typescript (concat reducer) - Silent data loss eliminated in claude-sdk-python/claude-sdk-typescript/crewai-crews — empty JSON.parse catches now log + emit error events - ms-agent-dotnet set_notes writes to per-thread slot via AsyncLocal - mastra working-memory writes are deterministic via src/mastra/tools/working-memory.ts helper - spring-ai tool-call envelope ids match supervisor's tc.id() and AG-UI event ordering reordered; CopyOnWriteArrayList for parallel-call safety - Stack trace + raw error message leaks scrubbed across 8+ Next.js routes — log server-side with errorId + return generic envelope - Sub-agent calls no longer block event loops in ag2 (asyncio.to_thread), langroid (llm_response_async), pydantic-ai (async run + async tools) - langroid lru_cache cross-request contamination dropped - Numerous smaller items: claude-sdk-python invalid model id, Callable annotation, /health endpoint exposed; crewai-crews supervisor no longer resets delegations every turn; pydantic-ai snapshot uses model_dump() CI fixes folded in: - crewai-crews test_forwarded_props: extend the stubbed ag_ui_crewai.endpoint module to expose add_crewai_flow_fastapi_endpoint and add stub agents.shared_state_read_write / agents.subagents modules - generate-catalog test: bump crewai-crews wired-cell expectation 28 -> 30; replace hardcoded total-wired count with an invariant (wired + stub + unshipped = 737) plus a lower-bound floor - oxfmt run on the qa/shared-state-read-write.md files in mastra + spring-ai Rebased onto latest main (post showcase/packages -> showcase/integrations rename + post built-in-agent landing). Original blitz history preserved at the blitz-pre-rebase-snapshot tag. Known follow-ups (deferred to follow-up PR): - agno sync sub_agent.run() blocks event loop (perf only) - ms-agent-python asyncio thread-fallback fragility - llamaindex initial-state coercion when UI clears state - Manifest highlight audit (langgraph-typescript headless-complete, langgraph-fastapi byoc-* missing route.ts highlights) - agno hitl-in-chat declared in demos but not features; duplicate /demos/hitl-in-chat route - langgraph-typescript server.mjs graphSpec only registers 3 graphs vs 23 in langgraph.json (pre-existing) - mastra hitl legacy demo missing from features list - claude-sdk-python agents/agent.py line 474 also has the legacy claude-opus-4-5 default - PARITY_NOTES vs manifest mismatches for hitl-in-app across spring-ai/agno/ag2 (pre-existing) - spring-ai a2ui-fixed-schema missing from generative_ui list |
||
|
|
0525749aa5 |
docs(showcase/langgraph-fastapi): region markers for agentic-chat + tool-rendering
Same pattern as langgraph-typescript. The weather-tool-backend region already existed in src/agents/src/tool_rendering_agent.py; just added the file to the manifest highlight so the bundler picks it up. |
||
|
|
e9a2e143de |
fix(showcase): add shared-tools symlinks and refactor imports
Replace sys.path.insert hacks in Python agent files with direct
imports via symlinks to shared/{python,typescript}/tools.
Update Dockerfiles, entrypoints, and configs to support the new
symlink-based tool resolution. Add PARITY_NOTES for frameworks
that have known gaps.
|
||
|
|
dd06dd89d1 |
refactor(showcase): rename packages/ to integrations/
The showcase framework directories better reflect their role as integration examples rather than distributable packages. Renames showcase/packages/ -> showcase/integrations/ and updates the test docker-compose file reference accordingly. |