feat: add includeOperations to search_nodes and patterns mode to search_templates

- Add `includeOperations` flag to search_nodes that returns resource/operation
  trees per result (e.g., Slack: 7 resources, 44 operations). Saves a get_node
  round-trip when building workflows.
- Add `searchMode: "patterns"` to search_templates — lightweight workflow pattern
  summaries mined from 2,700+ templates (node frequency, co-occurrence, connection
  chains across 10 task categories).
- Fix operations extraction: use filter() instead of find() to capture ALL
  operation properties, each mapped to its resource via displayOptions.
- Fix FTS-to-LIKE fallback silently dropping search options.
- Add mine-workflow-patterns.ts script (npm run mine:patterns).
- Restore 584 community nodes in database after rebuild.

Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2026-03-30 15:45:03 +02:00
parent 20ebfbb0fc
commit bda2009b77
10 changed files with 3414 additions and 28 deletions

View File

@@ -131,18 +131,23 @@ export class PropertyExtractor {
}
}
// Programmatic nodes - look for operation property in properties
// Programmatic nodes - look for operation properties in properties
// Note: nodes can have MULTIPLE operation properties, each with displayOptions.show.resource
// mapping to a different resource (e.g., Slack has 7 operation props for channel, message, etc.)
if (description.properties && Array.isArray(description.properties)) {
const operationProp = description.properties.find(
const operationProps = description.properties.filter(
(p: any) => p.name === 'operation' || p.name === 'action'
);
if (operationProp?.options) {
for (const operationProp of operationProps) {
if (!operationProp?.options) continue;
const resource = operationProp.displayOptions?.show?.resource?.[0];
operationProp.options.forEach((op: any) => {
operations.push({
operation: op.value,
name: op.name,
description: op.description
description: op.description,
...(resource ? { resource } : {})
});
});
}