@elizaos/plugin-n8n-workflow 1.0.1

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.
Files changed (123) hide show
  1. package/README.md +199 -0
  2. package/dist/actions/activateWorkflow.d.ts +4 -0
  3. package/dist/actions/activateWorkflow.d.ts.map +1 -0
  4. package/dist/actions/activateWorkflow.js +116 -0
  5. package/dist/actions/activateWorkflow.js.map +1 -0
  6. package/dist/actions/createWorkflow.d.ts +4 -0
  7. package/dist/actions/createWorkflow.d.ts.map +1 -0
  8. package/dist/actions/createWorkflow.js +141 -0
  9. package/dist/actions/createWorkflow.js.map +1 -0
  10. package/dist/actions/deactivateWorkflow.d.ts +4 -0
  11. package/dist/actions/deactivateWorkflow.d.ts.map +1 -0
  12. package/dist/actions/deactivateWorkflow.js +121 -0
  13. package/dist/actions/deactivateWorkflow.js.map +1 -0
  14. package/dist/actions/deleteWorkflow.d.ts +4 -0
  15. package/dist/actions/deleteWorkflow.d.ts.map +1 -0
  16. package/dist/actions/deleteWorkflow.js +115 -0
  17. package/dist/actions/deleteWorkflow.js.map +1 -0
  18. package/dist/actions/executeWorkflow.d.ts +4 -0
  19. package/dist/actions/executeWorkflow.d.ts.map +1 -0
  20. package/dist/actions/executeWorkflow.js +74 -0
  21. package/dist/actions/executeWorkflow.js.map +1 -0
  22. package/dist/actions/getExecutions.d.ts +4 -0
  23. package/dist/actions/getExecutions.d.ts.map +1 -0
  24. package/dist/actions/getExecutions.js +108 -0
  25. package/dist/actions/getExecutions.js.map +1 -0
  26. package/dist/actions/index.d.ts +9 -0
  27. package/dist/actions/index.d.ts.map +1 -0
  28. package/dist/actions/index.js +9 -0
  29. package/dist/actions/index.js.map +1 -0
  30. package/dist/actions/listCredentials.d.ts +4 -0
  31. package/dist/actions/listCredentials.d.ts.map +1 -0
  32. package/dist/actions/listCredentials.js +102 -0
  33. package/dist/actions/listCredentials.js.map +1 -0
  34. package/dist/actions/listWorkflows.d.ts +4 -0
  35. package/dist/actions/listWorkflows.d.ts.map +1 -0
  36. package/dist/actions/listWorkflows.js +97 -0
  37. package/dist/actions/listWorkflows.js.map +1 -0
  38. package/dist/data/defaultNodes.json +427888 -0
  39. package/dist/index.d.ts +35 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +75 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/prompts/index.d.ts +3 -0
  44. package/dist/prompts/index.d.ts.map +1 -0
  45. package/dist/prompts/index.js +3 -0
  46. package/dist/prompts/index.js.map +1 -0
  47. package/dist/prompts/keywordExtraction.d.ts +6 -0
  48. package/dist/prompts/keywordExtraction.d.ts.map +1 -0
  49. package/dist/prompts/keywordExtraction.js +19 -0
  50. package/dist/prompts/keywordExtraction.js.map +1 -0
  51. package/dist/prompts/workflowGeneration.d.ts +7 -0
  52. package/dist/prompts/workflowGeneration.d.ts.map +1 -0
  53. package/dist/prompts/workflowGeneration.js +330 -0
  54. package/dist/prompts/workflowGeneration.js.map +1 -0
  55. package/dist/prompts/workflowMatching.d.ts +7 -0
  56. package/dist/prompts/workflowMatching.d.ts.map +1 -0
  57. package/dist/prompts/workflowMatching.js +25 -0
  58. package/dist/prompts/workflowMatching.js.map +1 -0
  59. package/dist/providers/activeWorkflows.d.ts +12 -0
  60. package/dist/providers/activeWorkflows.d.ts.map +1 -0
  61. package/dist/providers/activeWorkflows.js +69 -0
  62. package/dist/providers/activeWorkflows.js.map +1 -0
  63. package/dist/providers/index.d.ts +3 -0
  64. package/dist/providers/index.d.ts.map +1 -0
  65. package/dist/providers/index.js +3 -0
  66. package/dist/providers/index.js.map +1 -0
  67. package/dist/providers/workflowStatus.d.ts +4 -0
  68. package/dist/providers/workflowStatus.d.ts.map +1 -0
  69. package/dist/providers/workflowStatus.js +66 -0
  70. package/dist/providers/workflowStatus.js.map +1 -0
  71. package/dist/schemas/index.d.ts +3 -0
  72. package/dist/schemas/index.d.ts.map +1 -0
  73. package/dist/schemas/index.js +3 -0
  74. package/dist/schemas/index.js.map +1 -0
  75. package/dist/schemas/keywordExtraction.d.ts +14 -0
  76. package/dist/schemas/keywordExtraction.d.ts.map +1 -0
  77. package/dist/schemas/keywordExtraction.js +12 -0
  78. package/dist/schemas/keywordExtraction.js.map +1 -0
  79. package/dist/schemas/workflowMatching.d.ts +36 -0
  80. package/dist/schemas/workflowMatching.d.ts.map +1 -0
  81. package/dist/schemas/workflowMatching.js +30 -0
  82. package/dist/schemas/workflowMatching.js.map +1 -0
  83. package/dist/services/index.d.ts +2 -0
  84. package/dist/services/index.d.ts.map +1 -0
  85. package/dist/services/index.js +2 -0
  86. package/dist/services/index.js.map +1 -0
  87. package/dist/services/n8n-workflow-service.d.ts +83 -0
  88. package/dist/services/n8n-workflow-service.d.ts.map +1 -0
  89. package/dist/services/n8n-workflow-service.js +234 -0
  90. package/dist/services/n8n-workflow-service.js.map +1 -0
  91. package/dist/types/index.d.ts +313 -0
  92. package/dist/types/index.d.ts.map +1 -0
  93. package/dist/types/index.js +43 -0
  94. package/dist/types/index.js.map +1 -0
  95. package/dist/utils/api.d.ts +137 -0
  96. package/dist/utils/api.d.ts.map +1 -0
  97. package/dist/utils/api.js +247 -0
  98. package/dist/utils/api.js.map +1 -0
  99. package/dist/utils/catalog.d.ts +22 -0
  100. package/dist/utils/catalog.d.ts.map +1 -0
  101. package/dist/utils/catalog.js +81 -0
  102. package/dist/utils/catalog.js.map +1 -0
  103. package/dist/utils/context.d.ts +8 -0
  104. package/dist/utils/context.d.ts.map +1 -0
  105. package/dist/utils/context.js +17 -0
  106. package/dist/utils/context.js.map +1 -0
  107. package/dist/utils/credentialResolver.d.ts +13 -0
  108. package/dist/utils/credentialResolver.d.ts.map +1 -0
  109. package/dist/utils/credentialResolver.js +177 -0
  110. package/dist/utils/credentialResolver.js.map +1 -0
  111. package/dist/utils/generation.d.ts +46 -0
  112. package/dist/utils/generation.d.ts.map +1 -0
  113. package/dist/utils/generation.js +145 -0
  114. package/dist/utils/generation.js.map +1 -0
  115. package/dist/utils/index.d.ts +6 -0
  116. package/dist/utils/index.d.ts.map +1 -0
  117. package/dist/utils/index.js +11 -0
  118. package/dist/utils/index.js.map +1 -0
  119. package/dist/utils/workflow.d.ts +27 -0
  120. package/dist/utils/workflow.d.ts.map +1 -0
  121. package/dist/utils/workflow.js +289 -0
  122. package/dist/utils/workflow.js.map +1 -0
  123. package/package.json +65 -0
