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 中配置的插件添加有用的回退方案。当 ID 列能为仅在 cli.json 中配置的插件显示有意义的值,且相关测试通过时,任务即完成。
由索引模型根据 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 分钟
- 30 天内合并 PR
- 498
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 天内回复
-
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可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭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 天内回复