import type { PluginManifest, PluginCommand } from "./plugins.js";
/** MCP server configuration (stdio or HTTP/SSE) */
export interface McpServerConfig {
    /** Unique ID for this MCP server */
    id: string;
    /** Human-readable name (used as key in SDK mcpServers config) */
    name: string;
    /** The app plugin this MCP server belongs to */
    sourcePluginId: string;
    /** Whether this MCP server is enabled */
    enabled: boolean;
    /** Server transport type */
    type: "stdio" | "sse" | "http";
    /** For stdio: command to run */
    command?: string;
    /** For stdio: command arguments */
    args?: string[];
    /** For sse/http: server URL */
    url?: string;
    /** For sse/http: request headers */
    headers?: Record<string, string>;
    /** Environment variables to pass to the server (resolved/user-set values) */
    env?: Record<string, string>;
    /** Original env templates from .mcp.json (e.g. "${API_KEY}", "${DB_URL:-localhost}") */
    envDefaults?: Record<string, string>;
    /** Directory containing the .mcp.json this server was parsed from (for path resolution) */
    mcpJsonDir?: string;
}
/** A single hook entry from a plugin's hooks.json */
export interface PluginHookEntry {
    type: "command" | "prompt";
    command?: string;
    prompt?: string;
    timeout?: number;
}
/** A hook matcher from a plugin's hooks.json */
export interface PluginHookMatcher {
    matcher?: string;
    hooks: PluginHookEntry[];
    timeout?: number;
}
/** Parsed hooks.json content for a plugin */
export interface PluginHooksConfig {
    description?: string;
    hooks: Partial<Record<string, PluginHookMatcher[]>>;
}
/** An app-wide plugin discovered from a recursive scan */
export interface AppPlugin {
    /** Unique ID (SHA-256 hash prefix of absolute plugin path) */
    id: string;
    /** Absolute path to the plugin directory */
    pluginPath: string;
    /** Path to the marketplace.json that declared this plugin */
    marketplacePath: string;
    /** The root scan directory this was discovered from */
    scanRoot: string;
    /** Plugin manifest from marketplace.json */
    manifest: PluginManifest;
    /** Discovered slash commands */
    commands: PluginCommand[];
    /** Whether this plugin is enabled (user toggle) */
    enabled: boolean;
    /** MCP servers discovered inside this plugin's .mcp.json (if any) */
    mcpServers?: McpServerConfig[];
    /** Hook definitions discovered from this plugin's hooks/hooks.json (if any) */
    hooksConfig?: PluginHooksConfig;
}
/** Stored scan root entry with metadata */
export interface PluginScanRoot {
    /** Absolute path to the directory that was scanned */
    path: string;
    /** When this scan was last performed (ISO-8601) */
    lastScanned: string;
    /** Number of plugins found in this scan root */
    pluginCount: number;
    /** Number of MCP servers found in this scan root */
    mcpServerCount: number;
}
/** The complete persisted state for app-wide plugins */
export interface AppPluginsData {
    /** Directories the user has registered for scanning */
    scanRoots: PluginScanRoot[];
    /** All discovered app-wide plugins */
    plugins: AppPlugin[];
}
/** API response for scan operations */
export interface ScanResult {
    scanRoot: string;
    pluginsFound: number;
    mcpServersFound: number;
    plugins: AppPlugin[];
}
//# sourceMappingURL=appPlugins.d.ts.map