Skip to content

chore: exclude cli-plugins/copilot from pnpm workspace - #5345

Merged
odinr merged 3 commits into
mainfrom
chore/exclude-copilot-plugin-workspace
Aug 19, 2026
Merged

chore: exclude cli-plugins/copilot from pnpm workspace#5345
odinr merged 3 commits into
mainfrom
chore/exclude-copilot-plugin-workspace

Conversation

@odinr

@odinr odinr commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Why is this change needed?
@equinor/fusion-framework-cli-plugin-copilot's @github/copilot-sdk dependency pulls in agent-browser and platform-specific native Copilot CLI binaries (@github/copilot-{darwin,linux,linuxmusl,win32}-{arm64,x64} via optionalDependencies), adding ~400MB to the pnpm store. Because it was a workspace member, every root pnpm install — including every CI job that installs the workspace — resolved and cached this weight for all 85 packages, not just this one plugin.

What is the current behavior?
The plugin lives inside the pnpm workspace (packages/cli-plugins/copilot), is versioned via Changesets, and its heavy dependencies are part of the root pnpm-lock.yaml and the shared CI pnpm-store cache.

What is the new behavior?

  • packages/cli-plugins/copilot is excluded from the pnpm workspace (pnpm-workspace.yaml) and from root TypeScript type-checking (tsconfig.json).
  • The package now pins @equinor/fusion-framework-cli to a real semver range (^15.2.9) instead of workspace:^, since it's no longer resolved through the workspace graph.
  • The vscode-jsonrpc patch (needed transitively by @github/copilot-sdk) moved from the root patches/ directory into the package's own patches/, and is now declared via a "pnpm" field in the package's own package.json so a standalone install still applies it. The root patchedDependencies entry was removed.
  • CODEMAP.md documents the exclusion and points to the package's own install process.
  • The package's README.md gained "Standalone install" and "Publishing" sections explaining how to install/build/version/publish it now that it's outside the workspace and Changesets.
  • Stale changesets referencing the now-excluded package were removed (they no longer apply — Changesets doesn't manage this package's versioning anymore).

What is the intended behavior or invariant?

  • The root pnpm-lock.yaml and CI pnpm-store cache must never reference @github/copilot-sdk, @github/copilot*, or agent-browser again — verified locally (grep for these in pnpm-lock.yaml returns zero matches after a fresh root install).
  • fusion-cli.config.ts already loads this plugin optionally via Promise.allSettled, so the rest of the repo's ffc CLI must continue to work whether or not this package is installed/built — this was already true and is unchanged.
  • The plugin package must remain independently installable/buildable/publishable from its own directory (packages/cli-plugins/copilot), with its own node_modules, patch, and build-script exclusions — verified locally via a standalone pnpm install/pnpm build.

Does this PR introduce a breaking change?
No for consumers of the framework. For contributors: the plugin is no longer built/type-checked as part of a root pnpm install/pnpm build — anyone working on it must cd packages/cli-plugins/copilot && pnpm install first. This is documented in the package's README.

Impact assessment:

  • Breaking changes: No (root workspace behavior for all other packages is unaffected; verified via pnpm list -r and a full root install).
  • Version bump: None required — no changeset, since this only touches repo-internal workspace/tooling config and one package's own manifest, not published package behavior for any workspace member.
  • Consumer impact: None. This plugin is a dev-time evaluation tool, not part of any published framework API.
  • Downstream impact: Reduces the size of the shared root pnpm-lock.yaml and CI pnpm-store cache for the whole monorepo.

Review guidance:

  • Confirm pnpm-workspace.yaml's !packages/cli-plugins/copilot exclusion and cleared patchedDependencies look correct.
  • Confirm the patch relocation and the new "pnpm" field in packages/cli-plugins/copilot/package.json are wired correctly (no root config needed).
  • No changeset is included on purpose — this is a workspace/tooling-scoped change, not a versioned package change.

Additional context
This plugin is a Copilot SDK-powered evaluation tool for ffc copilot app eval, used to validate cookbook/app behavior against markdown eval criteria. It has no runtime relationship to the rest of the framework's published packages.

Related issues
None.

Checklist

  • Confirm completion of the self-review checklist
  • Confirm TSDoc captures intent for functions, hooks, components, classes, and named arrow functions (no exported TS symbols changed)
  • Confirm iterator blocks, decision gates, RxJS chains, and complex decisions explain why they exist (none added/changed)
  • Confirm React logic and derived values are resolved before markup when applicable (n/a — no React code changed)
  • Confirm README/docs are updated for user-facing changes
  • Confirm changes to target branch validation
    • Included files validated (root pnpm install succeeds cleanly; standalone pnpm install/pnpm build in the plugin directory succeeds)
    • No new linting warnings
    • Not a duplicate PR
  • Confirm adherence to code of conduct

odinr added 2 commits August 19, 2026 20:38
Removes @equinor/fusion-framework-cli-plugin-copilot from the pnpm
workspace to keep its ~400MB @github/copilot-sdk/agent-browser native
binaries out of the shared CI pnpm store cache.

- pnpm-workspace.yaml: exclude packages/cli-plugins/copilot, clear
  the now-unused root patchedDependencies entry
- packages/cli-plugins/copilot: pin @equinor/fusion-framework-cli to
  a real semver range instead of workspace:^, relocate the
  vscode-jsonrpc patch here and wire it via its own pnpm config so a
  standalone install still resolves vscode-jsonrpc/node correctly
- tsconfig.json: exclude the package from root type-checking
- CODEMAP.md: document the exclusion and standalone install process
- remove stale changesets referencing the now-excluded package
@github-actions github-actions Bot added 📚 documentation Improvements or additions to documentation 🚧 chore maintaines work, (update deps, workflos ...) labels Aug 19, 2026
@odinr
odinr marked this pull request as ready for review August 19, 2026 18:43
@odinr
odinr requested a review from a team as a code owner August 19, 2026 18:43
Fixes the verify-agent-context CI check, which scans CODEMAP.md for the
literal package name of every packages/** manifest on disk (workspace
exclusion doesn't remove the file, so it's still expected to be documented).
@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bc0e4aa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@odinr
odinr merged commit 48345f0 into main Aug 19, 2026
9 of 10 checks passed
@odinr
odinr deleted the chore/exclude-copilot-plugin-workspace branch August 19, 2026 18:46
odinr added a commit that referenced this pull request Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 chore maintaines work, (update deps, workflos ...) 📚 documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant