santifer/career-ops · error · Error
plugin rejected
Error message
plugin rejected:
- ${result.problems.join('
- ')} What it means
installFromRepo clones a plugin repository and runs validateInstall against the clone. When validation reports result.ok === false, the clone is deleted and this error is thrown, joining each validation problem on its own bulleted line so all issues are visible at once. It means the plugin failed the manifest/content checks and was never installed.
Solutions
- Read the bulleted problem list in the error message — each line is a distinct validation failure to fix in the plugin's manifest/files
- Fix the plugin manifest (plugin.json) in the source repo, push, and reinstall
- Pin a different sha/commit where the plugin passed validation
- If you maintain the plugin locally, run its scaffold/validate path (validateNew) to check problems before installing
Example fix
// before: installing a repo with a manifest missing 'description'
await installFromRepo(root, 'my-plugin', 'https://github.com/user/my-plugin.git');
// Error: plugin rejected:
// - manifest.description is required
// after: fix plugin.json in the repo first
{ "id": "my-plugin", "description": "Does X", ... } Defensive patterns
Strategy: validation
Validate before calling
import { validateInstall } from './plugin-install.mjs';
const result = validateInstall(clonedDir, id);
if (!result.ok) console.error('Plugin will be rejected:', result.problems); Type guard
function isValidated(r) { return r && r.ok === true && typeof r.dir === 'string' && r.manifest; } Try / catch
try { await installFromRepo(root, id, url, sha); } catch (e) { if (String(e.message).startsWith('plugin rejected:')) { console.error(e.message); /* show each problem to the user */ } else throw e; } Prevention
- Validate the plugin locally (validateNew/validateInstall) before attempting install from a repo
- Keep plugin manifests in sync with the current schema after system updates
- Pin a known-good sha when installing third-party plugins
When it happens
Trigger: Calling installFromRepo(root, id, repoUrl, sha) where the cloned repo's plugin manifest fails validation — e.g. missing or malformed plugin.json, missing declared entry file, invalid permission/manifest fields. validateInstall returns { ok:false, problems:[...] } instead of throwing.
Common situations: Installing a third-party plugin whose manifest is outdated or hand-edited; a repo restructured so the manifest no longer matches the layout; typos in manifest fields after a schema change; checking out an old sha predating the current validation rules.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- each entry needs a string "input" and "output"
- invalid format " " (use: )
- invalid reportNum " " (use the numeric report number)
- plugin name must match [a-z0-9-]
- repo must be named "career-ops-plugin
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/7d0f21f659785eb3.
Report an issue: GitHub.
Appendix: source
Thrown at plugin-install.mjs:91
return { ok: true, problems: [], manifest, dir };
}
/**
* Install a community plugin from a github repo at a pinned SHA into
* plugins.local/<id>. Returns { id, manifest, integrity, dir } WITHOUT enabling
* it (the caller runs the consent gate). Throws on any validation failure.
*/
export function installFromRepo(root, { url, sha }) {
const { url: safeUrl, id } = parseRepoArg(url);
const dest = path.join(root, 'plugins.local', id);
if (existsSync(dest)) throw new Error(`plugins.local/${id} already exists — \`node plugins.mjs remove ${id}\` first`);
let cloned = safeClone(safeUrl, sha);
let result;
try { result = validateInstall(cloned, id); }
catch (e) { rmSync(cloned, { recursive: true, force: true }); throw e; }
if (!result.ok) {
rmSync(result.dir || cloned, { recursive: true, force: true });
throw new Error(`plugin rejected:\n - ${result.problems.join('\n - ')}`);
}
mkdirSync(path.join(root, 'plugins.local'), { recursive: true });
cpSync(result.dir, dest, { recursive: true });
rmSync(result.dir, { recursive: true, force: true });
const tree = hashPluginTree(dest);
return { id, manifest: { ...result.manifest, dir: dest }, integrity: tree.integrity, files: tree.files, repo: safeUrl, sha };
}
/**
* Clone + statically validate a registry entry WITHOUT installing it (used by
* the registry-validate CI). Executes NO plugin code — manifest is parsed, the
* audit is static. Returns problems (empty = clean).
* @returns {string[]}
*/
export function auditRegistryEntry(url, sha, expectId) {
let parsed;
try { parsed = parseRepoArg(url); } catch (e) { return [e.message]; }
if (expectId && parsed.id !== expectId) return [`repo "${url}" → id "${parsed.id}" but registry id is "${expectId}"`];View on GitHub (pinned to aac998c7ed)