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: 5 additions & 0 deletions .changeset/cli-plugin-copilot_skip-agent-browser-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@equinor/fusion-framework-cli-plugin-copilot": patch
---

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.
5 changes: 5 additions & 0 deletions .changeset/copilot-plugin_narrow-jsonvalue-args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@equinor/fusion-framework-cli-plugin-copilot": patch
---

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.
5 changes: 5 additions & 0 deletions .changeset/copilot-plugin_scope-agent-browser-dep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@equinor/fusion-framework-cli-plugin-copilot": patch
---

Internal: move the `agent-browser` dependency from the repo root into this package, where it is actually used, instead of the workspace root `devDependencies`.
9 changes: 1 addition & 8 deletions CODEMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,7 @@ 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) 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.
| `@equinor/fusion-framework-cli-plugin-copilot` | `packages/cli-plugins/copilot` | Copilot SDK evaluation plugin |

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

Expand Down
60 changes: 0 additions & 60 deletions packages/cli-plugins/copilot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,63 +226,3 @@ 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: 2 additions & 11 deletions packages/cli-plugins/copilot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,10 @@
"rxjs": "^7.8.2"
},
"peerDependencies": {
"@equinor/fusion-framework-cli": "^15.2.9"
"@equinor/fusion-framework-cli": "workspace:^"
},
"devDependencies": {
"@equinor/fusion-framework-cli": "^15.2.9",
"@equinor/fusion-framework-cli": "workspace:^",
"typescript": "^7.0.2"
},
"pnpm": {
"patchedDependencies": {
"vscode-jsonrpc@8.2.1": "patches/vscode-jsonrpc@8.2.1.patch"
},
"neverBuiltDependencies": [
"agent-browser",
"koffi"
]
}
}
Loading
Loading