@synergenius/flow-weaver 0.27.0 → 0.27.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.
package/README.md CHANGED
@@ -6,14 +6,61 @@
6
6
  [![Tests](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/moraispgsi/305430ef59a51d0a58eb61fefdfbe634/raw/flow-weaver-test-count.json&style=flat)](https://github.com/synergenius-fw/flow-weaver/actions/workflows/ci.yml)
7
7
  [![Coverage](https://img.shields.io/codecov/c/github/synergenius-fw/flow-weaver?style=flat)](https://codecov.io/gh/synergenius-fw/flow-weaver)
8
8
  [![License: Flow Weaver Library License](https://img.shields.io/badge/License-Flow%20Weaver%20Library-blue?style=flat)](./LICENSE)
9
- [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-green?style=flat)](https://nodejs.org)
9
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D22-green?style=flat)](https://nodejs.org)
10
10
 
11
11
  **Design agent workflows in conversation. The compiled output is yours.**
12
12
 
13
- [**flowweaver.ai**](https://flowweaver.ai) · [**Studio**](https://flowweaver.ai/studio) · [**Docs**](https://flowweaver.ai/docs) · [**Discord**](https://discord.gg/6Byh3ur2bk) · [**npm**](https://www.npmjs.com/package/@synergenius/flow-weaver)
13
+ [**flowweaver.ai**](https://flowweaver.ai) · [**Studio**](https://flowweaver.ai/studio) · [**Features**](https://flowweaver.ai/features) · [**Discord**](https://discord.gg/6Byh3ur2bk) · [**npm**](https://www.npmjs.com/package/@synergenius/flow-weaver)
14
14
 
15
15
  ---
16
16
 
17
+ Flow Weaver is a TypeScript workflow compiler. Define workflows with JSDoc annotations in your existing codebase, compile to standalone TypeScript functions with zero runtime dependencies, and deploy to any serverless target. The compiled output has no dependency on Flow Weaver. You own it.
18
+
19
+ Build AI agent workflows, data pipelines, or automation scripts through natural language using MCP tools in Claude Code, Cursor, Windsurf, VS Code, JetBrains, Codex, or any MCP-compatible editor. Or write them by hand with annotations the same way you write JSDoc today.
20
+
21
+ ## Project Status
22
+
23
+ Flow Weaver is in **active alpha**. The compiler, validator, CLI, and MCP tools are stable and thoroughly tested. The test suite covers thousands of cases across parsing, compilation, validation, diffing, and deployment. CI runs on every commit.
24
+
25
+ This started as a curiosity by [Ricardo Morais](https://linkedin.com/in/moraispgsi) into why visual programming never took off and whether code-first and visual editing could actually coexist. It has grown into something real. It is actively maintained, with releases shipping regularly. If you run into issues or have questions, the [Discord](https://discord.gg/6Byh3ur2bk) is the best place to reach out. Every issue and question gets a response, usually within a day.
26
+
27
+ **Flow Weaver Studio**, the browser-based visual IDE, is the next major milestone and is being actively built. Core editing (canvas, terminal, diagnostics) is live today. The visual debugger, AI chat assistant, version history, and deployment dashboard are in progress. You can follow development on Discord or in the [GitHub releases](https://github.com/synergenius-fw/flow-weaver/releases).
28
+
29
+ Breaking changes may occur between minor versions during alpha. Pin your version in `package.json` if stability matters for your project.
30
+
31
+ ## Capabilities
32
+
33
+ **Annotation-driven workflows:** Define node graphs directly in TypeScript using JSDoc annotations. No YAML, no JSON configs, no separate workflow files. Your workflows live in `.ts` files, version-controlled alongside your code.
34
+
35
+ **Zero-dependency compiled output:** The compiler generates a self-contained TypeScript function. No runtime to install in production, no SDK to import, no vendor lock-in. Delete the package after compiling and the output still runs.
36
+
37
+ **AI-native editing:** MCP tools expose the full compiler, validator, debugger, and diagram surface to any MCP-compatible editor. Scaffold a project, add nodes, wire connections, validate, compile, run, and diff through conversation.
38
+
39
+ **Structural validation:** Type checking across port connections, graph topology analysis, agent safety rules, and breaking change detection. Runs in CI, on every save, or on demand. Errors include source locations, fix suggestions, and documentation links.
40
+
41
+ **Step-through debugging:** Set breakpoints on nodes, step through execution node by node, inspect variables mid-run, and resume from checkpoints. Variable injection available through MCP tools.
42
+
43
+ **Semantic diffing:** Compare workflow versions at the graph level instead of text diffs. Impact analysis categorizes every change as critical, breaking, minor, or cosmetic. Know exactly what changed and whether it matters.
44
+
45
+ **Deploy anywhere:** Export to Inngest, AWS Lambda, Vercel, Cloudflare Workers, GitHub Actions, or GitLab CI. Or serve workflows over HTTP with built-in framework adapters for Next.js, Express, Hono, Fastify, and Remix.
46
+
47
+ **Extensible pack system:** Node types, deploy targets, CLI commands, and MCP tools are contributed by npm packages. Install community packs or build and publish your own.
48
+
49
+ ## Quick Start
50
+
51
+ ```bash
52
+ npm install @synergenius/flow-weaver
53
+ npx flow-weaver init my-agent
54
+ npx flow-weaver compile my-agent.ts
55
+ npx flow-weaver run my-agent.ts
56
+ ```
57
+
58
+ The CLI scaffolds a project, compiles annotations into a runnable workflow, and executes it. Run `fw --help` for the full command reference. The example below shows a more complete workflow built through conversation.
59
+
60
+ ## See It in Action
61
+
62
+ The conversation below shows [Weaver](https://github.com/synergenius-fw/flow-weaver-pack-weaver), an optional AI bot that drives Flow Weaver through natural language. It handles scaffolding, modification, validation, compilation, execution, and deployment. Install it with `fw market install @synergenius/flow-weaver-pack-weaver`, or use the MCP tools directly from your editor without Weaver.
63
+
17
64
  > **You:** Build a support agent that classifies messages and either auto-replies or escalates.
18
65
 
19
66
  > **Weaver:** Created `support-agent.ts`. Four nodes, one workflow.
@@ -101,19 +148,156 @@
101
148
  > fw export support-agent.ts --target inngest
102
149
  > ```
103
150
 
104
- ---
151
+ ## How Workflows Are Defined
152
+
153
+ Workflows are TypeScript functions annotated with JSDoc. You write plain functions for each node, and the annotations describe how they connect.
154
+
155
+ The function signature is the source of truth. Input parameters become input ports, return object fields become output ports. Every function has an `execute` boolean that controls whether it runs or passes through, and returns `onSuccess`/`onFailure` for branching. Expression nodes (marked with `@expression`) skip the execute/branching pattern and map return fields directly to outputs.
156
+
157
+ The `@flowWeaver workflow` block wires node instances together. `@node` creates an instance of a node type, `@connect` wires ports between nodes, and `@path` is shorthand for a linear route. `Start` and `Exit` are virtual nodes representing the workflow's inputs and outputs.
105
158
 
106
- ## Install
159
+ The compiler reads these annotations, builds the execution graph, and generates the body in place between markers. Everything outside the markers stays untouched. Node type functions are never modified.
160
+
161
+ ```typescript
162
+ /**
163
+ * @flowWeaver nodeType
164
+ * @expression
165
+ * @input message - The support message
166
+ * @output context - Classified context
167
+ */
168
+ function classifyIntent(message: string): { context: SupportContext } {
169
+ const intent = /refund|cancel/i.test(message) ? 'billing' : 'general';
170
+ return { context: { message, intent, priority: 'normal' } };
171
+ }
172
+
173
+ // routeAction, llmReply, and escalate are defined the same way:
174
+ // plain functions with @flowWeaver nodeType annotations.
175
+
176
+ /**
177
+ * @flowWeaver workflow
178
+ * @node classify classifyIntent
179
+ * @node route routeAction
180
+ * @node reply llmReply
181
+ * @node esc escalate
182
+ * @path Start -> classify -> route -> reply -> Exit
183
+ * @path route:fail -> esc -> Exit
184
+ * @connect Start.message -> classify.message
185
+ * @connect classify.context -> route.context
186
+ * @param message - The support message
187
+ * @returns reply - Generated reply
188
+ * @returns ticket - Escalation ticket
189
+ */
190
+ export async function supportAgent(
191
+ execute: boolean,
192
+ params: { message: string },
193
+ ): Promise<{
194
+ onSuccess: boolean;
195
+ onFailure: boolean;
196
+ reply: string | null;
197
+ ticket: string | null;
198
+ }> {
199
+ // @flow-weaver-body-start
200
+ // Generated by the compiler. Do not edit.
201
+ // @flow-weaver-body-end
202
+ }
203
+ ```
204
+
205
+ ## CLI Reference
206
+
207
+ | Command | Description |
208
+ |---------|-------------|
209
+ | `fw init` | Scaffold a new project with presets and templates |
210
+ | `fw compile` | Compile workflow files to standalone TypeScript |
211
+ | `fw validate` | Validate workflows without compiling |
212
+ | `fw run` | Execute a workflow with optional debug mode |
213
+ | `fw watch` | Recompile on file changes |
214
+ | `fw dev` | Watch + compile + run loop |
215
+ | `fw describe` | Output workflow structure as JSON, text, Mermaid, ASCII, or paths |
216
+ | `fw diagram` | Generate SVG, HTML, or ASCII diagrams |
217
+ | `fw diff` | Semantic diff between two workflow versions |
218
+ | `fw export` | Export to a deploy target (Inngest, Lambda, Vercel, Cloudflare, etc.) |
219
+ | `fw serve` | Start an HTTP server exposing workflows as endpoints |
220
+ | `fw modify` | Programmatic graph mutations (addNode, removeNode, connect, etc.) |
221
+ | `fw mcp-server` | Start the MCP server for AI editor integration |
222
+ | `fw mcp-setup` | Auto-configure MCP for Claude, Cursor, VS Code, Windsurf, or Codex |
223
+ | `fw docs` | Browse bundled reference documentation |
224
+
225
+ Run `fw --help` or `fw <command> --help` for full options.
226
+
227
+ ## Flow Weaver Studio (Early Beta)
228
+
229
+ A browser-based visual IDE for building workflows. Canvas editor, integrated terminal, real-time diagnostics, and the full CLI available in the cloud.
230
+
231
+ Studio is in early beta. Core editing is live. The visual debugger, AI chat assistant, version history, and deployment dashboard are being actively developed and will ship incrementally. The cloud platform is not yet production-ready, and paid plans are not available yet. Use it to explore and experiment, but expect rough edges.
232
+
233
+ [Open Studio](https://flowweaver.ai/studio) · [Learn more](https://flowweaver.ai/features)
234
+
235
+ ## Weaver (Experimental)
236
+
237
+ Weaver is an optional AI bot that automates the full workflow lifecycle. Give it a task in natural language and it plans, scaffolds, compiles, validates, and fixes issues in a loop until the workflow is correct. It connects to Anthropic, Claude CLI, or GitHub Copilot CLI.
238
+
239
+ - `weaver bot "create a greeting workflow"` handles a task end-to-end with plan approval
240
+ - `weaver run workflow.ts` executes a workflow with an AI agent channel attached
241
+ - `weaver session` polls a task queue continuously for automated pipelines
242
+ - `weaver swarm start` runs multiple bot instances in parallel, with an orchestrator dispatching tasks across them
243
+
244
+ Weaver is itself built as a set of Flow Weaver workflows. Run `weaver eject` to get a local copy you can customize.
107
245
 
108
246
  ```bash
109
- npm install @synergenius/flow-weaver
110
- npx flow-weaver init
247
+ fw market install @synergenius/flow-weaver-pack-weaver
111
248
  ```
112
249
 
113
- The CLI handles the rest.
250
+ > **Weaver is experimental.** The bot, session, and swarm modes work and are being used internally, but the APIs and behavior may change between releases. Weaver is not required to use Flow Weaver. The compiler, CLI, and MCP tools are the stable foundation and work independently.
114
251
 
115
- ---
252
+ ## Documentation
253
+
254
+ Reference documentation is bundled with the CLI. Run `fw docs` to browse topics, or `fw docs <topic>` to read a specific one:
255
+
256
+ ```bash
257
+ fw docs list # List all topics
258
+ fw docs tutorial # Step-by-step first workflow guide
259
+ fw docs concepts # Core concepts
260
+ fw docs jsdoc-grammar # Annotation syntax reference
261
+ fw docs cli-reference # Full CLI command reference
262
+ fw docs search <query> # Search across all docs
263
+ ```
264
+
265
+ **Online resources:**
266
+
267
+ - [Features](https://flowweaver.ai/features)
268
+ - [Compare with Alternatives](https://flowweaver.ai/compare)
269
+ - [License](https://flowweaver.ai/license)
270
+
271
+ ## Community
272
+
273
+ Flow Weaver is built and maintained by a solo developer. If you try it, find a bug, or just want to talk about workflows, the [Discord](https://discord.gg/6Byh3ur2bk) is open. Every message gets read and responded to, usually within a day.
274
+
275
+ If something breaks, [open an issue](https://github.com/synergenius-fw/flow-weaver/issues). Bug reports with reproduction steps get prioritized. Feature requests are welcome too.
276
+
277
+ ## Contributing
278
+
279
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
116
280
 
117
281
  ## License
118
282
 
119
- Licensed under the [Flow Weaver License](https://flowweaver.ai/license). See [LICENSE.md](./LICENSE.md).
283
+ Licensed under the [Flow Weaver Library License](https://flowweaver.ai/license). See [LICENSE](./LICENSE).
284
+
285
+ The license is designed to be generous for the vast majority of users while protecting the project's IP. Here is what it means in practice:
286
+
287
+ **Use freely:**
288
+ - Install, compile, validate, run, and deploy workflows in any project
289
+ - All compiled output is fully yours with no restrictions or attribution required
290
+ - Use in CI/CD pipelines and build systems
291
+ - Host internally for organizations with 15 or fewer people
292
+ - Include as a dependency in larger products where Flow Weaver is not the primary value
293
+
294
+ **Requires a commercial license:**
295
+ - Internal hosting for organizations with more than 15 people
296
+ - Building a hosted or standalone workflow authoring product
297
+ - Offering Flow Weaver capabilities as a managed service to third parties
298
+
299
+ **Never permitted:**
300
+ - Using source code, tests, documentation, or outputs as AI/ML training data to replicate the functionality
301
+ - Extracting specifications to build competing software
302
+
303
+ If you are unsure whether your use case needs a commercial license, reach out at support@synergenius.pt. The answer is probably "you're fine."
@@ -5987,7 +5987,7 @@ var VERSION;
5987
5987
  var init_generated_version = __esm({
5988
5988
  "src/generated-version.ts"() {
5989
5989
  "use strict";
5990
- VERSION = "0.27.0";
5990
+ VERSION = "0.27.3";
5991
5991
  }
5992
5992
  });
5993
5993
 
@@ -88468,7 +88468,7 @@ function parseIntStrict(value) {
88468
88468
  // src/cli/index.ts
88469
88469
  init_logger();
88470
88470
  init_error_utils();
88471
- var version2 = true ? "0.27.0" : "0.0.0-dev";
88471
+ var version2 = true ? "0.27.3" : "0.0.0-dev";
88472
88472
  var program2 = new Command();
88473
88473
  program2.name("fw").description("Flow Weaver Annotations - Compile and validate workflow files").option("-v, --version", "Output the current version").option("--no-color", "Disable colors").option("--color", "Force colors").on("option:version", () => {
88474
88474
  logger.banner(version2);
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.27.0";
1
+ export declare const VERSION = "0.27.3";
2
2
  //# sourceMappingURL=generated-version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by scripts/generate-version.ts — do not edit manually
2
- export const VERSION = '0.27.0';
2
+ export const VERSION = '0.27.3';
3
3
  //# sourceMappingURL=generated-version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.27.0",
3
+ "version": "0.27.3",
4
4
  "description": "Deterministic workflow compiler for AI agents. Compiles to standalone TypeScript, no runtime dependencies.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -149,6 +149,8 @@
149
149
  ],
150
150
  "author": "Ricardo José Horta Morais",
151
151
  "license": "SEE LICENSE IN LICENSE",
152
+ "homepage": "https://flowweaver.ai",
153
+ "bugs": "https://github.com/synergenius-fw/flow-weaver/issues",
152
154
  "repository": {
153
155
  "type": "git",
154
156
  "url": "https://github.com/synergenius-fw/flow-weaver.git"