Commit Graph

5581 Commits

Author SHA1 Message Date
Martha Schumann 981734fb99 fix: propagate useCopilotReadable context and CopilotKit properties into Python LangGraph agent state
Two silent failures in the Python SDK prevented frontend context from reaching the agent:

1. langgraph_default_merge_state rebuilt copilotkit as {actions} only, dropping the
   useCopilotReadable items the TypeScript runtime had placed in state.copilotkit.context.
2. CopilotKitContext.properties were never forwarded through execute_agent → agent.execute(),
   so <CopilotKit properties={...} /> values never reached state.copilotkit.properties.

Both fields now land cleanly under state["copilotkit"] on every agent invocation.
Also adds tests, a showcase example, and a new docs page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:37:51 -07:00
Jordan Ritter 39347a7ada feat: remove open-genui rendering from showcase starters (#3944)
## Summary

- Remove the Open GenUI rendering strategy from all 17 showcase starters
- Clean up all supporting files: feature registries, constraints, e2e
tests, Python middleware, docs
- Regenerate all starters from updated template

### What was removed

The "open-genui" render mode allowed agents to generate arbitrary HTML
rendered in a sandboxed iframe. This is being extricated from starters
into a separate project. The core SDK `OpenGenerativeUIRenderer`
component is **not** affected — only the showcase starter UI option.

### Files changed

- **Template**: Deleted `open-genui/` renderer, updated types.ts,
page.tsx, suggestions hook
- **Registry**: Removed `open-gen-ui` and `byoc-opengenui` features from
all registries (shell, shell-dojolike, shared)
- **Constraints**: Removed "open" constraint block and open-gen-ui
references
- **E2E tests**: Removed Open GenUI test cases from starter-e2e,
screenshots, renderer-selector specs
- **Python middleware**: Removed OPEN_GENUI_INSTRUCTION and open-genui
handling from render_mode.py
- **Starters**: Regenerated all 17 via generate-starters.ts
- **Docs**: Updated QA-COVERAGE.md pill count from 5 to 4

### Local verification

- Docker build of langgraph-python starter: success
- Rendered page shows exactly 4 render modes (Tool-Based, A2UI,
json-render, HashBrown)
- Zero "open-genui" references in rendered HTML
- 521 validation tests pass

## Test plan

- [x] Docker build succeeds locally
- [x] Rendered starter shows 4 modes, no Open GenUI
- [x] Zero grep matches for open-genui across showcase/
- [x] 521 vitest validation tests pass
- [ ] CI green

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-15 17:03:13 -07:00
Jordan Ritter da667dcf72 fix: context-aware Python import rewriting for tools/ directory (#3943)
## Summary

Fixes crewai-crews starter crash: `ModuleNotFoundError: No module named
'agent.tools.tools'`.

The import rewriter rewrites `from tools import X` to `from .tools
import X`. Correct for files at agent root, wrong for files *inside*
`tools/` — there `.tools` resolves to `tools/tools` (non-existent). Fix:
context-aware rewrite using `from . import X` for files inside tools/.

Verified locally with Docker build + import test.

## Test plan

- [x] Docker build + import succeeds
- [x] 502 tests pass, drift check passes
- [ ] Deploy and verify crewai-crews returns 200
2026-04-15 16:53:53 -07:00
github-actions[bot] 31c7380b86 style: auto-fix formatting 2026-04-15 23:52:57 +00:00
Jordan Ritter fe7129fbcf fix: context-aware Python import rewriting for files inside tools/ dir
Files inside tools/ need "from tools import X" → "from . import X"
(current package), not "from .tools import X" (sub-module). The
previous rewrite rule was correct for files outside tools/ but caused
ModuleNotFoundError for crewai-crews custom_tool.py.
2026-04-15 16:46:14 -07:00
Jordan Ritter f8bbb1390c feat: complete open-genui removal from tests, registries, middleware, and docs 2026-04-15 16:44:28 -07:00
Jordan Ritter 07ed9b6882 feat: regenerate all starters without open-genui 2026-04-15 16:38:13 -07:00
Jordan Ritter 1fcc49e100 feat: remove open-genui rendering from starter template and registry 2026-04-15 16:37:56 -07:00
Jordan Ritter 4d7912cc20 fix: resolve remaining starter crashes — ESM, chown, mastra pins (#3941)
## Summary

Fixes the last 2 crashing starters (claude-sdk-typescript + mastra)
after PR #3933 resolved 5/7.

1. **ESM resolution failure** (claude-sdk-typescript) — nested
`agent/package.json` in Docker runner stage creates a separate package
boundary that confuses tsx module resolution. Fix: `rm -f
agent/package.json` in Dockerfile template after COPY.

2. **Recursive chown** (all templates) — `chown app:app /app` only
changed the directory, not contents. Mastra needs to create
`/app/src/mastra/public` at runtime. Fix: `chown -R app:app /app` in all
Dockerfile templates.

3. **Mastra version drift** (mastra) — floating `beta` dist-tags resolve
to incompatible versions between `mastra` CLI and `@mastra/core`. Fix:
generation script pins mastra ecosystem deps to stable versions via
`PIN_OVERRIDES` map.

All fixes verified locally with Docker builds before pushing.

## Test plan

- [x] Docker build + run claude-sdk-typescript locally — agent starts on
port 8123
- [x] Docker build + run mastra locally — `mastra 1.6.0 ready in 675 ms`
- [x] 502 generate-starters tests pass
- [x] Drift check passes
- [ ] Deploy to Railway and verify all 17 starters return 200
2026-04-15 16:22:07 -07:00
Jordan Ritter f97bf875d9 fix: include review items in docs-sync Slack notification (#3940)
## Summary
- The docs-sync warning notification was sending "see workflow run for
details" with no actionable information
- Now reads `review-items.txt` and includes the file list directly in
the Slack message
- Recipients can see which files need attention without digging through
CI logs

## Test plan
- [ ] Trigger docs-sync with a file that has showcase-local
modifications (exit code 3 path)
- [ ] Verify Slack notification includes the file list in a code block
- [ ] Verify auto-push-only path (exit code 0) still does NOT send the
warning notification
2026-04-15 16:18:46 -07:00
Jordan Ritter 8407b2e0e8 fix: include generated agent files in claude-sdk-typescript starter
The source package's src/agent/ was just committed — regenerating
the starter now correctly copies agent/index.ts and agent/package.json
into the starter directory, fixing the drift check.
2026-04-15 16:16:39 -07:00
Jordan Ritter 675456ed28 fix: add missing claude-sdk-typescript agent source directory
The src/agent/ directory was never committed to the repo, causing
the drift-check to fail in CI. The starter was generated from a
local-only copy of this directory.
2026-04-15 16:14:34 -07:00
Jordan Ritter ccbc19a436 fix: include review items in docs-sync Slack notification
The warning notification for files needing manual review was sending
'see workflow run for details' with no actionable information.

- Read review-items.txt and include file list in the Slack message
- Use jq for proper JSON escaping (handles newlines, quotes, special chars)
- Guard against missing review-items.txt with fallback and ::warning::
- Review-needed notification fires independently of push/merge outcome
2026-04-15 16:13:27 -07:00
Jordan Ritter bf0bbdbc7c feat: deployed starter smoke tests + rendered-tools assertion (#3939)
## Summary

- Add deployed starter L1-L3 smoke tests to `integration-smoke.spec.ts`
(health, agent endpoint, chat round-trip) hitting live Railway
`demo_url`s from `registry.json`
- Upgrade existing L4 `@tools` test with DOM element assertion
(`Promise.all` + `.some()`) to catch bugs like the `query_data` agent
loop that produced text but never rendered charts
- Add `deployed` boolean field to all 17 starter objects in
`registry.json` (14 healthy, 3 currently down)
- New `starter_deployed_smoke.yml` CI workflow: 6h cron + post-deploy
trigger + manual dispatch, with Slack/GitHub issue alerting on failure

### Context

7+ starters were crashing on Railway for hours with no automated
detection. The existing test suite only covered integration backends —
starters had zero deployed-URL testing. The
`agent-looping-on-query_data` bug shipped undetected because L4 only
checked text keywords, not rendered components.

### Key design decisions

- URLs read dynamically from `registry.json` (not hardcoded) — new
starters auto-tested
- `deployed` field gates which starters run (opt-in via `=== true`),
with `SMOKE_ALL` override
- Single-test-per-starter pattern avoids `fullyParallel` config
overriding serial mode
- Rendered-tools check is a warning (not hard failure) pending
data-testid standardization
- `STARTER_SLUG` env var supports single-starter manual dispatch
filtering

### Spec

https://www.notion.so/copilotkit/3433aa3818528112b2b6f65a4fab92d4

## Test plan

- [ ] Verify `@starter-health` tests pass against the 14 deployed
starters
- [ ] Verify `@starter-agent` tests pass against deployed starters
- [ ] Verify `@starter-chat` tests produce assistant responses on
deployed starters
- [ ] Verify 3 non-deployed starters (mastra, crewai-crews,
claude-sdk-typescript) are skipped by default
- [ ] Verify `SMOKE_ALL=true` includes non-deployed starters
- [ ] Verify `STARTER_SLUG=langgraph-python` filters to a single starter
- [ ] Verify rendered-tools warning fires for integrations without chart
components
- [ ] Verify CI workflow triggers correctly on manual dispatch
- [ ] Verify Slack + GitHub issue creation on failure path

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-15 16:00:14 -07:00
Jordan Ritter eecb252263 fix: resolve remaining starter crashes — ESM resolution, recursive chown, mastra version pins
1. Remove nested agent/package.json in TypeScript Dockerfile template to
   prevent ESM module resolution failure (claude-sdk-typescript)
2. Use chown -R for /app in all Dockerfile templates so runtime-created
   dirs (e.g. /app/src/mastra/public) are writable by non-root user
3. Pin mastra ecosystem deps to stable versions (1.6.0/1.25.0) in
   generation script — floating beta tags caused version drift between
   mastra CLI and @mastra/core
2026-04-15 15:57:17 -07:00
github-actions[bot] df9c812047 style: auto-fix formatting 2026-04-15 22:25:26 +00:00
Jordan Ritter 1fd938ac35 feat: add starter deployed smoke test CI workflow
New workflow running starter health/agent/chat tests against Railway:
- Triggers: 6h cron, after showcase deploy, manual dispatch
- Alerts on schedule + workflow_run failures (Slack + GitHub issue)
- Issue dedup by title match, continue-on-error on Slack
- Proper working-directory for npm ci and Playwright install
2026-04-15 15:17:13 -07:00
Jordan Ritter 7330356ef3 feat: add deployed starter smoke tests and rendered-tools assertion
Extend integration-smoke.spec.ts with:
- Deployed Starters section (L1-L3) reading demo_url from registry.json
- STARTER_SLUG env var filtering for single-starter testing
- Rendered-tools DOM assertion (Promise.all + .some) for L4
- Proper type derivation from JSON import (no inline as-casts)
- Single-test-per-starter pattern to avoid fullyParallel override
2026-04-15 15:17:10 -07:00
Jordan Ritter 87eee6645b feat: add health check retry support to e2e helpers
Support retries with configurable delay in checkHealth() for Railway
cold-start scenarios. Captures last error from retry loop instead of
making a redundant final request.
2026-04-15 15:17:06 -07:00
Jordan Ritter 93b730aba5 feat: add deployed field to starter objects in registry.json
Add a `deployed` boolean to all 17 starter sub-objects. 14 marked
true (healthy on Railway), 3 marked false (mastra, crewai-crews,
claude-sdk-typescript — currently down). Used by smoke tests to
gate which starters are tested.
2026-04-15 15:17:04 -07:00
Alem Tuzlak 32fb2635ed chore: release monorepo v1.56.0 (#3936)
## Release monorepo v1.56.0

**Scope:** `monorepo` | **Bump:** `minor`

---

### How this release process works

1. **This PR was created automatically** by the "release / create-pr"
workflow.
   It bumped the `monorepo` packages to `1.56.0`
   and generated AI-enhanced release notes.

2. **CI runs on this PR** — the full test suite (unit tests, lint, type
checks, build)
   must pass before merging. This is the review gate.

3. **Review the release notes** in `release-notes.md` in this PR.
If a Notion draft was created, you can edit the release notes there
before merging.

4. **When this PR is merged**, the `release / publish` workflow
automatically:
   - Builds all packages
   - Publishes the `monorepo` packages to npm at version `1.56.0`
   - Creates git tag `monorepo/v1.56.0`
   - Creates a GitHub Release with the final release notes

### Before merging

- [ ] CI is green (tests, lint, types, build)
- [ ] Version bumps look correct
- [ ] Release notes are accurate (edit in Notion if a draft was created)

---

> **Do not merge until CI is fully green.** The full test suite runs
automatically on this PR.
v1.56.0
2026-04-15 20:07:47 +02:00
Ran Shemtov 4da0999d89 Merge branch 'main' into release/publish/monorepo/v1.56.0 2026-04-15 19:39:10 +02:00
Ran Shemtov f4955ad5fd chore: example state streamin (#3934) 2026-04-15 19:24:38 +02:00
Ran Shemtov d74e32c824 Merge branch 'main' into chore/example-state-streamin 2026-04-15 19:24:23 +02:00
ranst91 cfb5921108 chore: release monorepo v1.56.0 2026-04-15 17:22:27 +00:00
Max Korp 7b9cad5643 feat: add intelligence to langgraph python example (#3649) 2026-04-15 09:53:16 -07:00
Max Korp 246448120a feat: add langgraph-python-threads example 2026-04-15 09:50:03 -07:00
Ran Shemtov e85313521b Merge branch 'main' into chore/example-state-streamin 2026-04-15 18:37:44 +02:00
Ran Shemtov 742318fb94 fix: use latest agui langgraph packages (#3932) 2026-04-15 18:37:14 +02:00
Ran Shemtov 8d45984d17 Merge branch 'main' into fix/use-latest-agui-langgraph 2026-04-15 18:36:16 +02:00
Ran Shem Tov 65500c5fb8 chore: fix state streaming on langgraph prebuilt agents in demos 2026-04-15 18:35:55 +02:00
Jordan Ritter ea9b43efb4 fix: resolve 3 starter crash root causes crashing 7/17 Railway starters (#3933)
## Summary

7 out of 17 Railway-deployed starters are returning 502 (CRASHED). Three
distinct root causes:

1. **EACCES `/home/app`** (langgraph-typescript, claude-sdk-typescript,
mastra) — `npx` at runtime needs a home dir for its cache, but the
non-root `app` user was created with `--no-create-home`. Fix: `mkdir -p
/home/app && chown app:app /home/app` in all 4 Dockerfile templates.

2. **IndexError `Path.parents[4]`** (agno, claude-sdk-python,
ms-agent-python) — `search_flights.py` schema fallback accesses
`parents[4]` but Docker path `/app/agent/tools/search_flights.py` only
has 4 parents (0-3). Fix: wrap in try/except IndexError in shared source
+ regenerate.

3. **Wrong import path** (langroid, crewai-crews) — `from agents.X
import` but starters use `agent/` (singular). `rewritePythonImports()`
in generate-starters.ts now converts these to relative imports.

All fixes applied to upstream sources (templates, shared python,
generation script) so drift check passes.

## Test plan

- [x] 251 generate-starters tests pass
- [x] Drift check passes (`--check`)
- [x] Pre-commit hooks pass (lint, format, unit tests)
- [ ] Deploy to Railway and verify all 17 starters return 200
2026-04-15 09:33:38 -07:00
Jordan Ritter cffecf1fc1 fix: resolve 3 starter crash root causes — Docker home dir, path depth, import rewriting
1. EACCES on /home/app: Dockerfile templates now create home dir for
   non-root user before USER app (langgraph-ts, claude-sdk-ts, mastra)
2. IndexError Path.parents[4]: search_flights.py schema fallback now
   guards against shallow Docker paths (agno, claude-sdk-py, ms-agent-py)
3. Wrong import path: rewritePythonImports() now converts
   from agents.X to relative imports in starter agent dirs (langroid, crewai)
2026-04-15 09:27:08 -07:00
Ran Shem Tov 6986a1c120 fix: use latest agui langgraph packages 2026-04-15 18:11:17 +02:00
Ran Shem Tov c8d4b273aa chore: add state streaming to langgraph example 2026-04-15 17:54:05 +02:00
copilotkit-devops-bot[bot] 699f9313e9 chore: auto-sync docs from main (a00950787) (#3931)
Automated docs sync. Clean transforms only.
2026-04-15 15:32:48 +00:00
copilotkit-devops-bot[bot] 068521d0ec chore: auto-sync docs from main (2026-04-15) 2026-04-15 15:32:42 +00:00
Alem Tuzlak a009507873 feat: add debug mode to runtime and client (#3562)
## Summary
- Add `debug` option to `CopilotRuntime` constructor and `<CopilotKit>`
provider for detailed event pipeline logging
- Server-side uses Pino structured logger; client-side uses
`console.debug` at each AG-UI pipeline stage
- Accepts `true` for full output or a granular config: `{ events,
lifecycle, verbose }`
- The two toggles are independent — enabling debug on the client does
not affect the server

## Changes

**`@copilotkit/shared`**
- New `DebugConfig` type, `ResolvedDebugConfig` interface,
`resolveDebugConfig()` normalizer

**`@copilotkit/runtime`**
- `debug` option on `CopilotRuntime({ debug: true })`
- Lifecycle logging: agent run started, SSE stream
opened/completed/errored
- Event logging: every emitted event (verbose = full payload, otherwise
key fields summary)

**`@copilotkit/react-core` + `@copilotkit/core`**
- `debug` prop on `<CopilotKit debug={true}>`
- Threads config through `CopilotKitCore` → `AgentRegistry` →
`ProxiedCopilotRuntimeAgent`

**Companion PR:** ag-ui-protocol/ag-ui#1398 (AG-UI client-side debug
logging)

## Test plan
- [x] All 647 runtime tests pass
- [x] All 352 AG-UI client tests pass
- [x] Lint clean (0 errors)
- [x] All affected packages build successfully
- [ ] Manual: set `debug: true` on runtime and provider, verify
structured logs on server and console output on client

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-15 17:31:02 +02:00
Alem Tuzlak b7e009c56b fix: correct verbose default in docs and remove stray vscode-extension README
The docs table and prose claimed `debug: true` sets `verbose: true`,
but the implementation intentionally defaults verbose to false (PII
safety). Fixed the table and explanatory text to match.

Also removed packages/vscode-extension/README.md which was committed
on this branch by mistake — it describes an unrelated VS Code extension
and has nothing to do with debug mode.
2026-04-15 17:18:09 +02:00
Alem Tuzlak 9953b8a264 Merge branch 'main' into worktree-lucky-popping-wren 2026-04-15 17:12:55 +02:00
Markus Ecker e5daf8deff fix: align A2UI schema with v0.9 spec, improve path binding prompts (#3929)
## Summary
- Replace custom `{ name, props }` schema format with A2UI v0.9
spec-aligned inline catalog format (`allOf` + `properties`) — eliminates
LLM "props" nesting confusion
- Restructure generation prompts: inline literal values are the default,
path binding is a narrow schema-driven exception
- Bump `@ag-ui/a2ui-middleware` to `0.0.5` in runtime

## Context
LLMs generating dynamic A2UI sometimes produced invalid output:
1. Nesting properties under a `"props"` key (because our schema used
`props` as a key)
2. Using `{ "path": "..." }` bindings on properties that only accept
literal values (e.g. chart `data`, metric `value`)

Both issues caused silent render failures or runtime crashes.

## Test plan
- [x] Tested with ag-ui dojo — A2UI dynamic schema demo works
- [x] Tested with CopilotKit langgraph-starter — sales dashboard renders
correctly
- [x] `@ag-ui/a2ui-middleware@0.0.5` published to npm

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-15 16:48:17 +02:00
Markus Ecker c61ebc5d15 chore: use pkg-pr-new preview packages in langgraph starter 2026-04-15 16:13:47 +02:00
Markus Ecker cfeb1c68c4 chore: update lockfile for @ag-ui/a2ui-middleware 0.0.5 2026-04-15 15:57:34 +02:00
Markus Ecker d51140ebbc chore: bump @ag-ui/a2ui-middleware to 0.0.5 2026-04-15 14:56:51 +02:00
Alem Tuzlak 6589cf2e73 Merge branch 'main' into worktree-lucky-popping-wren 2026-04-15 13:22:46 +02:00
github-actions[bot] 4abb9af1b2 style: auto-fix formatting 2026-04-15 11:12:37 +00:00
Jordan Ritter d2a8eca4c6 fix: restructure spring-ai starter to use Maven standard directory layout
The generate-starters script was flattening src/main/{java,resources} into
agent/{java,resources}, breaking Maven builds. Add a post-copy step that
moves them to agent/src/main/{java,resources} as Maven expects.
2026-04-15 13:10:57 +02:00
Jordan Ritter a1d5fd87b0 feat: fill QA checklists with real test steps, add test coverage matrix
Replace TODO placeholders in all 73 QA checklist files across 17 showcase
packages with specific, actionable test steps derived from reading the
actual demo page source code. Each checklist now references real
data-testid selectors, hook names, expected UI states, and interaction
flows.

Add showcase/QA-COVERAGE.md with a comprehensive matrix showing coverage
across manual QA, Vitest unit tests, Playwright E2E (smoke and interaction),
per-package E2E, aimock fixtures, and CI automation for all 9 demos plus
the Sales Dashboard starter hero.
2026-04-15 13:10:57 +02:00
Jordan Ritter a7d4e6d9a0 fix: prevent langgraph-python agent from looping on query_data
The agent's system prompt didn't mention pieChart/barChart frontend
tools, so gpt-4o-mini would call query_data repeatedly instead of
rendering charts. Updated the system prompt to explicitly instruct
the agent to call query_data once then use pieChart/barChart, and
updated the query_data tool description to reinforce single-call
semantics.
2026-04-15 13:10:56 +02:00
github-actions[bot] 6fbf78bd26 style: auto-fix formatting 2026-04-15 13:10:55 +02:00