Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Plugin fails to load on OpenCode v2.0.27 - incompatible plugin API

Aperta
#83 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Start at the plugin's entry module, where the named export PTYPlugin is declared, and compare it with the default-export shape OpenCode 2.x expects (an id plus an effect or setup function). The error text is in the issue, and the linked oh-my-openagent and opencode-pty#67 threads describe the same loader. Done means the plugin loads on OpenCode v2.0.27 without the error. The issue does not choose between adapting the API and adding a shim, so ask the maintainer first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug Description

[email protected] fails to load as a plugin on OpenCode v2.0.27 with the following error:

Plugin must export a default definition with an id and an effect or setup function.

Environment

  • OpenCode version: v2.0.27
  • opencode-pty version: 0.4.0 (latest on npm)
  • Platform: Windows 11
  • Node: v22.18.0

Steps to Reproduce

  1. Install opencode-pty: opencode plugin add opencode-pty@latest
  2. Start OpenCode v2.0.27
  3. Plugin fails to load with the error above

Root Cause

OpenCode 2.0 introduced a new Effect-based plugin API that requires plugins to export a default definition with id and effect or setup function keys. opencode-pty currently uses the old export format (named exports like export { PTYPlugin }).

Expected Behavior

opencode-pty should either:

  • Adapt to the new Effect-based plugin API, OR
  • Provide a compatibility shim for OpenCode 2.x

Additional Context

Lingua principale
TypeScript
Stelle
597
Fork
65
Merge medio
1g 20h
PR unite (30g)
3

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di shekohex/opencode-pty

Tutte le issue di shekohex/opencode-pty

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.