Commit Graph

6618 Commits

Author SHA1 Message Date
Jordan Ritter 32794abc71 fix: make adduser idempotent in all Dockerfile templates, regenerate starters 2026-04-14 14:26:32 -07:00
Jordan Ritter 5aa158da03 fix: surface TOAST/BANNER errors when showDevConsole=false (#3789)
## Summary
- Fixes #2431
- The `routeError` function in `copilot-messages.tsx` returned early
when `showDevConsole=false`, suppressing ALL errors including
user-visible ones (TOAST and BANNER visibility)
- Now only `DEV_ONLY` and `SILENT` errors are suppressed in production;
`TOAST` and `BANNER` errors are always surfaced to the chat UI
- Also fixes the non-GraphQL error handler which had the same
early-return bug

## Test plan
- [x] Added `error-visibility-prod.test.tsx` covering TOAST, DEV_ONLY,
and SILENT visibility behavior
- [x] All 1073 existing react-core tests pass
- [x] Build passes
2026-04-14 14:26:17 -07:00
Jordan Ritter 0106b1bf19 fix: remove unstable key on CodeBlock to prevent flickering during streaming (#3826)
## Summary

- Removes the `key` prop from `CodeBlock` in `Markdown.tsx` entirely
- The original `Math.random()` key caused React to remount the component
on every render, producing visible flickering
- A content-based key (language + content prefix) still changes every
streaming token, causing the same problem
- Without an explicit key, React uses positional identity — stable
across re-renders while content streams in

Closes #2669

## Test plan

- [x] `@copilotkit/react-ui` tests pass
- [x] `@copilotkit/react-ui` build succeeds
- [ ] Manual: verify code blocks no longer flicker during streaming in
chat UI
2026-04-14 14:26:13 -07:00
Jordan Ritter 2c45e24e90 fix: handle anyOf/oneOf/$ref/null in JSON schema to Zod conversion (#3849)
## Summary
- Handle `anyOf`, `oneOf`, `$ref`, and null type entries when converting
JSON schema to Zod schemas
- Prevents runtime errors when LLM tool parameters use union types or
nullable fields

Closes #2220

---
*Split from #3847*
2026-04-14 14:26:09 -07:00
Jordan Ritter 1e5c0ba9ec fix: support OpenAI SDK v5 by falling back from openai.beta to openai.chat.completions (#1979) (#3810)
Fixes #1979

## Summary

- Add `isOpenAIV5()` detection helper that checks whether `beta.chat`
was removed (v5 promoted it to `chat.completions`)
- Add `getChatCompletionsForStreaming()` helper that routes to the
correct completions namespace per SDK version
- Migrate `OpenAIAdapter` to use the new helper instead of direct
`beta.chat.completions` access
- Migrate `OpenAIAssistantAdapter` `runs.retrieve()` and
`submitToolOutputsStream()` to use v5 named path params (e.g.
`retrieve(runId, { thread_id })` instead of positional
`retrieve(threadId, runId)`)
- Add `openai` to peerDependencies with `^4.85.1 || ^5.0.0` range
- Add 11 unit tests covering v4/v5 detection, streaming dispatch, and
named path param calling conventions

## Notes

The remaining `openai.beta.threads.*` calls (`threads.create`,
`messages.create`, `runs.stream`) do NOT need migration because:
1. `beta.threads` still exists in v5 (only `beta.chat` was removed)
2. These methods have single path params, so their signatures are
unchanged

## Test plan

- [x] All 11 v5 compat tests pass (`nx run @copilotkit/runtime:test`)
- [x] Runtime package builds successfully (`nx run
@copilotkit/runtime:build`)
- [x] Pre-commit hooks pass (lint, format, publint, attw)
2026-04-14 14:26:05 -07:00
Jordan Ritter 9e5b458612 fix: use div instead of p tag in Markdown to prevent hydration errors (#2234) (#3821)
## Summary

Fixes #2234

React's hydration fails when block-level elements (like `<div>`) are
nested inside `<p>` tags in the Markdown component. Replaces the `<p>`
wrapper with `<div>` (adding `copilotKitParagraph` class for styling) to
prevent SSR hydration mismatches.

## Test plan

- [ ] Verify Markdown rendering in SSR context has no hydration errors
- [ ] Verify paragraph styling is preserved via `copilotKitParagraph`
class
2026-04-14 14:26:02 -07:00
Jordan Ritter 14eef93d20 fix: scope .dark CSS selectors to CopilotKit elements (#3850)
## Summary

- **console.css + input.css:** Scope `.dark` CSS selectors to CopilotKit
container elements (`.copilotKitDevConsole
.copilotKitDebugMenuTriggerButton` and `.poweredBy` respectively). The
original selectors had bare `.dark,` as standalone entries in
comma-separated selector lists, which applied styles to *any* element
with class `.dark` instead of scoping to CopilotKit elements.
- **colors.css:** Remove broken `:root` pseudo-element from
`body[style*="color-scheme: dark"] :root` — `:root` is `<html>`, which
cannot be a descendant of `<body>`, so this selector never matched
anything.
- **E2E tests:** 4 Playwright regression tests verifying dark mode
styles don't leak into host application elements.

Prevents CopilotKit dark-mode styles from leaking into the host
application.

Closes #2920

---
*Split from #3847*
2026-04-14 14:25:57 -07:00
Jordan Ritter beed28df67 fix: regenerate shell registry and starter content data (#3904)
Registry and starter-content.json were stale after #3896 merge.
Regenerated from current manifests.
2026-04-14 14:18:47 -07:00
Jordan Ritter f79d7abdd3 fix: resolve langgraph-python starter crash from wrong graph path and fragile imports (#3902)
## Summary

- Fixed `langgraph.json` graph path in the langgraph-python starter: was
`./src/agents/main.py:graph` (copied verbatim from demo package),
corrected to `./main.py:graph` (matching the flattened starter layout)
- Wrapped A2UI agent imports (`search_flights`, `generate_a2ui`) in
try/except in both the demo package and starter, so the agent starts
cleanly even when optional dependencies like copilotkit's `ToolRuntime`
patch aren't loaded
- Fixed `generate-starters.ts` to rewrite `langgraph.json` graph paths
when copying from packages to starters, preventing this drift in future
regenerations

## Test plan

- [ ] Run `npx tsx generate-starters.ts --check --slug langgraph-python`
(passes)
- [ ] Deploy langgraph-python starter to Railway and verify agent starts
without crash
- [ ] Verify core tools (query_data, get_weather, schedule_meeting) work
- [ ] Verify A2UI tools load when copilotkit runtime is available
2026-04-14 14:18:33 -07:00
Jordan Ritter ed6a29e71a fix: add AG-UI SDK build-from-source step to spring-ai Dockerfile (#3901)
## Summary

- The `com.ag-ui.community` Maven artifacts (spring-ai, java-server,
spring) aren't published to Maven Central
- The spring-ai starter Docker build fails at dependency resolution
because it tries to fetch them from Central
- The demo package Dockerfile already handles this by cloning the ag-ui
repo and running `mvn install` before building — this PR mirrors that
approach in the Dockerfile.java template and regenerates the starter

## Changes

- `showcase/starters/template/dockerfiles/Dockerfile.java` — add AG-UI
SDK clone + build-from-source step before agent build
- `showcase/starters/spring-ai/Dockerfile` — regenerated from updated
template

## Test plan

- [ ] Docker build of spring-ai starter succeeds: `cd
showcase/starters/spring-ai && docker build .`
- [ ] Starter consistency check passes: `npx tsx generate-starters.ts
--check --slug spring-ai`
2026-04-14 14:18:14 -07:00
Jordan Ritter 8786ee98fc fix: regenerate shell registry and starter content data 2026-04-14 14:17:24 -07:00
Jordan Ritter 569f85246c fix: format showcase_deploy.yml 2026-04-14 14:13:59 -07:00
Jordan Ritter 6a8b754689 fix: resolve langgraph-python starter crash from wrong graph path and fragile imports
The langgraph.json in the starter was copied verbatim from the demo package
with path ./src/agents/main.py:graph, but the starter flattens agents into
the agent/ dir so the correct path is ./main.py:graph.

Also wraps A2UI agent imports in try/except so the starter starts cleanly
even if copilotkit's ToolRuntime patch isn't available — these are optional
features that shouldn't prevent the core agent from running.

Fixes the generate-starters.ts script to rewrite langgraph.json graph paths
when copying from packages to starters, preventing this drift in the future.
2026-04-14 14:12:03 -07:00
Jordan Ritter d6b865cb3a fix: add AG-UI SDK build-from-source step to spring-ai Dockerfile
The com.ag-ui.community artifacts aren't published to Maven Central,
so the Docker build fails when resolving dependencies. The demo package
Dockerfile already handles this by cloning the ag-ui repo and running
mvn install before building the agent — mirror that in the template
and regenerate the starter.
2026-04-14 14:10:03 -07:00
Jordan Ritter e1ef523a3e fix: resolve agent factory functions in V1 CopilotRuntime constructor (#3865)
## Summary

- The V1 `CopilotRuntime` constructor did `{...endpointAgents,
...agents}` which silently spread a factory function to `{}`, destroying
all agents with no error or warning
- Anyone using the V1 API with a factory function (introduced in #3854)
got zero agents — complete silent data loss
- This wraps factory functions so endpoint agents are merged at
resolution time instead of construction time, matching how V2 already
handles it via `resolveAgents()`

Fixes the V1 path regression from #3854 (per-request agent factory,
issue #2941).

## Test plan

- [x] New test: factory function is preserved through constructor (not
spread to `{}`)
- [x] New test: factory resolves different agents per-request based on
headers
- [x] New test: endpoint agents are correctly merged with
factory-resolved agents
- [x] New test: static agent records still work (backward compat)
- [x] New test: promised agent records still work (backward compat)
- [x] Red-green verified: 4/5 tests fail without the fix, all 5 pass
with it
- [x] Full runtime test suite passes (1234 tests)
- [x] Full build passes
2026-04-14 14:06:14 -07:00
Jordan Ritter bc4a173751 fix: preserve graph-owned state keys during frontend state merge (#3852)
## Summary
- During frontend state merge in LangGraph agent, preserve keys that are
owned by the graph (not set by the frontend)
- Prevents graph-computed state from being overwritten when frontend
state is merged back

Closes #2893

---
*Split from #3847*
2026-04-14 14:06:10 -07:00
Jordan Ritter de78dfdb68 fix: sanitize NaN/Infinity values in LangGraph state before JSON serialization (#3851)
## Summary
- Add sanitization pass over LangGraph agent state to replace NaN and
Infinity with null before JSON serialization
- Prevents `ValueError: Out of range float values are not JSON
compliant` in Python SDK

Closes #1955

---
*Split from #3847*
2026-04-14 14:06:07 -07:00
Jordan Ritter fe365d3f7f fix: extract all text parts when AIMessage content is a list (#3844)
Partially addresses #1748

When Anthropic models return multi-part content lists, only the first
element was used and the rest discarded. Now iterates all parts and
concatenates text blocks, preserving the full message content.

Split from #3838.
2026-04-14 14:06:04 -07:00
Jordan Ritter 76b1d73bb8 fix: convert Pydantic BaseModel instances to dicts before serialization (#2158) (#3816)
## Summary

Fixes #2158

Pydantic `BaseModel` instances in LangGraph agent state are not
serializable by `langchain_dumps`. This adds a recursive
`_serialize_state` helper that converts `BaseModel` instances to dicts
before serialization, preventing crashes when state contains Pydantic
models.

**Additional fixes (second commit):**
- Also applies `_serialize_state` to the `get_state()` code path, which
was missed in the original fix but has the same bug
- Fixes `filter_state_on_schema_keys` returning `None` implicitly when
schema keys are not set (the `except` branch returned `state` but the
non-matching `if` branch did not)
- Adds 17 tests covering `_serialize_state`, `_emit_state_sync_event`,
and `get_state` with Pydantic models

## Merge order note

This PR and #3851 both modify
`sdk-python/copilotkit/langgraph_agent.py`. Both add a helper function
at module level and call it from `_emit_state_sync_event` and
`get_state`. Whichever merges second will need a trivial rebase. No
semantic conflict — the fixes are complementary (this one handles
Pydantic models, #3851 handles NaN/Infinity).

## Test plan

- [x] 17 unit tests covering both code paths
- [x] Red-green verified: `get_state` tests fail without fix, pass with
it
- [x] Existing test suite (test_emit_filtering) still passes
- [x] Verify LangGraph agent with Pydantic BaseModel state serializes
correctly
- [x] Verify non-Pydantic state is unaffected
2026-04-14 14:06:00 -07:00
Jordan Ritter 3f838e482c fix(sdk-python): copilotkit_emit_state merges state instead of replacing (#3138) (#3782)
## Summary
- `copilotkit_emit_state` now merges emitted state with current graph
state instead of replacing it
- Sequential calls with different keys (e.g. `{"progress": 50}` then
`{"status": "running"}`) now preserve all keys in the snapshot
- Added `_merge_emit_state` helper that handles dict merging with
fallback for non-dict types

## Test plan
- [x] Red-green test: two sequential emit_state calls with different
keys, assert both present
- [x] Test: emitting same key twice uses latest value
- [x] Full test suite passes (15/15)

Closes #3138
2026-04-14 14:05:57 -07:00
Jordan Ritter b9748a6e0e fix: widen openai peer dep range to include v6.x
The compatibility layer correctly handles v6 (same API surface as v5),
but the version range ^5.0.0 excluded v6.x. Changed to >=5.0.0 so
users on the latest openai SDK don't get peer dependency warnings.
2026-04-14 13:57:49 -07:00
Jordan Ritter a8b224e935 fix: replace unsafe type casts with proper type guards for OpenAI v4/v5 compat
- Remove all `as any`, `as Function`, and `as Record<string, unknown>` casts
  from production code in the OpenAI compatibility layer
- Introduce typed `OpenAIV4Beta` interface and `hasV4BetaChat` type guard
  for safe runtime detection of v4 vs v5 clients
- Extract `retrieveThreadRun` and `submitToolOutputsStream` helper functions
  into utils.ts with properly typed generic signatures, moving the v4/v5
  dispatch logic out of the assistant adapter
- Give `getChatCompletionsForStreaming` an explicit return type so callers
  no longer need secondary casts
- Update tests to exercise the new helpers directly instead of
  duplicating dispatch logic inline
2026-04-14 13:50:23 -07:00
Jordan Ritter dc66ccc459 fix: starter Docker build failures (spring-ai, ms-agent-dotnet, mastra) (#3900)
## Summary

Fixes 3 starter Docker build failures discovered after #3896 merged:

- **spring-ai**: `mvnw` not found — switched to
`maven:3-eclipse-temurin-21` base image with `mvn`
- **ms-agent-dotnet**: `addgroup --system` not available — switched to
`groupadd`/`useradd` (aspnet image)
- **mastra**: `COPY agent/` fails — Dockerfiles now use `{{AGENT_DIR}}`
template variable (`src/mastra/` for mastra, `agent/` for others)
- **All Dockerfiles**: Consistent `groupadd`/`useradd` across all 4
language templates

Fixes applied to templates (source of truth), generation script updated
to substitute vars in Dockerfiles, all 17 starters regenerated.

## Test plan

- [x] 537 vitest tests pass
- [x] Drift check: `--check` exits 0
- [ ] Docker builds for spring-ai, ms-agent-dotnet, mastra succeed (CI
will verify)
2026-04-14 13:49:48 -07:00
Jordan Ritter 55932c5441 fix: correct starter Dockerfiles for spring-ai (mvnw), ms-agent-dotnet (adduser), mastra (agent dir)
spring-ai: Use maven:3-eclipse-temurin-21 image with mvn instead of
missing ./mvnw wrapper.

ms-agent-dotnet: Replace addgroup/adduser (not available on aspnet:9.0)
with groupadd/useradd. Applied same fix to all four Dockerfile templates
for consistency.

mastra: Make Dockerfile.typescript template use {{AGENT_DIR}} variable
so mastra correctly gets src/mastra/ instead of hardcoded agent/.
Updated generate-starters.ts to substitute variables in Dockerfiles.
2026-04-14 13:48:11 -07:00
Jordan Ritter fbf1af2419 fix: propagate copyToClipboard success result to CopyButton UI state
The CopyButton in react-core was showing the "copied" checkmark based on
an independent clipboard availability check rather than the actual copy
result. This meant a failed copy (e.g. permission denied) would still
show the success indicator. Now the onClick handler returns the boolean
from copyToClipboard, and handleClick uses that to drive the UI state.
Also removes unsafe type casts of onClick to Promise<void>.
2026-04-14 13:47:44 -07:00
Jordan Ritter 4fe75a1993 fix: remove test-integration-tmp from CI workflows (#3899)
## Summary

- Remove `test-integration-tmp` from showcase deploy workflow (dispatch
options, path filter, output, entire job block)
- Remove `test-integration-tmp` from starter-smoke test matrix

The `showcase/packages/test-integration-tmp/` directory doesn't exist —
these CI entries cause guaranteed failures on every run.

## Test plan

- [x] Deploy workflow validates (no YAML syntax errors)
- [x] Starter smoke matrix no longer includes test-integration-tmp
2026-04-14 13:45:31 -07:00
Jordan Ritter 72a7f16ca5 fix: remove shared_frontend from Dockerfiles and test-integration-tmp from CI 2026-04-14 13:43:36 -07:00
Jordan Ritter 093f41907a fix: extract shared copyToClipboard utility to eliminate clipboard duplication
Address review feedback: extract the repeated clipboard availability check +
writeText + error handling pattern into a shared copyToClipboard() utility in
@copilotkit/shared. All 9 call sites across angular, react-core, and react-ui
now use the shared utility instead of duplicating the same code block.
2026-04-14 13:39:42 -07:00
Jordan Ritter b7b885e086 fix: scope dark theme CSS variables in colors.css
Same bug pattern as console.css and input.css: bare `.dark,` was a
standalone selector leaking all --copilot-kit-* CSS custom properties
onto any element with a .dark class. Also removed broken `:root`
pseudo-element from `body[style*="color-scheme: dark"] :root` — :root
cannot be a descendant of body, so this selector never matched.

Fix: drop standalone `.dark,` (redundant with `html.dark` and
`body.dark`) and remove the non-functional `:root` descendant.
2026-04-14 13:33:59 -07:00
Jordan Ritter a48ae18fbf fix: update QA sync parent page to new Showcase QA Instructions under QA Root 2026-04-14 13:31:04 -07:00
Jordan Ritter c25c1ca291 fix: remove shared_frontend COPY from demo package Dockerfiles (deleted in #3896) 2026-04-14 13:27:05 -07:00
Jordan Ritter 3d0873cc1e test: add userToggledRef behavior tests for reasoning message
Two new test cases covering the core behavioral fix:
- User collapses during streaming → panel stays collapsed after stream ends
- User collapses then re-expands during streaming → panel stays open after stream ends
2026-04-14 13:12:28 -07:00
Jordan Ritter ce8a9fe18b feat: showcase starter restructuring — Sales Dashboard as hero (#3896)
## Summary

- **17 generated clonable starters** at `showcase/starters/<slug>/` with
Sales Dashboard + 5 GenUI rendering strategies (Tool-Based, A2UI
Catalog, HashBrown, json-render fallback, Open GenUI)
- **153 demo pages reverted** to self-contained originals from git
history — zero shared imports, fully readable in Code tab
- **Shared frontend deleted** — all packages now fully self-contained
- **17 Railway services provisioned** with sleep-on-idle for all
starters
- **Aimock integration** — 37 fixture rules covering all 9 demo types,
per-package playwright configs wired, docker-compose for CI
- **CI updated** — 17 starter services in deploy workflow, drift
detection CI for template consistency
- **Shell updated** — `npx degit` clone commands, full component tree in
Code tab, `.java` file support

## What Changed

### Phase 1A: Starter Template + Generation
- Canonical template at `showcase/starters/template/` with Sales
Dashboard, 5 renderer strategies, per-language Dockerfiles (non-root
user, agent health checks)
- Generation script at `showcase/scripts/generate-starters.ts` with
Python import rewriting, TypeScript shared-tools rewriting, `--check`
mode for CI drift detection, deterministic output (sorted
devDependencies)
- 537 tests: 267 unit (generation script + transform functions) + 270
cross-starter consistency

### Phase 1B: Demo Revert
- All 9 feature demos across all 17 packages reverted to self-contained
originals from commits `cbc4c8f77` and `52ac091ef`
- Zero `@copilotkit/showcase-shared` imports in any demo page
- Dead `demo-wrapper.tsx` and `error-boundary.tsx` files removed

### Phase 2: Integration + Cleanup
- Removed webpack alias and tsconfig paths from all 17 packages
- Deleted `showcase/shared/frontend/` and removed from
`pnpm-workspace.yaml`
- Updated all 17 manifest.yaml files with new starter paths + Railway
domains
- Updated CI deploy workflow with 17 starter services + Railway IDs
- Added drift detection CI (`showcase_template-drift.yml`) with expanded
trigger paths
- Updated shell clone command to `npx degit`, starter content bundler
discovers full component tree + `.java` files

### Phase 3: Aimock Integration
- Expanded `showcase/aimock/feature-parity.json` from 18 to 37 fixture
rules covering all demo interactions
- Updated all 17 `showcase/packages/*/playwright.config.ts` with env
passthrough for `OPENAI_BASE_URL`/`OPENAI_API_KEY`
- Created `showcase/tests/docker-compose.packages.yml` — CI aimock
sidecar (fixtures-only, strict mode)
- Created `showcase/scripts/run-e2e-with-aimock.sh` — convenience script
for local testing
- Aimock modes: CI = strict/fixtures-only, Live demos = proxy +
fixtures, Local = developer choice

### E2E Tests
- Starter interaction tests: renderer switching verifies content
changes, "Add a deal" exercises React state
- Demo interaction tests: suggestion buttons verified by text,
click-and-verify for agentic-chat, hitl, tool-rendering
- Playwright screenshot structure for 3 viewports (iPhone SE, iPhone 14
Pro Max, Desktop)

### Quality
- Docker: non-root user, process identification in entrypoint (`wait -n`
+ PID check), agent health checks for all 4 languages
- Types: `SalesStage` and `RenderMode` derived from `as const` arrays,
`VALID_MODES` localStorage validation, `HashBrownDealCardProps.stage`
typed as `SalesStage`
- Error handling: generation script fails hard on missing required
inputs, warns on known-incomplete agents, sorted devDependencies for
determinism
- HashBrown prompt: fixed `name=` to `label=` (MetricCard prop
mismatch), deduplicated generator functions

## Quality Gates

| Gate | Result |
|------|--------|
| MSAL CR Phase 1 (7 agents x 4 rounds) | Converged: 30 → 20 → 4 → 0 |
| MSAL CR Phase 2 (7 agents x 2 rounds) | Converged: 4 → 0 |
| Final MSAL CR (7 agents) | Converged |
| Aimock CR (7 agents) | 4 clean + 3 fixed |
| Unit tests (267) + Consistency (270) | 537 passing |
| Build validation (4 starters) | All pass |
| Drift detection (`--check`) | Pass |
| Playwright screenshots (33) | Visual verification pass |
| CI (16 checks) | ALL GREEN |

## Test plan

- [x] 537 vitest tests passing (generation script + starter consistency)
- [x] 4 starters build successfully (langgraph-python, ag2, mastra,
spring-ai)
- [x] Zero `@copilotkit/showcase-shared` imports in any demo page
- [x] All 17 manifest.yaml files have correct starter sections with
Railway domains
- [x] Drift detection: `npx tsx showcase/scripts/generate-starters.ts
--check` exits 0
- [x] 33 Playwright screenshots verified at 3 viewports
- [x] 37 aimock fixture rules cover all 9 demo types
- [x] CI: 16/16 checks green
- [x] E2e tests exercise real interactions (renderer switching, deal
creation, suggestion clicks)
- [ ] Aimock-backed e2e run via Docker (blocked by Node v25 local compat
— works in Docker)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-14 13:11:54 -07:00
Jordan Ritter 6f27637380 feat: add on-demand aimock e2e test workflow with PR comment trigger 2026-04-14 13:01:44 -07:00
Jordan Ritter d8d889aebf chore: remove dead demo-wrapper/error-boundary files, regenerate shell data
Remove orphaned demo-wrapper.tsx (1 file) and error-boundary.tsx (17 files)
that still imported from the deleted @copilotkit/showcase-shared.
Regenerate registry.json, demo-content.json, and starter-content.json.
2026-04-14 12:57:32 -07:00
Jordan Ritter 5ac07d4d9b feat: CI, shell, and aimock integration for showcase starters
CI:
- Add 17 starter services to showcase deploy workflow with Railway IDs
- Add drift detection workflow (triggers on starters, packages, scripts, shared)
- Remove shared_frontend copy step for starter builds

Shell:
- Update clone command to npx degit with clipboard fallback
- Update starter content bundler for full component tree + .java support
- Add clone_command to manifest schema and registry types

Aimock:
- Expand feature-parity.json from 18 to 37 fixture rules
- Add docker-compose.packages.yml for CI aimock sidecar (strict mode)
- Add run-e2e-with-aimock.sh convenience script
2026-04-14 12:52:52 -07:00
Jordan Ritter ee2d6eaae0 feat: generate all 17 standalone starter packages
Generated from template via showcase/scripts/generate-starters.ts.
Each starter is fully self-contained with Sales Dashboard + 5 renderers,
self-contained agent backend, per-language Dockerfile (non-root user),
and deterministic entrypoint with agent health checks.

Marked linguist-generated=true in .gitattributes.
2026-04-14 12:52:05 -07:00
Jordan Ritter 7012a7e07b feat: add starter template, generation script, and comprehensive test suite
Canonical template at showcase/starters/template/ with Sales Dashboard
hero page, 5 GenUI rendering strategies, per-language Dockerfiles
(non-root user, agent health checks), and self-contained agent backends.

Generation script at showcase/scripts/generate-starters.ts:
- Python sys.path.insert removal + relative import rewriting
- TypeScript shared-tools import rewriting
- Deterministic output (sorted devDependencies, stable file ordering)
- --check mode for CI drift detection
- Strict error handling (throws on missing required inputs)

537 tests: generation unit tests (transform functions, entrypoint blocks),
cross-starter consistency checks (270), Playwright e2e interaction tests
(renderer switching, deal creation, suggestion verification).
2026-04-14 12:51:44 -07:00
Jordan Ritter 3f8cb123db feat: delete shared frontend — all consumers now self-contained
Remove showcase/shared/frontend/ directory and its pnpm-workspace.yaml
entry. All 17 demo packages and 17 starters are fully self-contained
with no shared frontend dependency.
2026-04-14 12:51:22 -07:00
Jordan Ritter b844a7c97c feat: decouple 17 demo packages from shared frontend, update manifests and playwright configs
- Remove @copilotkit/showcase-shared webpack alias from all 17 next.config.ts
- Remove @copilotkit/showcase-shared tsconfig paths from all 17 tsconfig.json
- Update all 17 manifest.yaml starter sections to point to showcase/starters/<slug>
  with Sales Dashboard name, npx degit clone command, and Railway demo URLs
- Add OPENAI_BASE_URL/OPENAI_API_KEY env passthrough to all 17 playwright configs
  for aimock-backed e2e testing
2026-04-14 12:51:11 -07:00
Jordan Ritter 5b95a9d54d feat: revert all 153 demo pages to self-contained originals
Replace shared-import demo pages across all 17 showcase packages with
the original self-contained implementations from git history. Each demo
is now fully readable in the Code tab with zero @copilotkit/showcase-shared
imports, no demonstrationCatalog, and no shared error boundaries.

9 demos x 17 packages = 153 page.tsx files reverted.
2026-04-14 12:50:50 -07:00
Jordan Ritter 93547c933e test: wrap fireEvent.click in act() for deterministic reasoning toggle test
Without act(), React 18 defers the state update through its scheduler,
which can race with waitFor polling on slow CI runners (Node 20.x/22.x).
Wrapping in act() forces synchronous flush.
2026-04-14 12:42:06 -07:00
Jordan Ritter 8cf8f03a57 fix: respect user expand/collapse intent in reasoning message
The auto-collapse useEffect unconditionally called setIsOpen(false) when
streaming ended, overriding any manual expand/collapse the user had
performed.  Add a userToggledRef that tracks explicit clicks so the
effect only auto-collapses when the user hasn't interacted.
2026-04-14 12:41:22 -07:00
Jordan Ritter b63708490d fix: apply oxfmt formatting 2026-04-14 11:53:31 -07:00
Jordan Ritter 18988e4ea4 fix: apply oxfmt formatting 2026-04-14 11:52:13 -07:00
Maxim b82e13d134 test(sdk-python): extract shared helpers and add missing edge case test
Extract _convert_and_split() helper in both test files to eliminate
duplicated filtering logic across tests. Add test for tool_call
without id being silently skipped (crewai tc_id is None guard).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:18:11 +02:00
Abubakar 47ba3c602b Fixed the commenting syntax in MS Agent Framework from # to // in quickstart, for both docs and showcase 2026-04-14 23:18:05 +05:00
Abubakar c066549ba7 Added the imports to load env
variable in langgraph-quicktart in both docs and showcase
2026-04-14 23:10:14 +05:00
Abubakar b569ec7be7 Added the imports to load env variable in langgraph-quicktart in both docs and showcase 2026-04-14 23:05:01 +05:00
Abubakar 40dde47b70 Added the imports to load env variable in langgraph-quicktart in both docs and showcase 2026-04-14 22:56:08 +05:00