Add a zodState() helper that attaches a lazy `~standard.jsonSchema.input`
to a zod schema so LangGraph's StateSchema.getJsonSchema() emits the
field into the graph's output_schema. Without it, zod v4 fields carry
`~standard.validate` + `vendor` only, `isStandardJSONSchema` returns
false, and the field is silently dropped from output_schema — which in
turn causes the AG-UI LangGraphAgent proxy to filter the value out of
STATE_SNAPSHOT events on the wire, so the frontend never sees it even
though the underlying thread state has the data.
Apply zodState to the middleware's own `copilotkit` state field so it
surfaces in output_schema and export it for demos to use on custom
state fields (todos, documents, etc.).
Uses `z.toJSONSchema` when available (zod v4 subpath) and falls back to
an empty object, which is sufficient to make langgraph-api include the
key in output_schema.
Rewrite the langgraph-js agent to use `createAgent` from `langchain`
(matching langgraph-python) with `copilotkitMiddleware` and
`stateStreamingMiddleware` from `@copilotkit/sdk-js/langgraph-middlewares`.
Tools now use `ToolRuntime` for state and tool-call-id access. System
prompt inlined in `agent.ts`; drop the file-based `PROMPT.md`.
Replace the legacy single-stage Dockerfile with a Node-only two-stage
build that mirrors the langgraph-python Dockerfile (frontend build →
runner, HttpAgent route override for Docker, Turbopack→webpack).
Add JS-specific `entrypoint.sh` (launches `@langchain/langgraph-cli dev`
+ Next.js standalone) and `docker-compose.test.yml` (wget healthcheck
for the alpine-based agent image, STARTER=langgraph-js default). Both
added to the instance's `allowedDivergence` in the parity manifest.
Rewrite the README to drop Python/uv prerequisites and list the correct
TypeScript tool paths.
Two small changes to the parity tooling, surfaced while validating it on
the langgraph-fastapi port.
1. Drop the per-instance PROMPT.md file. The reference demo
(langgraph-python) does not load agent/PROMPT.md at runtime — it inlines
the prompt as a triple-string literal in agent/main.py. Syncing a
cosmetic PROMPT.md file to every instance created a contract the code
did not follow. Now:
- sync.ts no longer writes agent/PROMPT.md per instance.
- verify.ts greps the first non-blank line of _parity/canonical/PROMPT.md
against each instance's agent source. Inline the prompt string in
source; verifier passes.
- Deleted the now-orphaned PROMPT.md copy under langgraph-js/agent/.
2. Track Dockerfile, docker/Dockerfile.agent, and serve.py in the shared
verbatim-files list. These were previously silent "allowed divergence"
across all instances — any Docker or runtime-adapter drift shipped
unflagged. Now:
- Added to tracked.verbatimFiles in manifest.json.
- langgraph-js keeps them in allowedDivergence (Node-only stack, legit
difference from the Python-based reference).
- langgraph-fastapi drops them from allowedDivergence (same language
stack as the reference; Docker/serve.py should match).
README and the copilotkit-demo-parity skill updated to match the new
prompt contract. Verifier still supports `--target` and exits non-zero on
unexpected drift.
Align langgraph-js with examples/integrations/langgraph-python via the
parity tooling. Remove legacy app/ layout, adopt src/ layout, rewrite
the TS agent to expose the tracked tool surface (manage_todos,
get_todos, query_data, generate_a2ui, search_flights) and todos state,
and write the canonical PROMPT.md. Keeps LangGraphAgent + stategraph
runtime (allowed divergence per the manifest); brings deps,
Dockerfile.app, entrypoint, showcase metadata, and shared UI into
lockstep. Parity verifier: 88 ok / 0 error.
Introduce machinery for keeping examples/integrations/* demos aligned to a
single north-star (langgraph-python). Built first so the upcoming
langgraph-js and langgraph-fastapi alignment PRs have a mechanical baseline
to work against instead of manual copy-paste.
- examples/integrations/_parity/manifest.json declares verbatim files,
tracked package.json keys, and expected agent surface (tool names,
state keys) per instance plus allowed-divergence lists.
- _parity/sync.ts copies verbatim files + rewrites tracked package.json
keys from north-star to a target instance. Dry-run supported.
- _parity/verify.ts diffs each instance vs north-star and exits non-zero
on unexpected drift. Checks verbatim content, tracked keys, canonical
prompt equality, and agent-surface grep-level presence.
- Canonical prompt at _parity/canonical/PROMPT.md — synced into each
instance's agent/PROMPT.md on parity:sync.
- Root package.json: pnpm parity:sync, parity:verify, parity:check.
- CI: .github/workflows/integrations_parity.yml runs parity:check on PRs
touching examples/integrations/**.
- Skill: .claude/skills/copilotkit-demo-parity/SKILL.md teaches agents
how to drive sync/verify and handle manual-merge zones (agent code,
api route, Dockerfile).
Does NOT touch the existing instance demos yet. Those alignment commits
follow in the same PR.
Reverts the example-app integration that was used for local end-to-end
testing of the inspector against an intelligence-backed runtime. The
example app is not part of the pnpm workspace, ships its own
package-lock.json, and pulls @copilotkit/* from the npm registry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The intelligence-backed example was a standalone npm-managed monorepo
pinned to published @copilotkit/runtime 1.56.3, so iterating on the
runtime against an Intelligence platform required publishing a release
or hand-linking. Pulling its two JS apps into the pnpm workspace lets
them resolve workspace:* and use whatever the local packages currently
build to.
Specific changes:
- Adds the example's app and bff to pnpm-workspace.yaml.
- Switches their @copilotkit/* deps to workspace:*; adds
@copilotkit/web-inspector as a workspace dep on the frontend so the
inspector can mount alongside the chat.
- Adds a small <Inspector /> React component that side-effect-imports
@copilotkit/web-inspector to register the custom element and assigns
the CopilotKit core via a ref (Lit elements expect properties, not
attributes, for complex values).
- Bumps the docker-compose image to the rc.16 composite, which is the
earliest published tag containing CopilotKit/Intelligence#144's
/api/_inspect/threads/:id/{events,state} endpoints.
- Drops the example's package-lock.json so npm and pnpm don't fight
over lockfiles in the workspace.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The button hit DELETE /threads, which the runtime router resolves to
"threads/list" (a GET-only route) and returns 405. The intended endpoint
is POST /threads/clear (defined at fetch-router.ts:175). Add try/catch
and surface non-ok HTTP status via console.error so the click no longer
silently appears to succeed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@types/react 19.2.x breaks recharts class component types with
"JSX element class does not support attributes because it does not
have a 'props' property." Pin the workspace-wide pnpm override and
the chat-with-your-data devDependency to 19.1.8.
Reverts the 14 other framework bumps and 2 lockfile regens. Each
framework needs per-framework QA against 1.56.4 before being shipped
in a sweep — too risky for the demo timeline to bump them all at once.
The validator now uses an explicit ENFORCED allowlist (currently just
adk) with an inline comment documenting the scope decision. Other
integrations get added to ENFORCED as QA clears each framework. The
structural fix (release-please automation that bumps integrations in
lockstep on each release) is tracked in CPK-7534.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The CLI scaffolder (npx copilotkit create -f <fw>) clones from
examples/integrations/<fw>/ on main. The @copilotkit/* deps in those
package.json files are bumped manually on release; 14 of 17 integrations
fell behind. Notable: ADK pinned 1.55.2 (missing useFrontendTool), mcp-apps
at 1.52.1, a2a-middleware floating on "latest". Issue #4253.
Adds scripts/validate-integration-pins.ts + a vitest live-tree check that
fails when any integration pins lag the monorepo release version, so the
gap can't reopen silently on the next release.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
24 examples bumped from various 15.0-15.4 versions to 15.5.15.
chat-with-your-data bumped from 15.6.0-canary to 16.1.7.
next-openai: moved OpenAI client init into handlers (15.5 evaluates
edge routes at build time).
Remaining on 14.x: next-pages-router(v1), state-machine, travel,
banking, enterprise-brex, presentation, todo — require major rewrite.
Phase 2: upgrade existing overrides to higher patched versions
Phase 3: add 36 new safe overrides for all resolvable transitive deps
Phase 4: bump storybook devDeps, vite in react-router, vitest in demo-agents, next canary
Remaining 3 are truly unfixable:
- parse-git-config: no patch exists (danger devDep)
- elliptic: no patch exists (storybook crypto chain)
- next: example on 15.x canary, advisory needs 16.x
Part of CPK-7320
The Apr 21 "refactor(runtime): Support durable compaction of threads" commit
re-added a2ui_dynamic_schema.py and a2ui_fixed_schema.py to the
langgraph-python-threads example in a stripped form. Most of the simplification
was cleanup, but two docstrings carried load-bearing instructions for the
sub-LLM and those got lost:
- render_a2ui's Args block said the root component must have id "root".
Without it, the LLM emits a valid flat component list with no entry point;
the A2UI renderer (A2uiSurface.tsx:152) hard-codes id="root" and falls
through to a shimmer placeholder — the "Sales Dashboard (A2UI Dynamic)"
demo renders as an empty white square.
- search_flights' docstring spelled out airline logo URLs, date format,
and status-icon colors, producing consistently-styled flight cards.
This restores both files verbatim from the non-threads example, which is
the known-good template. All differences in the agent/src dir are now
removed. Debug prints and headers come back with the restore; happy to
trim them in a follow-up if the intent was to keep the -threads version
terser.
## What does this PR do?
Fixes the guillotine cut where long messages hit the flat top of the
chat input and get sliced mid-line. Most visible in
`autoScroll=\"pin-to-send\"` mode (where the user reads at their own
pace and routinely lingers with a line butted against the input), but
applies to all scroll modes.
### The problem
`CopilotChatView` rendered the attachment queue + input as flex siblings
beneath the scroll area, so the scroll content stopped at the input's
flat rectangular boundary. The previously-shipped feather gradient
masked this visually but clashed with host themes whose `--background`
didn't match its hard-coded white / near-black —
[b621e96ee](https://github.com/CopilotKit/CopilotKit/commit/b621e96ee)
defaulted the feather to an empty div, which then revealed the
underlying layout bug.
### The fix
Wrap attachments + input in a single absolute-positioned overlay wrapper
at the `CopilotChatView` level. The scroll content now fills full height
and passes behind the rounded pill, matching ChatGPT's layout. The
scroll content's bottom padding reflects the measured overlay height so
the last line clears the pill when scrolled to the bottom.
Changes:
- `CopilotChatView.tsx` — replace flex-sibling attachments + input with
a single absolute overlay wrapper; move `inputContainerRef` onto the
wrapper so the `ResizeObserver` measures the full stack (attachments +
pill + disclaimer); add `inputContainerHeight` to scroll-content bottom
padding
- `CopilotChatAttachmentQueue.tsx` — add
`data-testid=\"copilot-attachment-queue\"` for test hooks
- `CopilotChatView.stories.tsx` — add a `PinToSend` story as
manual-verification scaffolding
- New test file `CopilotChatView.inputOverlay.test.tsx` with four tests:
overlay wrapper is absolute-positioned, attachments render above the
input inside the wrapper, welcome-screen input is NOT wrapped, scroll
content reserves `inputContainerHeight` as bottom padding
Not changed:
- `CopilotChatInput.tsx` public API (still accepts `positioning:
\"static\" | \"absolute\"`, same `bottomAnchored` flag, same
`containerRef`)
- `use-pin-to-send.ts` anchor math
- The `feather` slot itself — still empty-div default from
[b621e96ee](https://github.com/CopilotKit/CopilotKit/commit/b621e96ee);
hosts who want a themed fade supply their own via `scrollView={{
feather: ... }}`
- Welcome-screen input (stays inline)
- Angular parallel (follow-up if desired)
## Related PRs and Issues
- Builds on [#4158](https://github.com/CopilotKit/CopilotKit/pull/4158)
(pin-to-send anchoring/spacer/feather fixes)
- Builds on
[b621e96ee](https://github.com/CopilotKit/CopilotKit/commit/b621e96ee)
(feather defaulted to empty div)
## Checklist
- [x] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation
## Test plan
- [x] Unit tests — 4 new tests in
`CopilotChatView.inputOverlay.test.tsx` cover overlay structure,
attachment ordering, welcome-screen exclusion, and padding formula
- [x] Full `@copilotkit/react-core` suite (1153 tests) passes
- [x] Manual verification in Storybook (`UI/CopilotChatView → Default`,
`PinToSend`): content flows cleanly under the pill, last line reachable,
no guillotine cut
- [ ] Reviewer: check `WithSuggestions` story (padding formula switches
between `+4` and `+32`)
- [ ] Reviewer: check that `scrollView={{ feather: MyFeather }}`
override still works (the `slots.e2e` test covers this, but worth a
manual sanity check)
The GitHub Actions formatter pushed a formatting-only change to
examples/integrations/langgraph-python-threads/README.md during this PR's
CI run. That file is unrelated to the threads inspector work — reverting
to origin/main so the PR diff stays focused.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the Angular-backed cpk-thread-list / cpk-thread-details custom
elements with native Lit implementations inside @copilotkit/web-inspector,
so React, Vanilla, and any other non-Angular consumer of the inspector
gets full functionality without pulling the Angular runtime. The
@copilotkit/web-inspector-angular package is deleted entirely, and the
Angular demo no longer calls defineInspectorElements.
Backend: adds GET /threads/:id/events and GET /threads/:id/state to the
runtime (in-memory runner path). The Intelligence path returns 501 with
a clear "not yet supported on this runtime" empty state — coordination
with the Intelligence team is tracked separately (CPK-7453).
Also guards attachToCore's getThreadStores call so consumers on an older
@copilotkit/core don't throw when assigning inspector.core, and drops
two unrelated showcase-whitelist lines that landed in
scripts/hooks/check-binaries.sh during a prior merge.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace `RUN curl -LsSf https://astral.sh/uv/install.sh | sh` across all
starter Dockerfiles with `COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx
/usr/local/bin/`. The curl|sh form has a pipe-swallow latent bug: when
astral.sh returns a 5xx, curl fails but `sh` gets no stdin and exits 0,
so the layer "succeeds" with no uv binary. A later `RUN uv sync` then
crashes with `uv: not found` (exit 127). This already bit the agno
starter today (run 24809910399) when astral.sh had a transient outage;
upstream recovered on its own so this is latent-bug cleanup, not a
hotfix.
Using the official uv image is uv's own recommended pattern: it's
cache-friendly, network-free at build time, and sidesteps the pipe
failure mode entirely.
Scope: all 20 Dockerfiles under examples/integrations/*/Dockerfile,
examples/integrations/*/docker/Dockerfile.agent, and
examples/showcases/scene-creator/agent/Dockerfile.
Verified locally: `docker build -f docker/Dockerfile.agent ./agent`
for agno succeeds against the new pattern.
`CopilotChatView` rendered the attachment queue + input as flex siblings
beneath the scroll area, so long messages hit the input's flat top edge
and were sliced mid-line. Most visible in pin-to-send mode where the user
reads at their own pace. The previously-shipped feather gradient masked
this but clashed with host themes whose `--background` didn't match its
hard-coded white/near-black (b621e96ee defaulted it to an empty div).
Wrap attachments + input in a single absolute-positioned overlay so the
scroll content fills full height and passes behind the rounded pill. Pad
scroll-content bottom by the measured overlay height so the last line
clears the pill. Welcome-screen input is unchanged (stays inline). The
`feather` slot remains — hosts who want a themed fade supply their own
gradient.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrap <ExampleLayout> in <CopilotChatConfigurationProvider agentId="default"
threadId={threadId}> so the canvas's useAgent() inherits the active threadId
via the existing fallback in use-agent.tsx. Without this wrapper, the canvas
calls useAgent() with no args and resolves to the registry agent instead of
the per-thread clone that the chat's /connect replay populates, so
STATE_SNAPSHOT events never reach it — todos rendered blank on thread resume
even though the final persisted snapshot contained them.
CopilotChat no longer needs explicit agentId/threadId props; it inherits
from the same provider, keeping one source of truth.
- hooks.ts: keep both threads/clear and cpk-debug-events in RouteInfo
- use-threads.tsx: keep registerThreadStore effect + adopt main's
runtimeStatus gating for context dispatch
- use-threads.test.tsx: keep both our register/unregister test and
main's new runtimeConnectionStatus=Connected gating test
- scripts/hooks/check-binaries.sh: add shell-docs and shell-dojo
demo-content.json exclusions (main introduced these >1MB files without
updating the exclusion list)
- lefthook.yml, pnpm-lock.yaml: accept main's version
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix the long-standing typo across the example directory name + module
identifiers, align imports + package names. Also touches examples/integrations/adk
docker-compose fixtures and examples/e2e agents reference doc.