Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/cli-plugin-copilot_skip-agent-browser-install.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/copilot-plugin_narrow-jsonvalue-args.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/copilot-plugin_scope-agent-browser-dep.md

This file was deleted.

9 changes: 8 additions & 1 deletion CODEMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ Format: `package name` → path → role.
| `@equinor/fusion-framework-cli-plugin-ai-base` | `packages/cli-plugins/ai-base` | Shared AI plugin base |
| `@equinor/fusion-framework-cli-plugin-ai-chat` | `packages/cli-plugins/ai-chat` | Interactive AI chat command |
| `@equinor/fusion-framework-cli-plugin-ai-index` | `packages/cli-plugins/ai-index` | Embedding and chunking for the retrieval index |
| `@equinor/fusion-framework-cli-plugin-copilot` | `packages/cli-plugins/copilot` | Copilot SDK evaluation plugin |

`@equinor/fusion-framework-cli-plugin-copilot` (`packages/cli-plugins/copilot`, Copilot SDK
evaluation plugin) is **excluded from the pnpm workspace**
(`!packages/cli-plugins/copilot` in `pnpm-workspace.yaml`) — its `@github/copilot-sdk`
dependency pulls in a native CLI binary (~300-400MB) that every workspace install and CI cache
would otherwise pay for. It has its own `package.json` and is installed/built standalone
(`cd packages/cli-plugins/copilot && pnpm install && pnpm build`); it is not versioned or
published through this repo's changesets automation.

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

Expand Down
60 changes: 60 additions & 0 deletions packages/cli-plugins/copilot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,63 @@ graph TD
- **pnpm** as the workspace package manager
- **agent-browser** installed globally or available on `PATH`
- **GitHub Copilot** access in VS Code, because the SDK authenticates through the GitHub Copilot extension

## Standalone install

> [!IMPORTANT]
> This package is deliberately excluded from the repo's pnpm workspace (see
> [`CODEMAP.md`](../../../CODEMAP.md)). Its `@github/copilot-sdk` dependency pulls in
> ~400MB of platform-specific native CLI binaries via `optionalDependencies`, which
> would otherwise bloat the shared root `pnpm-lock.yaml` and CI pnpm-store cache for
> every package in the monorepo.

It has its own install and build, run from its own directory:

```bash
cd packages/cli-plugins/copilot
pnpm install
pnpm build
```

`pnpm install` here resolves against the repo's shared local pnpm content-addressable
store, so there's no extra disk cost if you've already installed the root workspace —
but it produces its own `node_modules` and is not tracked in the root lockfile. The
`vscode-jsonrpc` patch and the `agent-browser`/`koffi` build-script exclusions this
package needs are declared locally in its own `package.json` under `"pnpm"`, not in the
root `pnpm-workspace.yaml`.

> [!NOTE]
> `fusion-cli.config.ts` loads this plugin optionally (via `Promise.allSettled`), so
> the rest of the repo's `ffc` CLI works whether or not this package has been
> installed/built.

## Publishing

> [!IMPORTANT]
> This package is outside the repo's pnpm workspace, so it is **not** versioned or
> published through Changesets or the root `ci.yml` `release-pkg` job. There is no
> automated release workflow — publish it manually from its own directory.

1. Add a new entry at the top of [`CHANGELOG.md`](./CHANGELOG.md), above the previous
version, following the existing Changesets-style format:

```markdown
## <new-version>

### Patch Changes

- Describe the change here.
```

2. Bump the version and publish:

```bash
cd packages/cli-plugins/copilot
pnpm version <patch|minor|major>
pnpm install # refresh its own lockfile-less node_modules after the bump
pnpm build
pnpm publish --access public
```

3. Commit `package.json`, `CHANGELOG.md`, and any source changes together, then push
the commit and tag yourself — nothing does this automatically.
13 changes: 11 additions & 2 deletions packages/cli-plugins/copilot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,19 @@
"rxjs": "^7.8.2"
},
"peerDependencies": {
"@equinor/fusion-framework-cli": "workspace:^"
"@equinor/fusion-framework-cli": "^15.2.9"
},
"devDependencies": {
"@equinor/fusion-framework-cli": "workspace:^",
"@equinor/fusion-framework-cli": "^15.2.9",
"typescript": "^7.0.2"
},
"pnpm": {
"patchedDependencies": {
"vscode-jsonrpc@8.2.1": "patches/vscode-jsonrpc@8.2.1.patch"
},
"neverBuiltDependencies": [
"agent-browser",
"koffi"
]
}
}
Loading
Loading