@synergenius/flow-weaver 0.10.7 → 0.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,7 +1,44 @@
1
1
  Flow Weaver Library License
2
2
 
3
- Based on the Elastic License 2.0 (https://www.elastic.co/licensing/elastic-license)
4
- with additional notices below.
3
+ Version 2.0, February 2026
4
+
5
+ ## Quick Reference (non-binding summary)
6
+
7
+ This table is provided for convenience only. In case of any conflict between
8
+ this summary and the license terms below, the license terms control.
9
+
10
+ Permitted:
11
+
12
+ Use Who Notes
13
+ ---------------------------------------- ---------------- ----------------------------------
14
+ Install and run locally Anyone No restrictions on local use
15
+ Compile workflows Anyone CLI, programmatic, scripts
16
+ Use generated output (code, artifacts) Anyone Output is unrestricted
17
+ Run in CI/CD pipelines and build systems Anyone, any size Not considered "hosting"
18
+ Distribute copies with license notices Anyone Must include license, mark changes
19
+ Create derivative works Anyone Must retain license key checks
20
+ Host internally Orgs <= 15 All members count toward limit
21
+ Embed in internal toolchains Anyone No visual workflow authoring UI
22
+ Use inside a larger product Anyone If flow-weaver is not the primary value
23
+
24
+ Requires commercial license:
25
+
26
+ Use Notes
27
+ ---------------------------------------- ----------------------------------
28
+ Host internally Orgs > 15 people
29
+ Build visual workflow authoring tools Standalone products for workflow authoring
30
+ Offer as a hosted or managed service To third parties, at any scale
31
+ Sell products built on the software Where flow-weaver is the primary value
32
+
33
+ Never permitted:
34
+
35
+ Use Notes
36
+ ---------------------------------------- ----------------------------------
37
+ Remove or circumvent license keys Applies to software and derivatives
38
+ Remove licensing or copyright notices Must always be retained
39
+ Strip license key checks from forks Derivatives must retain protections
40
+
41
+ ---
5
42
 
6
43
  ## Acceptance
7
44
 
@@ -17,13 +54,33 @@ the limitations and conditions below.
17
54
  ## Limitations
18
55
 
19
56
  You may not provide the software to third parties as a hosted or managed
20
- service, where the service provides users with access to any substantial set of
21
- the features or functionality of the software.
57
+ service, where the service provides users with access to any of the features or
58
+ functionality of the software.
59
+
60
+ You may not use the software to build, distribute, or offer any standalone
61
+ product or service whose primary purpose is providing a graphical or visual
62
+ interface for creating, editing, designing, or composing workflows. This
63
+ restriction applies whether the product is hosted, distributed, sold, or offered
64
+ free of charge. It does not apply to products that use the software internally
65
+ without exposing its workflow authoring capabilities to end users through a
66
+ graphical interface.
67
+
68
+ You may not sell the software or any product that provides, as its primary
69
+ function, capabilities supplied by the software (including workflow compilation,
70
+ parsing, validation, code generation, or diagram generation), without a separate
71
+ commercial license from the licensor. This does not restrict the sale of products
72
+ that merely incorporate the software as one component among many, where the
73
+ product's primary value comes from functionality independent of the software.
22
74
 
23
75
  You may not move, change, disable, or circumvent the license key functionality
24
76
  in the software, and you may not remove or obscure any functionality in the
25
77
  software that is protected by the license key.
26
78
 
79
+ Derivative works must retain all license key functionality, license verification
80
+ mechanisms, and licensing notices present in the original software. Distributing
81
+ derivative works with license key protections removed, disabled, or bypassed
82
+ constitutes a violation of this license.
83
+
27
84
  You may not alter, remove, or obscure any licensing, copyright, or other notices
28
85
  of the licensor in the software. Any use of the licensor's trademarks is subject
29
86
  to applicable law.
@@ -61,8 +118,11 @@ and your licenses will automatically terminate. If the licensor provides you
61
118
  with a notice of your violation, and you cease all violation of this license no
62
119
  later than 30 days after you receive that notice, your licenses will be
63
120
  reinstated retroactively. However, if you violate these terms after such
64
- reinstatement, any additional violation of these terms will immediately and
65
- permanently terminate your licenses.
121
+ reinstatement, any additional violation of these terms will cause your licenses
122
+ to terminate immediately.
123
+
124
+ You may request a review of any termination by contacting the licensor in
125
+ writing within 15 days of termination. The licensor will respond within 30 days.
66
126
 
67
127
  ## No Liability
68
128
 
@@ -71,6 +131,12 @@ condition, and the licensor will not be liable to you for any damages arising
71
131
  out of these terms or the use or nature of the software, under any kind of
72
132
  legal claim.
73
133
 
134
+ ## Governing Law
135
+
136
+ This license is governed by the laws of Portugal. Any disputes arising from or
137
+ related to this license will be submitted to the exclusive jurisdiction of the
138
+ courts of Lisbon, Portugal.
139
+
74
140
  ## Definitions
75
141
 
76
142
  The "licensor" is Ricardo Jose Horta Morais (Synergenius), and the "software"
@@ -84,40 +150,55 @@ ownership of substantially all the assets of an entity, or the power to direct
84
150
  its management and policies by vote, contract, or otherwise. Control can be
85
151
  direct or indirect.
86
152
 
153
+ "Third parties" means any individual or entity that is not you or your company
154
+ as defined in these terms.
155
+
87
156
  "Your licenses" are all the licenses granted to you for the software under these
88
157
  terms. "Use" means anything you do with the software requiring one of your
89
158
  licenses.
90
159
 
160
+ "Hosting the software" means making the software's functionality available to
161
+ users over a network as a service. Running the software in automated build
162
+ pipelines, continuous integration systems, command-line interfaces, or
163
+ development toolchains does not constitute hosting, regardless of organization
164
+ size.
165
+
91
166
  ---
92
167
 
93
168
  ADDITIONAL NOTICES
94
169
 
95
170
  1. Output of the Software
96
171
 
97
- The output of the Software including but not limited to compiled workflows,
172
+ The output of the software, including but not limited to compiled workflows,
98
173
  generated code, deployment artifacts, and any other files produced by the
99
- Software's compilation, code generation, or export features is not considered
100
- part of the Software and may be used, copied, modified, distributed, and
101
- sublicensed for any purpose without restriction under this License.
174
+ software's compilation, code generation, or export features, is not considered
175
+ part of the software and may be used, copied, modified, distributed, and
176
+ sublicensed for any purpose without restriction under this license.
102
177
 
103
178
  2. Internal Hosting Threshold
104
179
 
105
- Organizations with 15 or fewer individuals including employees, contractors,
106
- and affiliates may host the Software on internal infrastructure for use by
107
- their members without restriction under this License.
180
+ Organizations with 15 or fewer individuals, including employees, contractors,
181
+ and affiliates, may host the software on internal infrastructure for use by
182
+ their members without restriction under this license. The count includes all
183
+ individuals in the organization, not only those who directly use the software.
108
184
 
109
- Organizations with more than 15 individuals that wish to host the Software —
110
- whether on internal infrastructure or as a service require a commercial
185
+ Organizations with more than 15 individuals that wish to host the software,
186
+ whether on internal infrastructure or as a service, require a commercial
111
187
  license.
112
188
 
113
189
  3. Unrestricted Use
114
190
 
115
- Using the Software locally including installing, running, compiling
116
- workflows, generating code, and producing deployment artifacts is permitted
117
- for any individual or organization regardless of size, subject to the
118
- Limitations above.
191
+ Using the software locally, including installing, running, compiling workflows,
192
+ generating code, and producing deployment artifacts, is permitted for any
193
+ individual or organization regardless of size, subject to the Limitations above.
194
+
195
+ 4. Export Compliance
196
+
197
+ You are responsible for compliance with all applicable export and import laws
198
+ and regulations in your jurisdiction when using, distributing, or making the
199
+ software available.
119
200
 
120
- 4. Commercial Licensing
201
+ 5. Commercial Licensing
121
202
 
122
203
  For commercial licensing inquiries, partnership arrangements, or questions
123
204
  about permitted use, contact support@synergenius.pt.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import type { TWorkflowAST, TNodeInstanceAST, TNodeTypeAST } from '../../ast/types.js';
5
5
  export interface DescribeOptions {
6
- format?: 'json' | 'text' | 'mermaid' | 'paths';
6
+ format?: 'json' | 'text' | 'mermaid' | 'paths' | 'ascii' | 'ascii-compact';
7
7
  node?: string;
8
8
  workflowName?: string;
9
9
  compile?: boolean;
@@ -63,6 +63,6 @@ export declare function formatTextOutput(ast: TWorkflowAST, output: DescribeOutp
63
63
  /**
64
64
  * Format the describe output based on format option
65
65
  */
66
- export declare function formatDescribeOutput(ast: TWorkflowAST, output: DescribeOutput | FocusedNodeOutput, format: 'json' | 'text' | 'mermaid' | 'paths'): string;
66
+ export declare function formatDescribeOutput(ast: TWorkflowAST, output: DescribeOutput | FocusedNodeOutput, format: 'json' | 'text' | 'mermaid' | 'paths' | 'ascii' | 'ascii-compact'): string;
67
67
  export declare function describeCommand(input: string, options?: DescribeOptions): Promise<void>;
68
68
  //# sourceMappingURL=describe.d.ts.map
@@ -9,6 +9,8 @@ import { validator } from '../../validator.js';
9
9
  import { getNode, getIncomingConnections, getOutgoingConnections } from '../../api/query.js';
10
10
  import { logger } from '../utils/logger.js';
11
11
  import { getErrorMessage } from '../../utils/error-utils.js';
12
+ import { buildDiagramGraph } from '../../diagram/geometry.js';
13
+ import { renderASCII, renderASCIICompact } from '../../diagram/ascii-renderer.js';
12
14
  export function buildNodeInfo(instance, nodeType) {
13
15
  return {
14
16
  id: instance.id,
@@ -329,6 +331,10 @@ export function formatDescribeOutput(ast, output, format) {
329
331
  return generateMermaid(ast);
330
332
  case 'paths':
331
333
  return formatPaths(ast);
334
+ case 'ascii':
335
+ return renderASCII(buildDiagramGraph(ast));
336
+ case 'ascii-compact':
337
+ return renderASCIICompact(buildDiagramGraph(ast));
332
338
  case 'json':
333
339
  default:
334
340
  return JSON.stringify(output, null, 2);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Diagram command — generates SVG or interactive HTML diagrams from workflow files.
2
+ * Diagram command — generates SVG, interactive HTML, or ASCII diagrams from workflow files.
3
3
  */
4
4
  export interface DiagramCommandOptions {
5
5
  theme?: 'dark' | 'light';
@@ -8,7 +8,7 @@ export interface DiagramCommandOptions {
8
8
  showPortLabels?: boolean;
9
9
  workflowName?: string;
10
10
  output?: string;
11
- format?: 'svg' | 'html';
11
+ format?: 'svg' | 'html' | 'ascii' | 'ascii-compact' | 'text';
12
12
  }
13
13
  export declare function diagramCommand(input: string, options?: DiagramCommandOptions): Promise<void>;
14
14
  //# sourceMappingURL=diagram.d.ts.map
@@ -1,12 +1,13 @@
1
1
  /* eslint-disable no-console */
2
2
  /**
3
- * Diagram command — generates SVG or interactive HTML diagrams from workflow files.
3
+ * Diagram command — generates SVG, interactive HTML, or ASCII diagrams from workflow files.
4
4
  */
5
5
  import * as fs from 'fs';
6
6
  import * as path from 'path';
7
- import { fileToSVG, fileToHTML } from '../../diagram/index.js';
7
+ import { fileToSVG, fileToHTML, fileToASCII } from '../../diagram/index.js';
8
8
  import { logger } from '../utils/logger.js';
9
9
  import { getErrorMessage } from '../../utils/error-utils.js';
10
+ const ASCII_FORMATS = new Set(['ascii', 'ascii-compact', 'text']);
10
11
  export async function diagramCommand(input, options = {}) {
11
12
  const { output, format = 'svg', ...diagramOptions } = options;
12
13
  const filePath = path.resolve(input);
@@ -15,10 +16,16 @@ export async function diagramCommand(input, options = {}) {
15
16
  process.exit(1);
16
17
  }
17
18
  try {
18
- const isHtml = format === 'html';
19
- const result = isHtml
20
- ? fileToHTML(filePath, diagramOptions)
21
- : fileToSVG(filePath, diagramOptions);
19
+ let result;
20
+ if (ASCII_FORMATS.has(format)) {
21
+ result = fileToASCII(filePath, { ...diagramOptions, format });
22
+ }
23
+ else if (format === 'html') {
24
+ result = fileToHTML(filePath, diagramOptions);
25
+ }
26
+ else {
27
+ result = fileToSVG(filePath, diagramOptions);
28
+ }
22
29
  if (output) {
23
30
  const outputPath = path.resolve(output);
24
31
  fs.writeFileSync(outputPath, result, 'utf-8');