@atom8n/ai-workflow-builder 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/responder.agent.d.ts +21 -0
- package/dist/agents/responder.agent.js +71 -0
- package/dist/agents/responder.agent.js.map +1 -0
- package/dist/agents/supervisor.agent.d.ts +31 -0
- package/dist/agents/supervisor.agent.js +68 -0
- package/dist/agents/supervisor.agent.js.map +1 -0
- package/dist/ai-workflow-builder-agent.service.d.ts +32 -0
- package/dist/ai-workflow-builder-agent.service.js +236 -0
- package/dist/ai-workflow-builder-agent.service.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -0
- package/dist/chains/conversation-compact.d.ts +7 -0
- package/dist/chains/conversation-compact.js +56 -0
- package/dist/chains/conversation-compact.js.map +1 -0
- package/dist/chains/parameter-updater.d.ts +16 -0
- package/dist/chains/parameter-updater.js +112 -0
- package/dist/chains/parameter-updater.js.map +1 -0
- package/dist/chains/prompt-categorization.d.ts +3 -0
- package/dist/chains/prompt-categorization.js +31 -0
- package/dist/chains/prompt-categorization.js.map +1 -0
- package/dist/chains/test/integration/test-helpers.d.ts +3 -0
- package/dist/chains/test/integration/test-helpers.js +16 -0
- package/dist/chains/test/integration/test-helpers.js.map +1 -0
- package/dist/chains/workflow-name.d.ts +4 -0
- package/dist/chains/workflow-name.js +22 -0
- package/dist/chains/workflow-name.js.map +1 -0
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +18 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors/index.d.ts +52 -0
- package/dist/errors/index.js +137 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/llm-config.d.ts +11 -0
- package/dist/llm-config.js +126 -0
- package/dist/llm-config.js.map +1 -0
- package/dist/multi-agent-workflow-subgraphs.d.ts +122 -0
- package/dist/multi-agent-workflow-subgraphs.js +159 -0
- package/dist/multi-agent-workflow-subgraphs.js.map +1 -0
- package/dist/parent-graph-state.d.ts +27 -0
- package/dist/parent-graph-state.js +47 -0
- package/dist/parent-graph-state.js.map +1 -0
- package/dist/prompts/agents/builder.prompt.d.ts +1 -0
- package/dist/prompts/agents/builder.prompt.js +320 -0
- package/dist/prompts/agents/builder.prompt.js.map +1 -0
- package/dist/prompts/agents/configurator.prompt.d.ts +2 -0
- package/dist/prompts/agents/configurator.prompt.js +143 -0
- package/dist/prompts/agents/configurator.prompt.js.map +1 -0
- package/dist/prompts/agents/discovery.prompt.d.ts +11 -0
- package/dist/prompts/agents/discovery.prompt.js +260 -0
- package/dist/prompts/agents/discovery.prompt.js.map +1 -0
- package/dist/prompts/agents/responder.prompt.d.ts +1 -0
- package/dist/prompts/agents/responder.prompt.js +41 -0
- package/dist/prompts/agents/responder.prompt.js.map +1 -0
- package/dist/prompts/agents/supervisor.prompt.d.ts +1 -0
- package/dist/prompts/agents/supervisor.prompt.js +43 -0
- package/dist/prompts/agents/supervisor.prompt.js.map +1 -0
- package/dist/prompts/builder/index.d.ts +2 -0
- package/dist/prompts/builder/index.js +7 -0
- package/dist/prompts/builder/index.js.map +1 -0
- package/dist/prompts/builder/prompt-builder.d.ts +17 -0
- package/dist/prompts/builder/prompt-builder.js +147 -0
- package/dist/prompts/builder/prompt-builder.js.map +1 -0
- package/dist/prompts/builder/types.d.ts +22 -0
- package/dist/prompts/builder/types.js +3 -0
- package/dist/prompts/builder/types.js.map +1 -0
- package/dist/prompts/chains/categorization.prompt.d.ts +43 -0
- package/dist/prompts/chains/categorization.prompt.js +86 -0
- package/dist/prompts/chains/categorization.prompt.js.map +1 -0
- package/dist/prompts/chains/compact.prompt.d.ts +2 -0
- package/dist/prompts/chains/compact.prompt.js +16 -0
- package/dist/prompts/chains/compact.prompt.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.js +141 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/index.d.ts +6 -0
- package/dist/prompts/chains/parameter-updater/examples/index.js +16 -0
- package/dist/prompts/chains/parameter-updater/examples/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.js +83 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.js +151 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.js +54 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.js +131 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.js +74 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js +70 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.js +28 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.js +139 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.js +159 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/index.d.ts +10 -0
- package/dist/prompts/chains/parameter-updater/guides/index.js +24 -0
- package/dist/prompts/chains/parameter-updater/guides/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.js +99 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.js +94 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.js +75 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.js +96 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.js +31 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js +76 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/index.d.ts +8 -0
- package/dist/prompts/chains/parameter-updater/index.js +35 -0
- package/dist/prompts/chains/parameter-updater/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/instance-url.d.ts +1 -0
- package/dist/prompts/chains/parameter-updater/instance-url.js +15 -0
- package/dist/prompts/chains/parameter-updater/instance-url.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.d.ts +4 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.js +52 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/registry.d.ts +4 -0
- package/dist/prompts/chains/parameter-updater/registry.js +66 -0
- package/dist/prompts/chains/parameter-updater/registry.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/types.d.ts +18 -0
- package/dist/prompts/chains/parameter-updater/types.js +3 -0
- package/dist/prompts/chains/parameter-updater/types.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/utils.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/utils.js +16 -0
- package/dist/prompts/chains/parameter-updater/utils.js.map +1 -0
- package/dist/prompts/chains/workflow-name.prompt.d.ts +2 -0
- package/dist/prompts/chains/workflow-name.prompt.js +11 -0
- package/dist/prompts/chains/workflow-name.prompt.js.map +1 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.js +50 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/legacy-agent.prompt.d.ts +6 -0
- package/dist/prompts/legacy-agent.prompt.js +594 -0
- package/dist/prompts/legacy-agent.prompt.js.map +1 -0
- package/dist/session-manager.service.d.ts +16 -0
- package/dist/session-manager.service.js +125 -0
- package/dist/session-manager.service.js.map +1 -0
- package/dist/subgraphs/builder.subgraph.d.ts +132 -0
- package/dist/subgraphs/builder.subgraph.js +173 -0
- package/dist/subgraphs/builder.subgraph.js.map +1 -0
- package/dist/subgraphs/configurator.subgraph.d.ts +142 -0
- package/dist/subgraphs/configurator.subgraph.js +173 -0
- package/dist/subgraphs/configurator.subgraph.js.map +1 -0
- package/dist/subgraphs/discovery.subgraph.d.ts +158 -0
- package/dist/subgraphs/discovery.subgraph.js +221 -0
- package/dist/subgraphs/discovery.subgraph.js.map +1 -0
- package/dist/subgraphs/subgraph-interface.d.ts +23 -0
- package/dist/subgraphs/subgraph-interface.js +7 -0
- package/dist/subgraphs/subgraph-interface.js.map +1 -0
- package/dist/tools/add-node.tool.d.ts +54 -0
- package/dist/tools/add-node.tool.js +176 -0
- package/dist/tools/add-node.tool.js.map +1 -0
- package/dist/tools/best-practices/chatbot.d.ts +7 -0
- package/dist/tools/best-practices/chatbot.js +118 -0
- package/dist/tools/best-practices/chatbot.js.map +1 -0
- package/dist/tools/best-practices/content-generation.d.ts +7 -0
- package/dist/tools/best-practices/content-generation.js +115 -0
- package/dist/tools/best-practices/content-generation.js.map +1 -0
- package/dist/tools/best-practices/data-analysis.d.ts +7 -0
- package/dist/tools/best-practices/data-analysis.js +367 -0
- package/dist/tools/best-practices/data-analysis.js.map +1 -0
- package/dist/tools/best-practices/data-extraction.d.ts +7 -0
- package/dist/tools/best-practices/data-extraction.js +122 -0
- package/dist/tools/best-practices/data-extraction.js.map +1 -0
- package/dist/tools/best-practices/data-transformation.d.ts +7 -0
- package/dist/tools/best-practices/data-transformation.js +162 -0
- package/dist/tools/best-practices/data-transformation.js.map +1 -0
- package/dist/tools/best-practices/document-processing.d.ts +7 -0
- package/dist/tools/best-practices/document-processing.js +335 -0
- package/dist/tools/best-practices/document-processing.js.map +1 -0
- package/dist/tools/best-practices/enrichment.d.ts +7 -0
- package/dist/tools/best-practices/enrichment.js +271 -0
- package/dist/tools/best-practices/enrichment.js.map +1 -0
- package/dist/tools/best-practices/form-input.d.ts +7 -0
- package/dist/tools/best-practices/form-input.js +173 -0
- package/dist/tools/best-practices/form-input.js.map +1 -0
- package/dist/tools/best-practices/human-in-the-loop.d.ts +7 -0
- package/dist/tools/best-practices/human-in-the-loop.js +268 -0
- package/dist/tools/best-practices/human-in-the-loop.js.map +1 -0
- package/dist/tools/best-practices/index.d.ts +3 -0
- package/dist/tools/best-practices/index.js +29 -0
- package/dist/tools/best-practices/index.js.map +1 -0
- package/dist/tools/best-practices/knowledge-base.d.ts +7 -0
- package/dist/tools/best-practices/knowledge-base.js +268 -0
- package/dist/tools/best-practices/knowledge-base.js.map +1 -0
- package/dist/tools/best-practices/monitoring.d.ts +7 -0
- package/dist/tools/best-practices/monitoring.js +178 -0
- package/dist/tools/best-practices/monitoring.js.map +1 -0
- package/dist/tools/best-practices/notification.d.ts +7 -0
- package/dist/tools/best-practices/notification.js +229 -0
- package/dist/tools/best-practices/notification.js.map +1 -0
- package/dist/tools/best-practices/scheduling.d.ts +7 -0
- package/dist/tools/best-practices/scheduling.js +281 -0
- package/dist/tools/best-practices/scheduling.js.map +1 -0
- package/dist/tools/best-practices/scraping-and-research.d.ts +7 -0
- package/dist/tools/best-practices/scraping-and-research.js +161 -0
- package/dist/tools/best-practices/scraping-and-research.js.map +1 -0
- package/dist/tools/best-practices/triage.d.ts +7 -0
- package/dist/tools/best-practices/triage.js +211 -0
- package/dist/tools/best-practices/triage.js.map +1 -0
- package/dist/tools/builder-tools.d.ts +16 -0
- package/dist/tools/builder-tools.js +36 -0
- package/dist/tools/builder-tools.js.map +1 -0
- package/dist/tools/categorize-prompt.tool.d.ts +5 -0
- package/dist/tools/categorize-prompt.tool.js +85 -0
- package/dist/tools/categorize-prompt.tool.js.map +1 -0
- package/dist/tools/connect-nodes.tool.d.ts +22 -0
- package/dist/tools/connect-nodes.tool.js +231 -0
- package/dist/tools/connect-nodes.tool.js.map +1 -0
- package/dist/tools/engines/node-search-engine.d.ts +16 -0
- package/dist/tools/engines/node-search-engine.js +123 -0
- package/dist/tools/engines/node-search-engine.js.map +1 -0
- package/dist/tools/get-best-practices.tool.d.ts +33 -0
- package/dist/tools/get-best-practices.tool.js +94 -0
- package/dist/tools/get-best-practices.tool.js.map +1 -0
- package/dist/tools/get-node-examples.tool.d.ts +119 -0
- package/dist/tools/get-node-examples.tool.js +189 -0
- package/dist/tools/get-node-examples.tool.js.map +1 -0
- package/dist/tools/get-node-parameter.tool.d.ts +4 -0
- package/dist/tools/get-node-parameter.tool.js +114 -0
- package/dist/tools/get-node-parameter.tool.js.map +1 -0
- package/dist/tools/get-workflow-examples.tool.d.ts +34 -0
- package/dist/tools/get-workflow-examples.tool.js +138 -0
- package/dist/tools/get-workflow-examples.tool.js.map +1 -0
- package/dist/tools/helpers/index.d.ts +4 -0
- package/dist/tools/helpers/index.js +21 -0
- package/dist/tools/helpers/index.js.map +1 -0
- package/dist/tools/helpers/progress.d.ts +9 -0
- package/dist/tools/helpers/progress.js +126 -0
- package/dist/tools/helpers/progress.js.map +1 -0
- package/dist/tools/helpers/response.d.ts +7 -0
- package/dist/tools/helpers/response.js +33 -0
- package/dist/tools/helpers/response.js.map +1 -0
- package/dist/tools/helpers/state.d.ts +14 -0
- package/dist/tools/helpers/state.js +85 -0
- package/dist/tools/helpers/state.js.map +1 -0
- package/dist/tools/helpers/validation.d.ts +13 -0
- package/dist/tools/helpers/validation.js +83 -0
- package/dist/tools/helpers/validation.js.map +1 -0
- package/dist/tools/node-details.tool.d.ts +31 -0
- package/dist/tools/node-details.tool.js +201 -0
- package/dist/tools/node-details.tool.js.map +1 -0
- package/dist/tools/node-search.tool.d.ts +62 -0
- package/dist/tools/node-search.tool.js +155 -0
- package/dist/tools/node-search.tool.js.map +1 -0
- package/dist/tools/remove-connection.tool.d.ts +24 -0
- package/dist/tools/remove-connection.tool.js +234 -0
- package/dist/tools/remove-connection.tool.js.map +1 -0
- package/dist/tools/remove-node.tool.d.ts +4 -0
- package/dist/tools/remove-node.tool.js +106 -0
- package/dist/tools/remove-node.tool.js.map +1 -0
- package/dist/tools/update-node-parameters.tool.d.ts +5 -0
- package/dist/tools/update-node-parameters.tool.js +156 -0
- package/dist/tools/update-node-parameters.tool.js.map +1 -0
- package/dist/tools/utils/connection-parameters.utils.d.ts +8 -0
- package/dist/tools/utils/connection-parameters.utils.js +47 -0
- package/dist/tools/utils/connection-parameters.utils.js.map +1 -0
- package/dist/tools/utils/connection.utils.d.ts +15 -0
- package/dist/tools/utils/connection.utils.js +321 -0
- package/dist/tools/utils/connection.utils.js.map +1 -0
- package/dist/tools/utils/mermaid.utils.d.ts +13 -0
- package/dist/tools/utils/mermaid.utils.js +647 -0
- package/dist/tools/utils/mermaid.utils.js.map +1 -0
- package/dist/tools/utils/node-configuration.utils.d.ts +13 -0
- package/dist/tools/utils/node-configuration.utils.js +75 -0
- package/dist/tools/utils/node-configuration.utils.js.map +1 -0
- package/dist/tools/utils/node-creation.utils.d.ts +8 -0
- package/dist/tools/utils/node-creation.utils.js +56 -0
- package/dist/tools/utils/node-creation.utils.js.map +1 -0
- package/dist/tools/utils/node-positioning.utils.d.ts +17 -0
- package/dist/tools/utils/node-positioning.utils.js +87 -0
- package/dist/tools/utils/node-positioning.utils.js.map +1 -0
- package/dist/tools/utils/parameter-update.utils.d.ts +6 -0
- package/dist/tools/utils/parameter-update.utils.js +75 -0
- package/dist/tools/utils/parameter-update.utils.js.map +1 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.d.ts +2 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js +542 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js.map +1 -0
- package/dist/tools/validate-configuration.tool.d.ts +4 -0
- package/dist/tools/validate-configuration.tool.js +70 -0
- package/dist/tools/validate-configuration.tool.js.map +1 -0
- package/dist/tools/validate-structure.tool.d.ts +4 -0
- package/dist/tools/validate-structure.tool.js +66 -0
- package/dist/tools/validate-structure.tool.js.map +1 -0
- package/dist/tools/validate-workflow.tool.d.ts +5 -0
- package/dist/tools/validate-workflow.tool.js +73 -0
- package/dist/tools/validate-workflow.tool.js.map +1 -0
- package/dist/tools/web/templates.d.ts +23 -0
- package/dist/tools/web/templates.js +106 -0
- package/dist/tools/web/templates.js.map +1 -0
- package/dist/types/best-practices.d.ts +6 -0
- package/dist/types/best-practices.js +3 -0
- package/dist/types/best-practices.js.map +1 -0
- package/dist/types/categorization.d.ts +23 -0
- package/dist/types/categorization.js +38 -0
- package/dist/types/categorization.js.map +1 -0
- package/dist/types/config.d.ts +55 -0
- package/dist/types/config.js +3 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/connections.d.ts +30 -0
- package/dist/types/connections.js +3 -0
- package/dist/types/connections.js.map +1 -0
- package/dist/types/coordination.d.ts +42 -0
- package/dist/types/coordination.js +23 -0
- package/dist/types/coordination.js.map +1 -0
- package/dist/types/discovery-types.d.ts +12 -0
- package/dist/types/discovery-types.js +3 -0
- package/dist/types/discovery-types.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/langchain.d.ts +3 -0
- package/dist/types/langchain.js +15 -0
- package/dist/types/langchain.js.map +1 -0
- package/dist/types/messages.d.ts +32 -0
- package/dist/types/messages.js +3 -0
- package/dist/types/messages.js.map +1 -0
- package/dist/types/nodes.d.ts +27 -0
- package/dist/types/nodes.js +3 -0
- package/dist/types/nodes.js.map +1 -0
- package/dist/types/sessions.d.ts +8 -0
- package/dist/types/sessions.js +34 -0
- package/dist/types/sessions.js.map +1 -0
- package/dist/types/streaming.d.ts +33 -0
- package/dist/types/streaming.js +3 -0
- package/dist/types/streaming.js.map +1 -0
- package/dist/types/tools.d.ts +120 -0
- package/dist/types/tools.js +3 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/utils.js +3 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/web/templates.d.ts +45 -0
- package/dist/types/web/templates.js +37 -0
- package/dist/types/web/templates.js.map +1 -0
- package/dist/types/workflow.d.ts +31 -0
- package/dist/types/workflow.js +3 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/utils/cache-control/helpers.d.ts +5 -0
- package/dist/utils/cache-control/helpers.js +126 -0
- package/dist/utils/cache-control/helpers.js.map +1 -0
- package/dist/utils/cache-control/index.d.ts +1 -0
- package/dist/utils/cache-control/index.js +9 -0
- package/dist/utils/cache-control/index.js.map +1 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.d.ts +3 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.js +10 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.js.map +1 -0
- package/dist/utils/context-builders.d.ts +10 -0
- package/dist/utils/context-builders.js +71 -0
- package/dist/utils/context-builders.js.map +1 -0
- package/dist/utils/coordination-log.d.ts +15 -0
- package/dist/utils/coordination-log.js +75 -0
- package/dist/utils/coordination-log.js.map +1 -0
- package/dist/utils/http-proxy-agent.d.ts +2 -0
- package/dist/utils/http-proxy-agent.js +16 -0
- package/dist/utils/http-proxy-agent.js.map +1 -0
- package/dist/utils/node-helpers.d.ts +2 -0
- package/dist/utils/node-helpers.js +54 -0
- package/dist/utils/node-helpers.js.map +1 -0
- package/dist/utils/operations-processor.d.ts +14 -0
- package/dist/utils/operations-processor.js +196 -0
- package/dist/utils/operations-processor.js.map +1 -0
- package/dist/utils/state-modifier.d.ts +32 -0
- package/dist/utils/state-modifier.js +112 -0
- package/dist/utils/state-modifier.js.map +1 -0
- package/dist/utils/state-reducers.d.ts +3 -0
- package/dist/utils/state-reducers.js +20 -0
- package/dist/utils/state-reducers.js.map +1 -0
- package/dist/utils/stream-processor.d.ts +20 -0
- package/dist/utils/stream-processor.js +277 -0
- package/dist/utils/stream-processor.js.map +1 -0
- package/dist/utils/subgraph-helpers.d.ts +16 -0
- package/dist/utils/subgraph-helpers.js +117 -0
- package/dist/utils/subgraph-helpers.js.map +1 -0
- package/dist/utils/token-usage.d.ts +21 -0
- package/dist/utils/token-usage.js +45 -0
- package/dist/utils/token-usage.js.map +1 -0
- package/dist/utils/tool-executor.d.ts +3 -0
- package/dist/utils/tool-executor.js +108 -0
- package/dist/utils/tool-executor.js.map +1 -0
- package/dist/utils/trim-workflow-context.d.ts +2 -0
- package/dist/utils/trim-workflow-context.js +53 -0
- package/dist/utils/trim-workflow-context.js.map +1 -0
- package/dist/utils/workflow-validation.d.ts +2 -0
- package/dist/utils/workflow-validation.js +37 -0
- package/dist/utils/workflow-validation.js.map +1 -0
- package/dist/validation/checks/agent-prompt.d.ts +3 -0
- package/dist/validation/checks/agent-prompt.js +47 -0
- package/dist/validation/checks/agent-prompt.js.map +1 -0
- package/dist/validation/checks/connections.d.ts +4 -0
- package/dist/validation/checks/connections.js +163 -0
- package/dist/validation/checks/connections.js.map +1 -0
- package/dist/validation/checks/credentials.d.ts +3 -0
- package/dist/validation/checks/credentials.js +125 -0
- package/dist/validation/checks/credentials.js.map +1 -0
- package/dist/validation/checks/from-ai.d.ts +4 -0
- package/dist/validation/checks/from-ai.js +62 -0
- package/dist/validation/checks/from-ai.js.map +1 -0
- package/dist/validation/checks/index.d.ts +7 -0
- package/dist/validation/checks/index.js +18 -0
- package/dist/validation/checks/index.js.map +1 -0
- package/dist/validation/checks/nodes.d.ts +4 -0
- package/dist/validation/checks/nodes.js +44 -0
- package/dist/validation/checks/nodes.js.map +1 -0
- package/dist/validation/checks/tools.d.ts +4 -0
- package/dist/validation/checks/tools.js +38 -0
- package/dist/validation/checks/tools.js.map +1 -0
- package/dist/validation/checks/trigger.d.ts +8 -0
- package/dist/validation/checks/trigger.js +33 -0
- package/dist/validation/checks/trigger.js.map +1 -0
- package/dist/validation/programmatic.d.ts +3 -0
- package/dist/validation/programmatic.js +24 -0
- package/dist/validation/programmatic.js.map +1 -0
- package/dist/validation/types.d.ts +52 -0
- package/dist/validation/types.js +31 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/validation/utils/expressions.d.ts +3 -0
- package/dist/validation/utils/expressions.js +37 -0
- package/dist/validation/utils/expressions.js.map +1 -0
- package/dist/validation/utils/is-tool.d.ts +2 -0
- package/dist/validation/utils/is-tool.js +7 -0
- package/dist/validation/utils/is-tool.js.map +1 -0
- package/dist/validation/utils/node-type-map.d.ts +8 -0
- package/dist/validation/utils/node-type-map.js +50 -0
- package/dist/validation/utils/node-type-map.js.map +1 -0
- package/dist/validation/utils/resolve-connections.d.ts +8 -0
- package/dist/validation/utils/resolve-connections.js +64 -0
- package/dist/validation/utils/resolve-connections.js.map +1 -0
- package/dist/workflow-builder-agent.d.ts +72 -0
- package/dist/workflow-builder-agent.js +401 -0
- package/dist/workflow-builder-agent.js.map +1 -0
- package/dist/workflow-state.d.ts +26 -0
- package/dist/workflow-state.js +79 -0
- package/dist/workflow-state.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TEXT_FIELDS_GUIDE = exports.SYSTEM_MESSAGE_GUIDE = exports.RESOURCE_LOCATOR_GUIDE = exports.EMBEDDING_NODES_GUIDE = exports.GMAIL_GUIDE = exports.TOOL_NODES_GUIDE = exports.HTTP_REQUEST_GUIDE = exports.SWITCH_NODE_GUIDE = exports.IF_NODE_GUIDE = exports.SET_NODE_GUIDE = void 0;
|
|
4
|
+
var set_node_1 = require("./set-node");
|
|
5
|
+
Object.defineProperty(exports, "SET_NODE_GUIDE", { enumerable: true, get: function () { return set_node_1.SET_NODE_GUIDE; } });
|
|
6
|
+
var if_node_1 = require("./if-node");
|
|
7
|
+
Object.defineProperty(exports, "IF_NODE_GUIDE", { enumerable: true, get: function () { return if_node_1.IF_NODE_GUIDE; } });
|
|
8
|
+
var switch_node_1 = require("./switch-node");
|
|
9
|
+
Object.defineProperty(exports, "SWITCH_NODE_GUIDE", { enumerable: true, get: function () { return switch_node_1.SWITCH_NODE_GUIDE; } });
|
|
10
|
+
var http_request_1 = require("./http-request");
|
|
11
|
+
Object.defineProperty(exports, "HTTP_REQUEST_GUIDE", { enumerable: true, get: function () { return http_request_1.HTTP_REQUEST_GUIDE; } });
|
|
12
|
+
var tool_nodes_1 = require("./tool-nodes");
|
|
13
|
+
Object.defineProperty(exports, "TOOL_NODES_GUIDE", { enumerable: true, get: function () { return tool_nodes_1.TOOL_NODES_GUIDE; } });
|
|
14
|
+
var gmail_1 = require("./gmail");
|
|
15
|
+
Object.defineProperty(exports, "GMAIL_GUIDE", { enumerable: true, get: function () { return gmail_1.GMAIL_GUIDE; } });
|
|
16
|
+
var embedding_nodes_1 = require("./embedding-nodes");
|
|
17
|
+
Object.defineProperty(exports, "EMBEDDING_NODES_GUIDE", { enumerable: true, get: function () { return embedding_nodes_1.EMBEDDING_NODES_GUIDE; } });
|
|
18
|
+
var resource_locator_1 = require("./resource-locator");
|
|
19
|
+
Object.defineProperty(exports, "RESOURCE_LOCATOR_GUIDE", { enumerable: true, get: function () { return resource_locator_1.RESOURCE_LOCATOR_GUIDE; } });
|
|
20
|
+
var system_message_1 = require("./system-message");
|
|
21
|
+
Object.defineProperty(exports, "SYSTEM_MESSAGE_GUIDE", { enumerable: true, get: function () { return system_message_1.SYSTEM_MESSAGE_GUIDE; } });
|
|
22
|
+
var text_fields_1 = require("./text-fields");
|
|
23
|
+
Object.defineProperty(exports, "TEXT_FIELDS_GUIDE", { enumerable: true, get: function () { return text_fields_1.TEXT_FIELDS_GUIDE; } });
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/index.ts"],"names":[],"mappings":";;;AACA,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA;AAC1B,+CAAoD;AAA3C,kHAAA,kBAAkB,OAAA;AAC3B,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA;AACzB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,qDAA0D;AAAjD,wHAAA,qBAAqB,OAAA;AAG9B,uDAA4D;AAAnD,0HAAA,sBAAsB,OAAA;AAC/B,mDAAwD;AAA/C,sHAAA,oBAAoB,OAAA;AAC7B,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RESOURCE_LOCATOR_GUIDE = void 0;
|
|
4
|
+
exports.RESOURCE_LOCATOR_GUIDE = {
|
|
5
|
+
patterns: ['*'],
|
|
6
|
+
condition: (ctx) => ctx.hasResourceLocatorParams === true,
|
|
7
|
+
content: `
|
|
8
|
+
## IMPORTANT: ResourceLocator Parameter Handling
|
|
9
|
+
|
|
10
|
+
ResourceLocator parameters are special fields used for selecting resources like Slack channels, Google Drive files, Notion pages, etc. They MUST have a specific structure:
|
|
11
|
+
|
|
12
|
+
### Required ResourceLocator Structure:
|
|
13
|
+
\`\`\`json
|
|
14
|
+
{
|
|
15
|
+
"__rl": true,
|
|
16
|
+
"mode": "id" | "url" | "list" | "name",
|
|
17
|
+
"value": "the-actual-value"
|
|
18
|
+
}
|
|
19
|
+
\`\`\`
|
|
20
|
+
|
|
21
|
+
### Mode Detection Guidelines:
|
|
22
|
+
- Use mode "url" when the value is a URL (starts with http:// or https://)
|
|
23
|
+
- Use mode "id" when the value looks like an ID (alphanumeric string)
|
|
24
|
+
- Use mode "name" when the value has a prefix like # (Slack channels) or @ (users)
|
|
25
|
+
- Use mode "list" when referencing a dropdown selection (rarely needed in updates)
|
|
26
|
+
|
|
27
|
+
### ResourceLocator Examples:
|
|
28
|
+
|
|
29
|
+
#### Example 1: Slack Channel by ID
|
|
30
|
+
Parameter name: channelId
|
|
31
|
+
Change: "Set channel to C0122KQ70S7E"
|
|
32
|
+
Output:
|
|
33
|
+
\`\`\`json
|
|
34
|
+
{
|
|
35
|
+
"channelId": {
|
|
36
|
+
"__rl": true,
|
|
37
|
+
"mode": "id",
|
|
38
|
+
"value": "C0122KQ70S7E"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
#### Example 2: Google Drive File by URL
|
|
44
|
+
Parameter name: fileId
|
|
45
|
+
Change: "Use file https://drive.google.com/file/d/1Nvdl7bEfDW33cKQuwfItPhIk479--WYY/view"
|
|
46
|
+
Output:
|
|
47
|
+
\`\`\`json
|
|
48
|
+
{
|
|
49
|
+
"fileId": {
|
|
50
|
+
"__rl": true,
|
|
51
|
+
"mode": "url",
|
|
52
|
+
"value": "https://drive.google.com/file/d/1Nvdl7bEfDW33cKQuwfItPhIk479--WYY/view"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
#### Example 3: Notion Page by ID
|
|
58
|
+
Parameter name: pageId
|
|
59
|
+
Change: "Set page ID to 123e4567-e89b-12d3"
|
|
60
|
+
Output:
|
|
61
|
+
\`\`\`json
|
|
62
|
+
{
|
|
63
|
+
"pageId": {
|
|
64
|
+
"__rl": true,
|
|
65
|
+
"mode": "id",
|
|
66
|
+
"value": "123e4567-e89b-12d3"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
#### Example 4: Slack Channel by Name
|
|
72
|
+
Parameter name: channelId
|
|
73
|
+
Change: "Send to #general channel"
|
|
74
|
+
Output:
|
|
75
|
+
\`\`\`json
|
|
76
|
+
{
|
|
77
|
+
"channelId": {
|
|
78
|
+
"__rl": true,
|
|
79
|
+
"mode": "name",
|
|
80
|
+
"value": "#general"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
\`\`\`
|
|
84
|
+
|
|
85
|
+
#### Example 5: Using Expression with ResourceLocator
|
|
86
|
+
Parameter name: channelId
|
|
87
|
+
Change: "Use channel ID from previous node"
|
|
88
|
+
Output:
|
|
89
|
+
\`\`\`json
|
|
90
|
+
{
|
|
91
|
+
"channelId": {
|
|
92
|
+
"__rl": true,
|
|
93
|
+
"mode": "id",
|
|
94
|
+
"value": "={{ $('Previous Node').item.json.channelId }}"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
\`\`\``,
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=resource-locator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-locator.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/resource-locator.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAkB;IACpD,QAAQ,EAAE,CAAC,GAAG,CAAC;IACf,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,wBAAwB,KAAK,IAAI;IACzD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0FH;CACN,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SET_NODE_GUIDE = void 0;
|
|
4
|
+
exports.SET_NODE_GUIDE = {
|
|
5
|
+
patterns: ['n8n-nodes-base.set'],
|
|
6
|
+
content: `
|
|
7
|
+
### Set Node Updates - Comprehensive Type Handling Guide
|
|
8
|
+
|
|
9
|
+
The Set node uses assignments to create or modify data fields. Each assignment has a specific type that determines how the value is formatted and processed.
|
|
10
|
+
|
|
11
|
+
#### Assignment Structure
|
|
12
|
+
\`\`\`json
|
|
13
|
+
{
|
|
14
|
+
"id": "unique-id",
|
|
15
|
+
"name": "field_name",
|
|
16
|
+
"value": "field_value", // Format depends on type
|
|
17
|
+
"type": "string|number|boolean|array|object"
|
|
18
|
+
}
|
|
19
|
+
\`\`\`
|
|
20
|
+
|
|
21
|
+
**CRITICAL**: ALWAYS use "value" field for ALL types. NEVER use type-specific fields like "stringValue", "numberValue", "booleanValue", etc. The field is ALWAYS named "value" regardless of the type.
|
|
22
|
+
|
|
23
|
+
#### Type-Specific Value Formatting
|
|
24
|
+
|
|
25
|
+
##### String Type
|
|
26
|
+
- **Format**: Direct string value or expression
|
|
27
|
+
- **Examples**:
|
|
28
|
+
- Literal: \`"Hello World"\`
|
|
29
|
+
- Expression: \`"={{ $('Previous Node').item.json.message }}"\`
|
|
30
|
+
- With embedded expressions: \`"=Order #{{ $('Set').item.json.orderId }} processed"\`
|
|
31
|
+
- **Use when**: Text data, IDs, names, messages, dates as strings
|
|
32
|
+
|
|
33
|
+
##### Number Type
|
|
34
|
+
- **Format**: Direct numeric value (NOT as a string)
|
|
35
|
+
- **Examples**:
|
|
36
|
+
- Integer: \`123\`
|
|
37
|
+
- Decimal: \`45.67\`
|
|
38
|
+
- Negative: \`-100\`
|
|
39
|
+
- Expression: \`"={{ $('HTTP Request').item.json.count }}"\`
|
|
40
|
+
- **CRITICAL**: Use actual numbers, not strings: \`123\` not \`"123"\`
|
|
41
|
+
- **Use when**: Quantities, prices, scores, numeric calculations
|
|
42
|
+
|
|
43
|
+
##### Boolean Type
|
|
44
|
+
- **Format**: Direct boolean value (NOT as a string)
|
|
45
|
+
- **Examples**:
|
|
46
|
+
- True: \`true\`
|
|
47
|
+
- False: \`false\`
|
|
48
|
+
- Expression: \`"={{ $('IF').item.json.isActive }}"\`
|
|
49
|
+
- **CRITICAL**: Use actual booleans, not strings: \`true\` not \`"true"\`
|
|
50
|
+
- **CRITICAL**: The field name is "value", NOT "booleanValue"
|
|
51
|
+
- **Use when**: Flags, toggles, yes/no values, active/inactive states
|
|
52
|
+
|
|
53
|
+
##### Array Type
|
|
54
|
+
- **Format**: JSON stringified array
|
|
55
|
+
- **Examples**:
|
|
56
|
+
- Simple array: \`"[1, 2, 3]"\`
|
|
57
|
+
- String array: \`"[\\"apple\\", \\"banana\\", \\"orange\\"]"\`
|
|
58
|
+
- Mixed array: \`"[\\"item1\\", 123, true]"\`
|
|
59
|
+
- Expression: \`"={{ JSON.stringify($('Previous Node').item.json.items) }}"\`
|
|
60
|
+
- **CRITICAL**: Arrays must be JSON stringified
|
|
61
|
+
- **Use when**: Lists, collections, multiple values
|
|
62
|
+
|
|
63
|
+
##### Object Type
|
|
64
|
+
- **Format**: JSON stringified object
|
|
65
|
+
- **Examples**:
|
|
66
|
+
- Simple object: \`"{ \\"name\\": \\"John\\", \\"age\\": 30 }"\`
|
|
67
|
+
- Nested object: \`"{ \\"user\\": { \\"id\\": 123, \\"role\\": \\"admin\\" } }"\`
|
|
68
|
+
- Expression: \`"={{ JSON.stringify($('Set').item.json.userData) }}"\`
|
|
69
|
+
- **CRITICAL**: Objects must be JSON stringified with escaped quotes
|
|
70
|
+
- **Use when**: Complex data structures, grouped properties
|
|
71
|
+
|
|
72
|
+
#### Important Type Selection Rules
|
|
73
|
+
|
|
74
|
+
1. **Analyze the requested data type**:
|
|
75
|
+
- "Set count to 5" → number type with value: \`5\`
|
|
76
|
+
- "Set message to hello" → string type with value: \`"hello"\`
|
|
77
|
+
- "Set active to true" → boolean type with value: \`true\`
|
|
78
|
+
- "Set tags to apple, banana" → array type with value: \`"[\\"apple\\", \\"banana\\"]"\`
|
|
79
|
+
|
|
80
|
+
2. **Expression handling**:
|
|
81
|
+
- All types can use expressions with \`"={{ ... }}"\`
|
|
82
|
+
- For arrays/objects from expressions, use \`JSON.stringify()\`
|
|
83
|
+
|
|
84
|
+
3. **Common mistakes to avoid**:
|
|
85
|
+
- WRONG: Setting number as string: \`{ "value": "123", "type": "number" }\`
|
|
86
|
+
- CORRECT: \`{ "value": 123, "type": "number" }\`
|
|
87
|
+
- WRONG: Setting boolean as string: \`{ "value": "false", "type": "boolean" }\`
|
|
88
|
+
- CORRECT: \`{ "value": false, "type": "boolean" }\`
|
|
89
|
+
- WRONG: Using type-specific field names: \`{ "booleanValue": true, "type": "boolean" }\`
|
|
90
|
+
- CORRECT: \`{ "value": true, "type": "boolean" }\`
|
|
91
|
+
- WRONG: Setting array without stringification: \`{ "value": [1,2,3], "type": "array" }\`
|
|
92
|
+
- CORRECT: \`{ "value": "[1,2,3]", "type": "array" }\``,
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=set-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-node.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/set-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAkB;IAC5C,QAAQ,EAAE,CAAC,oBAAoB,CAAC;IAChC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAsFgD;CACzD,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SWITCH_NODE_GUIDE = void 0;
|
|
4
|
+
exports.SWITCH_NODE_GUIDE = {
|
|
5
|
+
patterns: ['n8n-nodes-base.switch'],
|
|
6
|
+
content: `
|
|
7
|
+
### Switch Node Configuration Guide
|
|
8
|
+
|
|
9
|
+
The Switch node routes items to different outputs based on conditions. Uses the same filter structure as IF node but for multi-way branching.
|
|
10
|
+
|
|
11
|
+
#### Switch Node Structure (mode: 'rules')
|
|
12
|
+
\`\`\`json
|
|
13
|
+
{
|
|
14
|
+
"mode": "rules",
|
|
15
|
+
"rules": {
|
|
16
|
+
"values": [
|
|
17
|
+
{
|
|
18
|
+
"conditions": {
|
|
19
|
+
"options": {
|
|
20
|
+
"caseSensitive": true,
|
|
21
|
+
"leftValue": "",
|
|
22
|
+
"typeValidation": "strict"
|
|
23
|
+
},
|
|
24
|
+
"conditions": [
|
|
25
|
+
{
|
|
26
|
+
"leftValue": "={{ $json.amount }}",
|
|
27
|
+
"rightValue": 100,
|
|
28
|
+
"operator": {
|
|
29
|
+
"type": "number",
|
|
30
|
+
"operation": "lt"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"combinator": "and"
|
|
35
|
+
},
|
|
36
|
+
"renameOutput": true,
|
|
37
|
+
"outputKey": "Under $100"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
\`\`\`
|
|
43
|
+
|
|
44
|
+
#### Key Points:
|
|
45
|
+
1. Each entry in rules.values[] creates ONE output
|
|
46
|
+
2. Conditions use the same filter structure as IF node
|
|
47
|
+
3. Multiple conditions per rule are combined with combinator ("and" or "or")
|
|
48
|
+
4. Use renameOutput: true + outputKey to label outputs descriptively
|
|
49
|
+
|
|
50
|
+
#### Numeric Operators
|
|
51
|
+
- lt: Less than
|
|
52
|
+
- gt: Greater than
|
|
53
|
+
- lte: Less than or equal
|
|
54
|
+
- gte: Greater than or equal
|
|
55
|
+
- equals: Equal to
|
|
56
|
+
|
|
57
|
+
#### String Operators
|
|
58
|
+
- equals: Exact match
|
|
59
|
+
- contains: Contains substring
|
|
60
|
+
- startsWith: Starts with
|
|
61
|
+
- endsWith: Ends with
|
|
62
|
+
|
|
63
|
+
#### Common Patterns:
|
|
64
|
+
|
|
65
|
+
**Numeric Range Routing** (for ranges like $100-$1000):
|
|
66
|
+
Use two conditions with combinator: "and":
|
|
67
|
+
- First condition: gte (greater than or equal to lower bound)
|
|
68
|
+
- Second condition: lte (less than or equal to upper bound)
|
|
69
|
+
|
|
70
|
+
**String-Based Routing** (status/type values):
|
|
71
|
+
- Use type: "string" with operation: "equals"
|
|
72
|
+
- Set caseSensitive: false in options for case-insensitive matching
|
|
73
|
+
`,
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=switch-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-node.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/switch-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAkB;IAC/C,QAAQ,EAAE,CAAC,uBAAuB,CAAC;IACnC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmET;CACA,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SYSTEM_MESSAGE_GUIDE = void 0;
|
|
4
|
+
function hasSystemMessageParameters(nodeDefinition) {
|
|
5
|
+
if (!nodeDefinition.properties)
|
|
6
|
+
return false;
|
|
7
|
+
return nodeDefinition.properties.some((prop) => {
|
|
8
|
+
if (prop.name === 'messages' &&
|
|
9
|
+
(prop.type === 'fixedCollection' || prop.type === 'collection')) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
if (prop.name === 'options' && prop.type === 'collection' && Array.isArray(prop.options)) {
|
|
13
|
+
return prop.options.some((opt) => typeof opt === 'object' &&
|
|
14
|
+
opt !== null &&
|
|
15
|
+
'name' in opt &&
|
|
16
|
+
(opt.name === 'systemMessage' || opt.name === 'system'));
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.SYSTEM_MESSAGE_GUIDE = {
|
|
22
|
+
patterns: ['*'],
|
|
23
|
+
condition: (ctx) => hasSystemMessageParameters(ctx.nodeDefinition),
|
|
24
|
+
content: `
|
|
25
|
+
## CRITICAL: System Message vs User Prompt Separation
|
|
26
|
+
|
|
27
|
+
AI nodes (AI Agent, LLM Chain, Anthropic, OpenAI, etc.) have TWO distinct prompt fields that MUST be used correctly:
|
|
28
|
+
|
|
29
|
+
### Field Separation
|
|
30
|
+
1. **System Message** - Model's persistent identity, role, and instructions
|
|
31
|
+
2. **User Message/Text** - Dynamic user context and data references per execution
|
|
32
|
+
|
|
33
|
+
**Node-specific field names:**
|
|
34
|
+
- AI Agent: \`options.systemMessage\` and \`text\`
|
|
35
|
+
- LLM Chain: \`messages.messageValues[]\` with system role and \`text\`
|
|
36
|
+
- Anthropic: \`options.system\` and \`messages.values[]\`
|
|
37
|
+
- OpenAI: \`messages.values[]\` with role "system" vs "user"
|
|
38
|
+
|
|
39
|
+
### System Message
|
|
40
|
+
Use for STATIC, ROLE-DEFINING content:
|
|
41
|
+
- Agent identity: "You are a [role] agent..."
|
|
42
|
+
- Task description: "Your task is to..."
|
|
43
|
+
- Step-by-step instructions: "1. Do X, 2. Do Y, 3. Do Z"
|
|
44
|
+
- Behavioral guidelines: "Always...", "Never..."
|
|
45
|
+
- Tool coordination: "Call the Research Tool to..., then call..."
|
|
46
|
+
|
|
47
|
+
### Text Parameter
|
|
48
|
+
Use for DYNAMIC, EXECUTION-SPECIFIC content:
|
|
49
|
+
- User input: "={{ $json.chatInput }}"
|
|
50
|
+
- Workflow context: "=The research topic is: {{ $json.topic }}"
|
|
51
|
+
- Data from previous nodes: "=Process this data: {{ $json.data }}"
|
|
52
|
+
- Variable context: "=Analyze for user: {{ $json.userId }}"
|
|
53
|
+
|
|
54
|
+
### Common Mistakes to Avoid
|
|
55
|
+
|
|
56
|
+
**WRONG - Everything in text field:**
|
|
57
|
+
{
|
|
58
|
+
"text": "=You are an orchestrator agent that coordinates specialized agents. Your task is to: 1) Call Research Agent Tool, 2) Call Fact-Check Agent Tool, 3) Generate report. Research topic: {{ $json.researchTopic }}"
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
**CORRECT - Properly separated:**
|
|
62
|
+
{
|
|
63
|
+
"text": "=The research topic is: {{ $json.researchTopic }}",
|
|
64
|
+
"options": {
|
|
65
|
+
"systemMessage": "You are an orchestrator agent that coordinates specialized agents.\\n\\nYour task is to:\\n1. Call the Research Agent Tool to gather information\\n2. Call the Fact-Check Agent Tool to verify findings\\n3. Generate a comprehensive report\\n\\nReturn ONLY the final report."
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
### Update Pattern Examples
|
|
70
|
+
|
|
71
|
+
Example 1 - AI Agent with orchestration:
|
|
72
|
+
Instructions: [
|
|
73
|
+
"Set text to '=Research topic: {{ $json.researchTopic }}'",
|
|
74
|
+
"Set system message to 'You are an orchestrator coordinating research tasks.\\n\\nSteps:\\n1. Call Research Agent Tool\\n2. Call Fact-Check Agent Tool\\n3. Call Report Writer Agent Tool\\n4. Return final HTML report'"
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
Example 2 - Chat-based AI node:
|
|
78
|
+
Instructions: [
|
|
79
|
+
"Set text to '=User question: {{ $json.chatInput }}'",
|
|
80
|
+
"Set system message to 'You are a helpful customer support assistant. Answer questions clearly and professionally. Escalate to human if needed.'"
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
Example 3 - Data processing with AI:
|
|
84
|
+
Instructions: [
|
|
85
|
+
"Set text to '=Process this data: {{ $json.inputData }}'",
|
|
86
|
+
"Set system message to 'You are a data analysis assistant.\\n\\nTasks:\\n1. Validate data structure\\n2. Calculate statistics\\n3. Identify anomalies\\n4. Return JSON with findings'"
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
### Why This Matters
|
|
90
|
+
- **Consistency**: System message stays the same across executions
|
|
91
|
+
- **Maintainability**: Easy to update AI behavior without touching data flow
|
|
92
|
+
- **Best Practice**: Follows standard AI prompt engineering patterns
|
|
93
|
+
- **Clarity**: Separates "what the AI model is" from "what data to process"
|
|
94
|
+
`,
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=system-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-message.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/system-message.ts"],"names":[],"mappings":";;;AAMA,SAAS,0BAA0B,CAAC,cAEnC;IACA,IAAI,CAAC,cAAc,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAE7C,OAAO,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAE9C,IACC,IAAI,CAAC,IAAI,KAAK,UAAU;YACxB,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,EAC9D,CAAC;YACF,OAAO,IAAI,CAAC;QACb,CAAC;QAGD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACvB,CAAC,GAAG,EAAE,EAAE,CACP,OAAO,GAAG,KAAK,QAAQ;gBACvB,GAAG,KAAK,IAAI;gBACZ,MAAM,IAAI,GAAG;gBACb,CAAC,GAAG,CAAC,IAAI,KAAK,eAAe,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CACxD,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,oBAAoB,GAAkB;IAClD,QAAQ,EAAE,CAAC,GAAG,CAAC;IACf,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,0BAA0B,CAAC,GAAG,CAAC,cAAc,CAAC;IAClE,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsET;CACA,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TEXT_FIELDS_GUIDE = void 0;
|
|
4
|
+
function hasTextFields(nodeDefinition) {
|
|
5
|
+
if (!nodeDefinition.properties)
|
|
6
|
+
return false;
|
|
7
|
+
return nodeDefinition.properties.some((prop) => prop.type === 'string' && prop.typeOptions?.multipleValues !== true);
|
|
8
|
+
}
|
|
9
|
+
exports.TEXT_FIELDS_GUIDE = {
|
|
10
|
+
patterns: ['*'],
|
|
11
|
+
condition: (ctx) => hasTextFields(ctx.nodeDefinition),
|
|
12
|
+
content: `
|
|
13
|
+
## Text Field Expression Formatting
|
|
14
|
+
|
|
15
|
+
### PREFERRED METHOD: Embedding expressions directly within text
|
|
16
|
+
\`\`\`
|
|
17
|
+
"text": "=ALERT: It is currently {{ $('Weather Node').item.json.weather }} in {{ $('Weather Node').item.json.city }}!"
|
|
18
|
+
\`\`\`
|
|
19
|
+
|
|
20
|
+
### Alternative method: Using string concatenation (use only when needed)
|
|
21
|
+
\`\`\`
|
|
22
|
+
"text": "={{ 'ALERT: It is currently ' + $('Weather Node').item.json.weather + ' in ' + $('Weather Node').item.json.city + '!' }}"
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
### Key Points:
|
|
26
|
+
- Use the embedded expression format when mixing static text with dynamic values
|
|
27
|
+
- The entire string must start with = when using expressions
|
|
28
|
+
- Expressions within text use single curly braces {{ }}
|
|
29
|
+
- The outer expression wrapper uses double curly braces ={{ }}`,
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=text-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-fields.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/text-fields.ts"],"names":[],"mappings":";;;AAKA,SAAS,aAAa,CAAC,cAEtB;IACA,IAAI,CAAC,cAAc,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAE7C,OAAO,cAAc,CAAC,UAAU,CAAC,IAAI,CACpC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,cAAc,KAAK,IAAI,CAC7E,CAAC;AACH,CAAC;AAEY,QAAA,iBAAiB,GAAkB;IAC/C,QAAQ,EAAE,CAAC,GAAG,CAAC;IACf,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC;IACrD,OAAO,EAAE;;;;;;;;;;;;;;;;;+DAiBqD;CAC9D,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_NODES_GUIDE = void 0;
|
|
4
|
+
exports.TOOL_NODES_GUIDE = {
|
|
5
|
+
patterns: ['*Tool'],
|
|
6
|
+
content: `
|
|
7
|
+
## CRITICAL: $fromAI Expression Support for Tool Nodes
|
|
8
|
+
|
|
9
|
+
Tool nodes (nodes ending with "Tool" like Gmail Tool, Google Calendar Tool, etc.) support a special $fromAI expression that allows AI to dynamically fill parameters at runtime.
|
|
10
|
+
|
|
11
|
+
### When to Use $fromAI
|
|
12
|
+
- ONLY available in tool nodes (node types ending with "Tool")
|
|
13
|
+
- Use when the AI should determine the value based on context
|
|
14
|
+
- Ideal for parameters that vary based on user input or conversation context
|
|
15
|
+
|
|
16
|
+
### $fromAI Syntax
|
|
17
|
+
\`={{ $fromAI('key', 'description', 'type', defaultValue) }}\`
|
|
18
|
+
|
|
19
|
+
### Parameters
|
|
20
|
+
- key: Unique identifier (1-64 chars, alphanumeric/underscore/hyphen)
|
|
21
|
+
- description: Optional description for the AI (use empty string '' if not needed)
|
|
22
|
+
- type: 'string' | 'number' | 'boolean' | 'json' (defaults to 'string')
|
|
23
|
+
- defaultValue: Optional fallback value
|
|
24
|
+
|
|
25
|
+
### Tool Node Examples
|
|
26
|
+
|
|
27
|
+
#### Gmail Tool - Sending Email
|
|
28
|
+
{
|
|
29
|
+
"sendTo": "={{ $fromAI('to') }}",
|
|
30
|
+
"subject": "={{ $fromAI('subject') }}",
|
|
31
|
+
"message": "={{ $fromAI('message_html') }}"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#### Google Calendar Tool - Filtering Events
|
|
35
|
+
{
|
|
36
|
+
"timeMin": "={{ $fromAI('After', '', 'string') }}",
|
|
37
|
+
"timeMax": "={{ $fromAI('Before', '', 'string') }}"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
### Mixed Usage Examples
|
|
41
|
+
You can combine $fromAI with regular text:
|
|
42
|
+
- "Subject: {{ $fromAI('subject') }} - Automated"
|
|
43
|
+
- "Dear {{ $fromAI('recipientName', 'Customer name', 'string', 'Customer') }},"
|
|
44
|
+
|
|
45
|
+
### Important Rules
|
|
46
|
+
1. ONLY use $fromAI in tool nodes (check if node type ends with "Tool")
|
|
47
|
+
2. For timeMin/timeMax and similar date fields, use appropriate key names
|
|
48
|
+
3. The AI will fill these values based on context during execution
|
|
49
|
+
4. Don't use $fromAI in regular nodes like Set, IF, HTTP Request, etc.
|
|
50
|
+
|
|
51
|
+
## Tool Node Parameter Guidelines
|
|
52
|
+
|
|
53
|
+
### Identifying Tool Nodes
|
|
54
|
+
1. CHECK NODE TYPE: If the node type ends with "Tool", it supports $fromAI expressions
|
|
55
|
+
2. COMMON TOOL NODES:
|
|
56
|
+
- Gmail Tool (gmailTool): to, subject, message → use $fromAI
|
|
57
|
+
- Google Calendar Tool (googleCalendarTool): timeMin, timeMax → use $fromAI
|
|
58
|
+
- Slack Tool (slackTool): channel, message → use $fromAI
|
|
59
|
+
- Microsoft Teams Tool: channel, message → use $fromAI
|
|
60
|
+
- Telegram Tool: chatId, text → use $fromAI
|
|
61
|
+
- Other communication/document tools: content fields → use $fromAI
|
|
62
|
+
|
|
63
|
+
### When to Use $fromAI in Tool Nodes
|
|
64
|
+
1. DYNAMIC VALUES: Use $fromAI for values that should be determined by AI based on context
|
|
65
|
+
2. USER INPUT FIELDS: Recipients, subjects, messages, date ranges
|
|
66
|
+
3. PRESERVE EXISTING: If a parameter already uses $fromAI, keep it unless explicitly asked to change
|
|
67
|
+
4. DATE/TIME FIELDS: Use descriptive key names for clarity
|
|
68
|
+
|
|
69
|
+
### Tool Node Parameter Patterns
|
|
70
|
+
- Email recipients: "={{ $fromAI('to') }}"
|
|
71
|
+
- Email subjects: "={{ $fromAI('subject') }}"
|
|
72
|
+
- Message content: "={{ $fromAI('message_html') }}" or "={{ $fromAI('message') }}"
|
|
73
|
+
- Date ranges: "={{ $fromAI('After', '', 'string') }}"
|
|
74
|
+
- Channel IDs: "={{ $fromAI('channel') }}"`,
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=tool-nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-nodes.js","sourceRoot":"","sources":["../../../../../src/prompts/chains/parameter-updater/guides/tool-nodes.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAkB;IAC9C,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAoEiC;CAC1C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { getMatchingGuides, getMatchingExamples, matchesPattern } from './registry';
|
|
2
|
+
export type { NodeTypeGuide, NodeTypeExamples, NodeTypePattern, PromptContext, } from './types';
|
|
3
|
+
export { hasResourceLocatorParameters } from './utils';
|
|
4
|
+
export { instanceUrlPrompt } from './instance-url';
|
|
5
|
+
export { CORE_INSTRUCTIONS, EXPRESSION_RULES, COMMON_PATTERNS, OUTPUT_FORMAT, } from './parameter-updater.prompt';
|
|
6
|
+
export { SET_NODE_GUIDE, IF_NODE_GUIDE, SWITCH_NODE_GUIDE, HTTP_REQUEST_GUIDE, TOOL_NODES_GUIDE, GMAIL_GUIDE, } from './guides';
|
|
7
|
+
export { RESOURCE_LOCATOR_GUIDE, SYSTEM_MESSAGE_GUIDE, TEXT_FIELDS_GUIDE, } from './guides';
|
|
8
|
+
export { SET_NODE_EXAMPLES, IF_NODE_EXAMPLES, SWITCH_NODE_EXAMPLES, SIMPLE_UPDATE_EXAMPLES, TOOL_NODE_EXAMPLES, RESOURCE_LOCATOR_EXAMPLES, } from './examples';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RESOURCE_LOCATOR_EXAMPLES = exports.TOOL_NODE_EXAMPLES = exports.SIMPLE_UPDATE_EXAMPLES = exports.SWITCH_NODE_EXAMPLES = exports.IF_NODE_EXAMPLES = exports.SET_NODE_EXAMPLES = exports.TEXT_FIELDS_GUIDE = exports.SYSTEM_MESSAGE_GUIDE = exports.RESOURCE_LOCATOR_GUIDE = exports.GMAIL_GUIDE = exports.TOOL_NODES_GUIDE = exports.HTTP_REQUEST_GUIDE = exports.SWITCH_NODE_GUIDE = exports.IF_NODE_GUIDE = exports.SET_NODE_GUIDE = exports.OUTPUT_FORMAT = exports.COMMON_PATTERNS = exports.EXPRESSION_RULES = exports.CORE_INSTRUCTIONS = exports.instanceUrlPrompt = exports.hasResourceLocatorParameters = exports.matchesPattern = exports.getMatchingExamples = exports.getMatchingGuides = void 0;
|
|
4
|
+
var registry_1 = require("./registry");
|
|
5
|
+
Object.defineProperty(exports, "getMatchingGuides", { enumerable: true, get: function () { return registry_1.getMatchingGuides; } });
|
|
6
|
+
Object.defineProperty(exports, "getMatchingExamples", { enumerable: true, get: function () { return registry_1.getMatchingExamples; } });
|
|
7
|
+
Object.defineProperty(exports, "matchesPattern", { enumerable: true, get: function () { return registry_1.matchesPattern; } });
|
|
8
|
+
var utils_1 = require("./utils");
|
|
9
|
+
Object.defineProperty(exports, "hasResourceLocatorParameters", { enumerable: true, get: function () { return utils_1.hasResourceLocatorParameters; } });
|
|
10
|
+
var instance_url_1 = require("./instance-url");
|
|
11
|
+
Object.defineProperty(exports, "instanceUrlPrompt", { enumerable: true, get: function () { return instance_url_1.instanceUrlPrompt; } });
|
|
12
|
+
var parameter_updater_prompt_1 = require("./parameter-updater.prompt");
|
|
13
|
+
Object.defineProperty(exports, "CORE_INSTRUCTIONS", { enumerable: true, get: function () { return parameter_updater_prompt_1.CORE_INSTRUCTIONS; } });
|
|
14
|
+
Object.defineProperty(exports, "EXPRESSION_RULES", { enumerable: true, get: function () { return parameter_updater_prompt_1.EXPRESSION_RULES; } });
|
|
15
|
+
Object.defineProperty(exports, "COMMON_PATTERNS", { enumerable: true, get: function () { return parameter_updater_prompt_1.COMMON_PATTERNS; } });
|
|
16
|
+
Object.defineProperty(exports, "OUTPUT_FORMAT", { enumerable: true, get: function () { return parameter_updater_prompt_1.OUTPUT_FORMAT; } });
|
|
17
|
+
var guides_1 = require("./guides");
|
|
18
|
+
Object.defineProperty(exports, "SET_NODE_GUIDE", { enumerable: true, get: function () { return guides_1.SET_NODE_GUIDE; } });
|
|
19
|
+
Object.defineProperty(exports, "IF_NODE_GUIDE", { enumerable: true, get: function () { return guides_1.IF_NODE_GUIDE; } });
|
|
20
|
+
Object.defineProperty(exports, "SWITCH_NODE_GUIDE", { enumerable: true, get: function () { return guides_1.SWITCH_NODE_GUIDE; } });
|
|
21
|
+
Object.defineProperty(exports, "HTTP_REQUEST_GUIDE", { enumerable: true, get: function () { return guides_1.HTTP_REQUEST_GUIDE; } });
|
|
22
|
+
Object.defineProperty(exports, "TOOL_NODES_GUIDE", { enumerable: true, get: function () { return guides_1.TOOL_NODES_GUIDE; } });
|
|
23
|
+
Object.defineProperty(exports, "GMAIL_GUIDE", { enumerable: true, get: function () { return guides_1.GMAIL_GUIDE; } });
|
|
24
|
+
var guides_2 = require("./guides");
|
|
25
|
+
Object.defineProperty(exports, "RESOURCE_LOCATOR_GUIDE", { enumerable: true, get: function () { return guides_2.RESOURCE_LOCATOR_GUIDE; } });
|
|
26
|
+
Object.defineProperty(exports, "SYSTEM_MESSAGE_GUIDE", { enumerable: true, get: function () { return guides_2.SYSTEM_MESSAGE_GUIDE; } });
|
|
27
|
+
Object.defineProperty(exports, "TEXT_FIELDS_GUIDE", { enumerable: true, get: function () { return guides_2.TEXT_FIELDS_GUIDE; } });
|
|
28
|
+
var examples_1 = require("./examples");
|
|
29
|
+
Object.defineProperty(exports, "SET_NODE_EXAMPLES", { enumerable: true, get: function () { return examples_1.SET_NODE_EXAMPLES; } });
|
|
30
|
+
Object.defineProperty(exports, "IF_NODE_EXAMPLES", { enumerable: true, get: function () { return examples_1.IF_NODE_EXAMPLES; } });
|
|
31
|
+
Object.defineProperty(exports, "SWITCH_NODE_EXAMPLES", { enumerable: true, get: function () { return examples_1.SWITCH_NODE_EXAMPLES; } });
|
|
32
|
+
Object.defineProperty(exports, "SIMPLE_UPDATE_EXAMPLES", { enumerable: true, get: function () { return examples_1.SIMPLE_UPDATE_EXAMPLES; } });
|
|
33
|
+
Object.defineProperty(exports, "TOOL_NODE_EXAMPLES", { enumerable: true, get: function () { return examples_1.TOOL_NODE_EXAMPLES; } });
|
|
34
|
+
Object.defineProperty(exports, "RESOURCE_LOCATOR_EXAMPLES", { enumerable: true, get: function () { return examples_1.RESOURCE_LOCATOR_EXAMPLES; } });
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/prompts/chains/parameter-updater/index.ts"],"names":[],"mappings":";;;AACA,uCAAoF;AAA3E,6GAAA,iBAAiB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,0GAAA,cAAc,OAAA;AAS/D,iCAAuD;AAA9C,qHAAA,4BAA4B,OAAA;AACrC,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAG1B,uEAKoC;AAJnC,6HAAA,iBAAiB,OAAA;AACjB,4HAAA,gBAAgB,OAAA;AAChB,2HAAA,eAAe,OAAA;AACf,yHAAA,aAAa,OAAA;AAId,mCAOkB;AANjB,wGAAA,cAAc,OAAA;AACd,uGAAA,aAAa,OAAA;AACb,2GAAA,iBAAiB,OAAA;AACjB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,qGAAA,WAAW,OAAA;AAIZ,mCAIkB;AAHjB,gHAAA,sBAAsB,OAAA;AACtB,8GAAA,oBAAoB,OAAA;AACpB,2GAAA,iBAAiB,OAAA;AAIlB,uCAOoB;AANnB,6GAAA,iBAAiB,OAAA;AACjB,4GAAA,gBAAgB,OAAA;AAChB,gHAAA,oBAAoB,OAAA;AACpB,kHAAA,sBAAsB,OAAA;AACtB,8GAAA,kBAAkB,OAAA;AAClB,qHAAA,yBAAyB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const instanceUrlPrompt: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instanceUrlPrompt = void 0;
|
|
4
|
+
const builder_1 = require("../../../prompts/builder");
|
|
5
|
+
exports.instanceUrlPrompt = new builder_1.PromptBuilder()
|
|
6
|
+
.section('instance_url', `The n8n instance base URL is: {instanceUrl}
|
|
7
|
+
|
|
8
|
+
This URL is essential for webhook nodes and chat triggers as it provides the base URL for:
|
|
9
|
+
- Webhook URLs that external services need to call
|
|
10
|
+
- Chat trigger URLs for conversational interfaces
|
|
11
|
+
- Any node that requires the full instance URL to generate proper callback URLs
|
|
12
|
+
|
|
13
|
+
When working with webhook or chat trigger nodes, use this URL as the base for constructing proper endpoint URLs.`)
|
|
14
|
+
.build();
|
|
15
|
+
//# sourceMappingURL=instance-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-url.js","sourceRoot":"","sources":["../../../../src/prompts/chains/parameter-updater/instance-url.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAErC,QAAA,iBAAiB,GAAG,IAAI,uBAAa,EAAE;KAClD,OAAO,CACP,cAAc,EACd;;;;;;;iHAO+G,CAC/G;KACA,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const CORE_INSTRUCTIONS = "You are an expert n8n workflow architect who updates node parameters based on natural language instructions.\n\n## Your Task\nUpdate the parameters of an existing n8n node based on the requested changes. Return the COMPLETE parameters object with both modified and unmodified parameters. Only modify the parameters that are explicitly mentioned in the changes, preserving all other existing parameters exactly as they are.\n\n## Reference Information\nYou will receive:\n1. The original user workflow request\n2. The current workflow JSON\n3. The selected node's current configuration (id, name, type, parameters)\n4. The node type's parameter definitions\n5. Natural language changes to apply\n\n## Parameter Update Guidelines\n1. START WITH CURRENT: If current parameters is empty {}, start with an empty object and add the requested parameters\n2. PRESERVE EXISTING VALUES: Only modify parameters mentioned in the requested changes\n3. MAINTAIN STRUCTURE: Keep the exact parameter structure required by the node type\n4. CHECK FOR RESOURCELOCATOR: If a parameter is type 'resourceLocator' in the node definition, it MUST use the ResourceLocator structure with __rl, mode, and value fields\n5. USE PROPER EXPRESSIONS: Follow n8n expression syntax when referencing other nodes\n6. VALIDATE TYPES: Ensure parameter values match their expected types\n7. HANDLE NESTED PARAMETERS: Correctly update nested structures like headers, conditions, etc.\n8. SIMPLE VALUES: For simple parameter updates like \"Set X to Y\", directly set the parameter without unnecessary nesting\n9. GENERATE IDS: When adding new items to arrays (like assignments, headers, etc.), generate unique IDs using a simple pattern like \"id-1\", \"id-2\", etc.\n10. TOOL NODE DETECTION: Check if node type ends with \"Tool\" to determine if $fromAI expressions are available\n11. PLACEHOLDER FORMAT: When changes specify a placeholder, copy it exactly as \"<__PLACEHOLDER_VALUE__VALUE_LABEL__>\" (no extra quotes or expressions) and keep VALUE_LABEL descriptive for the user";
|
|
2
|
+
export declare const EXPRESSION_RULES = "\n## CRITICAL: Correctly Formatting n8n Expressions\nWhen using expressions to reference data from other nodes:\n- ALWAYS use the format: `={{ $('Node Name').item.json.field }}`\n- NEVER omit the equals sign before the double curly braces\n- ALWAYS use DOUBLE curly braces, never single\n- NEVER use emojis or special characters inside expressions as they will break the expression\n- INCORRECT: `{ $('Node Name').item.json.field }` (missing =, single braces)\n- INCORRECT: `{{ $('Node Name').item.json.field }}` (missing =)\n- INCORRECT: `={{ $('\uD83D\uDC4D Node').item.json.field }}` (contains emoji)\n- CORRECT: `={{ $('Previous Node').item.json.field }}`";
|
|
3
|
+
export declare const COMMON_PATTERNS = "\n## Common Parameter Update Patterns\n\n### HTTP Request Node Updates\n- URL: Set directly or use expressions\n- Method: GET, POST, PUT, DELETE, etc.\n- Headers: Add/update in headerParameters.parameters array\n- Body: Update bodyParameters.parameters for POST/PUT\n- Authentication: Update authentication settings";
|
|
4
|
+
export declare const OUTPUT_FORMAT = "\n## Output Format\nReturn ONLY the complete updated parameters object that matches the node's parameter structure. Include ALL parameters, both modified and unmodified.";
|