/** * @name premium/plugin-validator * @description Strict structural validator for premium plugin manifests. * * Validates unknown JSON objects against the `PremiumPluginManifest` shape, * rejecting unknown fields (so private provider secrets or executable code * cannot leak through manifests), enforcing semver versions, JSON Schema * correctness, pricing bounds, and delivery contract constraints. * * Used by: * - `private-manifest-loader.ts` → validates every `.json` file loaded from disk. * - `premium-tools.ts` → MCP tool `sap_premium_validate_plugin_manifest`. * * @flow * 1. External manifest JSON arrives (filesystem or MCP tool argument). * 2. → `validatePremiumPluginManifest(manifest)` runs structural checks. * 3. Returns `PremiumValidationReport` with errors[] and warnings[]. * 4. Caller decides: accept (valid=true) or reject with error details. * * @module premium/plugin-validator */ import type { PremiumValidationReport } from './types.js'; /** * @name validatePremiumPluginManifest * @description Validate an unknown value as a `PremiumPluginManifest`. * * Top-level checks: object shape, id format, semver version, title, description * length, publisher, visibility enum, and at least one capability. Each * capability is then validated by `validateCapability`. * * @param manifest - Unknown JSON value (from filesystem or MCP tool argument). * @returns `PremiumValidationReport` with `valid`, `errors[]`, and `warnings[]`. * * @usedBy * - `private-manifest-loader.ts` → validates each `.json` file from disk. * - `premium-tools.ts` → MCP tool `sap_premium_validate_plugin_manifest`. */ export declare function validatePremiumPluginManifest(manifest: unknown): PremiumValidationReport; //# sourceMappingURL=plugin-validator.d.ts.map