Commit a9d807d
authored
feat(integrations): add Intelligence threads to langgraph-fastapi (CopilotKit#5197)
## 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 CopilotKit#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.13 files changed
Lines changed: 22046 additions & 14 deletions
File tree
- examples/integrations
- _parity
- langgraph-fastapi
- src
- app
- api/copilotkit/[[...slug]]
- components/threads-drawer
- langgraph-js/agent
- scripts/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 154 | + | |
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
6 | 19 | | |
7 | 20 | | |
8 | 21 | | |
| |||
0 commit comments