Repository navigation
Description
The workflow
I am building a plugin that opens KiCad projects (schematic, board, 3D) in the thread panel. The natural entry point is a file opener for .kicad_pcb, .kicad_sch and .kicad_pro, so a click on one of those files in chat or in the file tree opens the viewer.
What happens today
Registering the opener fails, and the whole frontend of the plugin is dropped:
app.slots.fileOpener({ id: "kicad", title: "KiCad", extensions: ["kicad_pcb", "kicad_sch", "kicad_pro"], component: KicadFile });frontend registration failed: slots.fileOpener: extensions must be lowercase alphanumerics without the dot, got "kicad_pcb"
The check is in packages/plugin-sdk/src/internal/plugin-app-collector.ts (/^[a-z0-9]+$/). The resolver itself already handles such names: getFileExtension in apps/app/src/lib/plugin-slot-resolvers.ts takes everything after the last dot, so board.kicad_pcb gives kicad_pcb. Only the registration check rejects it.
What you would expect
Allow _ and - inside an extension, still lowercase, no dots:
- if (typeof extension !== "string" || !/^[a-z0-9]+$/.test(extension)) {
+ if (typeof extension !== "string" || !/^[a-z0-9]+(?:[_-][a-z0-9]+)*$/.test(extension)) {
throw new Error(
- `${kind}: extensions must be lowercase alphanumerics without the dot, got ${JSON.stringify(extension)}`,
+ `${kind}: extensions must be lowercase alphanumerics (inner "_" or "-" allowed) without the dot, got ${JSON.stringify(extension)}`,
);plus a passing case for kicad_pcb next to the failing case in apps/app/src/lib/plugin-app-definition.test.ts, and the same wording in the extensions doc comment in app-contract.ts. Happy to send this as a PR after sign-off.
Context and alternatives
Real extensions with _ or -: KiCad (kicad_pcb, kicad_sch, kicad_pro, kicad_sym, kicad_mod, kicad_wks), VS Code code-workspace, Sublime sublime-project.
Workaround in my plugin: a thread header button plus a thread panel action that lists the KiCad projects in the workspace, and an agent tool that opens the panel. It works, but a click on a .kicad_pcb link in chat still opens raw text.
Version: bb 0.46.1, Plugin SDK 0.6.49.
Checks
- I searched open and closed issues for the same request.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 20, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotplugins.confirmed-repro.Allow internal separators in file opener extension registration (get-…