/** * A plugin id is a namespace: it names a directory in the instance home, the * `/api/plugins/` route prefix, and the inventory row. `jinn` is reserved for * the gateway itself, the same way a custom MCP server may not claim it * (mcp/resolver.ts) — a caller that trusts a well-known id must not be reachable * by a user-supplied one. */ export declare const PLUGIN_ID_PATTERN: RegExp; export interface PluginManifest { id: string; name: string; version: string; /** Absolute path to the client entry. */ client: string; /** Absolute path to the server entry; null when the manifest declares none. */ server: string | null; /** Why a declared `server` entry was dropped. The client half still loads. */ serverError?: string; } export type ManifestResult = { ok: true; manifest: PluginManifest; } | { ok: false; error: string; }; /** * Is `target` inside `root`? Separator-aware on purpose. The string-prefix check * serveStatic uses (server.ts) accepts a sibling directory whose name merely * extends the root — `plugins/safe-extra` passes a prefix test against * `plugins/safe` — and every path this module resolves comes from a manifest. */ export declare function isContainedIn(root: string, target: string): boolean; /** Resolve both paths before testing containment, so a symlink cannot turn a * lexically-contained entry into one that reaches outside its permitted root. */ export declare function resolveContainedPath(root: string, target: string): Promise; /** Validate a parsed `plugin.json` against the directory it was read from. */ export declare function validateManifest(raw: unknown, dir: string): ManifestResult; //# sourceMappingURL=manifest.d.ts.map