Commit Graph

35 Commits

Author SHA1 Message Date
Jordan Ritter 2482317ccc style: apply ruff format to Python codebase
320 files reformatted. One-time alignment to match the ruff format
check added to CI in #4812.
2026-05-13 23:10:35 -07:00
Jordan Ritter 21b832443d fix(showcase): run oxfmt on deep-agents-finance-erp use-request-approval hook 2026-05-06 16:35:49 -07:00
Alem Tuzlak e3b696c29d feat(showcase-finance-erp): animate chat tool cards on mount (#4631)
## Summary

Replace the abrupt "cut in" with a 300ms fade + slide-from-bottom
entrance on each chat card so they feel connected to the streaming
response instead of popping in.

Follow-up polish on
[#4587](https://github.com/CopilotKit/CopilotKit/pull/4587).

## What changed

Added `animate-in fade-in slide-in-from-bottom-2 duration-300 ease-out`
to the root element of every tool render surface in the chat:

- `ToolCard` — `SpecializedToolCard` and `DefaultToolCard` (covers
`do_research`, `do_projections`, `navigate_and_filter`, dashboard ops,
`render_chat_visual`, etc.)
- `InlineChart` (both placeholder and rendered chart)
- `CashPositionCard` (both placeholder and full card)
- `InventoryReorderCard` (both placeholder and full card)
- `InvoiceApprovalCard` (both placeholder and full card)

## Why this approach

- **`tw-animate-css` is already imported** in
`examples/showcases/deep-agents-finance-erp/src/app/globals.css` — no
new dependencies.
- **Mount-time CSS animation, not Framer Motion** — the cards are
short-lived per turn and don't need orchestration; CSS keyframes resolve
to `animation-name: enter` exactly once on first paint and don't re-fire
on prop transitions, so swapping between `InProgress` and the populated
state stays smooth.
- 300ms `ease-out` matches the rest of the demo's transition timing.

## Test plan

- [x] Chat → "Cash Position" → cards slide+fade in (verified via
`getComputedStyle().animationName === "enter"`, `animationDuration ===
"0.3s"`).
- [x] Same animation fires for `do_research` / `do_projections` tool
cards, inline charts, approval cards, and inventory reorder cards.
- [x] No layout shift or jank in successive turns.
- [ ] Reviewer: visual verification on a non-mac browser if possible
(animation runs on standard CSS, but worth confirming).

## Notes

- No JS/runtime changes. Pure CSS class additions via Tailwind
utilities.
- Decoupled from the HITL fix in
[#4630](https://github.com/CopilotKit/CopilotKit/pull/4630) — landing
this independently is fine.
2026-05-06 18:27:03 +02:00
GeneralJerel 57722ce6d6 feat(showcase-finance-erp): animate chat tool cards on mount
Replace the abrupt "cut in" with a 300ms fade + slide-from-bottom
entrance on each chat card so they feel connected to the streaming
response instead of popping in.

Applied to all five tool render surfaces:
- ToolCard (Specialized + Default variants — do_research, do_projections,
  navigate_and_filter, dashboard ops, render_chat_visual, etc.)
- InlineChart
- CashPositionCard
- InventoryReorderCard
- InvoiceApprovalCard

Uses tw-animate-css utilities (`animate-in fade-in slide-in-from-bottom-2
duration-300 ease-out`), already imported in globals.css — no new deps.
2026-05-04 05:47:24 -07:00
GeneralJerel ecea359618 fix(showcase-finance-erp): wire request_approval HITL through useInterrupt
The agent's request_approval tool calls copilotkit_interrupt() which
raises GraphInterrupt and the runtime emits a CUSTOM { name:
"on_interrupt" } event. The previous useHumanInTheLoop hook only handles
frontend-executed tools and was ignoring those events, so the approval
card flashed in then vanished without ever exposing Approve/Reject.

- Switch to useInterrupt for the interrupt-driven flow
- Add a no-op useRenderTool for request_approval to suppress the
  wildcard tool renderer (which would otherwise show a half-finished
  generic card during streaming)
- JSON-parse event.value (the runtime delivers the interrupt payload as
  a string, not an object — accessing properties directly silently
  returns undefined and filters the interrupt out)
2026-05-04 04:56:32 -07:00
GeneralJerel 15bf868cb8 feat(showcase-finance-erp): polish demo chat UX
- Persistent follow-up suggestion chips above the input; the third chip
  rotates based on the currently loaded dashboard so we never suggest
  switching to the dashboard the user is already viewing.
- Hide the assistant message toolbar except on hover and only on the
  latest turn — drops the floating copy icon that previously appeared
  mid-conversation between tool cards.
- Replace the raw markdown preview under do_research/do_projections
  tool cards with a clean "Completed data gathering" status caption.
- Expand the orchestrator prompt with natural-language intent mapping
  so spending / cash-flow / revenue / executive-overview questions
  route to load_dashboard against the matching template (no save +
  reset + update churn), and approval-context invoice queries route
  to request_approval instead of just charting.
2026-05-01 10:27:18 -07:00
Jordan Ritter ac66995bf8 fix: bump all 15.x examples to Next 15.5.15 (security patches)
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.
2026-04-28 10:33:06 -07:00
Jordan Ritter 0d9ead7556 fix(starters): replace curl|sh uv install with COPY from uv image
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.
2026-04-22 17:44:02 -07:00
Alem Tuzlak 327d134ecd Merge remote-tracking branch 'origin/main' into worktree-nested-tinkering-quail
# Conflicts:
#	packages/angular/package.json
#	packages/core/package.json
#	packages/demo-agents/package.json
#	packages/react-core/package.json
#	packages/runtime/package.json
#	packages/shared/package.json
#	packages/sqlite-runner/package.json
#	packages/web-inspector/package.json
#	pnpm-lock.yaml
2026-04-13 11:12:25 +02:00
Alem Tuzlak ff2093102c chore(lint): add new oxlint rules and auto-fix violations
Enable stricter oxlint rules for better code health:
- typescript/consistent-type-imports: enforce `import type` for type-only imports
- typescript/no-import-type-side-effects: prefer top-level type imports
- import/consistent-type-specifier-style: consistent type specifier placement
- typescript/no-unnecessary-type-assertion: bump to error
- react/self-closing-comp: enforce self-closing JSX components
- unicorn/prefer-optional-catch-binding: drop unused catch params
- eslint/no-useless-computed-key: simplify object keys
- unicorn/prefer-string-slice: prefer .slice() over .substring()
- unicorn/prefer-array-flat-map: prefer .flatMap() over .map().flat()

All existing violations auto-fixed via oxlint --fix.
2026-04-10 19:29:32 +02:00
Tyler Slaton 100a882ebe fix: repair protected-branch release flow 2026-04-08 15:18:10 -07:00
Markus Ecker e3c00af220 feat(examples): A2UI + OpenGenUI demos, updated aimock fixtures, dojo e2e fixes 2026-04-08 12:50:56 -07:00
Max Korp 3bd279d680 fix: format files 2026-04-06 17:20:06 -07:00
Jordan Ritter d9f58fb388 feat(showcase): add deep-agents-finance-erp showcase (#3592)
## Summary

Adds a full-featured **Finance ERP showcase** demonstrating CopilotKit
v2 deep agents with:

- **Multi-agent orchestrator** (research + projections subagents via
`deepagents`)
- **14 frontend tools** rendered inline in the CopilotSidebar — charts,
cash position cards, dashboard widgets, and human-in-the-loop approval
dialogs
- **Customizable dashboard** with drag/resize widgets controlled by the
AI agent
- **Component gallery** at `/components` showcasing all frontend tool
renderers

### Architecture

```
Orchestrator (FinanceOS AI)
├── research subagent — queries ERP data (invoices, accounts, inventory, HR)
├── projections subagent — forecasts, scenario analysis, trend computation
└── frontend tools (registered as backend stubs) — AG-UI streams events,
    CopilotKit frontend matches to useFrontendTool renderers
```

Frontend tools are registered as lightweight `@tool` stubs on the
orchestrator. When the model calls them, the AG-UI adapter streams
`ToolCall` events that CopilotKit matches to `useFrontendTool` /
`useHumanInTheLoop` renderers by name. HITL tools use
`copilotkit_interrupt()` to pause the graph for user approval.

### Key files

| Area | Files |
|---|---|
| Agent | `agent/agent.py`, `agent/prompts.py`, `agent/tools.py`,
`agent/frontend_tools.py` |
| Frontend hooks | `src/hooks/use-render-chart.ts`,
`use-render-cash-position.ts`, `use-approve-invoice-payment.ts`, ... (14
total) |
| Dashboard | `src/context/dashboard-context.tsx`,
`src/components/dashboard/` |
| Layout | `src/components/layout/shell.tsx` (tool registration +
context sharing) |

All changes are scoped to `examples/showcases/deep-agents-finance-erp/`
— no SDK or package modifications.

## Test plan

- [ ] `cd agent && pip install -e . && python main.py` — agent starts on
:8123
- [ ] `cd .. && npm install && npm run dev` — frontend starts on :3000
- [ ] "What's our current cash position?" → `CashPositionCard` renders
inline
- [ ] "Give me a cash flow projection" → `InlineChatChart` renders
- [ ] "Process payment for overdue invoices" → `InvoiceApprovalCard`
with Approve/Reject
- [ ] "Remove the expense breakdown" → dashboard widget removed
- [ ] `/components` page renders all tool previews

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-06 16:19:14 -07:00
GeneralJerel c186e20e0d feat(showcase): add deep-agents-finance-erp project
Finance ERP showcase powered by CopilotKit deep agents. Includes a
Next.js 16 frontend with 7 CopilotKit-registered tools, a LangGraph
multi-agent backend (orchestrator + research/projections subagents),
Postgres-backed dashboard gallery with 12 widget types and 4 templates,
and human-in-the-loop approval flows for invoices and inventory.
2026-04-06 16:16:12 -07:00
Maxim 2fb966bd68 fix: apply a2ui-root Strict Mode fix to example apps
Follow-up to #3607 — the same problematic `import { v0_8 } from "@a2ui/lit"`
pattern existed in 4 example files. Switch to `@a2ui/lit/0.8` subpath for value
imports and remove an unused v0_8 import. Also broaden the lint rule glob to
cover `examples/` and prevent regression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 20:31:58 +02:00
Tyler Slaton 4f1f132d41 fix: address issues with licensing, formatting and types (#3597) 2026-04-03 09:38:41 -07:00
Tyler Slaton b0da854de9 fix: convert showcase PNGs to proper LFS pointers
These images were committed as raw binaries on main despite
.gitattributes marking *.png for LFS tracking. Re-add them through
the LFS clean filter so they're stored as pointers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 09:24:23 -07:00
Tyler Slaton 275544f23a chore: apply formatter changes from pre-commit hook
Auto-formatted showcase and web-inspector files picked up by the
lint-fix pre-commit hook.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 09:23:18 -07:00
Alem Tuzlak c5d80f8cd3 chore(examples): update demo video and title in open-mcp-client showcase (#3603)
## Summary

- Updated demo video in the readme
- Updated the title for the open-mcp-client showcase
2026-04-03 15:36:25 +02:00
Ran Shem Tov 4cc494c84d chore: fix formatting 2026-04-03 15:04:40 +02:00
Anmol Baranwal db7ad5250b chore: add demo video and update title in README 2026-04-03 18:01:54 +05:30
Jerel 179cbfae03 Merge branch 'main' into showcase/add-showcase-open-mcp-app-NBTmf 2026-04-02 08:44:27 -07:00
Jerel 4413987477 fix(open-mcp-client): address PR review feedback
Remove duplicate .claude/skills and .cursor/skills directories (keep
.agent/skills only), pin mcp-use to ^1.22.3, fix OpenAI model to
gpt-5.4-2026-03-05, align e2b (^2.13.0) and @modelcontextprotocol/sdk
(^1.25.2) versions across packages, replace vivek100 repo URLs with
CopilotKit/CopilotKit, fix clean script to preserve pnpm-lock.yaml,
and fix threejs-server main field to point to built output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:41:57 -07:00
Jerel 0eeafb23c8 chore(open-mcp-client): remove Vercel deployment references
Replace Vercel-specific comments and README sections with
generic or Render-specific content. Keep .vercel in gitignore
as a standard exclusion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:25:34 -07:00
Jerel d0955e1f9d chore(open-mcp-client): add agent skills README and exclude skills from Docker build
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:22:17 -07:00
Jerel 4454b8491c chore(open-mcp-client): update GitHub link to CopilotKit/CopilotKit
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:12:36 -07:00
Jerel 15e37ac73c chore(open-mcp-client): add Render deployment config
Add Dockerfile (multi-stage, Next.js standalone), .dockerignore,
render.yaml, and pnpm-lock.yaml. Fix stale @ts-expect-error in
route.ts that broke production builds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:10:30 -07:00
Alem Tuzlak 79ce60c580 chore: migrate from eslint+prettier to oxlint+oxfmt
Replace eslint and prettier with oxlint and oxfmt for faster linting
and formatting across the monorepo. Remove all eslint and prettier
configs, dependencies, and related packages. Add .oxlintrc.json and
.oxfmtrc.json for the new tooling. Update CI workflows and lefthook
hooks accordingly. Reformat codebase with oxfmt.

https://claude.ai/code/session_01GMkSf29p78HuMR1mbXn8He
2026-04-02 16:39:05 +02:00
Jerel 07c479fdab feat: add open-mcp-client showcase example
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 07:15:17 -07:00
Tyler Slaton 96885b5959 refactor: consolidate V1/V2 packages into flat @copilotkit/* structure
Flatten all packages from packages/v1/* and packages/v2/* into packages/* —
every package now lives directly under the @copilotkit/ scope with no v1/v2
subdirectories.

- Move all v1 packages (react-core, react-ui, runtime, shared, etc.) from
  packages/v1/* to packages/*
- Absorb v2 react code into packages/react-core/src/v2/ (exported via /v2 subpath)
- Absorb v2 agent code into packages/runtime/src/agent/ (exported via /v2 subpath)
- Move v2 packages (core, angular, demo-agents, etc.) to packages/*
- Replace all @copilotkitnext/* imports with @copilotkit/* equivalents
- Keep @copilotkitnext/angular as the sole exception (angular remains on next)
- Update CI workflows, renovate config, release scripts for flat structure
- No public API surface changes — all exports fields are preserved

Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-28 16:45:10 -07:00
Jordan Ritter fd34bbfbf6 style: format all example files with prettier
Run prettier on ~1,865 files across examples/ to match the monorepo's
formatting standards. These files were imported as-is from standalone
repos that used different prettier configs.
2026-03-12 13:06:04 -07:00
Jordan Ritter 34268b756a fix: remove SVG from LFS tracking
SVG files are text-based XML averaging ~218 bytes each. LFS tracking
adds per-file HTTP fetch overhead with no storage benefit, suppresses
git diff output, and breaks tutorial clone instructions that use
GIT_LFS_SKIP_SMUDGE=1 (users get LFS pointers instead of icons).
2026-03-12 13:06:03 -07:00
Jordan Ritter ec3a5ff114 feat: consolidate 47 demo repos into examples/ 2026-03-12 13:06:02 -07:00
Jordan Ritter 1a3ae544cb chore: add LFS tracking for jpeg, webm, and svg assets
Extend .gitattributes to track *.jpeg, *.webm, and *.svg via Git LFS,
complementing existing patterns (gif, jpg, png, pdf, mp4).
2026-03-11 21:48:44 -07:00