You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
readV1Plugin detect mode throws TypeError for TUI-only plugins loaded as server plugins #31610
When a file-based TUI-only plugin (one that exports { id, tui } but not server) is configured via settings.plugin, the server plugin loader (plugin/index.ts) calls readV1Plugin(mod, spec, "server", "detect").
The detect-mode guard at shared.ts:283 only short-circuits when all three fields (id, server, tui) are absent. Since id and tui are present, the function proceeds to the kind-specific check at line 296 and throws:
TypeError: Plugin ... must default export an object with server()
This error is caught and logged at ERROR level, producing noisy and misleading log output.
Expected behavior
readV1Plugin with mode = "detect" should silently skip plugins that do not have the entrypoint for the requested kind. A TUI-only plugin should be skipped when kind = "server" and vice versa.
Proposed fix
Add two short-circuit guards after the existing detect check:
I'd like to work on this. The fix is clear from the issue description — add two short-circuit guards in readV1Plugin for detect mode when the requested kind's entrypoint is missing. Will submit a PR referencing this issue.
Activity
kagura-chen commentedon Jun 10, 2026
I'd like to work on this. The fix is clear from the issue description — add two short-circuit guards in
readV1Pluginfor detect mode when the requested kind's entrypoint is missing. Will submit a PR referencing this issue.fix(plugin): skip mismatched kind in readV1Plugin detect mode
github-actions commentedon Aug 10, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.