@gravity-platform/flow 1.1.3

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 (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -0
  3. package/dist/ClientStorage/index.d.ts +2 -0
  4. package/dist/ClientStorage/index.d.ts.map +1 -0
  5. package/dist/ClientStorage/index.js +6 -0
  6. package/dist/ClientStorage/index.js.map +1 -0
  7. package/dist/ClientStorage/node/executor.d.ts +7 -0
  8. package/dist/ClientStorage/node/executor.d.ts.map +1 -0
  9. package/dist/ClientStorage/node/executor.js +32 -0
  10. package/dist/ClientStorage/node/executor.js.map +1 -0
  11. package/dist/ClientStorage/node/index.d.ts +10 -0
  12. package/dist/ClientStorage/node/index.d.ts.map +1 -0
  13. package/dist/ClientStorage/node/index.js +64 -0
  14. package/dist/ClientStorage/node/index.js.map +1 -0
  15. package/dist/ClientStorage/util/types.d.ts +12 -0
  16. package/dist/ClientStorage/util/types.d.ts.map +1 -0
  17. package/dist/ClientStorage/util/types.js +3 -0
  18. package/dist/ClientStorage/util/types.js.map +1 -0
  19. package/dist/Code/executor.d.ts +24 -0
  20. package/dist/Code/executor.d.ts.map +1 -0
  21. package/dist/Code/executor.js +70 -0
  22. package/dist/Code/executor.js.map +1 -0
  23. package/dist/Code/index.d.ts +14 -0
  24. package/dist/Code/index.d.ts.map +1 -0
  25. package/dist/Code/index.js +79 -0
  26. package/dist/Code/index.js.map +1 -0
  27. package/dist/Code/utils/hashUtils.d.ts +18 -0
  28. package/dist/Code/utils/hashUtils.d.ts.map +1 -0
  29. package/dist/Code/utils/hashUtils.js +40 -0
  30. package/dist/Code/utils/hashUtils.js.map +1 -0
  31. package/dist/Context/executor.d.ts +16 -0
  32. package/dist/Context/executor.d.ts.map +1 -0
  33. package/dist/Context/executor.js +47 -0
  34. package/dist/Context/executor.js.map +1 -0
  35. package/dist/Context/index.d.ts +14 -0
  36. package/dist/Context/index.d.ts.map +1 -0
  37. package/dist/Context/index.js +45 -0
  38. package/dist/Context/index.js.map +1 -0
  39. package/dist/FieldValidator/executor.d.ts +40 -0
  40. package/dist/FieldValidator/executor.d.ts.map +1 -0
  41. package/dist/FieldValidator/executor.js +152 -0
  42. package/dist/FieldValidator/executor.js.map +1 -0
  43. package/dist/FieldValidator/index.d.ts +18 -0
  44. package/dist/FieldValidator/index.d.ts.map +1 -0
  45. package/dist/FieldValidator/index.js +80 -0
  46. package/dist/FieldValidator/index.js.map +1 -0
  47. package/dist/FieldValidator/utils/types.d.ts +25 -0
  48. package/dist/FieldValidator/utils/types.d.ts.map +1 -0
  49. package/dist/FieldValidator/utils/types.js +7 -0
  50. package/dist/FieldValidator/utils/types.js.map +1 -0
  51. package/dist/IfElse/executor.d.ts +24 -0
  52. package/dist/IfElse/executor.d.ts.map +1 -0
  53. package/dist/IfElse/executor.js +54 -0
  54. package/dist/IfElse/executor.js.map +1 -0
  55. package/dist/IfElse/index.d.ts +14 -0
  56. package/dist/IfElse/index.d.ts.map +1 -0
  57. package/dist/IfElse/index.js +61 -0
  58. package/dist/IfElse/index.js.map +1 -0
  59. package/dist/Loop/executor.d.ts +45 -0
  60. package/dist/Loop/executor.d.ts.map +1 -0
  61. package/dist/Loop/executor.js +182 -0
  62. package/dist/Loop/executor.js.map +1 -0
  63. package/dist/Loop/index.d.ts +15 -0
  64. package/dist/Loop/index.d.ts.map +1 -0
  65. package/dist/Loop/index.js +92 -0
  66. package/dist/Loop/index.js.map +1 -0
  67. package/dist/Loop/utils/index.d.ts +5 -0
  68. package/dist/Loop/utils/index.d.ts.map +1 -0
  69. package/dist/Loop/utils/index.js +21 -0
  70. package/dist/Loop/utils/index.js.map +1 -0
  71. package/dist/Loop/utils/types.d.ts +24 -0
  72. package/dist/Loop/utils/types.d.ts.map +1 -0
  73. package/dist/Loop/utils/types.js +6 -0
  74. package/dist/Loop/utils/types.js.map +1 -0
  75. package/dist/MCP/node/executor.d.ts +14 -0
  76. package/dist/MCP/node/executor.d.ts.map +1 -0
  77. package/dist/MCP/node/executor.js +99 -0
  78. package/dist/MCP/node/executor.js.map +1 -0
  79. package/dist/MCP/node/index.d.ts +10 -0
  80. package/dist/MCP/node/index.d.ts.map +1 -0
  81. package/dist/MCP/node/index.js +73 -0
  82. package/dist/MCP/node/index.js.map +1 -0
  83. package/dist/MCP/util/types.d.ts +62 -0
  84. package/dist/MCP/util/types.d.ts.map +1 -0
  85. package/dist/MCP/util/types.js +6 -0
  86. package/dist/MCP/util/types.js.map +1 -0
  87. package/dist/Note/executor.d.ts +16 -0
  88. package/dist/Note/executor.d.ts.map +1 -0
  89. package/dist/Note/executor.js +20 -0
  90. package/dist/Note/executor.js.map +1 -0
  91. package/dist/Note/index.d.ts +14 -0
  92. package/dist/Note/index.d.ts.map +1 -0
  93. package/dist/Note/index.js +82 -0
  94. package/dist/Note/index.js.map +1 -0
  95. package/dist/Relay/executor.d.ts +15 -0
  96. package/dist/Relay/executor.d.ts.map +1 -0
  97. package/dist/Relay/executor.js +68 -0
  98. package/dist/Relay/executor.js.map +1 -0
  99. package/dist/Relay/index.d.ts +15 -0
  100. package/dist/Relay/index.d.ts.map +1 -0
  101. package/dist/Relay/index.js +58 -0
  102. package/dist/Relay/index.js.map +1 -0
  103. package/dist/SendObject/index.d.ts +2 -0
  104. package/dist/SendObject/index.d.ts.map +1 -0
  105. package/dist/SendObject/index.js +6 -0
  106. package/dist/SendObject/index.js.map +1 -0
  107. package/dist/SendObject/node/executor.d.ts +7 -0
  108. package/dist/SendObject/node/executor.d.ts.map +1 -0
  109. package/dist/SendObject/node/executor.js +57 -0
  110. package/dist/SendObject/node/executor.js.map +1 -0
  111. package/dist/SendObject/node/index.d.ts +10 -0
  112. package/dist/SendObject/node/index.d.ts.map +1 -0
  113. package/dist/SendObject/node/index.js +64 -0
  114. package/dist/SendObject/node/index.js.map +1 -0
  115. package/dist/SendObject/service/publishObject.d.ts +21 -0
  116. package/dist/SendObject/service/publishObject.d.ts.map +1 -0
  117. package/dist/SendObject/service/publishObject.js +55 -0
  118. package/dist/SendObject/service/publishObject.js.map +1 -0
  119. package/dist/SendObject/util/types.d.ts +11 -0
  120. package/dist/SendObject/util/types.d.ts.map +1 -0
  121. package/dist/SendObject/util/types.js +3 -0
  122. package/dist/SendObject/util/types.js.map +1 -0
  123. package/dist/Suggestions/executor.d.ts +36 -0
  124. package/dist/Suggestions/executor.d.ts.map +1 -0
  125. package/dist/Suggestions/executor.js +116 -0
  126. package/dist/Suggestions/executor.js.map +1 -0
  127. package/dist/Suggestions/index.d.ts +14 -0
  128. package/dist/Suggestions/index.d.ts.map +1 -0
  129. package/dist/Suggestions/index.js +75 -0
  130. package/dist/Suggestions/index.js.map +1 -0
  131. package/dist/UMAP/executor.d.ts +20 -0
  132. package/dist/UMAP/executor.d.ts.map +1 -0
  133. package/dist/UMAP/executor.js +103 -0
  134. package/dist/UMAP/executor.js.map +1 -0
  135. package/dist/UMAP/index.d.ts +14 -0
  136. package/dist/UMAP/index.d.ts.map +1 -0
  137. package/dist/UMAP/index.js +91 -0
  138. package/dist/UMAP/index.js.map +1 -0
  139. package/dist/index.d.ts +3 -0
  140. package/dist/index.d.ts.map +1 -0
  141. package/dist/index.js +75 -0
  142. package/dist/index.js.map +1 -0
  143. package/dist/shared/platform.d.ts +14 -0
  144. package/dist/shared/platform.d.ts.map +1 -0
  145. package/dist/shared/platform.js +24 -0
  146. package/dist/shared/platform.js.map +1 -0
  147. package/package.json +26 -0
@@ -0,0 +1,62 @@
1
+ /**
2
+ * MCP (Model Context Protocol) Service Node Types
3
+ */
4
+ /**
5
+ * JSON Schema for defining MCP service methods
6
+ */
7
+ export interface MCPMethodSchema {
8
+ input: {
9
+ type: string;
10
+ properties: Record<string, any>;
11
+ required?: string[];
12
+ };
13
+ output: {
14
+ type: string;
15
+ properties: Record<string, any>;
16
+ };
17
+ }
18
+ /**
19
+ * MCP Service Schema Configuration
20
+ */
21
+ export interface MCPServiceSchema {
22
+ name: string;
23
+ version: string;
24
+ description: string;
25
+ methods: Record<string, MCPMethodSchema>;
26
+ }
27
+ /**
28
+ * MCP Node Configuration
29
+ */
30
+ export interface MCPConfig {
31
+ serviceSchema: MCPServiceSchema;
32
+ methodName?: string;
33
+ methodParams?: Record<string, any>;
34
+ }
35
+ /**
36
+ * MCP Node Output
37
+ */
38
+ export interface MCPOutput {
39
+ request?: {
40
+ method: string;
41
+ params: Record<string, any>;
42
+ };
43
+ response?: any;
44
+ error?: string;
45
+ }
46
+ /**
47
+ * MCP Service Request
48
+ */
49
+ export interface MCPServiceRequest {
50
+ method: string;
51
+ params: Record<string, any>;
52
+ requestId: string;
53
+ }
54
+ /**
55
+ * MCP Service Response
56
+ */
57
+ export interface MCPServiceResponse {
58
+ result?: any;
59
+ error?: string;
60
+ requestId: string;
61
+ }
62
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/MCP/util/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACjC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,gBAAgB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC7B,CAAC;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * MCP (Model Context Protocol) Service Node 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/MCP/util/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Note Node Executor
3
+ * A simple pass-through node that serves as documentation
4
+ */
5
+ import { NodeExecutionContext } from "@gravity-platform/plugin-base";
6
+ import { PromiseNode } from "../shared/platform";
7
+ interface NoteConfig {
8
+ content: string;
9
+ backgroundColor?: string;
10
+ fontSize?: number;
11
+ }
12
+ export default class NoteExecutor extends PromiseNode {
13
+ executeNode(inputs: Record<string, any>, config: NoteConfig, context: NodeExecutionContext): Promise<Record<string, any>>;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/Note/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAoB,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IAC7C,WAAW,CACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAUhC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /**
3
+ * Note Node Executor
4
+ * A simple pass-through node that serves as documentation
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const platform_1 = require("../shared/platform");
8
+ class NoteExecutor extends platform_1.PromiseNode {
9
+ async executeNode(inputs, config, context) {
10
+ // Note nodes are purely for documentation
11
+ // They don't process any data, just display markdown content
12
+ this.logger.info("Note node executing", {
13
+ contentLength: config.content?.length || 0
14
+ });
15
+ // Return empty object since Note nodes have no outputs
16
+ return {};
17
+ }
18
+ }
19
+ exports.default = NoteExecutor;
20
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/Note/executor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAGH,iDAAiD;AAQjD,MAAqB,YAAa,SAAQ,sBAAW;IACnD,KAAK,CAAC,WAAW,CACf,MAA2B,EAC3B,MAAkB,EAClB,OAA6B;QAE7B,0CAA0C;QAC1C,6DAA6D;QAC7D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE;YACtC,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;SAC3C,CAAC,CAAC;QAEH,uDAAuD;QACvD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAfD,+BAeC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Note Node Definition
3
+ * A documentation node for adding notes and comments to workflows
4
+ */
5
+ import { type EnhancedNodeDefinition } from "@gravity-platform/plugin-base";
6
+ import NoteExecutor from "./executor";
7
+ export declare const NODE_TYPE = "Note";
8
+ export declare function createNodeDefinition(): EnhancedNodeDefinition;
9
+ export declare const NoteNode: {
10
+ definition: any;
11
+ executor: typeof NoteExecutor;
12
+ };
13
+ export declare const definition: any;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Note/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA2B,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,YAAY,MAAM,YAAY,CAAC;AAGtC,eAAO,MAAM,SAAS,SAAS,CAAC;AAGhC,wBAAgB,oBAAoB,IAAI,sBAAsB,CA+D7D;AAGD,eAAO,MAAM,QAAQ;;;CAGpB,CAAC;AAGF,eAAO,MAAM,UAAU,KAAyB,CAAC"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ /**
3
+ * Note Node Definition
4
+ * A documentation node for adding notes and comments to workflows
5
+ */
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.definition = exports.NoteNode = exports.NODE_TYPE = void 0;
11
+ exports.createNodeDefinition = createNodeDefinition;
12
+ const plugin_base_1 = require("@gravity-platform/plugin-base");
13
+ const executor_1 = __importDefault(require("./executor"));
14
+ // Export node type constant
15
+ exports.NODE_TYPE = "Note";
16
+ // Export a function that creates the definition after platform deps are set
17
+ function createNodeDefinition() {
18
+ const { NodeInputType } = (0, plugin_base_1.getPlatformDependencies)();
19
+ return {
20
+ packageVersion: "1.1.1",
21
+ type: exports.NODE_TYPE,
22
+ isService: false,
23
+ name: "Note",
24
+ description: "Add notes, documentation, and comments to your workflow",
25
+ category: "Flow",
26
+ color: "#fbbf24", // Yellow color for notes
27
+ logoUrl: "/icons/note-icon.svg",
28
+ // Note nodes have no inputs/outputs - they are purely for documentation
29
+ inputs: [],
30
+ outputs: [],
31
+ // Configuration schema for the UI
32
+ configSchema: {
33
+ type: "object",
34
+ properties: {
35
+ content: {
36
+ type: "string",
37
+ title: "Note Content",
38
+ description: "Markdown content for the note. Supports full markdown syntax including headers, lists, code blocks, etc.",
39
+ default: "# Note\n\nAdd your documentation here...\n\n- Use markdown syntax\n- Create lists\n- Add **bold** or *italic* text\n- Include `code` snippets",
40
+ "ui:widget": "textarea",
41
+ "ui:options": {
42
+ rows: 10,
43
+ },
44
+ },
45
+ backgroundColor: {
46
+ type: "string",
47
+ title: "Background Color",
48
+ description: "Background color for the note",
49
+ default: "#fffbeb",
50
+ "ui:widget": "color",
51
+ },
52
+ fontSize: {
53
+ type: "number",
54
+ title: "Font Size",
55
+ description: "Base font size for the note content",
56
+ default: 14,
57
+ minimum: 10,
58
+ maximum: 24,
59
+ },
60
+ locked: {
61
+ type: "boolean",
62
+ title: "Lock Note",
63
+ description: "Lock the note to prevent moving or resizing",
64
+ default: false,
65
+ },
66
+ },
67
+ required: ["content"],
68
+ },
69
+ // Node capabilities
70
+ capabilities: {
71
+ isTrigger: false,
72
+ },
73
+ };
74
+ }
75
+ // Export as enhanced node
76
+ exports.NoteNode = {
77
+ definition: createNodeDefinition(),
78
+ executor: executor_1.default,
79
+ };
80
+ // Export for node registry
81
+ exports.definition = createNodeDefinition();
82
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Note/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AASH,oDA+DC;AAtED,+DAAqG;AACrG,0DAAsC;AAEtC,4BAA4B;AACf,QAAA,SAAS,GAAG,MAAM,CAAC;AAEhC,4EAA4E;AAC5E,SAAgB,oBAAoB;IAClC,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,qCAAuB,GAAE,CAAC;IAEpD,OAAO;QACL,cAAc,EAAE,OAAO;QACvB,IAAI,EAAE,iBAAS;QACjB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,yDAAyD;QACtE,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,SAAS,EAAE,yBAAyB;QAC3C,OAAO,EAAE,sBAAsB;QAE/B,wEAAwE;QACxE,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QAEX,kCAAkC;QAClC,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,cAAc;oBACrB,WAAW,EACT,0GAA0G;oBAC5G,OAAO,EACL,+IAA+I;oBACjJ,WAAW,EAAE,UAAU;oBACvB,YAAY,EAAE;wBACZ,IAAI,EAAE,EAAE;qBACT;iBACF;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,kBAAkB;oBACzB,WAAW,EAAE,+BAA+B;oBAC5C,OAAO,EAAE,SAAS;oBAClB,WAAW,EAAE,OAAO;iBACrB;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,WAAW;oBAClB,WAAW,EAAE,qCAAqC;oBAClD,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,EAAE;iBACZ;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,WAAW;oBAClB,WAAW,EAAE,6CAA6C;oBAC1D,OAAO,EAAE,KAAK;iBACf;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;QAED,oBAAoB;QACpB,YAAY,EAAE;YACZ,SAAS,EAAE,KAAK;SACjB;KACA,CAAC;AACJ,CAAC;AAED,0BAA0B;AACb,QAAA,QAAQ,GAAG;IACtB,UAAU,EAAE,oBAAoB,EAAE;IAClC,QAAQ,EAAE,kBAAY;CACvB,CAAC;AAEF,2BAA2B;AACd,QAAA,UAAU,GAAG,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Relay Node Executor
3
+ * Combines all inputs and immediately forwards them as a single output signal
4
+ */
5
+ import { NodeExecutionContext, ValidationResult } from "@gravity-platform/plugin-base";
6
+ import { PromiseNode } from "../shared/platform";
7
+ interface RelayConfig {
8
+ }
9
+ export default class RelayExecutor extends PromiseNode<RelayConfig> {
10
+ constructor();
11
+ protected validateConfig(config: RelayConfig): Promise<ValidationResult>;
12
+ protected executeNode(inputs: Record<string, any>, config: RelayConfig, context: NodeExecutionContext): Promise<any>;
13
+ }
14
+ export { RelayExecutor };
15
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/Relay/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,UAAU,WAAW;CAEpB;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW,CAAC,WAAW,CAAC;;cAKjD,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;cAK9D,WAAW,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,GAAG,CAAC;CAmDhB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /**
3
+ * Relay Node Executor
4
+ * Combines all inputs and immediately forwards them as a single output signal
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.RelayExecutor = void 0;
8
+ const platform_1 = require("../shared/platform");
9
+ class RelayExecutor extends platform_1.PromiseNode {
10
+ constructor() {
11
+ super("Relay");
12
+ }
13
+ async validateConfig(config) {
14
+ // No validation needed - relay accepts anything
15
+ return { success: true };
16
+ }
17
+ async executeNode(inputs, config, context) {
18
+ // Log what we're relaying
19
+ console.log(" Relay node executing", {
20
+ hasInputs: !!inputs,
21
+ inputKeys: Object.keys(inputs),
22
+ inputCount: Object.keys(inputs).length,
23
+ });
24
+ // Extract the actual signal data from the inputs
25
+ // The inputs come in as { signal: { sourceNode: { outputHandle: data } } }
26
+ // We want to forward just the data, not the nested structure
27
+ let outputData = {};
28
+ // If we have a signal input, extract the data from it
29
+ if (inputs.signal) {
30
+ // Get the first source node's data
31
+ const sourceNodes = Object.keys(inputs.signal);
32
+ if (sourceNodes.length > 0) {
33
+ const sourceNode = sourceNodes[0];
34
+ const sourceData = inputs.signal[sourceNode];
35
+ // If the source data has an output handle, use that
36
+ // Otherwise use the entire source data
37
+ if (sourceData && typeof sourceData === 'object') {
38
+ const outputHandles = Object.keys(sourceData);
39
+ if (outputHandles.length === 1) {
40
+ // Single output - forward just the data
41
+ outputData = sourceData[outputHandles[0]];
42
+ }
43
+ else {
44
+ // Multiple outputs - forward the entire object
45
+ outputData = sourceData;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ else {
51
+ // No signal input, forward all inputs as-is
52
+ outputData = inputs;
53
+ }
54
+ console.log("🚀 Relay forwarding signal", {
55
+ inputStructure: JSON.stringify(inputs, null, 2).substring(0, 200),
56
+ outputData: JSON.stringify(outputData, null, 2).substring(0, 200),
57
+ });
58
+ // Return the extracted data as the output signal
59
+ return {
60
+ __outputs: {
61
+ signal: outputData,
62
+ },
63
+ };
64
+ }
65
+ }
66
+ exports.default = RelayExecutor;
67
+ exports.RelayExecutor = RelayExecutor;
68
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/Relay/executor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,iDAAiD;AAMjD,MAAqB,aAAc,SAAQ,sBAAwB;IACjE;QACE,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAES,KAAK,CAAC,cAAc,CAAC,MAAmB;QAChD,gDAAgD;QAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAES,KAAK,CAAC,WAAW,CACzB,MAA2B,EAC3B,MAAmB,EACnB,OAA6B;QAE7B,0BAA0B;QAC1B,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE;YACnC,SAAS,EAAE,CAAC,CAAC,MAAM;YACnB,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9B,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM;SACvC,CAAC,CAAC;QAEH,iDAAiD;QACjD,2EAA2E;QAC3E,6DAA6D;QAC7D,IAAI,UAAU,GAAG,EAAE,CAAC;QAEpB,sDAAsD;QACtD,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,mCAAmC;YACnC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC/C,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3B,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;gBAClC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAE7C,oDAAoD;gBACpD,uCAAuC;gBACvC,IAAI,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;oBACjD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;oBAC9C,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBAC/B,wCAAwC;wBACxC,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC5C,CAAC;yBAAM,CAAC;wBACN,+CAA+C;wBAC/C,UAAU,GAAG,UAAU,CAAC;oBAC1B,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,4CAA4C;YAC5C,UAAU,GAAG,MAAM,CAAC;QACtB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE;YACxC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;YACjE,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;SAClE,CAAC,CAAC;QAEH,iDAAiD;QACjD,OAAO;YACL,SAAS,EAAE;gBACT,MAAM,EAAE,UAAU;aACnB;SACF,CAAC;IACJ,CAAC;CACF;AAjED,gCAiEC;AAEQ,sCAAa"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Relay Node Definition
3
+ * A unique node that immediately forwards any signal without respecting dependencies
4
+ * Acts as a "wire" that instantly relays whatever it receives
5
+ */
6
+ import { type EnhancedNodeDefinition } from "@gravity-platform/plugin-base";
7
+ import RelayExecutor from "./executor";
8
+ export declare const NODE_TYPE = "Relay";
9
+ export declare function createNodeDefinition(): EnhancedNodeDefinition;
10
+ export declare const RelayNode: {
11
+ definition: any;
12
+ executor: typeof RelayExecutor;
13
+ };
14
+ export declare const definition: any;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Relay/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA2B,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,aAAa,MAAM,YAAY,CAAC;AAGvC,eAAO,MAAM,SAAS,UAAU,CAAC;AAGjC,wBAAgB,oBAAoB,IAAI,sBAAsB,CAoC7D;AAGD,eAAO,MAAM,SAAS;;;CAGrB,CAAC;AAGF,eAAO,MAAM,UAAU,KAAyB,CAAC"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /**
3
+ * Relay Node Definition
4
+ * A unique node that immediately forwards any signal without respecting dependencies
5
+ * Acts as a "wire" that instantly relays whatever it receives
6
+ */
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.definition = exports.RelayNode = exports.NODE_TYPE = void 0;
12
+ exports.createNodeDefinition = createNodeDefinition;
13
+ const plugin_base_1 = require("@gravity-platform/plugin-base");
14
+ const executor_1 = __importDefault(require("./executor"));
15
+ // Export node type constant
16
+ exports.NODE_TYPE = "Relay";
17
+ // Export a function that creates the definition after platform deps are set
18
+ function createNodeDefinition() {
19
+ const { NodeInputType } = (0, plugin_base_1.getPlatformDependencies)();
20
+ return {
21
+ packageVersion: "1.1.1",
22
+ type: exports.NODE_TYPE,
23
+ isService: false,
24
+ name: "Relay",
25
+ description: "Instantly forwards any signal without waiting for dependencies",
26
+ category: "Flow",
27
+ color: "#10B981", // Green color for "go" signal
28
+ logoUrl: "https://res.cloudinary.com/sonik/image/upload/v1749961542/gravity/icons/arrow-right.png",
29
+ inputs: [
30
+ {
31
+ name: "signal",
32
+ type: NodeInputType.ANY,
33
+ description: "Signal to relay to downstream nodes",
34
+ },
35
+ ],
36
+ outputs: [
37
+ {
38
+ name: "signal",
39
+ type: NodeInputType.ANY,
40
+ description: "Relayed signal",
41
+ },
42
+ ],
43
+ // No config needed - just passes through all inputs
44
+ configSchema: {
45
+ type: "object",
46
+ properties: {},
47
+ required: [],
48
+ },
49
+ };
50
+ }
51
+ // Export as enhanced node
52
+ exports.RelayNode = {
53
+ definition: createNodeDefinition(),
54
+ executor: executor_1.default,
55
+ };
56
+ // Export for node registry
57
+ exports.definition = createNodeDefinition();
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Relay/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AASH,oDAoCC;AA3CD,+DAAqG;AACrG,0DAAuC;AAEvC,4BAA4B;AACf,QAAA,SAAS,GAAG,OAAO,CAAC;AAEjC,4EAA4E;AAC5E,SAAgB,oBAAoB;IAClC,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,qCAAuB,GAAE,CAAC;IAEpD,OAAO;QACL,cAAc,EAAE,OAAO;QACvB,IAAI,EAAE,iBAAS;QACf,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,gEAAgE;QAC7E,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,SAAS,EAAE,8BAA8B;QAChD,OAAO,EAAE,yFAAyF;QAElG,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,aAAa,CAAC,GAAG;gBACvB,WAAW,EAAE,qCAAqC;aACnD;SACF;QAED,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,aAAa,CAAC,GAAG;gBACvB,WAAW,EAAE,gBAAgB;aAC9B;SACF;QAED,oDAAoD;QACpD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;KACF,CAAC;AACJ,CAAC;AAED,0BAA0B;AACb,QAAA,SAAS,GAAG;IACvB,UAAU,EAAE,oBAAoB,EAAE;IAClC,QAAQ,EAAE,kBAAa;CACxB,CAAC;AAEF,2BAA2B;AACd,QAAA,UAAU,GAAG,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SendObjectNode } from "./node";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SendObject/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendObjectNode = void 0;
4
+ var node_1 = require("./node");
5
+ Object.defineProperty(exports, "SendObjectNode", { enumerable: true, get: function () { return node_1.SendObjectNode; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/SendObject/index.ts"],"names":[],"mappings":";;;AAAA,+BAAwC;AAA/B,sGAAA,cAAc,OAAA"}
@@ -0,0 +1,7 @@
1
+ import { PromiseNode, type NodeExecutionContext } from "@gravity-platform/plugin-base";
2
+ import { SendObjectConfig, SendObjectOutput } from "../util/types";
3
+ export default class SendObjectExecutor extends PromiseNode {
4
+ constructor();
5
+ protected executeNode(inputs: Record<string, any>, config: SendObjectConfig, context: NodeExecutionContext): Promise<SendObjectOutput>;
6
+ }
7
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/SendObject/node/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKnE,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;;cAKzC,WAAW,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,gBAAgB,CAAC;CAoD7B"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const plugin_base_1 = require("@gravity-platform/plugin-base");
4
+ const publishObject_1 = require("../service/publishObject");
5
+ const NODE_TYPE = "SendObject";
6
+ class SendObjectExecutor extends plugin_base_1.PromiseNode {
7
+ constructor() {
8
+ super(NODE_TYPE);
9
+ }
10
+ async executeNode(inputs, config, context) {
11
+ if (!config.data) {
12
+ throw new Error("Data is required");
13
+ }
14
+ let data = config.data;
15
+ if (typeof config.data === "string") {
16
+ try {
17
+ data = JSON.parse(config.data);
18
+ }
19
+ catch {
20
+ data = config.data;
21
+ }
22
+ }
23
+ // Use custom objectId if provided, otherwise use nodeId
24
+ const objectId = config.objectId && config.objectId.trim() !== "" ? config.objectId : context.nodeId;
25
+ this.logger.info("SendObject: sending data to client", {
26
+ id: objectId,
27
+ nodeId: context.nodeId,
28
+ dataKeys: typeof config.data === "object" ? Object.keys(config.data) : "primitive",
29
+ });
30
+ // Publish object to client via WebSocket
31
+ if (!context.publishingContext) {
32
+ this.logger.warn("Publishing context not available - object will not be sent to client");
33
+ }
34
+ else {
35
+ await (0, publishObject_1.publishObject)({
36
+ objectId,
37
+ data,
38
+ chatId: context.publishingContext.chatId,
39
+ conversationId: context.publishingContext.conversationId,
40
+ userId: context.publishingContext.userId,
41
+ providerId: context.publishingContext.providerId || "flow",
42
+ workflowId: context.workflowId,
43
+ workflowRunId: context.executionId,
44
+ nodeId: context.nodeId,
45
+ }, context.api, context);
46
+ }
47
+ // Return data with ID for client identification
48
+ return {
49
+ __outputs: {
50
+ id: objectId,
51
+ data,
52
+ },
53
+ };
54
+ }
55
+ }
56
+ exports.default = SendObjectExecutor;
57
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../src/SendObject/node/executor.ts"],"names":[],"mappings":";;AAAA,+DAAuF;AAEvF,4DAAyD;AAEzD,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,MAAqB,kBAAmB,SAAQ,yBAAW;IACzD;QACE,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAES,KAAK,CAAC,WAAW,CACzB,MAA2B,EAC3B,MAAwB,EACxB,OAA6B;QAE7B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACtC,CAAC;QAED,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACvB,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACpC,IAAI,CAAC;gBACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;YACrB,CAAC;QACH,CAAC;QAED,wDAAwD;QACxD,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QAErG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,EAAE;YACrD,EAAE,EAAE,QAAQ;YACZ,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,QAAQ,EAAE,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW;SACnF,CAAC,CAAC;QAEH,yCAAyC;QACzC,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;QAC3F,CAAC;aAAM,CAAC;YACN,MAAM,IAAA,6BAAa,EACjB;gBACE,QAAQ;gBACR,IAAI;gBACJ,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,MAAM;gBACxC,cAAc,EAAE,OAAO,CAAC,iBAAiB,CAAC,cAAc;gBACxD,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,MAAM;gBACxC,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,UAAU,IAAI,MAAM;gBAC1D,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,aAAa,EAAE,OAAO,CAAC,WAAW;gBAClC,MAAM,EAAE,OAAO,CAAC,MAAM;aACvB,EACD,OAAO,CAAC,GAAG,EACX,OAAO,CACR,CAAC;QACJ,CAAC;QAED,gDAAgD;QAChD,OAAO;YACL,SAAS,EAAE;gBACT,EAAE,EAAE,QAAQ;gBACZ,IAAI;aACL;SACK,CAAC;IACX,CAAC;CACF;AA7DD,qCA6DC"}
@@ -0,0 +1,10 @@
1
+ import { type EnhancedNodeDefinition } from "@gravity-platform/plugin-base";
2
+ import SendObjectExecutor from "./executor";
3
+ export declare const NODE_TYPE = "SendObject";
4
+ declare function createNodeDefinition(): EnhancedNodeDefinition;
5
+ export declare const SendObjectNode: {
6
+ definition: any;
7
+ executor: typeof SendObjectExecutor;
8
+ };
9
+ export { createNodeDefinition };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/SendObject/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,kBAAkB,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,iBAAS,oBAAoB,IAAI,sBAAsB,CA+CtD;AAID,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SendObjectNode = exports.NODE_TYPE = void 0;
7
+ exports.createNodeDefinition = createNodeDefinition;
8
+ const plugin_base_1 = require("@gravity-platform/plugin-base");
9
+ const executor_1 = __importDefault(require("./executor"));
10
+ exports.NODE_TYPE = "SendObject";
11
+ function createNodeDefinition() {
12
+ return {
13
+ packageVersion: "1.0.0",
14
+ type: exports.NODE_TYPE,
15
+ name: "Send Object",
16
+ description: "Send JSON data to client with an ID for identification",
17
+ category: "Flow",
18
+ color: "#10B981",
19
+ logoUrl: "https://res.cloudinary.com/sonik/image/upload/v1751366180/gravity/icons/gravityIcon.png",
20
+ inputs: [
21
+ {
22
+ name: "signal",
23
+ type: plugin_base_1.NodeInputType.OBJECT,
24
+ description: "Trigger signal (optional)",
25
+ },
26
+ ],
27
+ outputs: [
28
+ {
29
+ name: "output",
30
+ type: plugin_base_1.NodeInputType.OBJECT,
31
+ description: "Data with storageKey and id for client-side storage",
32
+ },
33
+ ],
34
+ configSchema: {
35
+ type: "object",
36
+ required: ["data"],
37
+ properties: {
38
+ data: {
39
+ type: "object",
40
+ title: "Data",
41
+ description: "JSON data to send to client. Supports template syntax: {{signal.fieldName}}",
42
+ default: {},
43
+ "ui:field": "template",
44
+ },
45
+ objectId: {
46
+ type: "string",
47
+ title: "Object ID (optional)",
48
+ description: "Optional custom ID. If not provided, uses node ID.",
49
+ default: "",
50
+ "ui:field": "template",
51
+ },
52
+ },
53
+ },
54
+ capabilities: {
55
+ isTrigger: false,
56
+ },
57
+ };
58
+ }
59
+ const definition = createNodeDefinition();
60
+ exports.SendObjectNode = {
61
+ definition,
62
+ executor: executor_1.default,
63
+ };
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/SendObject/node/index.ts"],"names":[],"mappings":";;;;;;AA6DS,oDAAoB;AA7D7B,+DAA2F;AAC3F,0DAA4C;AAE/B,QAAA,SAAS,GAAG,YAAY,CAAC;AAEtC,SAAS,oBAAoB;IAC3B,OAAO;QACL,cAAc,EAAE,OAAO;QACvB,IAAI,EAAE,iBAAS;QACf,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,wDAAwD;QACrE,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,yFAAyF;QAClG,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,2BAAa,CAAC,MAAM;gBAC1B,WAAW,EAAE,2BAA2B;aACzC;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,2BAAa,CAAC,MAAM;gBAC1B,WAAW,EAAE,qDAAqD;aACnE;SACF;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,6EAA6E;oBAC1F,OAAO,EAAE,EAAE;oBACX,UAAU,EAAE,UAAU;iBACvB;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,sBAAsB;oBAC7B,WAAW,EAAE,oDAAoD;oBACjE,OAAO,EAAE,EAAE;oBACX,UAAU,EAAE,UAAU;iBACvB;aACF;SACF;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,KAAK;SACjB;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;AAE7B,QAAA,cAAc,GAAG;IAC5B,UAAU;IACV,QAAQ,EAAE,kBAAkB;CAC7B,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Object publishing service
3
+ * Publishes JSON data to the client via COMPONENT_INIT (same as design-system components)
4
+ */
5
+ export interface ObjectPublishConfig {
6
+ objectId: string;
7
+ data: any;
8
+ chatId: string;
9
+ conversationId: string;
10
+ userId: string;
11
+ providerId: string;
12
+ workflowId: string;
13
+ workflowRunId: string;
14
+ nodeId: string;
15
+ metadata?: Record<string, any>;
16
+ }
17
+ export declare function publishObject(config: ObjectPublishConfig, api: any, context?: any): Promise<{
18
+ channel: string;
19
+ success: boolean;
20
+ }>;
21
+ //# sourceMappingURL=publishObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishObject.d.ts","sourceRoot":"","sources":["../../../src/SendObject/service/publishObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,EAC3B,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,EAAE,GAAG,GACZ,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAsDhD"}