Commit Graph

19 Commits

Author SHA1 Message Date
Tyler Slaton 387784c7bd ci: add bespoke stateless release system
Replace changesets with a simple, stateless release system:

Stable release (PR-gated):
  Actions → "create release PR" → pick patch/minor/major → CI runs →
  merge → publishes to npm, creates git tag + GitHub Release

Prerelease (ad-hoc):
  Actions → "publish / prerelease" → publishes current version with
  -canary.<suffix|timestamp> to npm under "canary" tag

Key features:
- All 12 core @copilotkit/* packages share a single version
- AI-generated release notes via Anthropic API
- Notion draft for team editing before merge
- Notion link commented on the release PR
- Guards: concurrent release PR check, version > npm check, clean
  semver check, canary-only prerelease tag
- release/publish/v* branch pattern (hard to accidentally match)
- TypeScript throughout (tsx runner)
- release.config.json with versionedTogether/versionedIndependently
2026-04-10 22:20:43 -07:00
Tyler Slaton ab74b737f0 ci: remove changesets infrastructure
Remove the entire changesets-based release system:
- .changeset/ config directory
- .github/actions/changesets-action/ custom fork (34 files)
- @changesets/assemble-release-plan patch
- @changesets/cli dependency
- Old release and prerelease workflows
- Legacy release scripts (check-allowed, generate-changelog, publish-snapshot)
- Stale paths-ignore entries in CI workflows
2026-04-10 22:20:32 -07: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
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
Jordan Ritter d8ca03fe46 feat: add model name validation for docs code blocks
Allowlist-based CI lint that extracts model names from docs MDX code
blocks and validates against docs/model-allowlist.json. Catches stale
model references (gpt-5.2 after gpt-5.4 ships) before they reach users.

- Regex extraction from model="...", model: "...", provider/model patterns
- Provider prefix stripping (openai/, anthropic/, google/, etc.)
- 20 unit tests
2026-04-08 18:55:25 -07:00
Tyler Slaton 13bf1be0f0 ci: guard release package allowlist 2026-04-08 16:20:28 -07:00
Alem Tuzlak 1317e51302 fix: revert copy-dts script, use typesVersions for legacy TS consumers
Reverts the copy-dts.mjs approach from #3612 in favor of typesVersions
which is the standard Node/TS mechanism for resolving subpath types
under legacy moduleResolution: "node".
2026-04-07 11:39:15 +02:00
Maxim 208f9bc32f fix: restore .d.ts declaration files for legacy moduleResolution consumers
Copies .d.cts → .d.ts after each tsdown build so consumers on
moduleResolution "node" (e.g. DocuSign) can resolve types without
changing their tsconfig. Also points the "types" field back to .d.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 20:55:45 +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
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 1d72b9ce1b chore: strip starters from consolidation, update metadata to 47 repos 2026-03-12 13:06:04 -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 4b73c33d2f chore: add migration and archive scripts for demo repo consolidation
migrate-demos.sh: automates shallow clone + cleanup + copy for all 73
repos, with --group and --dry-run support.

archive-demo-repos.sh: updates each standalone repo's README with a
deprecation notice pointing to the monorepo location, then archives it.
Exits non-zero on any failures.
2026-03-12 13:06:02 -07:00
Tyler Slaton cc8c945893 refactor(docs): optimize structure, content and navigability
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-02 11:30:16 -05:00
Max Korp 980d3f5b55 docs: add v2 interface reference docs (#3197)
Also fixing some linting/build issues.

Co-authored-by: Tyler Slaton <tyler@copilotkit.ai>
2026-02-17 17:14:41 -05: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