import type { McpServerDefinition } from '../types.js'; export declare const PLUGIN_SPEC_VERSION = "1.0.0"; export declare const PLUGIN_MANIFEST_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"; export declare const PLUGIN_MCP_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json"; export interface PluginManifest { $schema: string; name: string; version?: string; description?: string; author?: string; homepage?: string; repository?: string; license?: string; keywords?: string[]; extensions?: Record; } export interface PluginMcpFile { $schema: string; mcpServers: Record; } export interface PluginMcpServer { type: 'stdio' | 'streamable-http' | 'sse'; command?: string; args?: string[]; env?: Record; cwd?: string; url?: string; headers?: Record; } /** Validate a plugin name against the specification's character rules. */ export declare function validatePluginName(name: string): void; /** * Convert the committed server definitions into the plugin `mcp.json` shape. * * Values are taken from `.agents/agents.json` only, never from `.agents/local.json`, * so real secrets cannot reach an exported plugin: what ships is the `${VAR}` * placeholder the committed file already carries. */ export declare function buildPluginMcp(servers: Record): { file: PluginMcpFile; warnings: string[]; requiredEnv: string[]; /** Fields whose literal value looks like a credential; the export refuses to ship them. */ literalSecrets: string[]; }; export interface ExportPluginOptions { projectRoot: string; outDir: string; name: string; version?: string; description?: string; author?: string; license?: string; /** Ship credential-shaped fields that hold literal values instead of refusing. */ allowLiteralSecrets?: boolean; } export interface ExportPluginResult { outDir: string; serverCount: number; skillCount: number; requiredEnv: string[]; warnings: string[]; } /** Write an Agent Plugins v1 package built from the project's `.agents` directory. */ export declare function exportPlugin(options: ExportPluginOptions): Promise; export interface ValidatePluginResult { ok: boolean; errors: string[]; warnings: string[]; serverCount: number; skillCount: number; } /** Check a plugin directory against the Agent Plugins v1 rules. */ export declare function validatePlugin(pluginDir: string): Promise; export interface ImportPluginResult { addedServers: string[]; skippedServers: string[]; addedSkills: string[]; warnings: string[]; } export declare function importPlugin(args: { projectRoot: string; pluginDir: string; prefix?: string; }): Promise;