/** * Plugin Discovery Service * Discovers plugin registries via IPNS and fetches from IPFS * Parallel implementation to pattern store for plugins */ import type { PluginRegistry, KnownPluginRegistry, PluginStoreConfig } from './types.js'; /** * Default plugin store configuration */ /** * Live IPFS Registry CID - Updated 2026-05-11 * This is the current pinned registry on Pinata. * 2026-05-11: bumped agentic-qe→3.0.0-alpha.5, gastown-bridge→0.1.4, * legal-contracts/healthcare-clinical/perf-optimizer→3.0.0-alpha.2 * (republished to fix #1902/#1903/#1904 install breakage). */ export declare const LIVE_REGISTRY_CID = "QmeXmAdbWVvT84GfDXPD2Vg1HWhiTW2VdZfRLhkS96KkX2"; /** * Pre-trained Model Registry CID - Updated 2026-01-24 * Contains 8 pre-trained learning pattern models with 40 patterns * Trained on 110,600+ examples with 90.5% average accuracy */ export declare const MODEL_REGISTRY_CID = "QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc"; export declare const DEFAULT_PLUGIN_STORE_CONFIG: PluginStoreConfig; /** * Discovery result */ export interface PluginDiscoveryResult { success: boolean; registry?: PluginRegistry; cid?: string; source?: string; fromCache?: boolean; error?: string; /** * True when the signed registry could not be fetched or verified and the CLI fell back to * its built-in plugin list. That list is safe to use (fixed, first-party npm names), but it * is NOT the verified registry, and callers must say so rather than report a discovery. */ demo?: boolean; /** * True only when the registry's signature verified against the pinned key. Entries of an * unverified registry carry no registry trust: their trustLevel is reported as * 'unverified', so nothing downstream can treat them as registry-vouched. */ verified?: boolean; /** Why the registry is not verified (set whenever `verified` is not true). */ unverifiedReason?: string; } /** Registry-level verification status, for callers that report registry data. */ export declare function registryStatus(result: PluginDiscoveryResult): { verified: boolean; unverifiedReason?: string; source?: string; }; /** * Plugin Discovery Service */ export declare class PluginDiscoveryService { private config; private cache; constructor(config?: Partial); /** * Whether an unverified registry may be replaced by the built-in list. Off under * `CLAUDE_FLOW_STRICT_PLUGINS=true` (ADR-145) unless the config says otherwise. */ private allowsUnverifiedFallback; /** * Discover plugin registry via IPNS */ discoverRegistry(registryName?: string): Promise; /** * The signed registry is unavailable or unverified. Outside strict mode, use the built-in * list, labelled as such and stripped of registry trust; in strict mode, fail. */ private fallbackToBuiltIn; /** * Create demo plugin registry with real npm stats */ private createDemoRegistryAsync; /** * Get demo plugins */ private getDemoPlugins; /** * Get demo plugins with real npm stats */ private getDemoPluginsWithStats; /** * Verify the registry Ed25519 signature; returns why it failed, or null when it verified. * * Mirrors the signing scheme in scripts/publish-registry.ts: the signer * removes registrySignature + registryPublicKey from the registry object * and signs JSON.stringify(rest). The verifier reproduces those bytes and * checks the signature against the registry config's pre-pinned * publicKey — NOT registry.registryPublicKey, which is asserted by * whoever served the registry and can be swapped by a compromised * gateway / on-path attacker. */ private registrySignatureFailure; /** * List available registries */ listRegistries(): KnownPluginRegistry[]; /** * Add a new registry */ addRegistry(registry: KnownPluginRegistry): void; /** * Remove a registry */ removeRegistry(name: string): boolean; /** * Clear cache */ clearCache(): void; /** * Get cache statistics */ getCacheStats(): { entries: number; registries: string[]; }; } /** * Create discovery service with default config */ export declare function createPluginDiscoveryService(config?: Partial): PluginDiscoveryService; //# sourceMappingURL=discovery.d.ts.map