Commit Graph

205 Commits

Author SHA1 Message Date
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
Alem Tuzlak d0318e8723 fix(ci): upload clean markdown artifact, remove blog length limit
- Extract result text and save as pr-social-copy.md (not raw JSON)
- Strip preamble/analysis before first ### header
- Upload the markdown file as the artifact (90-day retention)
- Comment reads from the same markdown file
- Remove character limit from blog post and LinkedIn (only Twitter
  keeps 280 char limit)
- Instruct Claude to skip preamble and start directly with content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:04:19 +01:00
Alem Tuzlak 7cb8eba6f8 fix(ci): block TodoWrite, handle error_during_execution
- Add disallowed_tools to prevent Claude from wasting turns on
  TodoWrite, Edit, Write, and other non-essential tools that cause
  error_during_execution crashes
- Make extract/upload/update steps run with always() so they still
  execute even if Claude's step exits with error_during_execution
- Add JSONL log fallback: if result field is empty, scan assistant
  messages for the generated content (contains ###)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:59:33 +01:00
Alem Tuzlak 36be36f789 ci: add artifact download link to generated comment
Add a direct "Download full output" link in the comment footer that
points to the uploaded artifact, alongside the existing workflow run
link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:49:36 +01:00
Alem Tuzlak 1faa662dc3 fix(ci): write diff files inside repo for Claude sandbox access
Claude Code sandboxes file access to the working directory. Files in
/tmp are inaccessible regardless of allowed_tools config. Move diff
files and extracted result to .claude-tmp/ inside the repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:39:21 +01:00
Alem Tuzlak fdc98c42e2 fix(ci): fix output capture, add Read tool, upload artifact
- Add `Read` to allowed_tools so Claude can read the diff files
- Read Claude output from JSON file instead of step output (fixes
  empty result caused by multiline content breaking GH Actions outputs)
- Upload claude-execution-output.json as a downloadable artifact
- Add link to workflow run in the success comment footer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:37:08 +01:00
Alem Tuzlak b61b8b2313 ci: add workflow run link to generating state comment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:27:05 +01:00
Alem Tuzlak 78b92955a8 ci: skip social copy generator for fork PRs and external users
- Skip posting the initial comment on PRs from forks (job-level guard
  + runtime check for workflow_dispatch)
- Verify the checkbox clicker has write/admin permission before
  running generation (prevents external collaborators from triggering
  Claude API calls)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:24:46 +01:00
Alem Tuzlak e64ef5f542 fix(ci): pass anthropic_api_key as input, not env var
The claude-code-base-action expects anthropic_api_key as a `with:`
input parameter, not an `env:` variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:01:30 +01:00
Alem Tuzlak 96d595a660 ci: support workflow_dispatch for existing/merged PRs
Add workflow_dispatch trigger with pr_number input so the social copy
generator can be used on any existing PR (open or merged). Also adds
duplicate comment detection and a GitHub API diff fallback for merged
PRs where the branch may have been deleted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:49:21 +01:00
Alem Tuzlak 365471d357 ci: add social copy generator workflow
Add a GitHub Actions workflow that posts a comment on every new PR with a
checkbox to generate social media copies (Twitter/X, LinkedIn, Blog Post)
using Claude Code. Checking the checkbox triggers Claude to analyze the PR
diff and generate content. After generation, the checkbox resets to
"Regenerate" so users can re-trigger after pushing new changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:22:15 +01:00
Jordan Ritter 0f47b01d06 feat: Enable Git LFS for binary assets (.gif, .jpg, .png, .pdf, .mp4) (#3238)
Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-23 13:56:48 +01:00
Tyler Slaton 80418e371a fix: use workspace:* for a2ui-renderer peer dep and sync lockfile on release (#3241)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:47:09 -05:00
Alem Tuzlak 98ed92c4ef Feat/speed up build system (#3213) 2026-02-17 18:34:26 +01:00
Tyler Slaton dbe747d31b ci: ensure tests run on exiting pre-mode or changing changesets
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-02-16 16:59:44 -08:00
Alem Tuzlak 7cd968d6a6 refactor: migrate from Turborepo to Nx for task management (#3207) 2026-02-13 16:53:35 +01:00
Alem Tuzlak 7b838547a9 feat: re-architeture the monorepo setup (#3187) 2026-02-13 11:01:44 +01:00
Alem Tuzlak f6ec26b758 feat: improve CI by running build only once (#3183) 2026-02-10 13:56:08 -05:00
Alem Tuzlak ba5d8c8b8c feat: add GitHub Actions workflow for pkg-pr-new publishing (#3153) 2026-02-05 15:45:48 -05:00
Max Korp 0680196f41 chore: bump pre/release timeout 2026-01-29 11:49:54 -08:00
Tyler Slaton 0a6fb12084 fix: address issue with lint failing due to version incompatibilities (#3082)
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-01-22 17:54:41 -05:00
Max Korp e49f607133 Fix: integrate example e2e tests into monorepo (#3056) 2026-01-21 16:21:42 -07:00
Max Korp 6227f4998a chore: make test workflows manually triggerable (#3040) 2026-01-20 12:35:55 -07:00
Luis Valdés 076614bc2f fix: correct script paths in CI workflows (#3006) 2026-01-14 21:00:11 -03:00
Markus Ecker c87af71792 fix(mcp-apps): improve performance and fix MCP server ports (#2989)
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
Co-authored-by: Max Korp <maxkorp@8bytealchemy.com>
Co-authored-by: Maximiliano Korp <max@copilotkit.ai>
Co-authored-by: Tyler Slaton <tyler@copilotkit.ai>
2026-01-14 15:31:49 -07:00
Max Korp b3028c3ef4 feat: Speed up build for publishing 2026-01-09 16:24:59 -07:00
Max Korp 4addb72e6d fix: ci 2026-01-09 16:19:16 -07:00
Max Korp 2afd4e3b60 fix: Ci, in theory 2026-01-09 16:00:43 -07:00
Max Korp 2839a15827 feat: Combine v1 and v2 into a single pnpm workspace (#2984) 2026-01-09 14:09:25 -07:00
Tyler Slaton 2952bceeec refactor: overhaul examples structure, remove old ones and simplify testing (#2975)
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-01-08 14:18:35 -05:00
Max Korp 2a37e9caae feat: Enforce conventional commits via commitlint CaSe iNSeNSiTiVeLY(#2973) 2026-01-06 13:40:32 -07:00
Tyler Slaton b2d6c11c1e ci(e2e): fix issue with playwright examples not running (#2889)
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2025-12-18 17:47:30 -05:00
Tyler Slaton e36fe6989d ci(v2): wire up tests to run on PR (#2888)
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2025-12-18 17:41:36 -05:00
Tyler Slaton 48504c4816 refactor: standardize CI for clarity (#2887)
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2025-12-18 17:08:01 -05:00
Markus Ecker 036d5412cc refactor!: restructure repo for v1.x and add v2.x (#2794)
- Move original CopilotKit/CopilotKit directory to src/v1.x
- Introduce new v2 interfaces in src/v2.x
- Align CI paths and preview environments to new layout

Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
Co-authored-by: Ran Shemtov <ran@copilotkit.ai>
Co-authored-by: Brandon McConnell <brandon@dreamthinkbuild.com>
Co-authored-by: Mike Ryan <mike.ryan52@gmail.com>
2025-12-18 13:09:14 -05:00
Max Korp 4331e2534e Add strands to ci e2e matrix 2025-12-09 11:34:21 -07:00