github / github/copilot-cli

copilot plugin install does not load joinSession() extensions from installed-plugins/

オープン
#3,023 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:plugins
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

Plugins cannot package or distribute Copilot CLI \xtension.mjs\ / \joinSession()\ extensions. The official plugin schema (\plugin.json\) does not include an \xtensions\ field, and \copilot plugin install\ stores files under \installed-plugins/\ which does not appear to participate in extension discovery.

Extensions are only discovered from \~/.copilot/extensions//extension.mjs\ and \.github/extensions//extension.mjs\, per the SDK docs.

This means plugin authors who build \joinSession()\ extensions (with tools, hooks, lifecycle events) cannot distribute them through the plugin system — users must manually copy files to the extensions directory.

### Affected version

1.0.37 (also tested on 1.0.26)

### Steps to reproduce the behavior

1. Create a plugin with a \plugin.json\ and an \xtension.mjs\ that exports \joinSession()\ from \@github/copilot-sdk/extension\
2. Install via \copilot plugin install /\
3. Plugin installs successfully — files copied to \~/.copilot/installed-plugins/\
4. Start a new Copilot CLI session (restart terminal)
5. Tools registered by the extension do not appear
6. Hooks (e.g., \onSessionStart\) do not fire

### Expected behavior

Either:
- \copilot plugin install\ should discover and load \xtension.mjs\ from installed plugins, OR
- The \plugin.json\ schema should support an \xtensions\ field for declaring extensions, OR
- The docs should clarify that extensions are not distributable via the plugin system

### Additional context

- OS: Windows 11, also tested on macOS
- Shell: PowerShell 7, zsh
- Workaround: Manually copy extension to \~/.copilot/extensions//extension.mjs\

**Real-world example:** [copilot-brag-sheet](https://github.com/microsoft/copilot-brag-sheet) is a \joinSession()\ extension that auto-tracks coding sessions into a structured work log. It registers tools (\save_to_brag_sheet\, \
eview_brag_sheet\, \generate_work_log\) and hooks (\onSessionStart\, \onPostToolUse\, \onSessionEnd\). Currently users must install manually because the plugin system can't distribute it.

**Context:** This was flagged by an awesome-copilot maintainer during skill PR review: https://github.com/github/awesome-copilot/pull/1428

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by comparing the plugin.json schema and the documented extension discovery paths under ~/.copilot/extensions/ and .github/extensions/. Reproduce the install with an extension.mjs that exports joinSession(), then trace whether files in ~/.copilot/installed-plugins/ are considered; done means the supported distribution behavior is implemented or the limitation is clearly documented.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。