Skip to content

Commit 6efb63e

Browse files
authored
Revert "chore: exclude cli-plugins/copilot from pnpm workspace (#5345)" (#5346)
This reverts commit 48345f0.
1 parent 67e5d07 commit 6efb63e

10 files changed

Lines changed: 313 additions & 86 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@equinor/fusion-framework-cli-plugin-copilot": patch
3+
---
4+
5+
Internal: stop running `agent-browser`'s and `koffi`'s native-binary install scripts on every `pnpm install`. Both now build explicitly in this package's `prepack` script, so publishing still bundles the binaries but everyday installs no longer download them.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@equinor/fusion-framework-cli-plugin-copilot": patch
3+
---
4+
5+
Fix a build failure caused by `@github/copilot-sdk`'s stricter `JsonValue` typing on tool-call `arguments`. Tool-call detail extraction (`url`/`path`/`load`/`selector`) now narrows the union type before reading properties instead of relying on unchecked optional chaining.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@equinor/fusion-framework-cli-plugin-copilot": patch
3+
---
4+
5+
Internal: move the `agent-browser` dependency from the repo root into this package, where it is actually used, instead of the workspace root `devDependencies`.

CODEMAP.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,7 @@ Format: `package name` → path → role.
109109
| `@equinor/fusion-framework-cli-plugin-ai-base` | `packages/cli-plugins/ai-base` | Shared AI plugin base |
110110
| `@equinor/fusion-framework-cli-plugin-ai-chat` | `packages/cli-plugins/ai-chat` | Interactive AI chat command |
111111
| `@equinor/fusion-framework-cli-plugin-ai-index` | `packages/cli-plugins/ai-index` | Embedding and chunking for the retrieval index |
112-
113-
`@equinor/fusion-framework-cli-plugin-copilot` (`packages/cli-plugins/copilot`, Copilot SDK
114-
evaluation plugin) is **excluded from the pnpm workspace**
115-
(`!packages/cli-plugins/copilot` in `pnpm-workspace.yaml`) — its `@github/copilot-sdk`
116-
dependency pulls in a native CLI binary (~300-400MB) that every workspace install and CI cache
117-
would otherwise pay for. It has its own `package.json` and is installed/built standalone
118-
(`cd packages/cli-plugins/copilot && pnpm install && pnpm build`); it is not versioned or
119-
published through this repo's changesets automation.
112+
| `@equinor/fusion-framework-cli-plugin-copilot` | `packages/cli-plugins/copilot` | Copilot SDK evaluation plugin |
120113

121114
### Vite plugins (`packages/vite-plugins/*`)
122115

packages/cli-plugins/copilot/README.md

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -226,63 +226,3 @@ graph TD
226226
- **pnpm** as the workspace package manager
227227
- **agent-browser** installed globally or available on `PATH`
228228
- **GitHub Copilot** access in VS Code, because the SDK authenticates through the GitHub Copilot extension
229-
230-
## Standalone install
231-
232-
> [!IMPORTANT]
233-
> This package is deliberately excluded from the repo's pnpm workspace (see
234-
> [`CODEMAP.md`](../../../CODEMAP.md)). Its `@github/copilot-sdk` dependency pulls in
235-
> ~400MB of platform-specific native CLI binaries via `optionalDependencies`, which
236-
> would otherwise bloat the shared root `pnpm-lock.yaml` and CI pnpm-store cache for
237-
> every package in the monorepo.
238-
239-
It has its own install and build, run from its own directory:
240-
241-
```bash
242-
cd packages/cli-plugins/copilot
243-
pnpm install
244-
pnpm build
245-
```
246-
247-
`pnpm install` here resolves against the repo's shared local pnpm content-addressable
248-
store, so there's no extra disk cost if you've already installed the root workspace —
249-
but it produces its own `node_modules` and is not tracked in the root lockfile. The
250-
`vscode-jsonrpc` patch and the `agent-browser`/`koffi` build-script exclusions this
251-
package needs are declared locally in its own `package.json` under `"pnpm"`, not in the
252-
root `pnpm-workspace.yaml`.
253-
254-
> [!NOTE]
255-
> `fusion-cli.config.ts` loads this plugin optionally (via `Promise.allSettled`), so
256-
> the rest of the repo's `ffc` CLI works whether or not this package has been
257-
> installed/built.
258-
259-
## Publishing
260-
261-
> [!IMPORTANT]
262-
> This package is outside the repo's pnpm workspace, so it is **not** versioned or
263-
> published through Changesets or the root `ci.yml` `release-pkg` job. There is no
264-
> automated release workflow — publish it manually from its own directory.
265-
266-
1. Add a new entry at the top of [`CHANGELOG.md`](./CHANGELOG.md), above the previous
267-
version, following the existing Changesets-style format:
268-
269-
```markdown
270-
## <new-version>
271-
272-
### Patch Changes
273-
274-
- Describe the change here.
275-
```
276-
277-
2. Bump the version and publish:
278-
279-
```bash
280-
cd packages/cli-plugins/copilot
281-
pnpm version <patch|minor|major>
282-
pnpm install # refresh its own lockfile-less node_modules after the bump
283-
pnpm build
284-
pnpm publish --access public
285-
```
286-
287-
3. Commit `package.json`, `CHANGELOG.md`, and any source changes together, then push
288-
the commit and tag yourself — nothing does this automatically.

packages/cli-plugins/copilot/package.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,10 @@
5050
"rxjs": "^7.8.2"
5151
},
5252
"peerDependencies": {
53-
"@equinor/fusion-framework-cli": "^15.2.9"
53+
"@equinor/fusion-framework-cli": "workspace:^"
5454
},
5555
"devDependencies": {
56-
"@equinor/fusion-framework-cli": "^15.2.9",
56+
"@equinor/fusion-framework-cli": "workspace:^",
5757
"typescript": "^7.0.2"
58-
},
59-
"pnpm": {
60-
"patchedDependencies": {
61-
"vscode-jsonrpc@8.2.1": "patches/vscode-jsonrpc@8.2.1.patch"
62-
},
63-
"neverBuiltDependencies": [
64-
"agent-browser",
65-
"koffi"
66-
]
6758
}
6859
}

packages/cli-plugins/copilot/patches/vscode-jsonrpc@8.2.1.patch renamed to patches/vscode-jsonrpc@8.2.1.patch

File renamed without changes.

0 commit comments

Comments
 (0)