* Pattern Search Service Search and filter patterns from decentralized registry /
// Source: https://github.com/ruvnet/ruflo | License: MIT | Copyright 2024-2026 ruvnet
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Pattern Search Service
* Search and filter patterns from decentralized registry
*/
import type {
PatternRegistry,
PatternEntry,
SearchOptions,
SearchResult,
} from './types.js';
/**
* Search patterns in registry
*/
export function searchPatterns(
registry: PatternRegistry,
options: SearchOptions = {}
): SearchResult {
let patterns = [...registry.patterns];
// Text search
if (options.query) {
const query = options.query.toLowerCase();
patterns = patterns.filter(p =>
p.name.toLowerCase().includes(query) ||
p.displayName.toLowerCase().includes(query) ||
p.description.toLowerCase().inclu
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key