Point a failed discovery at the stale plugins/ copy, and document upgrading
CI / full-gate (push) Successful in 2m39s

This commit is contained in:
2026-08-05 17:52:34 +02:00
parent f76cd2a267
commit 45b16824f1
5 changed files with 58 additions and 1 deletions
+8 -1
View File
@@ -65,7 +65,14 @@ export async function discoverPlugins(options: DiscoverOptions = {}): Promise<Pl
}
if (errors.length) {
throw new Error(`Plugin discovery failed:\n${errors.map((e) => ` - ${e}`).join("\n")}`);
// `plugins/` is a drop-in mount the operator owns, so the reader of this message often didn't
// write the manifest — they copied it. Tightening a contract rule breaks those copies at boot,
// and the rule alone doesn't tell them the remedy is one command.
throw new Error(
`Plugin discovery failed:\n${errors.map((e) => ` - ${e}`).join("\n")}\n` +
`A plugin under plugins/ is your own copy. If it came from examples/, re-copy it — ` +
`the host contract may have changed since (see README → Upgrading).`,
);
}
return plugins;
}