chore(core): Remove unused node-tips prompts and re-exports

The structuredOutputParser and webhook NodeGuidance constants in
@n8n/workflow-sdk/prompts/node-guidance/node-tips were re-exported by
ai-workflow-builder.ee/src/prompts/shared/node-guidance/index.ts, but
nothing in the codebase imported either name. Drop the directory, the
re-export, the type-only mirror, and the package.json subpath export.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mutasem Aldmour 2026-05-08 12:03:27 +02:00
parent a08f67aca6
commit 0d557bc99e
No known key found for this signature in database
GPG Key ID: 3DFA8122BB7FD6B8
9 changed files with 0 additions and 107 deletions

View File

@ -1,4 +0,0 @@
/**
* Re-export node tips from the shared @n8n/workflow-sdk package.
*/
export { structuredOutputParser, webhook } from '@n8n/workflow-sdk/prompts/node-guidance/node-tips';

View File

@ -11,7 +11,6 @@ export type * from './config';
export type * from './utils';
export type * from './categorization';
export type * from './best-practices';
export type * from './node-guidance';
export type * from './session-storage';
export * from './sessions';
export type * from './planning';

View File

@ -1,4 +0,0 @@
/**
* Re-export node guidance types from the shared @n8n/workflow-sdk/prompts package.
*/
export type { NodeGuidance } from '@n8n/workflow-sdk/prompts/node-guidance/node-tips';

View File

@ -26,10 +26,6 @@
"types": "./dist/prompts/node-guidance/parameter-guides/index.d.ts",
"default": "./dist/prompts/node-guidance/parameter-guides/index.js"
},
"./prompts/node-guidance/node-tips": {
"types": "./dist/prompts/node-guidance/node-tips/index.d.ts",
"default": "./dist/prompts/node-guidance/node-tips/index.js"
},
"./prompts/node-guidance/node-recommendations": {
"types": "./dist/prompts/node-guidance/node-recommendations/index.d.ts",
"default": "./dist/prompts/node-guidance/node-recommendations/index.js"
@ -75,9 +71,6 @@
"prompts/node-guidance/parameter-guides": [
"./dist/prompts/node-guidance/parameter-guides/index.d.ts"
],
"prompts/node-guidance/node-tips": [
"./dist/prompts/node-guidance/node-tips/index.d.ts"
],
"prompts/node-guidance/node-recommendations": [
"./dist/prompts/node-guidance/node-recommendations/index.d.ts"
],

View File

@ -1,3 +1,2 @@
export * from './parameter-guides';
export * from './node-tips';
export * from './node-recommendations';

View File

@ -1,3 +0,0 @@
export type { NodeGuidance } from './types';
export { webhook } from './webhook';
export { structuredOutputParser } from './structured-output-parser';

View File

@ -1,37 +0,0 @@
import type { NodeGuidance } from './types';
export const structuredOutputParser: NodeGuidance = {
nodeType: '@n8n/n8n-nodes-langchain.outputParserStructured',
usage: `Search for "Structured Output Parser" (@n8n/n8n-nodes-langchain.outputParserStructured) when:
- AI output will be used programmatically (conditions, formatting, database storage, API calls)
- AI needs to extract specific fields (e.g., score, category, priority, action items)
- AI needs to classify/categorize data into defined categories
- Downstream nodes need to access specific fields from AI response (e.g., $json.score, $json.category)
- Output will be displayed in a formatted way (e.g., HTML email with specific sections)
- Data needs validation against a schema before processing
- Always use search_nodes to find the exact node names and versions - NEVER guess versions`,
connections: `When Discovery results include AI Agent or Structured Output Parser:
1. Create the Structured Output Parser node
2. Set AI Agent's hasOutputParser: true in initialParameters
3. Connect: Structured Output Parser AI Agent (outputParser() connection)`,
configuration: `WHEN TO SET hasOutputParser: true on AI Agent:
- Discovery found Structured Output Parser node MUST set hasOutputParser: true
- AI output will be used in conditions (IF/Switch nodes checking $json.field)
- AI output will be formatted/displayed (HTML emails, reports with specific sections)
- AI output will be stored in database/data tables with specific fields
- AI is classifying, scoring, or extracting specific data fields`,
recommendation: `For AI-generated structured data, prefer Structured Output Parser nodes over Code nodes.
Why: Purpose-built parsers are more reliable and handle edge cases better than custom code.
For binary file data, use Extract From File node to extract content from files before processing.
Use Code nodes only for:
- Simple string manipulations
- Already structured data (JSON, CSV)
- Custom business logic beyond parsing`,
};

View File

@ -1,10 +0,0 @@
/**
* Structured guidance for node usage across different agents.
*/
export interface NodeGuidance {
nodeType: string;
usage: string;
connections: string;
configuration: string;
recommendation?: string;
}

View File

@ -1,40 +0,0 @@
import type { NodeGuidance } from './types';
export const webhook: NodeGuidance = {
nodeType: 'n8n-nodes-base.webhook',
usage: `Search for "Webhook" (n8n-nodes-base.webhook) when:
- Workflow needs to receive HTTP requests from external services
- API callbacks, webhooks, or HTTP endpoints are needed
- Integration requires real-time event handling from external systems`,
connections: `WEBHOOK RESPONSE MODE RULES - CRITICAL:
Response modes and their requirements:
- "onReceived" (Immediately): Responds instantly when webhook is called. No RespondToWebhook node needed.
- "lastNode" (When Last Node Finishes): Responds with data from last node. No RespondToWebhook node needed.
- "responseNode" (Using Respond to Webhook Node): REQUIRES a RespondToWebhook node connected downstream.
RULE 1: If responseMode='responseNode', you MUST add a RespondToWebhook node
RULE 2: If RespondToWebhook node exists, responseMode MUST be 'responseNode'
Pattern for custom response control:
Webhook (responseMode: responseNode) [Processing] RespondToWebhook`,
configuration: `WEBHOOK RESPONSE MODE CONFIGURATION:
Choose responseMode based on use case:
- "onReceived": Quick acknowledgment, processing happens async
- "lastNode": Return processed data, simple request-response flows
- "responseNode": Full control over response timing, headers, status codes
CRITICAL: When user needs to control response content/timing/headers, set responseMode='responseNode' AND add RespondToWebhook node.
When NOT to use responseNode:
- Simple acknowledgments (use 'onReceived')
- Return last node output directly (use 'lastNode')`,
recommendation: `For webhook workflows requiring custom response handling (status codes, headers, delayed response), use responseMode='responseNode' with a RespondToWebhook node.
For simple webhook acknowledgments or direct data return, use 'onReceived' or 'lastNode' modes respectively.`,
};