Commit Graph

281 Commits

Author SHA1 Message Date
Jordan Ritter a3a0cae762 fix: use toJSON for safe Slack payload escaping 2026-04-09 12:48:23 -07:00
Jordan Ritter edfc48585e fix: use GitHub API for blame context instead of deep clone (repo is 750MB) 2026-04-09 12:46:00 -07:00
Jordan Ritter 1fc8b00128 fix: use full clone for git log blame context on all triggers 2026-04-09 12:45:08 -07:00
Jordan Ritter 8194630f45 fix: move capture before teardown, fix fetch-depth, safe env injection 2026-04-09 12:43:50 -07:00
Jordan Ritter 78285f448a fix: remove duplicate GITHUB_OUTPUT redirect 2026-04-09 12:42:06 -07:00
Jordan Ritter 4c1b70ea7b feat: include blame context in failure alerts (PR author/commits or dep drift) 2026-04-09 12:37:04 -07:00
Jordan Ritter 9a377c7574 feat: include failure cause in Slack alerts and GitHub issues 2026-04-09 12:37:04 -07:00
Jordan Ritter 123a5d76f9 fix: switch Slack alerts to slackapi/slack-github-action, gate drift alerts to schedule-only 2026-04-09 12:24:34 -07:00
Jordan Ritter 74fc015dbf fix: remove GHCR login — public images should pull without auth 2026-04-09 09:18:52 -07:00
Jordan Ritter b8dc9ad843 fix: add packages:read permission for GHCR aimock image pull 2026-04-09 09:17:24 -07:00
Jordan Ritter ef55874072 fix: format files and add GHCR login to CI workflow 2026-04-09 09:16:05 -07:00
Jordan Ritter 7e7311bf21 ci: add workflow for starter smoke tests 2026-04-09 08:33:25 -07:00
Jordan Ritter 204dd29a97 fix: standardize health checks on /health port 8000 2026-04-08 21:22:35 -07:00
Jordan Ritter 6d05499ecd feat: add automated docs sync from main with transform pipeline 2026-04-08 19:59:31 -07:00
Jordan Ritter 31f046d0ac feat: add SEO redirect infrastructure with PostHog tracking 2026-04-08 19:59:30 -07:00
Jordan Ritter 5284614227 feat: add health monitoring with smoke endpoints, drift detection, and Slack alerts 2026-04-08 19:59:30 -07:00
Jordan Ritter 759ffeb29a feat: add animated preview GIFs with per-demo capture automation 2026-04-08 19:59:30 -07:00
Jordan Ritter 479e62cb7f feat: add unified showcase platform with CI, Docker starters, and 13 deployed integrations 2026-04-08 19:59:29 -07:00
Jordan Ritter bd119c29e1 fix(docs): update stale model names + add CI validation (#3666)
## Summary

Comprehensive docs quality infrastructure — model name validation,
executable doc tests, and 8 community docs fixes rolled up.

### Docs fixes (supersedes 8 PRs)
- **gpt-5.2 → gpt-5.4** across 70 files, 124 occurrences (supersedes
#3655)
- **Anthropic model IDs** dots → hyphens to match API/AI SDK format
(supersedes #3656)
- **LangGraph FastAPI quickstart** — missing `import uvicorn`, missing
`MemorySaver` checkpointer, `port` string→int (supersedes #3661, with
contributor's `langgrapg` typo fixed)
- **AG2 ContextVariables import** — moved from `autogen` to
`autogen.agentchat` per latest AG2 (supersedes #3658, verified via
Docker)
- **CrewAI Flows** — comment out deprecated CLI option (supersedes
#3667)
- **Pydantic quickstart** — pin Starlette 0.45.3 (1.0.0 is incompatible,
verified via Docker) (supersedes #3660)
- **CopilotChat example** — add missing `default` export for Next.js
page components (supersedes #3669)
- **globals.css import** — add to all 9 quickstart layout examples so
customization section works (supersedes #3665)

### Model name validation (new)
- `docs/model-allowlist.json` — maintained list of valid model names by
provider (OpenAI, Anthropic, Google, Cohere, Meta)
- `scripts/validate-doc-model-names.ts` — CI lint that extracts model
names from docs code blocks and validates against allowlist
- 20 tests

### Executable doc tests (new, Phase 1)
- `scripts/doc-tests/extract.ts` — remark + remark-mdx AST parser finds
`doctest`-tagged code blocks in MDX
- `scripts/doc-tests/run.ts` — execution harness: installs deps, points
at aimock, runs server/script/component snippets
- `.github/workflows/test_doc-examples.yml` — CI triggered on `docs/**`
changes (previously excluded from ALL CI)
- LangGraph FastAPI quickstart tagged as first `doctest="server"`
example
- 10 tests for extraction

### Spec
[Executable Doc Tests proposal on
Notion](https://www.notion.so/33c3aa38185281388a21e8dfe752ac5e)

## Supersedes
| PR | Fix | Status |
|----|-----|--------|
| #3655 | gpt-5.2-mini → gpt-5.4-mini |  Included (all 70 files, not
just 22) |
| #3656 | Anthropic dots → hyphens |  Included |
| #3658 | AG2 ContextVariables import |  Included (verified via Docker)
|
| #3660 | Starlette pin |  Included (verified via Docker) |
| #3661 | LangGraph FastAPI quickstart |  Included (with typo fix) |
| #3665 | globals.css import |  Included |
| #3667 | CrewAI deprecated CLI |  Included |
| #3669 | CopilotChat default export |  Included |

All 8 PRs can be closed when this merges.

## Test plan
- [x] Model name validator passes (0 violations)
- [x] 20 validator unit tests pass
- [x] 10 extraction unit tests pass
- [x] Build passes
- [x] Commitlint passes
- [ ] CI workflow validates doc examples on docs/** changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-08 19:53:11 -07:00
Jordan Ritter aabce2c548 chore: add remark/unified deps for doc test extraction 2026-04-08 19:46:15 -07:00
Jordan Ritter 84fb4c6c0a feat: executable doc tests — extract, run, and validate MDX code snippets
AST-based extraction (remark + remark-mdx) finds doctest-tagged code
blocks in MDX files. Execution harness runs them against aimock with
category-specific validation (server health-check, script exit code,
component type-check). CI workflow triggers on docs/** changes.

- stripCommonIndent for JSX-indented blocks
- validateDepName for shell injection prevention
- try/finally process cleanup on all spawn paths
- 10 extraction tests
2026-04-08 18:55:39 -07:00
Tyler Slaton 6637142c72 ci: remove prerelease auto-merge 2026-04-08 17:12:05 -07:00
Tyler Slaton 7de3fe68be ci: fix npm publish auth in release workflow 2026-04-08 17:09:58 -07:00
Tyler Slaton 409216a8bf ci: reopen next prerelease mode after stable releases 2026-04-08 17:00:55 -07:00
Tyler Slaton 13bf1be0f0 ci: guard release package allowlist 2026-04-08 16:20:28 -07:00
Tyler Slaton fac304b60f feat: restore stable release tags and GitHub releases 2026-04-08 15:40:35 -07:00
Tyler Slaton bf44b1d02f chore: remove nx cloud release env setup 2026-04-08 15:18:10 -07:00
Tyler Slaton 100a882ebe fix: repair protected-branch release flow 2026-04-08 15:18:10 -07:00
Alem Tuzlak 9a6ee39d96 chore(runtime): update package config, CI workflows, and docs
- Add package.json exports for v2/{express,hono,node} subpaths
- Add elysia devDependency and tsdown entry points
- Exclude bun integration tests from vitest config
- Update CI workflows to include runtime-servers test job
- Add runtime-server-adapter docs page
- Add changeset for the fetch-based runtime feature
2026-04-03 18:41:27 +02:00
Alem Tuzlak e9d026577b ci: add NX_VERBOSE_LOGGING to all workflows
https://claude.ai/code/session_01GMkSf29p78HuMR1mbXn8He
2026-04-02 16:39:06 +02: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
Claude 5d612556d4 fix: address flaky CI unit tests
- Add fail-fast: false to unit test matrix strategies so one Node
  version failing doesn't cancel all other matrix jobs
- Add retry: 2 to runtime-client-gql vitest config (Nx confirmed
  this package's tests as flaky during parallel execution)
- Replace fragile setTimeout waits in middleware express tests with
  vi.waitFor() polling, which is resilient to CI timing variance

https://claude.ai/code/session_01W2Kb2HXsjZett3HdqM9zay
2026-04-01 11:50:56 +02:00
Jordan Ritter ab025fea5a ci: auto-merge showcase-only PRs from Demo team
Add CopilotKit/demo as CODEOWNER for examples/showcases/ alongside
the existing dev team for reviewer auto-assignment.

Add a workflow that checks Demo team membership, verifies all changed
files are under examples/showcases/, then auto-approves and enables
auto-merge. PRs touching anything outside showcases or from non-Demo
members sit for normal review.
2026-03-30 11:57:09 -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
Ran Shem Tov 2f2fdec7ee chore: fix python test ci process 2026-03-19 13:45:10 +01:00
Alem Tuzlak 08e356df74 ci: remove unused uv install step from node-only workflows
These 8 workflows install uv but never invoke it. Only e2e_dojo.yml
actually needs uv (the dojo scripts use uv sync/run for Python agents).
Removing the unnecessary step saves CI time and reduces confusion.
2026-03-13 15:03:39 +01:00
Jordan Ritter 6bab4e37cf Prevent binary artifacts in PRs (#3377)
## Summary

- **`.gitignore`** — add patterns for common binary extensions (`.exe`,
`.dll`, `.so`, `.dylib`, `.o`, `.obj`, `.a`, `.lib`, `.wasm`, `.dSYM/`)
- **CI workflow** (`static_check-binaries.yml`) — runs on all PRs to
`main`, checks for binary file extensions, `build/` directories,
`.dSYM/` directories, and individual files over 1 MB
- **Lefthook pre-commit** (`check-binaries`) — mirrors the CI check
locally, catching binary artifacts, build outputs, and oversized files
at commit time before they reach CI

Prompted by ag-ui PR #29 where ~15 MB of compiled macOS binaries were
accidentally committed. This adds the same protection to CopilotKit.

## Test plan

- [ ] Verify `.gitignore` additions don't affect existing tracked files
- [ ] Confirm the `static / check binaries` workflow runs and passes on
this clean PR
- [ ] Verify lefthook `check-binaries` fires on `git commit` and blocks
binary/oversized files
2026-03-10 16:51:14 -04:00
Jordan Ritter e96f1485c7 fix(sdk-python): fix emit_messages and emit_tool_calls config not working (#2996)
Fixes #2066

## Problem

`copilotkit_customize_config(config, emit_messages=False)` does not work
— TEXT_MESSAGE_* events are still emitted despite the configuration.

## Root Causes

1. **Metadata Reading Bug**: `getattr(raw_event, 'metadata', {})` always
returns `{}` because `raw_event` is a dict, not an object. Must use
`.get()` instead.

2. **Encoder Crash Bug**: Filtered events return `""` (empty string),
which gets yielded to the event encoder that expects objects with
`model_dump_json()`, causing `AttributeError`.

## Solution

1. Read metadata with `.get()` for dicts, `getattr()` for objects
2. Return `None` instead of `""` for filtered events
3. Override `run()` to strip `None` values before they reach the encoder

## Tests & CI

- Added 8 unit tests covering both bugs, pass-through cases, and `run()`
filtering
- Added `test_unit-python-sdk.yml` CI workflow — first-ever Python SDK
unit test coverage
- Added `pytest` as a dev dependency
2026-03-06 13:00:56 -04:00
Jordan Ritter 95bfec5d28 ci: add Python SDK unit test workflow
Runs pytest on sdk-python/ for pushes and PRs that touch the Python SDK.
2026-03-06 08:32:11 -08:00
Jordan Ritter 5fd10e7bd8 Trigger dojo e2e tests on Python SDK changes
Add sdk-python/** to the e2e_dojo workflow path filter so Python SDK
changes actually get tested. A detect-changes job uses dorny/paths-filter
to distinguish TS vs Python changes — when only sdk-python/** changed,
only the needs_python suites run (11 of 15). TS/workflow/changeset
changes still trigger all suites as before.
2026-03-06 08:21:50 -08:00
Jordan Ritter 914d84c150 Trigger dojo e2e tests on Python SDK changes
Most dojo e2e suites (langgraph, agno, crew-ai, pydantic-ai, etc.)
run Python agents that use the sdk-python package, but the workflow
path filter didn't include sdk-python/**, so changes to the Python
SDK never triggered e2e tests.
2026-03-06 08:20:01 -08:00
Alem Tuzlak b854810d71 ci: add stable NX_CI_EXECUTION_ID across all PR workflows
Parallel CI workflows were each getting a different Nx Cloud execution
ID, resulting in separate CIPEs instead of one unified view. Set a
stable NX_CI_EXECUTION_ID env var using head_ref + sha + run_attempt
so all workflows for the same push are grouped together. Also add
NX_CI_EXECUTION_ENV per workflow to create labeled tab sections in the
Nx Cloud CIPE page.
2026-03-06 13:36:23 +01:00
Jordan Ritter 627e9195b8 ci: bump size threshold to 1MB and exclude known large files
pnpm-lock.yaml (1.5MB), poetry.lock, docs media, example assets,
and the bundled changesets action would all trip the 500KB threshold
on routine PRs.
2026-03-05 15:30:23 -08:00
Jordan Ritter 61047f85d3 ci: add binary artifact detection to .gitignore and CI
Add .gitignore patterns for common binary extensions (.exe, .dll, .so,
.dylib, .o, .obj, .a, .lib, .wasm, .dSYM) and a CI workflow that
checks all PRs for binary files, build directories, and files >500KB.

Prompted by ag-ui PR #29 where ~15MB of compiled binaries were
accidentally committed.
2026-03-05 08:41:57 -08:00
Jordan Ritter 84d09c62a4 fix: move link-cpk after prep-dojo to prevent pnpm overwriting symlinks
prep-dojo-everything.js runs `pnpm install --no-frozen-lockfile` for the
dojo target, which resolves @copilotkit/* from the npm registry. When
link-cpk runs before prep-dojo, the symlinks it creates get overwritten.

Swapping the order ensures prep-dojo installs first, then link-cpk
overwrites the registry packages with local CopilotKit build outputs.
2026-03-02 19:18:52 -08:00
Jordan Ritter c5410244f1 ci(e2e): pass packages root to link-cpk.js for V2 support
Update e2e_dojo.yml to pass CopilotKit/packages instead of
CopilotKit/packages/v1, so the updated ag-ui link-cpk.js script
links both V1 and V2 packages in dojo e2e tests.
2026-02-28 20:29:58 -08:00
Jordan Ritter 543275ad91 ci: double Node.js heap size to 4GB for CI builds
The @copilotkitnext/runtime:build step OOMs on GitHub Actions runners
with the default ~2GB heap. Set NODE_OPTIONS=--max-old-space-size=4096
on all three failing workflows.
2026-02-28 20:29:58 -08:00
Alem Tuzlak c8cfb2bbe1 ci: switch from base-action to Claude CLI for social copy generator
Replace anthropics/claude-code-base-action@beta with the Claude Code
CLI (`claude -p` with `--output-format json`). This gives direct
control over the output format — a single JSON object with a `result`
field instead of ambiguous JSONL. The extraction script parses the
JSON, strips preamble, and writes clean markdown to pr-social-copy.md
which is uploaded as the artifact and posted to the PR comment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:44:18 +01:00
Alem Tuzlak 4d05bb9bd9 fix(ci): parse JSONL output format for result extraction
The claude-execution-output.json is JSONL (one JSON object per line),
not a single JSON object. JSON.parse() on the whole file silently
failed, producing empty output. Now parses line by line, finding the
"type": "result" entry or falling back to the last assistant message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:18:06 +01:00
Alem Tuzlak 31575b8f72 ci: move hashtags from Twitter to LinkedIn post
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:12:41 +01:00