@elsium-ai/workflows 0.1.6 → 0.2.0

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 ADDED
@@ -0,0 +1,49 @@
1
+ # @elsium-ai/workflows
2
+
3
+ Multi-step workflow pipelines and DAG execution for [ElsiumAI](https://github.com/elsium-ai/elsium-ai).
4
+
5
+ [![npm](https://img.shields.io/npm/v/@elsium-ai/workflows.svg)](https://www.npmjs.com/package/@elsium-ai/workflows)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/elsium-ai/elsium-ai/blob/main/LICENSE)
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @elsium-ai/workflows @elsium-ai/core
12
+ ```
13
+
14
+ ## What's Inside
15
+
16
+ - **Sequential Steps** — Chain operations with automatic data passing
17
+ - **Parallel Execution** — Run independent steps concurrently
18
+ - **Branching** — Conditional workflow paths based on runtime results
19
+ - **Retries** — Per-step retry policies with backoff
20
+
21
+ ## Usage
22
+
23
+ ```typescript
24
+ import { defineWorkflow, step } from '@elsium-ai/workflows'
25
+
26
+ const pipeline = defineWorkflow('analyze', [
27
+ step('fetch', async (input) => {
28
+ return await fetchData(input.url)
29
+ }),
30
+ step('process', async (data) => {
31
+ return await processData(data)
32
+ }),
33
+ step('summarize', async (processed) => {
34
+ return await llm.complete({
35
+ messages: [{ role: 'user', content: `Summarize: ${processed}` }],
36
+ })
37
+ }),
38
+ ])
39
+
40
+ const result = await pipeline.run({ url: 'https://example.com' })
41
+ ```
42
+
43
+ ## Part of ElsiumAI
44
+
45
+ This package is the workflow layer of the [ElsiumAI](https://github.com/elsium-ai/elsium-ai) framework. See the [full documentation](https://github.com/elsium-ai/elsium-ai) for guides and examples.
46
+
47
+ ## License
48
+
49
+ [MIT](https://github.com/elsium-ai/elsium-ai/blob/main/LICENSE)
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- // @bun
2
1
  // ../core/src/errors.ts
3
2
  class ElsiumError extends Error {
4
3
  code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elsium-ai/workflows",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "Multi-step workflow pipelines and DAG execution for ElsiumAI",
5
5
  "license": "MIT",
6
6
  "author": "Eric Utrera <ebutrera9103@gmail.com>",
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "scripts": {
25
- "build": "bun build ./src/index.ts --outdir ./dist --target bun && bun x tsc -p tsconfig.build.json --emitDeclarationOnly",
25
+ "build": "bun build ./src/index.ts --outdir ./dist --target node && bun x tsc -p tsconfig.build.json --emitDeclarationOnly",
26
26
  "dev": "bun --watch src/index.ts"
27
27
  },
28
28
  "dependencies": {
@@ -30,7 +30,6 @@
30
30
  "zod": "^3.24.0"
31
31
  },
32
32
  "devDependencies": {
33
- "bun-types": "^1.3.0",
34
33
  "typescript": "^5.7.0"
35
34
  }
36
35
  }