@nodetool-ai/workflow-services 0.8.14 → 0.8.17

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,51 @@
1
+ # Workflow services
2
+
3
+ HTTP-independent workflow packaging: the `.nodetool` bundle codec and the
4
+ export of workflow assets as package assets. Both are storage-agnostic. The
5
+ caller supplies the functions that read and write asset bytes.
6
+
7
+ ## Bundles
8
+
9
+ A bundle is a zip with `manifest.json`, one `workflows/<file>.json` per
10
+ workflow, content-addressed `assets/<sha256>.<ext>` files shared across the
11
+ workflows, and an optional `thumbnail.jpg`. Export rewrites `asset://` and
12
+ `/api/storage/` references to `bundle://<file>`. Import rewrites them back to
13
+ whatever `storeAsset` returns.
14
+
15
+ ```ts
16
+ import {
17
+ packWorkflowsBundle,
18
+ importWorkflowBundle
19
+ } from "@nodetool-ai/workflow-services";
20
+
21
+ const { bytes, skipped } = await packWorkflowsBundle({
22
+ workflows: [{ id: "abc", name: "Demo", graph }],
23
+ fetchAssetBytes: async (ref) => readAssetBytes(ref)
24
+ });
25
+
26
+ const result = await importWorkflowBundle(bytes, {
27
+ storeAsset: async ({ bytes, fileName, contentType }) => ({
28
+ uri: await saveAsset(bytes, fileName, contentType)
29
+ }),
30
+ verifyChecksums: true
31
+ });
32
+ ```
33
+
34
+ `readAssetBytes` and `saveAsset` stand for your storage. `packWorkflowBundle`
35
+ packs a single workflow. `unpackWorkflowBundle` and `verifyBundleChecksums`
36
+ read a bundle without storing anything. Unpacking rejects archives over
37
+ 512 MB uncompressed or with more than 10,000 entries. Remote and local-file
38
+ references are embedded only with `includeRemote: true`. References that
39
+ cannot be resolved stay as they are and appear in `skipped`.
40
+
41
+ `nodetool export-bundle` and `nodetool import-bundle` call this codec. See
42
+ [CLI](../../docs/cli.md).
43
+
44
+ ## Package assets
45
+
46
+ `materializeWorkflowConstantAssets` turns a workflow into a shippable example.
47
+ It writes each user asset the graph references to
48
+ `<assetsRoot>/<packageName>/<file>` and rewrites the reference to
49
+ `package://<packageName>/<file>`. The server resolves those through
50
+ `/api/assets/packages/...`. `collectWorkflowAssets` and `transformMediaRefs`
51
+ are the lower-level steps the bundle codec shares.
@@ -1 +1 @@
1
- 2026-11-19T19:42:34.937Z
1
+ 2026-11-26T15:01:53.695Z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodetool-ai/workflow-services",
3
- "version": "0.8.14",
3
+ "version": "0.8.17",
4
4
  "description": "Portable workflow bundles and package asset export",
5
5
  "type": "module",
6
6
  "engines": {
@@ -27,7 +27,7 @@
27
27
  "lint": "node ../../scripts/run-tsc.mjs --noEmit"
28
28
  },
29
29
  "dependencies": {
30
- "@nodetool-ai/protocol": "0.8.14",
30
+ "@nodetool-ai/protocol": "0.8.17",
31
31
  "fflate": "^0.8.2"
32
32
  },
33
33
  "devDependencies": {