cli: plugin list shows - for ID of TUI-only plugins configured in cli.json
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
opencode plugin listがID列をどのように構築し、プラグインデータを読み取るかを、CLIコマンドとそのテストから調べます。サーバー側のレジストリデータと、すでにSOURCEに表示されているパッケージ名を比較し、TUIでのみ設定されたプラグインに対する有用なフォールバックを追加します。cli.jsonでのみ設定されたプラグインについて、ID列に意味のある値が表示され、関連するテストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
opencode plugin list shows - in the ID column for TUI-only plugins (packages exporting only ./tui, configured in cli.json), even though the plugin loads and works correctly. The ID column should fall back to something useful — ideally the package name — when the plugin has no server-side registry entry.
Environment
- opencode version: 2.3.0
- OS: reproduced on Windows 11, but this is platform-independent CLI output
- Active plugins: a TUI-only package (exports only
./tui) configured incli.json, alongside server+TUI packages configured inopencode.json
Reproduction
-
Publish (or link) a plugin package that exports only a TUI part and declares a TUI id:
"exports": { "./tui": "./dist/tui.js" }export default Plugin.define({ id: "usage.quota", setup(ctx) { /* ... */ } }) -
Configure it in
~/.config/opencode/cli.json(the documented location for TUI-only packages):{ "plugins": ["your-tui-only-plugin"] } -
Run
opencode plugin list, with at least one server+TUI plugin configured inopencode.jsonfor comparison.
Expected Behavior
The ID column should display something useful for TUI-only plugins. Two reasonable fallbacks, in order of preference:
- The package name — it is already available and displayed in the SOURCE column, so the data needs no new plumbing.
- The TUI part's declared id (e.g.
usage.quota) when there is no server-side entry.
Actual Behavior
The ID column shows - for the TUI-only plugin, while server+TUI plugins configured in opencode.json show their IDs:
ID VERSION SOURCE
- 0.2.2 opencode-coding-quota
<server-plugin-a> 1.0.0 <server-plugin-a>
<server-plugin-b> 1.0.0 <server-plugin-b>
Additional Context
- The plugin itself works fine (loads in the TUI, renders its UI). This is purely a display issue in
plugin list, but it is confusing for plugin authors: it looks like the package is broken or not detected. - Verified against the running service via
GET /api/plugin: the TUI-only plugin is absent from the server-side registry because it is loaded directly by the TUI fromcli.json— by design, per the docs, so it remains active against remote servers. Theplugin listID column appears to read only that server-side registry, hence the-. - Reproduced consistently on every invocation.
- Real-world npm package that triggers this:
opencode-coding-quota. - No workaround short of adding an empty server part to the package and moving it to
opencode.json— which sacrifices the documented remote-server benefit ofcli.jsonfor TUI-only packages.
- 主要言語
- TypeScript
- スター
- 227k
- フォーク
- 30.7k
- 平均マージ
- 4時間 35分
- マージ済み PR(30日)
- 498
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode のほかの issue
-
area/cli platform/windows type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anomalyco/opencode#64631 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/desktop platform/windows type/feature version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode#64566 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Opening mini-tabsオープンarea/desktop platform/windows status/repro-plausible type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
anomalyco/opencode#64522 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
opencode-native panics on session ID after a multibyte character対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea/tui platform/macos status/repro-plausible type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
anomalyco/opencode#64389 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/desktop platform/windows type/feature version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#64077 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude Cosmetic
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Domain / chatbot New
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Inist-CNRS/lodex#3861 ·
メンテナーはふだん 1 日以内に返信
-
area:agent-sdk area:docs documentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
anthropics/claude-code#110914 ·
-
approved check:passed streams:remove
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信