/** * OpenSpec **plugin** manifest — the declarative contract OpenLore publishes so * the OpenSpec plugin marketplace can discover, surface, gate, and install it * WITHOUT importing OpenLore's code. * * This is a DISTINCT artifact from the OpenLore **federation** manifest * (`openlore manifest …`, `.well-known/openlore.json`, schemas/openlore-manifest-v1.json), * which describes a repo's public symbols for cross-repo federation. The two share * neither schema nor command, by design — see `openlore plugin-manifest` vs * `openlore manifest`. * * The single source of truth is the `"openspec"` key in OpenLore's own * `package.json` (host Decision 3 — the package.json key form is scannable from * `node_modules` with zero extra files). This module reads and validates that key; * it never owns a second copy. A standalone `openspec.plugin.json` is supported as a * fallback for non-npm distribution. */ import { type ValidationError } from '../manifest/schema-validator.js'; export declare const PLUGIN_MANIFEST_VERSION = 1; export interface PluginManifestCommand { name: string; summary: string; } export interface PluginManifestSkill { dir: string; source: string; } export interface PluginManifest { manifestVersion: number; id: string; namespace: string; bin?: string; binArgs?: string[]; openspecCompat: string; displayName?: string; summary?: string; commands?: PluginManifestCommand[]; skills?: PluginManifestSkill[]; workflows?: string[]; ownsConfigKeys?: string[]; } /** Absolute path to the vendored plugin-manifest JSON Schema (ships in the package). */ export declare function pluginManifestSchemaPath(): string; export declare function loadPluginManifestSchema(): Record; /** * Read the plugin manifest from a package directory. Mirrors the host's discovery * order (Decision 3 / plugin-manifest spec): the `"openspec"` package.json key wins; * a sibling `openspec.plugin.json` is the fallback when the key is absent. * Returns null when neither is present. */ export declare function readPluginManifest(packageRoot: string): PluginManifest | null; /** * Validate a parsed plugin manifest. Combines JSON-Schema validation (types + * required fields, top-level passthrough preserved for forward-compat) with the * semantic checks the tiny schema validator cannot express: * - exactly one executable form is declared (`bin` OR `binArgs`), * - `namespace` is a single lowercase token (host reserves it as a top-level verb), * - each contributed skill's `dir` is a single safe path segment and its `source` * stays inside the package (the host's path-containment rule — enforced here so * `validate ` is as strict for third parties as the self-guard is * for OpenLore's own manifest). * Returns the (possibly empty) error list, same shape as the federation validator. */ export declare function validatePluginManifest(manifest: unknown): ValidationError[]; /** Serialize a manifest to the exact bytes printed to stdout (machine-readable). */ export declare function serializePluginManifest(manifest: PluginManifest): string; //# sourceMappingURL=manifest.d.ts.map