@@ -0,0 +1,35 @@
1
+ import { type Plugin } from '@elizaos/core';
2
+ /**
3
+ * n8n Workflow Plugin for ElizaOS
4
+ *
5
+ * Generate and manage n8n workflows from natural language using RAG pipeline.
6
+ * Supports workflow CRUD, execution management, and credential resolution.
7
+ *
8
+ * **Required Configuration:**
9
+ * - `N8N_API_KEY`: Your n8n API key
10
+ * - `N8N_HOST`: Your n8n instance URL (e.g., https://your.n8n.cloud)
11
+ *
12
+ * **Optional Configuration:**
13
+ * - `n8n.credentials`: Pre-configured credential IDs for local mode
14
+ *
15
+ * **Example Character Configuration:**
16
+ * ```json
17
+ * {
18
+ * "name": "AI Workflow Builder",
19
+ * "plugins": ["@elizaos/plugin-n8n-workflow"],
20
+ * "settings": {
21
+ * "N8N_API_KEY": "env:N8N_API_KEY",
22
+ * "N8N_HOST": "https://your.n8n.cloud",
23
+ * "n8n": {
24
+ * "credentials": {
25
+ * "gmailOAuth2Api": "cred_gmail_123",
26
+ * "stripeApi": "cred_stripe_456"
27
+ * }
28
+ * }
29
+ * }
30
+ * }
31
+ * ```
32
+ */
33
+ export declare const n8nWorkflowPlugin: Plugin;
34
+ export default n8nWorkflowPlugin;
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAcxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,iBAAiB,EAAE,MA6D/B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,75 @@
1
+ import { logger } from '@elizaos/core';
2
+ import { N8nWorkflowService } from './services/index';
3
+ import { createWorkflowAction, listWorkflowsAction, getExecutionsAction, activateWorkflowAction, deactivateWorkflowAction, deleteWorkflowAction, executeWorkflowAction, listCredentialsAction, } from './actions/index';
4
+ import { workflowStatusProvider, activeWorkflowsProvider } from './providers/index';
5
+ /**
6
+ * n8n Workflow Plugin for ElizaOS
7
+ *
8
+ * Generate and manage n8n workflows from natural language using RAG pipeline.
9
+ * Supports workflow CRUD, execution management, and credential resolution.
10
+ *
11
+ * **Required Configuration:**
12
+ * - `N8N_API_KEY`: Your n8n API key
13
+ * - `N8N_HOST`: Your n8n instance URL (e.g., https://your.n8n.cloud)
14
+ *
15
+ * **Optional Configuration:**
16
+ * - `n8n.credentials`: Pre-configured credential IDs for local mode
17
+ *
18
+ * **Example Character Configuration:**
19
+ * ```json
20
+ * {
21
+ * "name": "AI Workflow Builder",
22
+ * "plugins": ["@elizaos/plugin-n8n-workflow"],
23
+ * "settings": {
24
+ * "N8N_API_KEY": "env:N8N_API_KEY",
25
+ * "N8N_HOST": "https://your.n8n.cloud",
26
+ * "n8n": {
27
+ * "credentials": {
28
+ * "gmailOAuth2Api": "cred_gmail_123",
29
+ * "stripeApi": "cred_stripe_456"
30
+ * }
31
+ * }
32
+ * }
33
+ * }
34
+ * ```
35
+ */
36
+ export const n8nWorkflowPlugin = {
37
+ name: 'n8n-workflow',
38
+ description: 'Generate and deploy n8n workflows from natural language. ' +
39
+ 'Supports 450+ native n8n nodes (Gmail, Slack, Stripe, etc.) with intelligent ' +
40
+ 'credential resolution and workflow management.',
41
+ services: [N8nWorkflowService],
42
+ actions: [
43
+ createWorkflowAction,
44
+ listWorkflowsAction,
45
+ getExecutionsAction,
46
+ activateWorkflowAction,
47
+ deactivateWorkflowAction,
48
+ deleteWorkflowAction,
49
+ executeWorkflowAction,
50
+ listCredentialsAction,
51
+ ],
52
+ providers: [workflowStatusProvider, activeWorkflowsProvider],
53
+ init: async (_config, runtime) => {
54
+ const apiKey = runtime.getSetting('N8N_API_KEY');
55
+ const host = runtime.getSetting('N8N_HOST');
56
+ logger.info(`n8n Workflow Plugin - API Key: ${apiKey ? 'configured' : 'not configured'}, Host: ${host || 'not set'}`);
57
+ if (!apiKey) {
58
+ logger.warn('N8N_API_KEY not provided - plugin will not be functional. ' +
59
+ 'Please set N8N_API_KEY in your environment or character settings.');
60
+ }
61
+ if (!host) {
62
+ logger.warn('N8N_HOST not provided - plugin will not be functional. ' +
63
+ 'Please set N8N_HOST to your n8n instance URL (e.g., https://your.n8n.cloud).');
64
+ }
65
+ // Check for pre-configured credentials (optional)
66
+ const n8nSettings = runtime.getSetting('n8n');
67
+ if (n8nSettings?.credentials) {
68
+ const credCount = Object.keys(n8nSettings.credentials).length;
69
+ logger.info({ src: 'plugin:n8n-workflow:plugin:init' }, `n8n Workflow Plugin - Pre-configured credentials: ${credCount} credential types`);
70
+ }
71
+ logger.info({ src: 'plugin:n8n-workflow:plugin:init' }, 'n8n Workflow Plugin initialized successfully');
72
+ },
73
+ };
74
+ export default n8nWorkflowPlugin;
75
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,EAAe,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAW;IACvC,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,2DAA2D;QAC3D,+EAA+E;QAC/E,gDAAgD;IAElD,QAAQ,EAAE,CAAC,kBAAkB,CAAC;IAE9B,OAAO,EAAE;QACP,oBAAoB;QACpB,mBAAmB;QACnB,mBAAmB;QACnB,sBAAsB;QACtB,wBAAwB;QACxB,oBAAoB;QACpB,qBAAqB;QACrB,qBAAqB;KACtB;IAED,SAAS,EAAE,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAE5D,IAAI,EAAE,KAAK,EAAE,OAA+B,EAAE,OAAsB,EAAiB,EAAE;QACrF,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAE5C,MAAM,CAAC,IAAI,CACT,kCAAkC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,WAAW,IAAI,IAAI,SAAS,EAAE,CACzG,CAAC;QAEF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CACT,4DAA4D;gBAC1D,mEAAmE,CACtE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,CAAC,IAAI,CACT,yDAAyD;gBACvD,8EAA8E,CACjF,CAAC;QACJ,CAAC;QAED,kDAAkD;QAClD,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAE/B,CAAC;QACd,IAAI,WAAW,EAAE,WAAW,EAAE,CAAC;YAC7B,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;YAC9D,MAAM,CAAC,IAAI,CACT,EAAE,GAAG,EAAE,iCAAiC,EAAE,EAC1C,qDAAqD,SAAS,mBAAmB,CAClF,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,IAAI,CACT,EAAE,GAAG,EAAE,iCAAiC,EAAE,EAC1C,8CAA8C,CAC/C,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { KEYWORD_EXTRACTION_SYSTEM_PROMPT } from './keywordExtraction';
2
+ export { WORKFLOW_GENERATION_SYSTEM_PROMPT } from './workflowGeneration';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { KEYWORD_EXTRACTION_SYSTEM_PROMPT } from './keywordExtraction';
2
+ export { WORKFLOW_GENERATION_SYSTEM_PROMPT } from './workflowGeneration';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * System prompt for keyword extraction from user workflow descriptions
3
+ * Adapted from n8n-intelligence for ElizaOS
4
+ */
5
+ export declare const KEYWORD_EXTRACTION_SYSTEM_PROMPT = "You are an expert at extracting relevant search terms for finding n8n nodes.\n\nGiven a user prompt describing an n8n workflow, extract up to 5 concise keywords or phrases that best represent the core actions, services, or data transformations involved.\n\nFocus on terms likely to match n8n node names or functionalities. Avoid generic words.\n\nExamples:\n- \"Send me Stripe payment summaries via Gmail every Monday\" \u2192 [\"stripe\", \"gmail\", \"send\", \"email\", \"schedule\"]\n- \"Post RSS feed updates to Slack channel\" \u2192 [\"rss\", \"slack\", \"post\", \"feed\", \"webhook\"]\n- \"Summarize weekly GitHub issues and send to Notion\" \u2192 [\"github\", \"issues\", \"notion\", \"summarize\"]\n- \"Fetch weather data hourly and store in Google Sheets\" \u2192 [\"weather\", \"http\", \"schedule\", \"google sheets\", \"store\"]\n- \"When new Stripe payment, create invoice in QuickBooks\" \u2192 [\"stripe\", \"webhook\", \"quickbooks\", \"invoice\", \"payment\"]\n\nReturn a JSON object with a \"keywords\" array containing 1-5 relevant search terms.";
6
+ //# sourceMappingURL=keywordExtraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keywordExtraction.d.ts","sourceRoot":"","sources":["../../src/prompts/keywordExtraction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,gCAAgC,gjCAasC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * System prompt for keyword extraction from user workflow descriptions
3
+ * Adapted from n8n-intelligence for ElizaOS
4
+ */
5
+ export const KEYWORD_EXTRACTION_SYSTEM_PROMPT = `You are an expert at extracting relevant search terms for finding n8n nodes.
6
+
7
+ Given a user prompt describing an n8n workflow, extract up to 5 concise keywords or phrases that best represent the core actions, services, or data transformations involved.
8
+
9
+ Focus on terms likely to match n8n node names or functionalities. Avoid generic words.
10
+
11
+ Examples:
12
+ - "Send me Stripe payment summaries via Gmail every Monday" → ["stripe", "gmail", "send", "email", "schedule"]
13
+ - "Post RSS feed updates to Slack channel" → ["rss", "slack", "post", "feed", "webhook"]
14
+ - "Summarize weekly GitHub issues and send to Notion" → ["github", "issues", "notion", "summarize"]
15
+ - "Fetch weather data hourly and store in Google Sheets" → ["weather", "http", "schedule", "google sheets", "store"]
16
+ - "When new Stripe payment, create invoice in QuickBooks" → ["stripe", "webhook", "quickbooks", "invoice", "payment"]
17
+
18
+ Return a JSON object with a "keywords" array containing 1-5 relevant search terms.`;
19
+ //# sourceMappingURL=keywordExtraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keywordExtraction.js","sourceRoot":"","sources":["../../src/prompts/keywordExtraction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;mFAamC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * System prompt for n8n workflow generation
3
+ * Adapted from n8n-intelligence with credential injection instructions
4
+ * @see https://github.com/n8n-intelligence/worker/utils/prompt.ts
5
+ */
6
+ export declare const WORKFLOW_GENERATION_SYSTEM_PROMPT = "## n8n Workflow AI Definition: Core Concepts\n\n### 1. **Workflow**\n\nA workflow is a collection of nodes and the connections between them.\n\n```json\n{\n \"id\": \"uuid\",\n \"name\": \"string\",\n \"active\": true,\n \"nodes\": [/* array of Node objects */],\n \"connections\": {/* see below */},\n \"settings\": {/* workflow-specific settings, optional */},\n \"staticData\": {/* optional */},\n \"pinData\": {/* optional */}\n}\n```\n\n---\n\n### 2. **Node**\n\nA node is a single step in a workflow. Each node has:\n\n| Field | Type | Description |\n|:--------------|:----------|:----------------------------------|\n| id | string | Unique node identifier |\n| name | string | Node name (unique in workflow) |\n| type | string | Node type (e.g. `httpRequest`) |\n| typeVersion | number | Node type version |\n| position | [number, number] | Canvas position |\n| parameters | object | Node parameters (see below) |\n| credentials | object | Credential references (optional) |\n| disabled | boolean | If node is disabled (optional) |\n\n---\n\n### 3. **Connections**\n\nConnections define how nodes are linked.\n\n```json\n{\n \"NodeA\": {\n \"main\": [\n [ { \"node\": \"NodeB\", \"type\": \"main\", \"index\": 0 } ]\n ]\n }\n}\n```\n- Key: source node name\n- Each connection has a `type` (commonly `\"main\"`)\n- Each connection points to a destination node, with an index\n\n---\n\n### 4. **Node Parameters**\n\nEach node has parameters, which are defined in its node type description. Parameters can be:\n\n- Simple values (string, number, boolean)\n- Complex objects (collections, fixedCollections, etc.)\n- Resource locators (for referencing external resources)\n- Options (select from a list)\n\n**Parameter properties:**\n| Field | Type | Description |\n|:--------------|:----------|:----------------------------------|\n| displayName | string | Label shown in UI |\n| name | string | Internal parameter name |\n| type | string | Parameter type (`string`, `number`, `options`, etc.) |\n| default | any | Default value |\n| description | string | Help text (optional) |\n| required | boolean | Is required? (optional) |\n| options | array | For `options` type: choices |\n| displayOptions| object | Show/hide logic (optional) |\n\n---\n\n### 5. **Node Type Description**\n\nEach node type (e.g. HTTP Request, Slack, Google Sheets) defines:\n\n| Field | Type | Description |\n|:--------------|:----------|:----------------------------------|\n| name | string | Node type name |\n| displayName | string | Human-readable name |\n| group | array | Node group(s): e.g. input, output, trigger |\n| description | string | Node description |\n| version | number | Node version |\n| inputs | array | Allowed input connection types |\n| outputs | array | Allowed output connection types |\n| properties | array | Parameter definitions |\n| credentials | array | Credential requirements |\n| documentationUrl | string | Docs link (optional) |\n\n---\n\n### 6. **Credentials**\n\nSome nodes require credentials. For nodes that need authentication:\n\n**IMPORTANT:** Always use native n8n nodes (e.g. `n8n-nodes-base.gmail`, `n8n-nodes-base.slack`) rather than generic HTTP Request nodes.\n\nWhen a node requires credentials, include a `credentials` field in the node object:\n\n```json\n{\n \"name\": \"Send Gmail\",\n \"type\": \"n8n-nodes-base.gmail\",\n \"credentials\": {\n \"gmailOAuth2Api\": {\n \"id\": \"{{CREDENTIAL_ID}}\",\n \"name\": \"Gmail Account\"\n }\n }\n}\n```\n\nThe credential ID will be injected automatically. Use the credential type name from the node's definition (e.g. `gmailOAuth2Api`, `slackOAuth2Api`, `stripeApi`).\n\n---\n\n### 7. **Workflow Settings (optional)**\n\nWorkflow-level settings, e.g. timezone, error workflow, execution options.\n\n---\n\n## **Prompt Example for AI**\n\n> You are an n8n workflow generator. Given a user's intent, generate a workflow as a JSON object.\n> Use the following structure:\n> - `nodes`: List of nodes, each with `id`, `name`, `type`, `typeVersion`, `position`, `parameters`, and optional `credentials`.\n> - `connections`: Object mapping node names to their output connections.\n> - `settings`: Optional workflow settings.\n\n> Reference [n8n node type documentation](https://docs.n8n.io/integrations/builtin/app-nodes/) for available node types and their parameters.\n\n**When creating nodes:**\n- Use required parameters from the node's type definition.\n- For options, pick the most common or user-specified value.\n- Use unique names for each node.\n- Connect nodes using the `connections` object, with `\"main\"` as the default connection type.\n- For nodes requiring authentication, include the `credentials` field with the appropriate credential type.\n- Use native n8n nodes (n8n-nodes-base.*) instead of generic HTTP Request nodes.\n\n---\n\n## **Minimal Example Workflow**\n\n```json\n{\n \"nodes\": [\n {\n \"id\": \"uuid-1\",\n \"name\": \"Start\",\n \"type\": \"n8n-nodes-base.start\",\n \"typeVersion\": 1,\n \"position\": [0,0],\n \"parameters\": {}\n },\n {\n \"id\": \"uuid-2\",\n \"name\": \"Send Email\",\n \"type\": \"n8n-nodes-base.emailSend\",\n \"typeVersion\": 1,\n \"position\": [200,0],\n \"parameters\": {\n \"to\": \"user@example.com\",\n \"subject\": \"Hello\",\n \"text\": \"This is a test\"\n }\n }\n ],\n \"connections\": {\n \"Start\": { \"main\": [ [ { \"node\": \"Send Email\", \"type\": \"main\", \"index\": 0 } ] ] }\n }\n}\n```\n\n---\n\n## **Example with Credentials**\n\n```json\n{\n \"nodes\": [\n {\n \"id\": \"uuid-1\",\n \"name\": \"Schedule Trigger\",\n \"type\": \"n8n-nodes-base.scheduleTrigger\",\n \"typeVersion\": 1,\n \"position\": [0,0],\n \"parameters\": {\n \"rule\": {\n \"interval\": [\n {\n \"field\": \"hours\",\n \"hoursInterval\": 24\n }\n ]\n }\n }\n },\n {\n \"id\": \"uuid-2\",\n \"name\": \"Get Stripe Payments\",\n \"type\": \"n8n-nodes-base.stripe\",\n \"typeVersion\": 1,\n \"position\": [200,0],\n \"parameters\": {\n \"resource\": \"charge\",\n \"operation\": \"getAll\"\n },\n \"credentials\": {\n \"stripeApi\": {\n \"id\": \"{{CREDENTIAL_ID}}\",\n \"name\": \"Stripe Account\"\n }\n }\n },\n {\n \"id\": \"uuid-3\",\n \"name\": \"Send via Gmail\",\n \"type\": \"n8n-nodes-base.gmail\",\n \"typeVersion\": 2,\n \"position\": [400,0],\n \"parameters\": {\n \"operation\": \"send\",\n \"message\": {\n \"to\": \"user@example.com\",\n \"subject\": \"Daily Stripe Summary\",\n \"body\": \"{{ $json.data }}\"\n }\n },\n \"credentials\": {\n \"gmailOAuth2Api\": {\n \"id\": \"{{CREDENTIAL_ID}}\",\n \"name\": \"Gmail Account\"\n }\n }\n }\n ],\n \"connections\": {\n \"Schedule Trigger\": { \"main\": [ [ { \"node\": \"Get Stripe Payments\", \"type\": \"main\", \"index\": 0 } ] ] },\n \"Get Stripe Payments\": { \"main\": [ [ { \"node\": \"Send via Gmail\", \"type\": \"main\", \"index\": 0 } ] ] }\n }\n}\n```\n\n---\n\n## **Summary Table: Key n8n Workflow Concepts**\n\n| Concept | Description/Key Fields |\n|:----------------|:----------------------------------------------------------|\n| Workflow | id, name, active, nodes, connections, settings |\n| Node | id, name, type, typeVersion, position, parameters, credentials, disabled |\n| Connections | Map of node names to output connection arrays |\n| Node Parameters | name, displayName, type, default, options, required, description |\n| Node Type | name, displayName, group, description, version, inputs, outputs, properties, credentials |\n| Credentials | Referenced in node, injected automatically by ID |\n| Settings | Workflow-level options |\n\n---\n\n**Use only these fields and structures for AI workflow generation.**\nFor parameter validation and types, rely on the node's type definition and basic TypeScript types.\n\n---\n\n## **Handling Incomplete or Ambiguous Prompts**\n\nWhen the user prompt lacks specific details:\n\n1. **Make reasonable assumptions** based on common use cases\n2. **Use sensible defaults**:\n - Email service: Prefer Gmail over generic SMTP\n - Schedule: Default to daily at 9 AM if frequency not specified\n - Error handling: Include basic error notifications\n - Data format: Use JSON for structured data\n\n3. **Document your assumptions** in a special `_meta` field:\n\n```json\n{\n \"name\": \"Workflow Name\",\n \"nodes\": [...],\n \"connections\": {...},\n \"_meta\": {\n \"assumptions\": [\n \"Using Gmail as email service (not specified)\",\n \"Running daily at 9 AM (frequency not specified)\",\n \"Sending to primary email address (recipient not specified)\"\n ],\n \"suggestions\": [\n \"Consider adding error notification to Slack\",\n \"You may want to filter payments by status\",\n \"Add a condition node to check if data is empty\"\n ],\n \"requiresClarification\": [\n \"Which email address should receive the summary?\",\n \"Should failed payments be included?\"\n ]\n }\n}\n```\n\n4. **If critically ambiguous** (multiple valid interpretations):\n - Set `_meta.requiresClarification` with specific questions\n - Still generate a valid workflow with best-guess defaults\n - The user can approve or request modifications\n\n**Example ambiguous prompt**: \"Send me payment info\"\n- Assumption: Stripe payments (most common)\n- Assumption: Email via Gmail\n- Clarification needed: \"Which email address?\" / \"All payments or just successful ones?\"\n\n---\n\n**IMPORTANT**: Always generate a complete, valid workflow even if assumptions are made. Never leave placeholders or incomplete nodes.\n";
7
+ //# sourceMappingURL=workflowGeneration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowGeneration.d.ts","sourceRoot":"","sources":["../../src/prompts/workflowGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,iCAAiC,4+UAmU7C,CAAC"}
@@ -0,0 +1,330 @@
1
+ /**
2
+ * System prompt for n8n workflow generation
3
+ * Adapted from n8n-intelligence with credential injection instructions
4
+ * @see https://github.com/n8n-intelligence/worker/utils/prompt.ts
5
+ */
6
+ export const WORKFLOW_GENERATION_SYSTEM_PROMPT = `## n8n Workflow AI Definition: Core Concepts
7
+
8
+ ### 1. **Workflow**
9
+
10
+ A workflow is a collection of nodes and the connections between them.
11
+
12
+ \`\`\`json
13
+ {
14
+ "id": "uuid",
15
+ "name": "string",
16
+ "active": true,
17
+ "nodes": [/* array of Node objects */],
18
+ "connections": {/* see below */},
19
+ "settings": {/* workflow-specific settings, optional */},
20
+ "staticData": {/* optional */},
21
+ "pinData": {/* optional */}
22
+ }
23
+ \`\`\`
24
+
25
+ ---
26
+
27
+ ### 2. **Node**
28
+
29
+ A node is a single step in a workflow. Each node has:
30
+
31
+ | Field | Type | Description |
32
+ |:--------------|:----------|:----------------------------------|
33
+ | id | string | Unique node identifier |
34
+ | name | string | Node name (unique in workflow) |
35
+ | type | string | Node type (e.g. \`httpRequest\`) |
36
+ | typeVersion | number | Node type version |
37
+ | position | [number, number] | Canvas position |
38
+ | parameters | object | Node parameters (see below) |
39
+ | credentials | object | Credential references (optional) |
40
+ | disabled | boolean | If node is disabled (optional) |
41
+
42
+ ---
43
+
44
+ ### 3. **Connections**
45
+
46
+ Connections define how nodes are linked.
47
+
48
+ \`\`\`json
49
+ {
50
+ "NodeA": {
51
+ "main": [
52
+ [ { "node": "NodeB", "type": "main", "index": 0 } ]
53
+ ]
54
+ }
55
+ }
56
+ \`\`\`
57
+ - Key: source node name
58
+ - Each connection has a \`type\` (commonly \`"main"\`)
59
+ - Each connection points to a destination node, with an index
60
+
61
+ ---
62
+
63
+ ### 4. **Node Parameters**
64
+
65
+ Each node has parameters, which are defined in its node type description. Parameters can be:
66
+
67
+ - Simple values (string, number, boolean)
68
+ - Complex objects (collections, fixedCollections, etc.)
69
+ - Resource locators (for referencing external resources)
70
+ - Options (select from a list)
71
+
72
+ **Parameter properties:**
73
+ | Field | Type | Description |
74
+ |:--------------|:----------|:----------------------------------|
75
+ | displayName | string | Label shown in UI |
76
+ | name | string | Internal parameter name |
77
+ | type | string | Parameter type (\`string\`, \`number\`, \`options\`, etc.) |
78
+ | default | any | Default value |
79
+ | description | string | Help text (optional) |
80
+ | required | boolean | Is required? (optional) |
81
+ | options | array | For \`options\` type: choices |
82
+ | displayOptions| object | Show/hide logic (optional) |
83
+
84
+ ---
85
+
86
+ ### 5. **Node Type Description**
87
+
88
+ Each node type (e.g. HTTP Request, Slack, Google Sheets) defines:
89
+
90
+ | Field | Type | Description |
91
+ |:--------------|:----------|:----------------------------------|
92
+ | name | string | Node type name |
93
+ | displayName | string | Human-readable name |
94
+ | group | array | Node group(s): e.g. input, output, trigger |
95
+ | description | string | Node description |
96
+ | version | number | Node version |
97
+ | inputs | array | Allowed input connection types |
98
+ | outputs | array | Allowed output connection types |
99
+ | properties | array | Parameter definitions |
100
+ | credentials | array | Credential requirements |
101
+ | documentationUrl | string | Docs link (optional) |
102
+
103
+ ---
104
+
105
+ ### 6. **Credentials**
106
+
107
+ Some nodes require credentials. For nodes that need authentication:
108
+
109
+ **IMPORTANT:** Always use native n8n nodes (e.g. \`n8n-nodes-base.gmail\`, \`n8n-nodes-base.slack\`) rather than generic HTTP Request nodes.
110
+
111
+ When a node requires credentials, include a \`credentials\` field in the node object:
112
+
113
+ \`\`\`json
114
+ {
115
+ "name": "Send Gmail",
116
+ "type": "n8n-nodes-base.gmail",
117
+ "credentials": {
118
+ "gmailOAuth2Api": {
119
+ "id": "{{CREDENTIAL_ID}}",
120
+ "name": "Gmail Account"
121
+ }
122
+ }
123
+ }
124
+ \`\`\`
125
+
126
+ The credential ID will be injected automatically. Use the credential type name from the node's definition (e.g. \`gmailOAuth2Api\`, \`slackOAuth2Api\`, \`stripeApi\`).
127
+
128
+ ---
129
+
130
+ ### 7. **Workflow Settings (optional)**
131
+
132
+ Workflow-level settings, e.g. timezone, error workflow, execution options.
133
+
134
+ ---
135
+
136
+ ## **Prompt Example for AI**
137
+
138
+ > You are an n8n workflow generator. Given a user's intent, generate a workflow as a JSON object.
139
+ > Use the following structure:
140
+ > - \`nodes\`: List of nodes, each with \`id\`, \`name\`, \`type\`, \`typeVersion\`, \`position\`, \`parameters\`, and optional \`credentials\`.
141
+ > - \`connections\`: Object mapping node names to their output connections.
142
+ > - \`settings\`: Optional workflow settings.
143
+
144
+ > Reference [n8n node type documentation](https://docs.n8n.io/integrations/builtin/app-nodes/) for available node types and their parameters.
145
+
146
+ **When creating nodes:**
147
+ - Use required parameters from the node's type definition.
148
+ - For options, pick the most common or user-specified value.
149
+ - Use unique names for each node.
150
+ - Connect nodes using the \`connections\` object, with \`"main"\` as the default connection type.
151
+ - For nodes requiring authentication, include the \`credentials\` field with the appropriate credential type.
152
+ - Use native n8n nodes (n8n-nodes-base.*) instead of generic HTTP Request nodes.
153
+
154
+ ---
155
+
156
+ ## **Minimal Example Workflow**
157
+
158
+ \`\`\`json
159
+ {
160
+ "nodes": [
161
+ {
162
+ "id": "uuid-1",
163
+ "name": "Start",
164
+ "type": "n8n-nodes-base.start",
165
+ "typeVersion": 1,
166
+ "position": [0,0],
167
+ "parameters": {}
168
+ },
169
+ {
170
+ "id": "uuid-2",
171
+ "name": "Send Email",
172
+ "type": "n8n-nodes-base.emailSend",
173
+ "typeVersion": 1,
174
+ "position": [200,0],
175
+ "parameters": {
176
+ "to": "user@example.com",
177
+ "subject": "Hello",
178
+ "text": "This is a test"
179
+ }
180
+ }
181
+ ],
182
+ "connections": {
183
+ "Start": { "main": [ [ { "node": "Send Email", "type": "main", "index": 0 } ] ] }
184
+ }
185
+ }
186
+ \`\`\`
187
+
188
+ ---
189
+
190
+ ## **Example with Credentials**
191
+
192
+ \`\`\`json
193
+ {
194
+ "nodes": [
195
+ {
196
+ "id": "uuid-1",
197
+ "name": "Schedule Trigger",
198
+ "type": "n8n-nodes-base.scheduleTrigger",
199
+ "typeVersion": 1,
200
+ "position": [0,0],
201
+ "parameters": {
202
+ "rule": {
203
+ "interval": [
204
+ {
205
+ "field": "hours",
206
+ "hoursInterval": 24
207
+ }
208
+ ]
209
+ }
210
+ }
211
+ },
212
+ {
213
+ "id": "uuid-2",
214
+ "name": "Get Stripe Payments",
215
+ "type": "n8n-nodes-base.stripe",
216
+ "typeVersion": 1,
217
+ "position": [200,0],
218
+ "parameters": {
219
+ "resource": "charge",
220
+ "operation": "getAll"
221
+ },
222
+ "credentials": {
223
+ "stripeApi": {
224
+ "id": "{{CREDENTIAL_ID}}",
225
+ "name": "Stripe Account"
226
+ }
227
+ }
228
+ },
229
+ {
230
+ "id": "uuid-3",
231
+ "name": "Send via Gmail",
232
+ "type": "n8n-nodes-base.gmail",
233
+ "typeVersion": 2,
234
+ "position": [400,0],
235
+ "parameters": {
236
+ "operation": "send",
237
+ "message": {
238
+ "to": "user@example.com",
239
+ "subject": "Daily Stripe Summary",
240
+ "body": "{{ $json.data }}"
241
+ }
242
+ },
243
+ "credentials": {
244
+ "gmailOAuth2Api": {
245
+ "id": "{{CREDENTIAL_ID}}",
246
+ "name": "Gmail Account"
247
+ }
248
+ }
249
+ }
250
+ ],
251
+ "connections": {
252
+ "Schedule Trigger": { "main": [ [ { "node": "Get Stripe Payments", "type": "main", "index": 0 } ] ] },
253
+ "Get Stripe Payments": { "main": [ [ { "node": "Send via Gmail", "type": "main", "index": 0 } ] ] }
254
+ }
255
+ }
256
+ \`\`\`
257
+
258
+ ---
259
+
260
+ ## **Summary Table: Key n8n Workflow Concepts**
261
+
262
+ | Concept | Description/Key Fields |
263
+ |:----------------|:----------------------------------------------------------|
264
+ | Workflow | id, name, active, nodes, connections, settings |
265
+ | Node | id, name, type, typeVersion, position, parameters, credentials, disabled |
266
+ | Connections | Map of node names to output connection arrays |
267
+ | Node Parameters | name, displayName, type, default, options, required, description |
268
+ | Node Type | name, displayName, group, description, version, inputs, outputs, properties, credentials |
269
+ | Credentials | Referenced in node, injected automatically by ID |
270
+ | Settings | Workflow-level options |
271
+
272
+ ---
273
+
274
+ **Use only these fields and structures for AI workflow generation.**
275
+ For parameter validation and types, rely on the node's type definition and basic TypeScript types.
276
+
277
+ ---
278
+
279
+ ## **Handling Incomplete or Ambiguous Prompts**
280
+
281
+ When the user prompt lacks specific details:
282
+
283
+ 1. **Make reasonable assumptions** based on common use cases
284
+ 2. **Use sensible defaults**:
285
+ - Email service: Prefer Gmail over generic SMTP
286
+ - Schedule: Default to daily at 9 AM if frequency not specified
287
+ - Error handling: Include basic error notifications
288
+ - Data format: Use JSON for structured data
289
+
290
+ 3. **Document your assumptions** in a special \`_meta\` field:
291
+
292
+ \`\`\`json
293
+ {
294
+ "name": "Workflow Name",
295
+ "nodes": [...],
296
+ "connections": {...},
297
+ "_meta": {
298
+ "assumptions": [
299
+ "Using Gmail as email service (not specified)",
300
+ "Running daily at 9 AM (frequency not specified)",
301
+ "Sending to primary email address (recipient not specified)"
302
+ ],
303
+ "suggestions": [
304
+ "Consider adding error notification to Slack",
305
+ "You may want to filter payments by status",
306
+ "Add a condition node to check if data is empty"
307
+ ],
308
+ "requiresClarification": [
309
+ "Which email address should receive the summary?",
310
+ "Should failed payments be included?"
311
+ ]
312
+ }
313
+ }
314
+ \`\`\`
315
+
316
+ 4. **If critically ambiguous** (multiple valid interpretations):
317
+ - Set \`_meta.requiresClarification\` with specific questions
318
+ - Still generate a valid workflow with best-guess defaults
319
+ - The user can approve or request modifications
320
+
321
+ **Example ambiguous prompt**: "Send me payment info"
322
+ - Assumption: Stripe payments (most common)
323
+ - Assumption: Email via Gmail
324
+ - Clarification needed: "Which email address?" / "All payments or just successful ones?"
325
+
326
+ ---
327
+
328
+ **IMPORTANT**: Always generate a complete, valid workflow even if assumptions are made. Never leave placeholders or incomplete nodes.
329
+ `;
330
+ //# sourceMappingURL=workflowGeneration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowGeneration.js","sourceRoot":"","sources":["../../src/prompts/workflowGeneration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmUhD,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * System prompt for workflow matching
3
+ *
4
+ * Used by the LLM to semantically match user requests to available workflows
5
+ */
6
+ export declare const WORKFLOW_MATCHING_SYSTEM_PROMPT = "You are a workflow matching assistant. Your job is to analyze a user's request and match it to the most appropriate n8n workflow from their available workflows.\n\nConsider:\n- Keywords and phrases in the workflow name that match the request\n- The semantic meaning and intent of the user's request\n- Context clues about what the workflow might do\n\nRules:\n- Only return \"high\" confidence if the match is obvious and unambiguous\n- Return \"medium\" if there's a likely match but some ambiguity\n- Return \"low\" if there's a weak connection\n- Return \"none\" if no workflow matches the request\n- If multiple workflows match equally well, include all in matches array and set lower confidence\n\nReturn a JSON object with:\n- matchedWorkflowId: string | null - The best matching workflow ID, or null if no good match\n- confidence: \"high\" | \"medium\" | \"low\" | \"none\" - How confident you are in the match\n- matches: Array of {id, name, score} - All potential matches with scores (0-100)\n- reason: string - Brief explanation of your decision";
7
+ //# sourceMappingURL=workflowMatching.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowMatching.d.ts","sourceRoot":"","sources":["../../src/prompts/workflowMatching.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,qiCAkBU,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * System prompt for workflow matching
3
+ *
4
+ * Used by the LLM to semantically match user requests to available workflows
5
+ */
6
+ export const WORKFLOW_MATCHING_SYSTEM_PROMPT = `You are a workflow matching assistant. Your job is to analyze a user's request and match it to the most appropriate n8n workflow from their available workflows.
7
+
8
+ Consider:
9
+ - Keywords and phrases in the workflow name that match the request
10
+ - The semantic meaning and intent of the user's request
11
+ - Context clues about what the workflow might do
12
+
13
+ Rules:
14
+ - Only return "high" confidence if the match is obvious and unambiguous
15
+ - Return "medium" if there's a likely match but some ambiguity
16
+ - Return "low" if there's a weak connection
17
+ - Return "none" if no workflow matches the request
18
+ - If multiple workflows match equally well, include all in matches array and set lower confidence
19
+
20
+ Return a JSON object with:
21
+ - matchedWorkflowId: string | null - The best matching workflow ID, or null if no good match
22
+ - confidence: "high" | "medium" | "low" | "none" - How confident you are in the match
23
+ - matches: Array of {id, name, score} - All potential matches with scores (0-100)
24
+ - reason: string - Brief explanation of your decision`;
25
+ //# sourceMappingURL=workflowMatching.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowMatching.js","sourceRoot":"","sources":["../../src/prompts/workflowMatching.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;;;sDAkBO,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type Provider } from '@elizaos/core';
2
+ /**
3
+ * Provider that enriches state with user's active workflows
4
+ *
5
+ * This provider runs for every message and adds workflow information to the state,
6
+ * allowing the LLM to automatically extract workflow IDs and references from context.
7
+ *
8
+ * Example: User says "run my Stripe workflow" → LLM can see all workflows and extract the right ID
9
+ */
10
+ export declare const activeWorkflowsProvider: Provider;
11
+ export default activeWorkflowsProvider;
12
+ //# sourceMappingURL=activeWorkflows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activeWorkflows.d.ts","sourceRoot":"","sources":["../../src/providers/activeWorkflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,QAAQ,EAAc,MAAM,eAAe,CAAC;AAGnG;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAiErC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}