cli: plugin list shows - for ID of TUI-only plugins configured in cli.json

Aberta Para iniciantes
#64,175 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@yash-alla já está trabalhando nisso.

Desde 16/11/2026.

  • #64287 de @yash-alla — aberto

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
72/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
cli

Direção de pesquisa

Rastreie como opencode plugin list monta a coluna ID e lê os dados dos plugins, começando pelo comando CLI e seus testes. Compare os dados do registro no servidor com o nome do pacote já exibido em SOURCE e, em seguida, adicione uma alternativa útil para plugins configurados somente na TUI. A tarefa estará concluída quando a coluna ID exibir um valor significativo para um plugin configurado somente em cli.json e os testes relevantes passarem.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area/cli platform/windows type/feature version/v2

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 in cli.json, alongside server+TUI packages configured in opencode.json

Reproduction

  1. 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) { /* ... */ } })
    
  2. Configure it in ~/.config/opencode/cli.json (the documented location for TUI-only packages):

    { "plugins": ["your-tui-only-plugin"] }
    
  3. Run opencode plugin list, with at least one server+TUI plugin configured in opencode.json for comparison.

Expected Behavior

The ID column should display something useful for TUI-only plugins. Two reasonable fallbacks, in order of preference:

  1. The package name — it is already available and displayed in the SOURCE column, so the data needs no new plumbing.
  2. 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 from cli.json — by design, per the docs, so it remains active against remote servers. The plugin list ID 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 of cli.json for TUI-only packages.
Linguagem predominante
TypeScript
Estrelas
227k
Forks
30.7k
Merge médio
4h 35min
PRs com merge (30d)
498

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de anomalyco/opencode

Todas as issues de anomalyco/opencode

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.