/** * @name premium/builtin-plugins * @description Built-in premium plugin definitions and discovery helpers. * * Defines the core built-in public premium plugin shipped with SAP MCP: * 1. `sap-premium-market-data` — Jupiter quotes, Pyth price ticks, threshold webhooks. * * Additional built-in plugin arrays are imported and merged by `listPremiumPlugins()`: * - `TRADING_PREMIUM_PLUGINS` — Trading streams. * - `MEME_RADAR_PREMIUM_PLUGINS` — Meme token listing, sentiment, rugpull, volume. * - `TECH_FUNDAMENTALS_PREMIUM_PLUGINS` — GitHub activity, TVL changes, tokenomics analysis. * * Also provides discovery helpers (`listPremiumPlugins`, `listPremiumCapabilities`, * `findPremiumCapability`) that merge built-in plugins with privately loaded * manifests, and status helpers (`publicPremiumProviderStatus`, * `premiumPrivatePluginSupport`) used by the remote server and MCP tools. * * @flow * 1. MCP tool `sap_premium_plugin_catalog` → `listPremiumPlugins()` → * merges built-in + private manifests, filters by visibility, returns clones. * 2. MCP tool `sap_premium_create_session_plan` → `findPremiumCapability()` → * resolves a specific plugin/capability pair for session planning. * 3. Remote server (`remote/server.ts`) → `publicPremiumProviderStatus()` → * exposes which provider env vars are configured. * 4. Remote server → `premiumPrivatePluginSupport()` → reports private plugin * loader configuration and safety contract. * * @module premium/builtin-plugins */ import type { PremiumCapabilityDefinition, PremiumCapabilityType, PremiumPluginManifest } from './types.js'; /** * @name BUILTIN_PREMIUM_PLUGINS * @description The built-in public premium plugins shipped with SAP MCP. * * These are always available (no env vars needed for discovery) and serve as * the reference implementations for the premium plugin manifest format. * Additional plugin arrays (`TRADING_PREMIUM_PLUGINS`, * `MEME_RADAR_PREMIUM_PLUGINS`, `TECH_FUNDAMENTALS_PREMIUM_PLUGINS`) are merged * in `listPremiumPlugins()`. * * @type {PremiumPluginManifest[]} * * @usedBy `listPremiumPlugins()` as the base catalog merged with private manifests. */ export declare const BUILTIN_PREMIUM_PLUGINS: PremiumPluginManifest[]; /** * @name PremiumPluginListOptions * @description Options controlling which plugins are included in discovery. * * @property includePrivate - When true, `private` and `enterprise` visibility * plugins are included. Defaults to the value of * `SAP_MCP_PREMIUM_EXPOSE_PRIVATE_DISCOVERY` env var. */ export interface PremiumPluginListOptions { includePrivate?: boolean; } /** * @name listPremiumPlugins * @description Return all discoverable premium plugins (built-in + private). * * Merges `BUILTIN_PREMIUM_PLUGINS` with privately loaded manifests, filters by * visibility (public always; private/enterprise only when `includePrivate` is * true or `SAP_MCP_PREMIUM_EXPOSE_PRIVATE_DISCOVERY=true`), and returns deep * clones to prevent external mutation. * * @param options - Discovery options (see `PremiumPluginListOptions`). * @returns Array of `PremiumPluginManifest` clones. * * @usedBy * - `premium-tools.ts` → MCP tool `sap_premium_plugin_catalog`. * - `remote/server.ts` → landing page plugin listing. * - `listPremiumCapabilities`, `findPremiumCapability` (internally). */ export declare function listPremiumPlugins(options?: PremiumPluginListOptions): PremiumPluginManifest[]; /** * @name listPremiumCapabilities * @description Return all capabilities across all discoverable plugins, * optionally filtered by capability type. * * @param type - Optional filter: `stream`, `webhook`, or `tool`. * @param options - Discovery options (see `PremiumPluginListOptions`). * @returns Array of `PremiumCapabilityDefinition` clones (shallow-copied). * * @usedBy `publicPremiumProviderStatus` (internally), MCP tools. */ export declare function listPremiumCapabilities(type?: PremiumCapabilityType, options?: PremiumPluginListOptions): PremiumCapabilityDefinition[]; /** * @name findPremiumCapability * @description Resolve a specific plugin/capability pair by id. * * @param pluginId - The plugin id to search for. * @param capabilityId - The capability id within that plugin. * @param type - Optional capability type filter. * @param options - Discovery options (see `PremiumPluginListOptions`). * @returns `{ plugin, capability }` if found, otherwise `null`. * * @usedBy `session-manager.ts:createPremiumSessionPlan` → resolves the * capability for pricing bounds and provider env checks. */ export declare function findPremiumCapability(pluginId: string, capabilityId: string, type?: PremiumCapabilityType, options?: PremiumPluginListOptions): { plugin: PremiumPluginManifest; capability: PremiumCapabilityDefinition; } | null; /** * @name findPremiumCapabilityById * @description Resolve a capability by its id alone, searching across ALL plugins. * * This is the auto-discovery path: the agent doesn't need to know which plugin * contains a capability. If the capability exists in any plugin, it's returned. * * If `pluginId` is provided AND matches, that plugin is preferred. If the * capability is not found in the specified plugin but exists in another, the * other plugin's capability is returned with a note. * * @param capabilityId - The capability id to search for (e.g. "pyth.volatility.watch"). * @param type - Optional capability type filter. * @param options - Discovery options. * @returns `{ plugin, capability }` if found, otherwise `null`. */ export declare function findPremiumCapabilityById(capabilityId: string, type?: PremiumCapabilityType, options?: PremiumPluginListOptions): { plugin: PremiumPluginManifest; capability: PremiumCapabilityDefinition; } | null; /** * @name publicPremiumProviderStatus * @description Return a map of all provider env var names to their current * readiness state (true/false based on `process.env`). * * Used by the remote server to expose which premium providers are configured * without revealing secret values. * * @returns Record keyed by env var name, value is boolean readiness. * * @usedBy `remote/server.ts` → provider status endpoint. */ export declare function publicPremiumProviderStatus(): Record; /** * @name premiumProviderLoaderStatus * @description Return diagnostic info about the private plugin loader configuration. * * Reports whether private plugins are enabled, whether the plugin directory is * configured and exists, and how many manifests were loaded/rejected. This * complements `publicPremiumProviderStatus()` (which only checks env var * readiness) by exposing the loader state that determines whether provider * adapters can actually be loaded. * * @returns Object with `enabled`, `pluginDirConfigured`, `pluginDirExists`, * `loadedManifestCount`, and `rejectedManifestCount` fields. * * @usedBy `remote/server.ts` → provider status endpoint, `premium-tools.ts`. */ export declare function premiumProviderLoaderStatus(): { enabled: boolean; pluginDirConfigured: boolean; pluginDirExists: boolean; loadedManifestCount: number; rejectedManifestCount: number; }; /** * @name premiumPrivatePluginSupport * @description Return a diagnostic object describing the private plugin * loader configuration, loaded/rejected manifest counts, and the safety contract. * * Used by the remote server and MCP tools to report private plugin support * status without exposing any enterprise code or secrets. * * @returns Object with `enabled`, `exposePrivateDiscovery`, `loadedManifestCount`, * `rejectedManifestCount`, `loaderEnv`, `contract`, and `safety` fields. * * @usedBy `remote/server.ts`, `premium-tools.ts`. */ export declare function premiumPrivatePluginSupport(): Record; /** * @name premiumAddressField * @description Re-exported reusable Solana address JSON Schema fragment. * * Used by MCP tool definitions that accept a Solana public key argument. */ export declare const premiumAddressField: { type: string; minLength: number; maxLength: number; description: string; }; //# sourceMappingURL=builtin-plugins.d.ts.map