@octo-cyber/ai 0.5.6 → 0.5.7

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 (175) hide show
  1. package/dist/BranchDecisionEngine.d.ts +73 -0
  2. package/dist/BranchDecisionEngine.d.ts.map +1 -0
  3. package/dist/BranchDecisionEngine.js +195 -0
  4. package/dist/BranchDecisionEngine.js.map +1 -0
  5. package/dist/agent/coding-tools.d.ts +7 -0
  6. package/dist/agent/coding-tools.d.ts.map +1 -0
  7. package/dist/agent/coding-tools.js +181 -0
  8. package/dist/agent/coding-tools.js.map +1 -0
  9. package/dist/ai.module.d.ts +16 -0
  10. package/dist/ai.module.d.ts.map +1 -0
  11. package/dist/ai.module.js +106 -0
  12. package/dist/ai.module.js.map +1 -0
  13. package/dist/cli/adapters/antigravity.adapter.d.ts +31 -0
  14. package/dist/cli/adapters/antigravity.adapter.d.ts.map +1 -0
  15. package/dist/cli/adapters/antigravity.adapter.js +248 -0
  16. package/dist/cli/adapters/antigravity.adapter.js.map +1 -0
  17. package/dist/cli/adapters/claude-cli.adapter.d.ts +23 -0
  18. package/dist/cli/adapters/claude-cli.adapter.d.ts.map +1 -0
  19. package/dist/cli/adapters/claude-cli.adapter.js +81 -0
  20. package/dist/cli/adapters/claude-cli.adapter.js.map +1 -0
  21. package/dist/cli/adapters/cli-proxy-api.adapter.d.ts +32 -0
  22. package/dist/cli/adapters/cli-proxy-api.adapter.d.ts.map +1 -0
  23. package/dist/cli/adapters/cli-proxy-api.adapter.js +239 -0
  24. package/dist/cli/adapters/cli-proxy-api.adapter.js.map +1 -0
  25. package/dist/cli/adapters/codex-cli.adapter.d.ts +22 -0
  26. package/dist/cli/adapters/codex-cli.adapter.d.ts.map +1 -0
  27. package/dist/cli/adapters/codex-cli.adapter.js +76 -0
  28. package/dist/cli/adapters/codex-cli.adapter.js.map +1 -0
  29. package/dist/cli/adapters/detect-cli.d.ts +11 -0
  30. package/dist/cli/adapters/detect-cli.d.ts.map +1 -0
  31. package/dist/cli/adapters/detect-cli.js +40 -0
  32. package/dist/cli/adapters/detect-cli.js.map +1 -0
  33. package/dist/cli/adapters/gemini-cli.adapter.d.ts +21 -0
  34. package/dist/cli/adapters/gemini-cli.adapter.d.ts.map +1 -0
  35. package/dist/cli/adapters/gemini-cli.adapter.js +72 -0
  36. package/dist/cli/adapters/gemini-cli.adapter.js.map +1 -0
  37. package/dist/cli/adapters/index.d.ts +4 -0
  38. package/dist/cli/adapters/index.d.ts.map +1 -0
  39. package/dist/cli/adapters/index.js +10 -0
  40. package/dist/cli/adapters/index.js.map +1 -0
  41. package/dist/cli/cli-executor.service.d.ts +25 -0
  42. package/dist/cli/cli-executor.service.d.ts.map +1 -0
  43. package/dist/cli/cli-executor.service.js +170 -0
  44. package/dist/cli/cli-executor.service.js.map +1 -0
  45. package/dist/cli/cli-registry.service.d.ts +38 -0
  46. package/dist/cli/cli-registry.service.d.ts.map +1 -0
  47. package/dist/cli/cli-registry.service.js +114 -0
  48. package/dist/cli/cli-registry.service.js.map +1 -0
  49. package/dist/cli/controllers/ai-cli.controller.d.ts +40 -0
  50. package/dist/cli/controllers/ai-cli.controller.d.ts.map +1 -0
  51. package/dist/cli/controllers/ai-cli.controller.js +208 -0
  52. package/dist/cli/controllers/ai-cli.controller.js.map +1 -0
  53. package/dist/cli/index.d.ts +8 -0
  54. package/dist/cli/index.d.ts.map +1 -0
  55. package/dist/cli/index.js +17 -0
  56. package/dist/cli/index.js.map +1 -0
  57. package/dist/cli/types.d.ts +153 -0
  58. package/dist/cli/types.d.ts.map +1 -0
  59. package/dist/cli/types.js +9 -0
  60. package/dist/cli/types.js.map +1 -0
  61. package/dist/cli/workspace.service.d.ts +42 -0
  62. package/dist/cli/workspace.service.d.ts.map +1 -0
  63. package/dist/cli/workspace.service.js +249 -0
  64. package/dist/cli/workspace.service.js.map +1 -0
  65. package/dist/index.d.ts +10 -0
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/index.js +44 -0
  68. package/dist/index.js.map +1 -0
  69. package/dist/session/claude-code-session-manager.service.d.ts +28 -0
  70. package/dist/session/claude-code-session-manager.service.d.ts.map +1 -0
  71. package/dist/session/claude-code-session-manager.service.js +177 -0
  72. package/dist/session/claude-code-session-manager.service.js.map +1 -0
  73. package/dist/skill/controllers/skill-market.controller.d.ts +18 -0
  74. package/dist/skill/controllers/skill-market.controller.d.ts.map +1 -0
  75. package/dist/skill/controllers/skill-market.controller.js +128 -0
  76. package/dist/skill/controllers/skill-market.controller.js.map +1 -0
  77. package/dist/skill/controllers/skill.controller.d.ts +37 -0
  78. package/dist/skill/controllers/skill.controller.d.ts.map +1 -0
  79. package/dist/skill/controllers/skill.controller.js +295 -0
  80. package/dist/skill/controllers/skill.controller.js.map +1 -0
  81. package/dist/skill/entities/octo-skill.entity.d.ts +22 -0
  82. package/dist/skill/entities/octo-skill.entity.d.ts.map +1 -0
  83. package/dist/skill/entities/octo-skill.entity.js +91 -0
  84. package/dist/skill/entities/octo-skill.entity.js.map +1 -0
  85. package/dist/skill/index.d.ts +9 -0
  86. package/dist/skill/index.d.ts.map +1 -0
  87. package/dist/skill/index.js +21 -0
  88. package/dist/skill/index.js.map +1 -0
  89. package/dist/skill/services/skill-generator.service.d.ts +47 -0
  90. package/dist/skill/services/skill-generator.service.d.ts.map +1 -0
  91. package/dist/skill/services/skill-generator.service.js +232 -0
  92. package/dist/skill/services/skill-generator.service.js.map +1 -0
  93. package/dist/skill/services/skill-installer.service.d.ts +65 -0
  94. package/dist/skill/services/skill-installer.service.d.ts.map +1 -0
  95. package/dist/skill/services/skill-installer.service.js +258 -0
  96. package/dist/skill/services/skill-installer.service.js.map +1 -0
  97. package/dist/skill/services/skill-market.service.d.ts +60 -0
  98. package/dist/skill/services/skill-market.service.d.ts.map +1 -0
  99. package/dist/skill/services/skill-market.service.js +244 -0
  100. package/dist/skill/services/skill-market.service.js.map +1 -0
  101. package/dist/skill/services/skill-registry.service.d.ts +61 -0
  102. package/dist/skill/services/skill-registry.service.d.ts.map +1 -0
  103. package/dist/skill/services/skill-registry.service.js +159 -0
  104. package/dist/skill/services/skill-registry.service.js.map +1 -0
  105. package/dist/skill/types.d.ts +76 -0
  106. package/dist/skill/types.d.ts.map +1 -0
  107. package/dist/skill/types.js +6 -0
  108. package/dist/skill/types.js.map +1 -0
  109. package/dist/src/agent/agent-run-persistence.service.d.ts +82 -0
  110. package/dist/src/agent/agent-run-persistence.service.d.ts.map +1 -0
  111. package/dist/src/agent/agent-run-persistence.service.js +171 -0
  112. package/dist/src/agent/agent-run-persistence.service.js.map +1 -0
  113. package/dist/src/agent/agent-run-step.entity.d.ts +23 -0
  114. package/dist/src/agent/agent-run-step.entity.d.ts.map +1 -0
  115. package/dist/src/agent/agent-run-step.entity.js +76 -0
  116. package/dist/src/agent/agent-run-step.entity.js.map +1 -0
  117. package/dist/src/skill/services/skill-market-utils.d.ts +25 -0
  118. package/dist/src/skill/services/skill-market-utils.d.ts.map +1 -0
  119. package/dist/src/skill/services/skill-market-utils.js +22 -0
  120. package/dist/src/skill/services/skill-market-utils.js.map +1 -0
  121. package/dist/src/workflow-design/WorkflowAssembler.d.ts +10 -0
  122. package/dist/src/workflow-design/WorkflowAssembler.d.ts.map +1 -0
  123. package/dist/src/workflow-design/WorkflowAssembler.js +81 -0
  124. package/dist/src/workflow-design/WorkflowAssembler.js.map +1 -0
  125. package/dist/src/workflow-design/n8n-node-templates-data.d.ts +4 -0
  126. package/dist/src/workflow-design/n8n-node-templates-data.d.ts.map +1 -0
  127. package/dist/src/workflow-design/n8n-node-templates-data.js +290 -0
  128. package/dist/src/workflow-design/n8n-node-templates-data.js.map +1 -0
  129. package/dist/workflow-design/DocumentExtractorAgent.d.ts +47 -0
  130. package/dist/workflow-design/DocumentExtractorAgent.d.ts.map +1 -0
  131. package/dist/workflow-design/DocumentExtractorAgent.js +118 -0
  132. package/dist/workflow-design/DocumentExtractorAgent.js.map +1 -0
  133. package/dist/workflow-design/N8nNodeKnowledgeBase.d.ts +26 -0
  134. package/dist/workflow-design/N8nNodeKnowledgeBase.d.ts.map +1 -0
  135. package/dist/workflow-design/N8nNodeKnowledgeBase.js +320 -0
  136. package/dist/workflow-design/N8nNodeKnowledgeBase.js.map +1 -0
  137. package/dist/workflow-design/OctoAgentClient.d.ts +42 -0
  138. package/dist/workflow-design/OctoAgentClient.d.ts.map +1 -0
  139. package/dist/workflow-design/OctoAgentClient.js +166 -0
  140. package/dist/workflow-design/OctoAgentClient.js.map +1 -0
  141. package/dist/workflow-design/WorkflowDesignOrchestrator.d.ts +45 -0
  142. package/dist/workflow-design/WorkflowDesignOrchestrator.d.ts.map +1 -0
  143. package/dist/workflow-design/WorkflowDesignOrchestrator.js +265 -0
  144. package/dist/workflow-design/WorkflowDesignOrchestrator.js.map +1 -0
  145. package/dist/workflow-design/agents/ActionChainAgent.d.ts +9 -0
  146. package/dist/workflow-design/agents/ActionChainAgent.d.ts.map +1 -0
  147. package/dist/workflow-design/agents/ActionChainAgent.js +79 -0
  148. package/dist/workflow-design/agents/ActionChainAgent.js.map +1 -0
  149. package/dist/workflow-design/agents/CodeScriptAgent.d.ts +15 -0
  150. package/dist/workflow-design/agents/CodeScriptAgent.d.ts.map +1 -0
  151. package/dist/workflow-design/agents/CodeScriptAgent.js +96 -0
  152. package/dist/workflow-design/agents/CodeScriptAgent.js.map +1 -0
  153. package/dist/workflow-design/agents/LogicFlowAgent.d.ts +9 -0
  154. package/dist/workflow-design/agents/LogicFlowAgent.d.ts.map +1 -0
  155. package/dist/workflow-design/agents/LogicFlowAgent.js +78 -0
  156. package/dist/workflow-design/agents/LogicFlowAgent.js.map +1 -0
  157. package/dist/workflow-design/agents/TriggerAnalystAgent.d.ts +9 -0
  158. package/dist/workflow-design/agents/TriggerAnalystAgent.d.ts.map +1 -0
  159. package/dist/workflow-design/agents/TriggerAnalystAgent.js +65 -0
  160. package/dist/workflow-design/agents/TriggerAnalystAgent.js.map +1 -0
  161. package/dist/workflow-design/agents/WorkflowValidatorAgent.d.ts +9 -0
  162. package/dist/workflow-design/agents/WorkflowValidatorAgent.d.ts.map +1 -0
  163. package/dist/workflow-design/agents/WorkflowValidatorAgent.js +117 -0
  164. package/dist/workflow-design/agents/WorkflowValidatorAgent.js.map +1 -0
  165. package/dist/workflow-design/index.d.ts +12 -0
  166. package/dist/workflow-design/index.d.ts.map +1 -0
  167. package/dist/workflow-design/index.js +23 -0
  168. package/dist/workflow-design/index.js.map +1 -0
  169. package/dist/workflow-design/types.d.ts +155 -0
  170. package/dist/workflow-design/types.d.ts.map +1 -0
  171. package/dist/workflow-design/types.js +6 -0
  172. package/dist/workflow-design/types.js.map +1 -0
  173. package/package.json +2 -1
  174. package/web/dist/module.iife.js +254 -0
  175. package/web/dynamic-entry.tsx +94 -0
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TriggerAnalystAgent = void 0;
4
+ const OctoAgentClient_js_1 = require("../OctoAgentClient.js");
5
+ const N8nNodeKnowledgeBase_js_1 = require("../N8nNodeKnowledgeBase.js");
6
+ // ============================================================
7
+ // TriggerAnalystAgent
8
+ // Analyses user intent and selects the appropriate n8n trigger node.
9
+ // ============================================================
10
+ const SYSTEM_PROMPT_BASE = `You are an n8n workflow trigger specialist.
11
+ Your only job is to identify the correct trigger node for a workflow based on the user's description.
12
+
13
+ Rules:
14
+ - Respond with ONLY a JSON object — no extra text, no markdown explanation outside the JSON fence.
15
+ - The JSON must match this shape exactly:
16
+ {
17
+ "spec": {
18
+ "type": "<n8n node type string>",
19
+ "name": "<short display name>",
20
+ "parameters": { <relevant params> },
21
+ "position": { "x": 240, "y": 300 }
22
+ },
23
+ "reasoning": "<one sentence why this trigger>"
24
+ }
25
+ - Use "x": 240, "y": 300 as the default position for all trigger nodes.
26
+ - Choose the most specific trigger available; fall back to Manual Trigger only if truly unclear.
27
+ - For cron/schedule triggers include a "rule" or "cronExpression" parameter with a sensible default.
28
+ - For Webhook triggers include "httpMethod" (GET or POST) and a "path" parameter.
29
+ `;
30
+ class TriggerAnalystAgent {
31
+ client;
32
+ constructor(client) {
33
+ this.client = client;
34
+ }
35
+ async analyse(intent, history) {
36
+ const system = [
37
+ { type: 'text', text: SYSTEM_PROMPT_BASE },
38
+ N8nNodeKnowledgeBase_js_1.N8nNodeKnowledgeBase.buildCachedBlock(['trigger']),
39
+ ];
40
+ const messages = [
41
+ ...history,
42
+ {
43
+ role: 'user',
44
+ content: `Analyse the following workflow requirement and return the trigger node specification:\n\n${intent}`,
45
+ },
46
+ ];
47
+ const reply = await this.client.singleCall(messages, system);
48
+ const result = OctoAgentClient_js_1.OctoAgentClient.parseJsonFromReply(reply);
49
+ return this.validateAndNormalise(result);
50
+ }
51
+ validateAndNormalise(result) {
52
+ if (!result.spec?.type) {
53
+ throw new Error('TriggerAnalystAgent: missing spec.type in response');
54
+ }
55
+ const spec = {
56
+ type: result.spec.type,
57
+ name: result.spec.name || 'Trigger',
58
+ parameters: result.spec.parameters ?? {},
59
+ position: result.spec.position ?? { x: 240, y: 300 },
60
+ };
61
+ return { spec, reasoning: result.reasoning ?? '' };
62
+ }
63
+ }
64
+ exports.TriggerAnalystAgent = TriggerAnalystAgent;
65
+ //# sourceMappingURL=TriggerAnalystAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriggerAnalystAgent.js","sourceRoot":"","sources":["../../../src/workflow-design/agents/TriggerAnalystAgent.ts"],"names":[],"mappings":";;;AAAA,8DAAwD;AACxD,wEAAkE;AAGlE,+DAA+D;AAC/D,sBAAsB;AACtB,qEAAqE;AACrE,+DAA+D;AAE/D,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;CAmB1B,CAAC;AAEF,MAAa,mBAAmB;IACD;IAA7B,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;IAAG,CAAC;IAExD,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,OAAkB;QAC9C,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE;YACnD,8CAAoB,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC;SACnD,CAAC;QAEF,MAAM,QAAQ,GAAc;YAC1B,GAAG,OAAO;YACV;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,4FAA4F,MAAM,EAAE;aAC9G;SACF,CAAC;QAEF,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,oCAAe,CAAC,kBAAkB,CAAwB,KAAK,CAAC,CAAC;QAEhF,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEO,oBAAoB,CAAC,MAA6B;QACxD,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QAED,MAAM,IAAI,GAAoB;YAC5B,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI;YACtB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,SAAS;YACnC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE;YACxC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;SACrD,CAAC;QAEF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE,EAAE,CAAC;IACrD,CAAC;CACF;AArCD,kDAqCC"}
@@ -0,0 +1,9 @@
1
+ import { OctoAgentClient } from '../OctoAgentClient.js';
2
+ import type { Message, N8nWorkflow, ValidationResult } from '../types.js';
3
+ export declare class WorkflowValidatorAgent {
4
+ private readonly client;
5
+ constructor(client: OctoAgentClient);
6
+ validate(workflow: N8nWorkflow, history: Message[]): Promise<ValidationResult>;
7
+ private runLocalChecks;
8
+ }
9
+ //# sourceMappingURL=WorkflowValidatorAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkflowValidatorAgent.d.ts","sourceRoot":"","sources":["../../../src/workflow-design/agents/WorkflowValidatorAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA4B1E,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,eAAe;IAE9C,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8BpF,OAAO,CAAC,cAAc;CA+DvB"}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowValidatorAgent = void 0;
4
+ const OctoAgentClient_js_1 = require("../OctoAgentClient.js");
5
+ // ============================================================
6
+ // WorkflowValidatorAgent
7
+ // Validates the assembled n8n workflow JSON for structural correctness.
8
+ // Phase 5 — runs after Orchestrator assembles the final JSON.
9
+ // ============================================================
10
+ const SYSTEM_PROMPT = `You are an n8n workflow JSON validator.
11
+ You will receive a complete n8n workflow JSON object and must validate it.
12
+
13
+ Check for these issues:
14
+ 1. Every node referenced in "connections" must exist in "nodes" (by name).
15
+ 2. Every source node in connections must exist in "nodes".
16
+ 3. All nodes must have a non-empty "type" field in the correct format (e.g. "n8n-nodes-base.xxx" or "@n8n/n8n-nodes-langchain.xxx").
17
+ 4. All nodes must have a non-empty "name" field.
18
+ 5. All nodes must have a valid "position" array of two numbers.
19
+ 6. The workflow must have exactly one trigger node (a node whose type ends with "Trigger" or "Webhook" or is "n8n-nodes-base.manualTrigger").
20
+ 7. No duplicate node names.
21
+
22
+ Respond with ONLY a JSON object inside a markdown json fence:
23
+ {
24
+ "valid": <true|false>,
25
+ "errors": ["<error message>", ...]
26
+ }
27
+ If valid, "errors" should be an empty array.
28
+ `;
29
+ class WorkflowValidatorAgent {
30
+ client;
31
+ constructor(client) {
32
+ this.client = client;
33
+ }
34
+ async validate(workflow, history) {
35
+ // Run structural checks locally first (fast, no LLM call needed for obvious errors)
36
+ const localErrors = this.runLocalChecks(workflow);
37
+ // Also ask the LLM for a higher-level semantic check
38
+ const workflowJson = JSON.stringify(workflow, null, 2);
39
+ const messages = [
40
+ ...history,
41
+ {
42
+ role: 'user',
43
+ content: `Validate this n8n workflow JSON:\n\`\`\`json\n${workflowJson}\n\`\`\``,
44
+ },
45
+ ];
46
+ let llmErrors = [];
47
+ try {
48
+ // Cache the validator system prompt — it's large and identical across all validation calls
49
+ const reply = await this.client.singleCall(messages, [{ type: 'text', text: SYSTEM_PROMPT, cache_control: { type: 'ephemeral' } }]);
50
+ const result = OctoAgentClient_js_1.OctoAgentClient.parseJsonFromReply(reply);
51
+ llmErrors = Array.isArray(result.errors) ? result.errors : [];
52
+ }
53
+ catch {
54
+ // If LLM validation fails, fall back to local checks only
55
+ llmErrors = [];
56
+ }
57
+ const allErrors = [...new Set([...localErrors, ...llmErrors])];
58
+ return { valid: allErrors.length === 0, errors: allErrors };
59
+ }
60
+ runLocalChecks(workflow) {
61
+ const errors = [];
62
+ const nodeNames = new Set(workflow.nodes.map((n) => n.name));
63
+ const seenNames = new Set();
64
+ // Check duplicate names
65
+ for (const node of workflow.nodes) {
66
+ if (!node.name) {
67
+ errors.push(`Node with type "${node.type}" is missing a name.`);
68
+ continue;
69
+ }
70
+ if (seenNames.has(node.name)) {
71
+ errors.push(`Duplicate node name: "${node.name}".`);
72
+ }
73
+ seenNames.add(node.name);
74
+ }
75
+ // Check node type format
76
+ for (const node of workflow.nodes) {
77
+ if (!node.type) {
78
+ errors.push(`Node "${node.name}" has no type.`);
79
+ }
80
+ }
81
+ // Check connections reference valid nodes
82
+ for (const [sourceName, outputMap] of Object.entries(workflow.connections)) {
83
+ if (!nodeNames.has(sourceName)) {
84
+ errors.push(`Connection source node "${sourceName}" does not exist in nodes array.`);
85
+ }
86
+ for (const outputConnections of Object.values(outputMap)) {
87
+ for (const connGroup of outputConnections) {
88
+ for (const conn of connGroup) {
89
+ if (!nodeNames.has(conn.node)) {
90
+ errors.push(`Connection target node "${conn.node}" does not exist in nodes array.`);
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ // Check node type format (must match n8n-nodes-base.xxx or @scope/pkg.xxx)
97
+ const validTypePattern = /^(@[^/]+\/[^.]+\.[a-zA-Z]|[a-zA-Z0-9-]+\.[a-zA-Z])/;
98
+ for (const node of workflow.nodes) {
99
+ if (node.type && !validTypePattern.test(node.type)) {
100
+ errors.push(`Node "${node.name}" has invalid type format: "${node.type}". Expected format: "n8n-nodes-base.xxx" or "@scope/pkg.xxx".`);
101
+ }
102
+ }
103
+ // Check exactly one trigger node (not zero, not multiple)
104
+ const triggerNodes = workflow.nodes.filter((n) => n.type.toLowerCase().includes('trigger') ||
105
+ n.type === 'n8n-nodes-base.webhook');
106
+ if (triggerNodes.length === 0) {
107
+ errors.push('Workflow has no trigger node.');
108
+ }
109
+ else if (triggerNodes.length > 1) {
110
+ const names = triggerNodes.map((n) => `"${n.name}"`).join(', ');
111
+ errors.push(`Workflow has multiple trigger nodes: ${names}. Only one trigger is allowed.`);
112
+ }
113
+ return errors;
114
+ }
115
+ }
116
+ exports.WorkflowValidatorAgent = WorkflowValidatorAgent;
117
+ //# sourceMappingURL=WorkflowValidatorAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkflowValidatorAgent.js","sourceRoot":"","sources":["../../../src/workflow-design/agents/WorkflowValidatorAgent.ts"],"names":[],"mappings":";;;AAAA,8DAAwD;AAGxD,+DAA+D;AAC/D,yBAAyB;AACzB,wEAAwE;AACxE,8DAA8D;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AM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChE,MAAM,CAAC,IAAI,CAAC,wCAAwC,KAAK,gCAAgC,CAAC,CAAC;QAC7F,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAhGD,wDAgGC"}
@@ -0,0 +1,12 @@
1
+ export { OctoAgentClient } from './OctoAgentClient.js';
2
+ export { N8nNodeKnowledgeBase } from './N8nNodeKnowledgeBase.js';
3
+ export { WorkflowDesignOrchestrator } from './WorkflowDesignOrchestrator.js';
4
+ export { DocumentExtractorAgent } from './DocumentExtractorAgent.js';
5
+ export { TriggerAnalystAgent } from './agents/TriggerAnalystAgent.js';
6
+ export { ActionChainAgent } from './agents/ActionChainAgent.js';
7
+ export { LogicFlowAgent } from './agents/LogicFlowAgent.js';
8
+ export { CodeScriptAgent } from './agents/CodeScriptAgent.js';
9
+ export { WorkflowValidatorAgent } from './agents/WorkflowValidatorAgent.js';
10
+ export type { InvoiceData, InvoiceLineItem, ContractData, ContractParty, } from './DocumentExtractorAgent.js';
11
+ export type { Message, Tool, NodePosition, TriggerNodeSpec, ActionNodeSpec, LogicNodeSpec, N8nNode, N8nWorkflow, WorkflowDraft, ValidationResult, ModificationScope, ParsedModificationIntent, TriggerAnalysisResult, ActionChainResult, LogicFlowResult, CodeScriptResult, NodeCategory, NodeTemplate, ToolDefinition, AgentRunOptions, } from './types.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workflow-design/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAG5E,YAAY,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,aAAa,GACd,MAAM,6BAA6B,CAAC;AAErC,YAAY,EACV,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,aAAa,EACb,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,eAAe,GAChB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowValidatorAgent = exports.CodeScriptAgent = exports.LogicFlowAgent = exports.ActionChainAgent = exports.TriggerAnalystAgent = exports.DocumentExtractorAgent = exports.WorkflowDesignOrchestrator = exports.N8nNodeKnowledgeBase = exports.OctoAgentClient = void 0;
4
+ var OctoAgentClient_js_1 = require("./OctoAgentClient.js");
5
+ Object.defineProperty(exports, "OctoAgentClient", { enumerable: true, get: function () { return OctoAgentClient_js_1.OctoAgentClient; } });
6
+ var N8nNodeKnowledgeBase_js_1 = require("./N8nNodeKnowledgeBase.js");
7
+ Object.defineProperty(exports, "N8nNodeKnowledgeBase", { enumerable: true, get: function () { return N8nNodeKnowledgeBase_js_1.N8nNodeKnowledgeBase; } });
8
+ var WorkflowDesignOrchestrator_js_1 = require("./WorkflowDesignOrchestrator.js");
9
+ Object.defineProperty(exports, "WorkflowDesignOrchestrator", { enumerable: true, get: function () { return WorkflowDesignOrchestrator_js_1.WorkflowDesignOrchestrator; } });
10
+ var DocumentExtractorAgent_js_1 = require("./DocumentExtractorAgent.js");
11
+ Object.defineProperty(exports, "DocumentExtractorAgent", { enumerable: true, get: function () { return DocumentExtractorAgent_js_1.DocumentExtractorAgent; } });
12
+ // Sub-agents (exported for testing / custom composition)
13
+ var TriggerAnalystAgent_js_1 = require("./agents/TriggerAnalystAgent.js");
14
+ Object.defineProperty(exports, "TriggerAnalystAgent", { enumerable: true, get: function () { return TriggerAnalystAgent_js_1.TriggerAnalystAgent; } });
15
+ var ActionChainAgent_js_1 = require("./agents/ActionChainAgent.js");
16
+ Object.defineProperty(exports, "ActionChainAgent", { enumerable: true, get: function () { return ActionChainAgent_js_1.ActionChainAgent; } });
17
+ var LogicFlowAgent_js_1 = require("./agents/LogicFlowAgent.js");
18
+ Object.defineProperty(exports, "LogicFlowAgent", { enumerable: true, get: function () { return LogicFlowAgent_js_1.LogicFlowAgent; } });
19
+ var CodeScriptAgent_js_1 = require("./agents/CodeScriptAgent.js");
20
+ Object.defineProperty(exports, "CodeScriptAgent", { enumerable: true, get: function () { return CodeScriptAgent_js_1.CodeScriptAgent; } });
21
+ var WorkflowValidatorAgent_js_1 = require("./agents/WorkflowValidatorAgent.js");
22
+ Object.defineProperty(exports, "WorkflowValidatorAgent", { enumerable: true, get: function () { return WorkflowValidatorAgent_js_1.WorkflowValidatorAgent; } });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow-design/index.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AACxB,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA;AACnC,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAE/B,yDAAyD;AACzD,0EAAsE;AAA7D,6HAAA,mBAAmB,OAAA;AAC5B,oEAAgE;AAAvD,uHAAA,gBAAgB,OAAA;AACzB,gEAA4D;AAAnD,mHAAA,cAAc,OAAA;AACvB,kEAA8D;AAArD,qHAAA,eAAe,OAAA;AACxB,gFAA4E;AAAnE,mIAAA,sBAAsB,OAAA"}
@@ -0,0 +1,155 @@
1
+ export interface Message {
2
+ role: 'user' | 'assistant' | 'system';
3
+ content: string;
4
+ }
5
+ export interface Tool {
6
+ name: string;
7
+ description: string;
8
+ parameters: Record<string, unknown>;
9
+ }
10
+ export interface NodePosition {
11
+ x: number;
12
+ y: number;
13
+ }
14
+ export interface TriggerNodeSpec {
15
+ /** n8n node type string, e.g. 'n8n-nodes-base.scheduleTrigger' */
16
+ type: string;
17
+ /** Human-readable name shown in editor */
18
+ name: string;
19
+ parameters: Record<string, unknown>;
20
+ position: NodePosition;
21
+ }
22
+ export interface ActionNodeSpec {
23
+ type: string;
24
+ name: string;
25
+ parameters: Record<string, unknown>;
26
+ position: NodePosition;
27
+ /** id of the upstream node this action depends on */
28
+ dependsOn?: string;
29
+ /** marks this node as needing code generation */
30
+ needsCodeGen?: boolean;
31
+ /** description for CodeScriptAgent when needsCodeGen = true */
32
+ codeDescription?: string;
33
+ }
34
+ export interface LogicNodeSpec {
35
+ type: string;
36
+ name: string;
37
+ parameters: Record<string, unknown>;
38
+ position: NodePosition;
39
+ /** index in actionSpecs after which this logic node is inserted */
40
+ insertAfterIndex: number;
41
+ /** condition expression for IF/Switch nodes */
42
+ condition?: string;
43
+ }
44
+ export interface N8nNodeConnection {
45
+ node: string;
46
+ type: string;
47
+ index: number;
48
+ }
49
+ export interface N8nNode {
50
+ id: string;
51
+ name: string;
52
+ type: string;
53
+ typeVersion: number;
54
+ position: [number, number];
55
+ parameters: Record<string, unknown>;
56
+ }
57
+ export interface N8nWorkflow {
58
+ name: string;
59
+ nodes: N8nNode[];
60
+ connections: Record<string, {
61
+ main: Array<Array<{
62
+ node: string;
63
+ type: string;
64
+ index: number;
65
+ }>>;
66
+ }>;
67
+ active: boolean;
68
+ settings: Record<string, unknown>;
69
+ }
70
+ export interface WorkflowDraft {
71
+ intent: string;
72
+ conversationHistory: Message[];
73
+ triggerSpec?: TriggerNodeSpec;
74
+ actionSpecs?: ActionNodeSpec[];
75
+ logicSpecs?: LogicNodeSpec[];
76
+ /** nodeId → generated code snippet */
77
+ codeSpecs?: Record<string, string>;
78
+ validationErrors?: string[];
79
+ finalWorkflow?: N8nWorkflow;
80
+ }
81
+ export interface ValidationResult {
82
+ valid: boolean;
83
+ errors: string[];
84
+ }
85
+ export type ModificationScope = 'trigger' | 'actions' | 'logic' | 'code' | 'all';
86
+ export interface ParsedModificationIntent {
87
+ scope: ModificationScope;
88
+ description: string;
89
+ }
90
+ export interface TriggerAnalysisResult {
91
+ spec: TriggerNodeSpec;
92
+ reasoning: string;
93
+ }
94
+ export interface ActionChainResult {
95
+ specs: ActionNodeSpec[];
96
+ reasoning: string;
97
+ }
98
+ export interface LogicFlowResult {
99
+ specs: LogicNodeSpec[];
100
+ reasoning: string;
101
+ }
102
+ export interface CodeScriptResult {
103
+ /** nodeId → code */
104
+ codes: Record<string, string>;
105
+ }
106
+ /** A text content block marked for Anthropic prompt caching. */
107
+ export interface CachedTextBlock {
108
+ type: 'text';
109
+ text: string;
110
+ cache_control: {
111
+ type: 'ephemeral';
112
+ };
113
+ }
114
+ /** System content accepted by OctoAgentClient — plain string or cached blocks. */
115
+ export type SystemContent = string | Array<{
116
+ type: 'text';
117
+ text: string;
118
+ cache_control?: {
119
+ type: 'ephemeral';
120
+ };
121
+ }>;
122
+ export type NodeCategory = 'trigger' | 'http' | 'data' | 'control' | 'notification' | 'database' | 'file' | 'ai';
123
+ export interface NodeTemplate {
124
+ type: string;
125
+ displayName: string;
126
+ category: NodeCategory;
127
+ /** Core parameter names users usually configure */
128
+ coreParams: string[];
129
+ /** Short description for prompts */
130
+ description: string;
131
+ }
132
+ /**
133
+ * A tool that the agent can call during an agent loop.
134
+ * The `execute` function receives parsed JSON arguments and returns a string result.
135
+ */
136
+ export interface ToolDefinition {
137
+ name: string;
138
+ description: string;
139
+ /** JSON Schema for the tool's input parameters. */
140
+ parameters: Record<string, unknown>;
141
+ execute: (args: unknown) => Promise<string>;
142
+ }
143
+ /** Options for running a full agent loop with optional tool use. */
144
+ export interface AgentRunOptions {
145
+ systemPrompt: string;
146
+ userMessage: string;
147
+ tools?: ToolDefinition[];
148
+ /** Maximum number of LLM rounds (default 10). Prevents infinite loops. */
149
+ maxRounds?: number;
150
+ /** Timeout in ms for the entire run (default 300 000 ms = 5 min). */
151
+ timeoutMs?: number;
152
+ /** Called with each text chunk emitted by the assistant. */
153
+ onChunk?: (chunk: string) => void;
154
+ }
155
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/workflow-design/types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAMD,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;I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CACnC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // ============================================================
3
+ // Shared message types
4
+ // ============================================================
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/workflow-design/types.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,uBAAuB;AACvB,+DAA+D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octo-cyber/ai",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Octo AI module — Agent + Capability + SyncBridge + client registration",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -96,6 +96,7 @@
96
96
  "license": "MIT",
97
97
  "scripts": {
98
98
  "build": "tsc -p tsconfig.build.json",
99
+ "build:web": "vite build --config vite.config.ts",
99
100
  "dev": "tsc -p tsconfig.build.json --watch",
100
101
  "test": "vitest run",
101
102
  "typecheck": "tsc --noEmit"