Repository navigation
ci: add a community folder for lightly supported framework packages - #7616
Conversation
Community packages live in community/<name>/. They are deliberately not pnpm workspace members: each ships its own lockfile and pins published @copilotkit/* versions exactly. Nx discovers projects through the pnpm workspace, so a community package stays out of every repo-wide sweep, and a CopilotKit change cannot break one in the same pull request. This follows the examples/showcases/reskinnable-demo precedent. - community/README.md is the contract: the support tier, the four required scripts, the exact-pin rule (framework packages use core's internal ɵ exports), and the repository gates that still apply (config allowlist, license policy). - .github/workflows/test_community.yml runs only when community/** changes, gates only the packages that changed, checks the contract, then runs lint, typecheck, test and build inside each package. - .github/CODEOWNERS gives /community/ to core dev; each package adds a line naming its maintainer. - pnpm-workspace.yaml documents why community/* is excluded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds ownership and workspace documentation for community packages. It adds a GitHub Actions workflow that selects affected packages, checks package requirements, and runs package scripts. ChangesCommunity package checks
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk: ⚪ Minimal · up to No actionable issue was identified that would prevent the community package checks from running for changed packages. The PR is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Community checks use read-only repository permissions and do not receive explicit secrets or deployment authority. However, the admission check incompletely enforces the promised single-package workspace, creating a bounded isolation and CI-coupling risk. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 1.77 MB ℹ️ View Unchanged
|
…#7611) ## What Adds a **Community frameworks** page at `/community-frameworks`. It says what "community" means for a community-built frontend package, and lists those frameworks: - tested with one stated `@copilotkit/core` version - updates are best effort, with no promised response time - releases on its own schedule, never blocking CopilotKit releases - each package's README is its setup guide; the CopilotKit documentation does not cover community packages **The framework table launches empty.** Svelte (#5905, for #310) gets a row once its package lands under `community/` (the folder and its contract landed in #7616), not while it is still a pull request. The page hides its page actions (the copy-prompt widget) with `hidePageActions: true`, as 13 other pages do. ## How readers reach it 1. **Root sidebar, "Other" section.** That section is hand-curated in `normalizeSidebarNav` (`src/lib/docs-render.tsx`), so a `meta.json` entry alone never shows it. The page is added there after "Open-source telemetry", using the same lookup as telemetry. It is also added to `docs/meta.json`, which is what puts it in the nav tree. 2. **Site search.** The search index only keeps pages that some sidebar can reach (`search-index-navigability.test.ts`), so (1) is what makes it searchable. 3. **Frontend picker.** A muted "Community frameworks →" link sits at the bottom of the picker, below the coming-soon channels. Clicking it sends `docs.frontend_picker.community_frameworks_clicked` (with `from_frontend` and `from_path`), so the clicks count as a demand signal for community frameworks. This is a low-stakes link, so it has no capture test. The existing `docs.frontend_selected` and `docs.framework_selected` names are unchanged. ## Testing All in a fresh worktree of current `main` with a clean `npm ci` of `showcase/shell-docs`: - `npm run pretest` (the generators): success - `tsc --noEmit`: success - `oxlint` on the two changed source files: 0 errors. The one warning (`isSection`, `docs-render.tsx:1558`) is not in this diff. - `oxfmt --check` on the changed source files: clean - `vitest run`: **1105 passed**, 3 failed. The 3 failures are all in `public-assets.test.ts`, which checks that PNGs start with the PNG signature. My worktree had no Git LFS objects, so the files were pointers: the test read `118 101 114 115` (`vers`, from `version https://git-lfs…`). CI fetches LFS, so these do not fail there. - Generated search index: contains `/docs/community-frameworks` → public href `/community-frameworks`. - **Rendered in the dev server** (`next dev --webpack`): - `GET /community-frameworks` returns 200 with title "Community frameworks", and every section is present. After the second commit: the heading reads "What community means", the table has a header and no rows, there is no #5905 link, and the copy-prompt widget (`docs-page-tools`) is gone. - The sidebar on `/webmcp` and on the page itself lists, under "Other": `/telemetry` "Open-source telemetry", then `/community-frameworks` "Community frameworks". - Frontend-scoped pages such as `/vue` have no "Other" section, so the picker link is the way in from there. - Conflicts: this branch adds no merge conflicts to the open PRs that touch the same files (#7471, #7231, #5842). Their conflict sets against this branch match their conflict sets against `main`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a “Community frameworks” link to the framework picker sidebar. Selecting it opens the community frameworks documentation and closes the picker. * Added a documentation page describing community package maintenance and release expectations, linking to package READMEs for setup, and explaining how to request or build a framework package. The frameworks table currently has no entries. * Added the page to the “Other” section of the documentation navigation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
) ## What Community packages (`community/<name>/`, added in #7616) release through CopilotKit's pipeline as `@copilotkit/*`, under their own scope and version line. That was decided for Svelte (#5905). The release tooling could not see them, so this PR teaches it to. | File | Change | |---|---| | `scripts/release/lib/versions.ts` | `findPackageDir` and `getPackagesForScope` only searched `packages/`. Both now use one `listPackages()` helper that searches `PACKAGE_ROOTS = ["packages", "community"]`, in that order. A missing `community/` is skipped. Adds `isCommunityPackage()` and `getCommunityPackagesForScopes()`. | | `scripts/release/build-community-packages.ts` (new) | For a `--scope` selector (a scope, `all` or `learning-preview`, via the existing `resolveScopes`), installs (`--frozen-lockfile`) and builds each community package in those scopes, inside its own folder. When there are none it logs and exits 0, which is every scope today. | | `.github/workflows/publish-release.yml` | One step after "Build packages" runs that script for the release's scope. The root build is `nx run-many -t build --projects=packages/**`; community packages are not workspace members, so without this `pnpm pack` would publish them with no `dist`. The scope reaches the script through `env:`. | | `scripts/release/lib/versions.community.test.ts` (new) | Covers community packages in the tooling. It has its own config mock, because adding a scope to `versions.test.ts`'s shared mock would leave that file's other fixtures incomplete. | | `community/README.md` | Adds a **Releases** section: the core team adds a community package's scope in `release.config.json`, the `ReleaseScope` type and the three workflow dropdowns that `verify-release-scope-dropdowns.sh` checks. | Not touched on purpose: `pack-workspace.ts`'s `packageDirectory` only packs the runtime's `workspace:` closure (`verify-runtime-package.ts`), which never contains a community package; `angular-artifacts.ts` is Angular-only; and `public-api-manifest.ts` intentionally covers `packages/`. No scope is added here. The Svelte scope comes when the package lands. ## Testing - **New tests** (`versions.community.test.ts`): 5 passed. They cover finding a scope's package under `community/`, reading its version from `versionSource`, bumping it without touching its exact `@copilotkit/core` pin, selecting only community packages for the separate build, and still working when `community/` does not exist. - **Mutation check:** with `PACKAGE_ROOTS` reduced to `["packages"]`, 4 of the 5 fail. The "does not exist" case passes either way, as a robustness test should. Restored afterwards. - **Full release-script suite** (`npx vitest run --config scripts/release/vitest.config.mts`, as `test_unit.yml` runs it): 242 passed, 1 failed. The failure is `learning-preview.test.ts > packs and installs Core against the exact Learning from this run` (`pnpm install --offline …` fails). It fails identically on clean `main` (`ad2965c174`) in the same local setup, so it comes from the environment, not this change. - **The script, run for real:** - `--scope monorepo`, `all` and `learning-preview`: "No community packages in scope …; nothing to build", exit 0. - `--scope bogus`: "Unknown scope: bogus", exit 1. No `--scope`: exit 1. - **End to end with a temporary scope** and a throwaway `community/fakepkg` (its own pnpm root, depending on published `@copilotkit/core` `1.77.0`, with a `build` that writes `dist/`): the script installed and built it, `dist/index.js` read `built against core 1.77.0`, and **`pnpm pack` produced a tarball containing `package/dist/index.js`**. The temporary scope and package were removed afterwards. - **Workflow:** `actionlint` is clean. `zizmor` with the repo config reports the same 41 findings (0 low, 0 medium, 0 high) as on `main`, and none mention the new step. `verify-release-scope-dropdowns.sh`: "OK: all release scope dropdowns match release.config.json". - `oxfmt --check` and `oxlint` on the changed files: clean. Pre-commit hooks: all passed. - **Overlap:** #6856 and #6485 also touch these files. Their conflict sets against this branch match their conflict sets against `main` (2 and 9), so this adds no new conflicts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Community packages can now be included in releases with their own scope and version line. The release process builds eligible community packages before publishing them. * **Documentation** * Added guidance on configuring community package releases and selecting the appropriate release scope. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
What
Adds
community/, a home for lightly supported, community-maintained framework packages. Svelte (#5905, for #310) is the first candidate. The public description of the tier is the Community frameworks page in #7611.Containment comes from the
examples/showcases/reskinnable-demoprecedent. A community package is not a pnpm workspace member: it ships its own pnpm root and lockfile, and pins published@copilotkit/*versions exactly. Nx discovers projects through the pnpm workspace (nx.jsonhas noworkspaceLayout), so a community package stays out of every repo-wide build, typecheck and test sweep. A CopilotKit change cannot break one in the same PR, and a community package cannot redden a CopilotKit PR.community/README.md.github/workflows/test_community.ymlcommunity/**changes. It gates only the packages that changed, checks the contract, then runslint,typecheck,testandbuildinside each one.github/CODEOWNERS/community/goes to core dev. Each package adds its own line naming its maintainerpnpm-workspace.yamlcommunity/*is excludedWhy exact pins, not ranges: framework ports use
@copilotkit/core's internalɵexports. #5905 usesɵcreateThreadStoreand theɵselect*selectors, and so do Vue, Angular and React. Those exports carry no semver promise, so a range could break a community package on a patch release.Why each package needs its own
pnpm-workspace.yaml: without one, pnpm walks up to the repo's workspace and installs the monorepo instead of the package. The reskinnable-demo precedent measured this ("Scope: all 70 workspace projects", and the package got nonode_modulesat all). An.npmrcsetting does not stop it. The contract check enforces the file.Deliberately not in this PR:
.github/config-allowlist.txt. It is an exact-path supply-chain control, owned by core dev. Community build configs go through it like everything else.auto-approve-community.yml. It cannot approve fork PRs (theirGITHUB_TOKENis read-only), and an automated approval interacts with main's ruleset. That needs its own decision.@copilotkit/*, or the maintainer publishing under their own name) is a separate decision.Testing
Static checks on the workflow:
actionlint: clean.zizmorwith the repo's.github/zizmor.yml: "No findings to report". All event data reaches the scripts throughenv:.oxfmt --checkon the new files: clean.End to end with a throwaway package. In a scratch worktree I added
community/fakepkg, which depends on published@copilotkit/core1.77.0and has its ownpnpm-workspace.yamland lockfile. I then ran the workflow's ownrun:scripts, extracted from the YAML with PyYAML:Detection (
detectjob):packagesoutputcommunity/fakepkg["community/fakepkg"][], so thegatesjob is skipped["community/fakepkg"]beforeSHA["community/fakepkg"](gates everything)["community/fakepkg"](re-gates every package)community/README.md[]Contract check:
package contract: ok"@copilotkit/core": "workspace:*"uses "workspace:*"; community packages depend on published versions"@copilotkit/core": "^1.77.0"pin @copilotkit/* to an exact versiontypecheckscript,packageManager: "pnpm"pnpm-workspace.yamland no lockfilepackages: ["."]packages: ["packages/*"]Gates, on a clean copy with no
node_modules:corepack installactivated pnpm 10.33.4.pnpm install --frozen-lockfileinstalled only the package and resolved core1.77.0, with the repo root'snode_modulesuntouched. Thenlint,typecheck(which requires@copilotkit/core),testandbuildall passed.I first wrote the package scan with GNU
find -printf. I replaced it with the portable-exec dirname {} \;so the same script runs on Linux CI and on macOS.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation