/** * Import and validate the portable Agent Plugin format. * * The importer intentionally handles only local plugin directories. Skills are * copied as inert files into the workspace's agent-visible `.agents/skills` * tree, and remote Streamable HTTP MCP entries are translated to the * Agent-Native `mcp.config.json` shape without copying package headers. * A plugin package is not a credential store and this command never executes * a plugin's scripts or stdio servers. */ export declare const AGENT_PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"; export declare const AGENT_PLUGIN_MCP_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json"; export interface AgentPluginManifest { name: string; version?: string; description?: string; author?: string | { name: string; url?: string; }; homepage?: string; repository?: string; license?: string; keywords?: string[]; } export interface AgentPluginSkillFile { relativePath: string; content: Buffer; mode: number; } export interface LoadedAgentPluginSkill { name: string; description: string; relativePath: string; directory: string; files: AgentPluginSkillFile[]; } export type AgentPluginMcpTransport = "streamable-http" | "sse" | "stdio"; export interface LoadedAgentPluginMcpServer { name: string; type: AgentPluginMcpTransport; url?: string; command?: string; args?: string[]; cwd?: string; headerCount: number; } export interface AgentPluginSkippedComponent { component: "skill" | "mcp"; name?: string; reason: string; } export interface LoadedAgentPlugin { rootDir: string; manifestFile: string; mcpFile?: string; manifest: AgentPluginManifest; pluginHash: string; skills: LoadedAgentPluginSkill[]; mcpServers: LoadedAgentPluginMcpServer[]; skipped: AgentPluginSkippedComponent[]; warnings: string[]; } export interface AgentPluginImportOptions { targetDir?: string; skillsTargetDir?: string; force?: boolean; dryRun?: boolean; } export type AgentPluginImportItemStatus = "imported" | "unchanged" | "overwritten" | "would-import" | "would-overwrite"; export interface AgentPluginImportSkillResult { name: string; sourcePath: string; destination: string; files: number; status: AgentPluginImportItemStatus; } export interface AgentPluginImportMcpResult { name: string; id: string; url: string; headersIgnored: number; status: AgentPluginImportItemStatus; } export interface AgentPluginImportResult { plugin: { name: string; version?: string; hash: string; sourceDir: string; }; targetDir: string; metadataPath: string; mcpConfigPath: string; skills: AgentPluginImportSkillResult[]; mcpServers: AgentPluginImportMcpResult[]; skipped: AgentPluginSkippedComponent[]; warnings: string[]; dryRun: boolean; } export interface ParsedAgentPluginArgs { command: "import" | "help"; source?: string; into?: string; force: boolean; dryRun: boolean; printJson: boolean; yes: boolean; } export declare function loadAgentPlugin(input: string): LoadedAgentPlugin; export declare function importedMcpServerId(pluginName: string, serverName: string, existingIds?: Iterable): string; export declare function importAgentPlugin(input: string, options?: AgentPluginImportOptions): AgentPluginImportResult; export declare function parseAgentPluginArgs(argv: string[]): ParsedAgentPluginArgs; export declare function runAgentPlugin(argv: string[]): Promise;