@multiplier-labs/stepflow 0.3.4 → 0.3.8
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 +9 -0
- package/dist/{chunk-5XJBAPXF.js → chunk-4IDPWWGS.js} +15 -4
- package/dist/chunk-4IDPWWGS.js.map +1 -0
- package/dist/{chunk-U3PCVK6O.js → chunk-T6GAZBTQ.js} +70 -38
- package/dist/chunk-T6GAZBTQ.js.map +1 -0
- package/dist/{chunk-FMPJBK2N.js → chunk-TVSADUYU.js} +3 -5
- package/dist/{chunk-FMPJBK2N.js.map → chunk-TVSADUYU.js.map} +1 -1
- package/dist/events/index.d.ts +43 -3
- package/dist/events/index.js +7 -3
- package/dist/{index-Cd0IZ40L.d.ts → index-CdXDv30T.d.ts} +10 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +159 -46
- package/dist/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/index.js +1 -1
- package/dist/storage/index.d.ts +6 -4
- package/dist/storage/index.js +1 -1
- package/dist/{types-DSEjiLMj.d.ts → types-BfWe5yP6.d.ts} +2 -0
- package/package.json +26 -14
- package/.codekin/reports/code-review/2026-04-11_code-review-daily.md +0 -146
- package/.codekin/reports/code-review/2026-04-13_code-review-daily.md +0 -74
- package/.codekin/reports/comments/2026-04-04_comment-assessment.md +0 -179
- package/.codekin/reports/comments/2026-04-11_comment-assessment.md +0 -161
- package/.codekin/reports/comments/2026-04-14_comment-assessment.md +0 -34
- package/.codekin/reports/complexity/2026-04-03_complexity-report.md +0 -152
- package/.codekin/reports/complexity/2026-04-11_complexity-report.md +0 -152
- package/.codekin/reports/complexity/2026-04-14_complexity-report.md +0 -34
- package/.codekin/reports/dependencies/2026-04-04_dependency-health.md +0 -94
- package/.codekin/reports/dependencies/2026-04-11_dependency-health.md +0 -93
- package/.codekin/reports/docs-audit/2026-04-04_docs-audit.md +0 -10
- package/.codekin/reports/docs-audit/2026-04-11_docs-audit.md +0 -138
- package/.codekin/reports/docs-audit/2026-04-13_docs-audit.md +0 -121
- package/.codekin/reports/security/2026-04-03_security-audit.md +0 -208
- package/.codekin/reports/security/2026-04-11_security-audit.md +0 -297
- package/.github/CODEOWNERS +0 -15
- package/.github/dependabot.yml +0 -23
- package/.github/workflows/ci.yml +0 -38
- package/.github/workflows/publish.yml +0 -42
- package/.github/workflows/security.yml +0 -29
- package/CHANGELOG.md +0 -34
- package/SECURITY.md +0 -40
- package/dist/chunk-5XJBAPXF.js.map +0 -1
- package/dist/chunk-U3PCVK6O.js.map +0 -1
- package/docs/github-packages-setup.md +0 -97
- package/docs/stepflow-api-reference.md +0 -1663
- package/src/core/engine/concurrency.ts +0 -229
- package/src/core/engine/lifecycle.ts +0 -176
- package/src/core/engine.test.ts +0 -1435
- package/src/core/engine.ts +0 -598
- package/src/core/index.ts +0 -7
- package/src/core/orchestrator/persistence.ts +0 -165
- package/src/core/orchestrator/plan-resolution.ts +0 -140
- package/src/core/orchestrator/state-transitions.ts +0 -109
- package/src/core/orchestrator/step-runner.ts +0 -427
- package/src/core/orchestrator.ts +0 -252
- package/src/core/types.ts +0 -220
- package/src/events/index.ts +0 -8
- package/src/events/memory.test.ts +0 -107
- package/src/events/memory.ts +0 -92
- package/src/events/socketio.test.ts +0 -378
- package/src/events/socketio.ts +0 -262
- package/src/events/types.ts +0 -118
- package/src/events/webhook.test.ts +0 -949
- package/src/events/webhook.ts +0 -807
- package/src/index.ts +0 -270
- package/src/planning/evaluate-condition.test.ts +0 -153
- package/src/planning/evaluate-condition.ts +0 -105
- package/src/planning/index.ts +0 -55
- package/src/planning/planner.ts +0 -494
- package/src/planning/planning.test.ts +0 -727
- package/src/planning/registry.test.ts +0 -398
- package/src/planning/registry.ts +0 -283
- package/src/planning/types.ts +0 -566
- package/src/scheduler/cron.test.ts +0 -479
- package/src/scheduler/cron.ts +0 -438
- package/src/scheduler/index.ts +0 -8
- package/src/scheduler/postgres-persistence.ts +0 -530
- package/src/scheduler/sqlite-persistence.test.ts +0 -235
- package/src/scheduler/sqlite-persistence.ts +0 -286
- package/src/scheduler/types.ts +0 -73
- package/src/storage/index.ts +0 -27
- package/src/storage/memory.test.ts +0 -349
- package/src/storage/memory.ts +0 -227
- package/src/storage/postgres-core.ts +0 -550
- package/src/storage/postgres-migration.test.ts +0 -69
- package/src/storage/postgres-transaction-pagination.test.ts +0 -107
- package/src/storage/postgres.ts +0 -835
- package/src/storage/sqlite-core.ts +0 -151
- package/src/storage/sqlite.test.ts +0 -642
- package/src/storage/sqlite.ts +0 -717
- package/src/storage/types.ts +0 -343
- package/src/utils/errors.test.ts +0 -150
- package/src/utils/errors.ts +0 -161
- package/src/utils/id.ts +0 -21
- package/src/utils/index.ts +0 -10
- package/src/utils/logger.test.ts +0 -121
- package/src/utils/logger.ts +0 -96
- package/src/utils/pinned-fetch.test.ts +0 -84
- package/src/utils/pinned-fetch.ts +0 -118
- package/src/utils/postgres-deps.ts +0 -79
- package/src/utils/retry.test.ts +0 -177
- package/src/utils/retry.ts +0 -121
- package/src/utils/safe-json.test.ts +0 -166
- package/src/utils/safe-json.ts +0 -107
- package/src/utils/webhook-signature.test.ts +0 -111
- package/src/utils/webhook-signature.ts +0 -74
- package/tsconfig.json +0 -21
- package/tsup.config.ts +0 -14
- package/vitest.config.ts +0 -9
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# Dependency Health Report: stepflow
|
|
2
|
-
|
|
3
|
-
**Date**: 2026-04-04T06:58:47.515Z
|
|
4
|
-
**Repository**: /srv/repos/stepflow
|
|
5
|
-
**Branch**: main
|
|
6
|
-
**Workflow Run**: caf445eb-aa6a-4887-a75d-0068f9ea47ac
|
|
7
|
-
**Session**: 40a62583-ab64-444b-be60-b6caef82eab5
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Now I have all the data needed. Here is the full dependency health assessment:
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Summary
|
|
16
|
-
|
|
17
|
-
| Package Manager | Total Deps | Outdated | Vulnerabilities | Risk Level |
|
|
18
|
-
|---|---|---|---|---|
|
|
19
|
-
| npm | 296 | 7 | 3 (2 high, 1 moderate) | **High** |
|
|
20
|
-
|
|
21
|
-
**Notes:** 296 total installed packages (64 prod, 231 dev, 87 optional). Direct production dependencies: `cron-parser`, `re2`. Direct devDependencies: 10 packages. Peer dependencies: `better-sqlite3`, `kysely`, `pg`.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Security Vulnerabilities
|
|
26
|
-
|
|
27
|
-
| Package | Severity | Advisory | Description | Fixed In |
|
|
28
|
-
|---|---|---|---|---|
|
|
29
|
-
| `kysely` | **HIGH** (CVSS 8.1) | [GHSA-8cpq-38p9-67gx](https://github.com/advisories/GHSA-8cpq-38p9-67gx) | MySQL SQL Injection via insufficient backslash escaping in `sql.lit(string)` and similar string-literal methods | `>=0.28.14` |
|
|
30
|
-
| `kysely` | **HIGH** (CVSS 8.1) | [GHSA-fr9j-6mvq-frcv](https://github.com/advisories/GHSA-fr9j-6mvq-frcv) | MySQL SQL Injection via backslash escape bypass in non-type-safe JSON path key usage | `>=0.28.14` |
|
|
31
|
-
| `picomatch` | **HIGH** (CVSS 7.5) | [GHSA-c2c7-rcm5-vvqj](https://github.com/advisories/GHSA-c2c7-rcm5-vvqj) | ReDoS vulnerability via extglob quantifiers — denial-of-service via malicious glob patterns (indirect dep of `chokidar`/`tsup`) | `>=4.0.4` |
|
|
32
|
-
| `brace-expansion` | **MODERATE** (CVSS 6.5) | [GHSA-f886-m6hf-6m8v](https://github.com/advisories/GHSA-f886-m6hf-6m8v) | Zero-step sequence (e.g. `{1..0}`) causes process hang and memory exhaustion (indirect dep) | `>=5.0.5` |
|
|
33
|
-
| `picomatch` | MODERATE (CVSS 5.3) | [GHSA-3v7f-55p6-f55p](https://github.com/advisories/GHSA-3v7f-55p6-f55p) | Method injection via POSIX character classes causing incorrect glob matching (indirect dep of `chokidar`/`tsup`) | `>=4.0.4` |
|
|
34
|
-
|
|
35
|
-
**Scope assessment:** The `kysely` vulnerabilities are in a peer dependency used for the PostgreSQL/MySQL adapter path. They affect MySQL dialect users who pass unsanitised input via `sql.lit()` or JSON path keys. SQLite users are not affected. The `picomatch` and `brace-expansion` issues are in dev toolchain transitive deps (`tsup` → `chokidar`) and do not affect the published package.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Outdated Dependencies
|
|
40
|
-
|
|
41
|
-
| Package | Current | Latest | Age of Current | Type |
|
|
42
|
-
|---|---|---|---|---|
|
|
43
|
-
| `@types/node` | 22.19.5 | 25.5.2 | ~84 days (3 major versions behind) | devDependency |
|
|
44
|
-
| `typescript` | 5.9.3 | 6.0.2 | — (1 major version behind; v6 released 2026-03-23) | devDependency |
|
|
45
|
-
| `re2` | 1.23.3 | 1.24.0 | ~54 days (released 2026-02-09) | dependency (prod) |
|
|
46
|
-
| `kysely` | 0.28.12 | 0.28.15 | ~22 days (released 2026-03-13) | peerDependency / devDependency |
|
|
47
|
-
| `vitest` | 4.1.0 | 4.1.2 | ~23 days (released 2026-03-12) | devDependency |
|
|
48
|
-
| `@vitest/coverage-v8` | 4.1.0 | 4.1.2 | ~23 days | devDependency |
|
|
49
|
-
| `@types/pg` | 8.18.0 | 8.20.0 | — (2 minor versions behind) | devDependency |
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Abandoned / Unmaintained Packages
|
|
54
|
-
|
|
55
|
-
All items below are **transitive/indirect** dependencies — none are direct. Most trace back to the `prebuild-install` → `node-pre-gyp` chain used by `better-sqlite3` and `re2` for native addon installation.
|
|
56
|
-
|
|
57
|
-
| Package | Installed Version | Last npm Publish | Age |
|
|
58
|
-
|---|---|---|---|
|
|
59
|
-
| `any-promise` | 1.3.0 | 2022-06-13 | ~3.8 years |
|
|
60
|
-
| `tunnel-agent` | 0.6.0 | 2022-06-27 | ~3.8 years |
|
|
61
|
-
| `util-deprecate` | 1.0.2 | 2022-06-28 | ~3.8 years |
|
|
62
|
-
| `thenify` | 3.3.1 | 2022-06-27 | ~3.8 years |
|
|
63
|
-
| `github-from-package` | 0.1.1 | 2022-11-11 | ~3.4 years |
|
|
64
|
-
| `deep-extend` | 0.6.0 | 2023-07-10 | ~2.7 years |
|
|
65
|
-
| `safe-buffer` | 5.2.1 | 2023-07-10 | ~2.7 years |
|
|
66
|
-
| `bindings` | 1.5.0 | 2023-07-10 | ~2.7 years |
|
|
67
|
-
| `file-uri-to-path` | 2.0.0 | 2023-07-10 | ~2.7 years |
|
|
68
|
-
| `mz` | 2.7.0 | 2023-11-07 | ~2.4 years |
|
|
69
|
-
|
|
70
|
-
These packages are effectively stable and in maintenance-only mode (no API surface changes expected). Their abandonment is low operational risk, but they represent supply-chain exposure if they are ever compromised on npm.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Recommendations
|
|
75
|
-
|
|
76
|
-
1. **[CRITICAL] Update `kysely` to `>=0.28.14` immediately.** Two high-severity SQL injection CVEs (GHSA-8cpq-38p9-67gx, GHSA-fr9j-6mvq-frcv) affect all versions `<=0.28.13`. The fix is available in `0.28.15` (released 2026-03-31). Since `kysely` is a peer dependency, consumers must update their own `kysely` version; update the peer/dev dep range floor in `package.json` to `>=0.28.14` and run `npm install` to update the lockfile.
|
|
77
|
-
|
|
78
|
-
2. **[HIGH] Update `picomatch` to `>=4.0.4`.** Two CVEs (ReDoS GHSA-c2c7-rcm5-vvqj at CVSS 7.5, method injection GHSA-3v7f-55p6-f55p) are present in the installed `4.0.x` range. This is pulled in transitively by `tsup`/`chokidar`. Run `npm update picomatch` or update `chokidar` when a version that pins `picomatch>=4.0.4` is released.
|
|
79
|
-
|
|
80
|
-
3. **[MODERATE] Update `brace-expansion` to `>=5.0.5`.** The installed range `4.0.0–5.0.4` is vulnerable to a process-hanging ReDoS (GHSA-f886-m6hf-6m8v, CVSS 6.5). Run `npm update brace-expansion` to pull in the patched version.
|
|
81
|
-
|
|
82
|
-
4. **[HIGH] Plan migration to TypeScript 6.** TypeScript 6.0.2 is now available and includes breaking changes (stricter inference, removed deprecated emit options). Schedule an upgrade cycle: run `tsc` against the new compiler on a branch, address any new type errors, then merge. TypeScript 5.9 will not receive bug fixes once support ends.
|
|
83
|
-
|
|
84
|
-
5. **[MEDIUM] Update `@types/node` from `22.x` to `22.x` latest (semver-wanted), and plan a roadmap to `25.x`.** The installed version (`22.19.5`) is 3 major type-definition versions behind `25.5.2`. While types don't affect runtime, using stale `@types/node` means missing Node.js API types and incorrect/missing signatures for newer APIs. Update to the wanted `22.19.17` now, then evaluate a bump to `24.x` or `25.x` after the TypeScript 6 migration.
|
|
85
|
-
|
|
86
|
-
6. **[MEDIUM] Update `re2` to `1.24.0`.** The production `re2` package (a direct dependency) has a new minor release. As a native addon that is loaded at runtime, staying current ensures compatibility with newer Node.js ABI versions and any security fixes in the C++ RE2 library.
|
|
87
|
-
|
|
88
|
-
7. **[LOW] Update `vitest` and `@vitest/coverage-v8` to `4.1.2`.** These are patch releases that likely include bug fixes. They are low-risk to update (`npm update vitest @vitest/coverage-v8`) and should be kept in sync since mismatched versions can cause coverage reporting failures.
|
|
89
|
-
|
|
90
|
-
8. **[LOW] Audit the `prebuild-install` dependency chain.** Ten transitive packages in the native addon prebuilt-install chain (`tunnel-agent`, `any-promise`, `github-from-package`, etc.) have not been published in 2–4 years. Consider whether `better-sqlite3` or `re2` have moved to alternative install mechanisms that shed these deps, and upgrade those packages to their latest versions to reduce supply-chain surface area.
|
|
91
|
-
|
|
92
|
-
9. **[INFO] Verify `kysely` peer dependency minimum version in `package.json`.** The current `peerDependencies` floor is `>=0.27.0`, which includes the now-vulnerable range `<=0.28.13`. Update the peer dep constraint to `>=0.28.14` to prevent downstream consumers from inadvertently installing a vulnerable version of `kysely` when using this library.
|
|
93
|
-
|
|
94
|
-
10. **[INFO] Consider replacing `tunnel-agent` and `safe-buffer` transitive deps long-term.** Both are effectively superseded by Node.js built-ins (`https.Agent` and `Buffer` respectively). They persist only as transitive deps of `prebuild-install`. File upstream issues or switch to alternative prebuilt strategies (e.g., `node-gyp-build` with bundled binaries) if those deps cannot be shed through normal upgrades.
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Dependency Health Report: stepflow
|
|
2
|
-
|
|
3
|
-
**Date**: 2026-04-11T02:46:13.072Z
|
|
4
|
-
**Repository**: /srv/repos/stepflow
|
|
5
|
-
**Branch**: main
|
|
6
|
-
**Workflow Run**: 672a3272-e7d7-4127-b865-4e02a47eac94
|
|
7
|
-
**Session**: 0b582a44-067e-4ef0-b863-b0cd566a81fd
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Now I have all the data needed to compile the report.
|
|
12
|
-
|
|
13
|
-
## Dependency Health Assessment — `@multiplier-labs/stepflow` v0.2.6
|
|
14
|
-
|
|
15
|
-
_Assessment date: 2026-04-11 | Package manager: **npm** | Lock file: `package-lock.json`_
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Summary
|
|
20
|
-
|
|
21
|
-
| Package Manager | Total Deps | Outdated (direct) | Vulnerabilities | Risk Level |
|
|
22
|
-
|---|---|---|---|---|
|
|
23
|
-
| npm | 296 (12 direct) | 7 | 4 (3 high, 1 moderate) | **HIGH** |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Security Vulnerabilities
|
|
28
|
-
|
|
29
|
-
| Package | Severity | Advisory | Description | Fixed In |
|
|
30
|
-
|---|---|---|---|---|
|
|
31
|
-
| `kysely` | **HIGH** (CVSS 8.1) | GHSA-8cpq-38p9-67gx | SQL Injection via insufficient backslash escaping in `sql.lit()` and similar string-literal methods | `0.28.14` |
|
|
32
|
-
| `kysely` | **HIGH** (CVSS 8.1) | GHSA-fr9j-6mvq-frcv | SQL Injection via backslash escape bypass in non-type-safe JSON path key usage | `0.28.14` |
|
|
33
|
-
| `picomatch` | **HIGH** (CVSS 7.5) | GHSA-c2c7-rcm5-vvqj | ReDoS (Denial of Service) via extglob quantifiers — affects transitive dep from `vitest`/`chokidar` chain | `4.0.4` |
|
|
34
|
-
| `vite` | **HIGH** | GHSA-p9ff-h696-f583 | Arbitrary file read via Vite Dev Server WebSocket — transitive dep via `vitest` | `8.0.5` |
|
|
35
|
-
| `vite` | **HIGH** | GHSA-v2wj-q39q-566r | `server.fs.deny` access control bypass with query strings — transitive dep via `vitest` | `8.0.5` |
|
|
36
|
-
| `vite` | Moderate | GHSA-4w7w-66w2-5vf9 | Path traversal in optimized deps `.map` handling — transitive dep via `vitest` | `8.0.5` |
|
|
37
|
-
| `brace-expansion` | Moderate (CVSS 6.5) | GHSA-f886-m6hf-6m8v | Zero-step sequence causes process hang and memory exhaustion — transitive dep | `5.0.5` |
|
|
38
|
-
| `picomatch` | Moderate (CVSS 5.3) | GHSA-3v7f-55p6-f55p | Method injection in POSIX character classes causes incorrect glob matching | `4.0.4` |
|
|
39
|
-
|
|
40
|
-
> **Note:** `kysely` appears as both a `devDependency` and `peerDependency` in this project. The SQL injection issues affect MySQL dialect users specifically; SQLite and PostgreSQL dialects have lower exposure, but upgrading is still critical.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Outdated Dependencies
|
|
45
|
-
|
|
46
|
-
| Package | Current | Latest | Gap | Type |
|
|
47
|
-
|---|---|---|---|---|
|
|
48
|
-
| `@types/node` | `22.19.5` | `25.6.0` | 3 major versions | devDependency |
|
|
49
|
-
| `typescript` | `5.9.3` | `6.0.2` | 1 major version | devDependency |
|
|
50
|
-
| `kysely` | `0.28.12` | `0.28.16` | 4 patches (**security**) | devDependency / peerDependency |
|
|
51
|
-
| `re2` | `1.23.3` | `1.24.0` | 1 minor | production dependency |
|
|
52
|
-
| `vitest` | `4.1.0` | `4.1.4` | 4 patches (transitive vuln fix) | devDependency |
|
|
53
|
-
| `@vitest/coverage-v8` | `4.1.0` | `4.1.4` | 4 patches | devDependency |
|
|
54
|
-
| `@types/pg` | `8.18.0` | `8.20.0` | 2 patches | devDependency |
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Abandoned / Unmaintained Packages
|
|
59
|
-
|
|
60
|
-
These are all **transitive dependencies** pulled in via the build/test toolchain (`tsup`, `prebuild-install`, `vitest`). Direct replacement is not possible without upstream action, but they represent long-term risk.
|
|
61
|
-
|
|
62
|
-
| Package | Installed Version | Est. Last Release | Dependency Path | Notes |
|
|
63
|
-
|---|---|---|---|---|
|
|
64
|
-
| `any-promise` | `1.3.0` | ~2016 (~10 yrs) | `tsup` → `mz` → `any-promise` | Effectively abandoned; superseded by native Promises |
|
|
65
|
-
| `object-assign` | `4.1.1` | ~2017 (~9 yrs) | `tsup` → build chain | Superseded by `Object.assign()` natively in Node.js |
|
|
66
|
-
| `file-uri-to-path` | `1.0.0` | ~2017 (~9 yrs) | `bindings` → `file-uri-to-path` | No longer needed for modern Node.js |
|
|
67
|
-
| `tunnel-agent` | `0.6.0` | ~2018 (~8 yrs) | `prebuild-install` → `request` chain | `request` itself is deprecated |
|
|
68
|
-
| `safe-buffer` | `5.2.1` | ~2020 (~6 yrs) | `readable-stream` → `safe-buffer` | Superseded by native `Buffer` APIs |
|
|
69
|
-
| `source-map` | `0.7.6` | ~2021 (~5 yrs) | `sucrase` → `source-map` | Minimal maintenance; `sucrase` is a dev-only tool |
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Recommendations
|
|
74
|
-
|
|
75
|
-
1. **[Critical] Upgrade `kysely` to `≥0.28.14` immediately.** Two HIGH-severity SQL injection vulnerabilities (GHSA-8cpq-38p9-67gx, GHSA-fr9j-6mvq-frcv) affect all versions ≤0.28.13. Update both `devDependencies` and adjust `peerDependencies` range (`"kysely": ">=0.27.0"`) to document the minimum safe version. The fix is available at `0.28.16` (current latest).
|
|
76
|
-
|
|
77
|
-
2. **[High] Upgrade `vitest` to `≥4.1.4` to pull in patched `vite` (≥8.0.5) and `picomatch` (≥4.0.4).** Three HIGH/moderate vulnerabilities in `vite` (GHSA-p9ff-h696-f583, GHSA-v2wj-q39q-566r, GHSA-4w7w-66w2-5vf9) and two in `picomatch` are fixed by bumping vitest. Although these only run in the dev server context, they pose a real risk in CI or development environments.
|
|
78
|
-
|
|
79
|
-
3. **[High] Run `npm audit fix` to resolve `brace-expansion` (GHSA-f886-m6hf-6m8v).** This moderate ReDoS/memory-exhaustion vulnerability is in a transitive dep with a straightforward fix available. Running `npm audit fix` should resolve all 4 outstanding advisories once `kysely` and `vitest` are updated first.
|
|
80
|
-
|
|
81
|
-
4. **[Medium] Upgrade `@types/node` from `22.x` to `24.x` (or `25.x`) in a planned sprint.** The installed version is 3 major versions behind. While `@types/node` bumps rarely break code, staying far behind obscures real type errors and misses new Node.js API typings. Align with the Node.js LTS version in use.
|
|
82
|
-
|
|
83
|
-
5. **[Medium] Evaluate `TypeScript 6.x` migration.** The project uses `typescript ^5.7.2` while `6.0.2` is now the latest stable release. TypeScript 6 ships breaking changes (notably around module resolution and `erasableSyntaxOnly`). Plan a migration branch to assess impact on the codebase and tsup build config.
|
|
84
|
-
|
|
85
|
-
6. **[Medium] Update `re2` to `1.24.0`.** `re2` is a **production dependency** — it directly affects the package published to consumers. Patch updates should be applied promptly; `1.24.0` is a minor bump with bug fixes.
|
|
86
|
-
|
|
87
|
-
7. **[Low] Update peer dependency minimum for `kysely` to `>=0.28.14` in `package.json`.** Even if downstream users manage their own `kysely` install, advertising a range that includes vulnerable versions is irresponsible. Tightening the peer constraint signals the minimum safe version to consumers.
|
|
88
|
-
|
|
89
|
-
8. **[Low] Audit and potentially remove `prebuild-install` → `tunnel-agent` chain.** `tunnel-agent` is pulled in via `re2`'s native build tooling (`prebuild-install`). Check whether `re2` 1.24.0 still ships prebuilt binaries for all target platforms; if so, `prebuild-install` (and its abandoned transitive deps) may not run at all in production.
|
|
90
|
-
|
|
91
|
-
9. **[Low] Pin `vitest` and `@vitest/coverage-v8` to matching patch versions** (`4.1.4`). The `^4.1.0` range means CI will auto-install the latest patch, but local developer environments may lag. Lock to a specific version to ensure consistent test environments across machines.
|
|
92
|
-
|
|
93
|
-
10. **[Informational] No production bundle contamination detected.** All dev dependencies (`vitest`, `tsup`, `typescript`, `@types/*`) are correctly scoped to `devDependencies` and excluded from the published package. The only two production dependencies are `cron-parser` and `re2`, which is appropriately lean for a library.
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# Documentation Audit: stepflow
|
|
2
|
-
|
|
3
|
-
**Date**: 2026-04-11T02:47:05.901Z
|
|
4
|
-
**Repository**: /srv/repos/stepflow
|
|
5
|
-
**Branch**: main
|
|
6
|
-
**Workflow Run**: 24ff56b6-9441-43f2-8563-c985920b774f
|
|
7
|
-
**Session**: ba7bd622-3564-476e-976b-21918677f818
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Now I have enough information to write the complete report.
|
|
12
|
-
|
|
13
|
-
## Summary
|
|
14
|
-
|
|
15
|
-
**Audit date:** 2026-04-11 | **Repository:** `/srv/repos/stepflow` | **Branch:** `main`
|
|
16
|
-
|
|
17
|
-
The repository contains **3 documentation files** totalling **2,167 lines**. All three share the same commit timestamp (`2026-04-11 05:43:05`) from the initial import, so git-log staleness analysis is not applicable — all docs and code landed together. Cross-referencing documentation claims against the actual TypeScript source reveals the documentation is largely accurate and comprehensive, with **2 confirmed accuracy issues** and **1 minor fragmentation observation**.
|
|
18
|
-
|
|
19
|
-
**Health rating: Well-maintained** — minimal sprawl, no redundancy, nearly all claims verified against source.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Documentation Inventory
|
|
24
|
-
|
|
25
|
-
| Path | Lines | Last Modified | Purpose | Status |
|
|
26
|
-
|------|-------|---------------|---------|--------|
|
|
27
|
-
| `README.md` | 408 | 2026-04-11 | Project overview, quick start, core concepts, feature tour, storage/event/scheduler options, planning system intro | Current |
|
|
28
|
-
| `docs/github-packages-setup.md` | 97 | 2026-04-11 | Publish and consume `@multiplier-labs/stepflow` via GitHub Packages; CI/CD token setup | Current |
|
|
29
|
-
| `docs/stepflow-api-reference.md` | 1,662 | 2026-04-11 | Full API reference: every class, interface, method signature, configuration option, PostgreSQL schema, integration patterns | Current (2 minor issues) |
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Staleness Findings
|
|
34
|
-
|
|
35
|
-
Because all documentation and source files share the same initial-commit timestamp, there is no temporal drift to report — no doc file predates its covered code or vice versa. No broken internal cross-links were found between the three files; the README's link to `docs/stepflow-api-reference.md` resolves correctly, and the GitHub Packages guide is self-contained.
|
|
36
|
-
|
|
37
|
-
No references to non-existent file paths, removed CLI commands, or deprecated config keys were found in any of the three documents.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Accuracy Issues
|
|
42
|
-
|
|
43
|
-
### Issue 1 — Non-existent `getSchedule()` method (confirmed)
|
|
44
|
-
|
|
45
|
-
**File:** `docs/stepflow-api-reference.md`
|
|
46
|
-
**Location:** Scheduler section (approximate line 499)
|
|
47
|
-
**Claim:** Documents a `scheduler.getSchedule(scheduleId: string): Promise<WorkflowSchedule>` method.
|
|
48
|
-
**Reality:** The `Scheduler` interface in `src/scheduler/types.ts` defines only `getSchedules(): Promise<WorkflowSchedule[]>` (plural, no `scheduleId` parameter). The singular `getSchedule(id)` does not exist on the interface.
|
|
49
|
-
**Impact:** Any developer who copies the shown usage will get a TypeScript compile error and runtime failure.
|
|
50
|
-
|
|
51
|
-
### Issue 2 — `getInterruptedRuns()` method needs verification
|
|
52
|
-
|
|
53
|
-
**File:** `docs/stepflow-api-reference.md`
|
|
54
|
-
**Location:** Storage adapter section (approximate line 785)
|
|
55
|
-
**Claim:** References `storage.getInterruptedRuns()` on `SQLiteStorageAdapter`.
|
|
56
|
-
**Reality:** This method does not appear in the `StorageAdapter` interface (`src/storage/types.ts`) nor in the `WorkflowStorage` interface. It may be an undocumented implementation-only method, a leftover reference to a removed method, or a documentation invention. Requires reading `src/storage/sqlite.ts` to confirm.
|
|
57
|
-
**Impact:** Medium — if the method does not exist, documented usage will fail at compile time.
|
|
58
|
-
|
|
59
|
-
### Everything Else — Verified Accurate
|
|
60
|
-
|
|
61
|
-
All of the following were cross-checked against source and match exactly:
|
|
62
|
-
|
|
63
|
-
- All exported names in `src/index.ts` match the TypeScript Types Reference section in the API reference.
|
|
64
|
-
- All `RunStatus`, `StepStatus`, `StepErrorStrategy` union literal values are correct.
|
|
65
|
-
- All `WorkflowContext`, `WorkflowStep`, `WorkflowHooks`, `WorkflowDefinition` interface properties and types are correct.
|
|
66
|
-
- All `StorageAdapter` and `WorkflowStorage` method signatures are correct.
|
|
67
|
-
- All 14 `BuiltInEventType` literals are correct.
|
|
68
|
-
- All `EventTransport` method signatures are correct.
|
|
69
|
-
- All `WorkflowSchedule` properties and `Scheduler` interface methods (except the `getSchedule` issue above) are correct.
|
|
70
|
-
- All 10 `ConditionOperator` values, all `Recipe`, `Plan`, `PlannedStep` interfaces are correct.
|
|
71
|
-
- All 9 error class names, error codes, and constructor signatures are correct.
|
|
72
|
-
- `WorkflowEngineConfig` and `StartRunOptions` interfaces are correct.
|
|
73
|
-
- `package.json` scripts (`build`, `dev`, `typecheck`, `test`, `test:watch`, `test:coverage`) match README claims.
|
|
74
|
-
- Peer dependency versions (`better-sqlite3 >=11.0.0`, `kysely >=0.27.0`, `pg >=8.13.0`) match `package.json`.
|
|
75
|
-
- Package name `@multiplier-labs/stepflow` and subpath exports (`/storage`, `/events`, `/scheduler`) are correct throughout all docs.
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Overlap & Redundancy
|
|
80
|
-
|
|
81
|
-
There is no meaningful overlap between the three files. Each occupies a distinct lane:
|
|
82
|
-
|
|
83
|
-
- `README.md` — conceptual overview and feature tour (prose-heavy, code snippets for motivation)
|
|
84
|
-
- `docs/github-packages-setup.md` — ops/distribution concern (PAT setup, CI/CD tokens, `npm version`)
|
|
85
|
-
- `docs/stepflow-api-reference.md` — exhaustive technical reference
|
|
86
|
-
|
|
87
|
-
Both `README.md` and `docs/stepflow-api-reference.md` contain a Quick Start section, but they use different examples (order-processing workflow vs. email-campaign workflow) and serve different readers (README = first-time evaluator, API ref = returning developer). This is a reasonable design choice, not a redundancy problem.
|
|
88
|
-
|
|
89
|
-
**No merge recommendations are warranted.**
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Fragmentation
|
|
94
|
-
|
|
95
|
-
With only 3 files, fragmentation is not a concern. The split between README and API reference follows widely accepted open-source convention. The GitHub Packages setup guide is appropriately separated as a distribution/ops concern that would clutter the main README.
|
|
96
|
-
|
|
97
|
-
No spec, proposal, or planning documents exist in the repo. No "completed feature" spec files need to be folded in or removed.
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Action Items
|
|
102
|
-
|
|
103
|
-
### Delete
|
|
104
|
-
|
|
105
|
-
| File | Reason it's safe to delete |
|
|
106
|
-
|------|----------------------------|
|
|
107
|
-
| — | No deletion candidates. All three files serve distinct, active purposes. |
|
|
108
|
-
|
|
109
|
-
### Consolidate
|
|
110
|
-
|
|
111
|
-
| Source Files | Target File | What to Keep / Drop |
|
|
112
|
-
|---|---|---|
|
|
113
|
-
| — | — | No consolidation needed. Files do not overlap in scope. |
|
|
114
|
-
|
|
115
|
-
### Update
|
|
116
|
-
|
|
117
|
-
| File | Section Needing Update | What Changed |
|
|
118
|
-
|------|------------------------|--------------|
|
|
119
|
-
| `docs/stepflow-api-reference.md` | Scheduler section — `getSchedule(scheduleId)` method | Remove or replace with correct `getSchedules(): Promise<WorkflowSchedule[]>`. The documented method does not exist on the `Scheduler` interface. |
|
|
120
|
-
| `docs/stepflow-api-reference.md` | Storage section — `getInterruptedRuns()` on `SQLiteStorageAdapter` | Verify against `src/storage/sqlite.ts`. If the method no longer exists or was never part of the public interface, remove the reference. If it's an implementation detail not on the interface, add a note clarifying it is not part of the `StorageAdapter` contract. |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Recommendations
|
|
125
|
-
|
|
126
|
-
1. **Fix `getSchedule()` → `getSchedules()`** in `docs/stepflow-api-reference.md`. This is a confirmed broken API reference that will cause compile errors if followed. One-line fix.
|
|
127
|
-
|
|
128
|
-
2. **Verify `getInterruptedRuns()`** by reading `src/storage/sqlite.ts`. If the method is absent, delete the reference. If present, ensure it is either promoted to the `StorageAdapter` interface (if intentionally public) or marked as an internal implementation detail.
|
|
129
|
-
|
|
130
|
-
3. **Add a version changelog or `CHANGELOG.md`** if the package begins publishing new minor/major versions. Currently at `0.2.6`, with no changelog. As the API stabilises this becomes important for downstream consumers to understand what changed between releases.
|
|
131
|
-
|
|
132
|
-
4. **Pin documented peer-dependency versions in the API reference.** The reference correctly lists minimum versions but does not mention tested/recommended ranges. As `better-sqlite3`, `kysely`, and `pg` release new majors, this becomes a source of drift. Consider a compatibility table or tested-with note.
|
|
133
|
-
|
|
134
|
-
5. **Add a `CONTRIBUTING.md` or development-setup section** for contributors. The `package.json` has `dev`, `test`, `build`, and `typecheck` scripts, but there is no document explaining how to run the test suite locally, set up a Postgres instance for integration tests, or submit changes. This gap matters as the project gains external contributors.
|
|
135
|
-
|
|
136
|
-
6. **Keep `docs/github-packages-setup.md` updated on PAT scope requirements.** GitHub periodically revises fine-grained PAT scopes. The current instructions reference `read:packages` — this is correct today, but is the most likely part of that document to go stale.
|
|
137
|
-
|
|
138
|
-
7. **Consider lightweight doc-testing** (e.g., extracting TypeScript code blocks and running `tsc --noEmit` on them as part of CI). The one confirmed accuracy issue (`getSchedule`) would have been caught automatically if the Quick Start and integration examples were compiled as part of the build.
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Documentation Audit: stepflow
|
|
2
|
-
|
|
3
|
-
**Date**: 2026-04-13T01:17:34.517Z
|
|
4
|
-
**Repository**: /srv/repos/stepflow
|
|
5
|
-
**Branch**: main
|
|
6
|
-
**Workflow Run**: 54339665-09b6-4e19-8981-c8fc3144a296
|
|
7
|
-
**Session**: 386a6c34-ce83-4c68-a8e7-e668435ced26
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Now I'll produce the final structured report based on the audit findings.
|
|
12
|
-
|
|
13
|
-
## Summary
|
|
14
|
-
|
|
15
|
-
**Total documentation files:** 3 (2,167 lines total)
|
|
16
|
-
**Files needing attention:** 1 (minor — one missing error class entry)
|
|
17
|
-
**Health rating:** Well-maintained
|
|
18
|
-
|
|
19
|
-
The repository has a lean, focused documentation set: one root README, one GitHub Packages setup guide, and one comprehensive API reference. All three files share the same last-modified date (2026-04-11, the initial commit), so there is no divergence between doc age and code age. Code examples, configuration keys, export paths, and API signatures were cross-checked against the source and are accurate. The only finding is a single missing entry in the error-class table.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Documentation Inventory
|
|
24
|
-
|
|
25
|
-
| Path | Lines | Last Modified | Purpose | Status |
|
|
26
|
-
|------|-------|--------------|---------|--------|
|
|
27
|
-
| `README.md` | 408 | 2026-04-11 | Project overview, quick-start, install, basic usage examples | Current |
|
|
28
|
-
| `docs/github-packages-setup.md` | 97 | 2026-04-11 | Instructions for authenticating with and publishing to GitHub Packages NPM registry | Current |
|
|
29
|
-
| `docs/stepflow-api-reference.md` | 1,662 | 2026-04-11 | Complete API reference: WorkflowEngine, storage adapters, event transports, scheduler, planner, error types, TypeScript types | Current (1 omission) |
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Staleness Findings
|
|
34
|
-
|
|
35
|
-
No staleness issues detected. All three documentation files were committed in the initial commit (2026-04-11) alongside the source code they describe. There is only one commit in the repository (`bd16961 Initial commit`), so no code has changed after the docs were written.
|
|
36
|
-
|
|
37
|
-
No broken internal links were found:
|
|
38
|
-
- `README.md` references `docs/github-packages-setup.md` — file exists.
|
|
39
|
-
- `README.md` references `docs/stepflow-api-reference.md` — file exists.
|
|
40
|
-
- All markdown anchor links (`#error-classes`, `#workflow-engine`, etc.) resolve to sections present in their respective files.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Accuracy Issues
|
|
45
|
-
|
|
46
|
-
**Issue 1 — Missing error class in API Reference**
|
|
47
|
-
|
|
48
|
-
`WaitForRunTimeoutError` is exported from `src/index.ts` and implemented in `src/utils/errors.ts`, but it does not appear in the error-class table in `docs/stepflow-api-reference.md` (the table covers eight error types; this is the ninth).
|
|
49
|
-
|
|
50
|
-
- **Exported symbol:** `WaitForRunTimeoutError` with code `WAIT_FOR_RUN_TIMEOUT`, constructor signature `(runId, timeoutMs)`.
|
|
51
|
-
- **Where it is thrown:** `WorkflowEngine.waitForRun()` when the timeout elapses before the run completes.
|
|
52
|
-
- **Impact:** Users who encounter this error and search the API reference will not find it documented.
|
|
53
|
-
|
|
54
|
-
**Issue 2 — Storage adapter naming ambiguity (very minor)**
|
|
55
|
-
|
|
56
|
-
The TypeScript types section mentions both `StorageAdapter` and `WorkflowStorage` interfaces without explaining that `WorkflowStorage` is the extended/current interface while `StorageAdapter` is the narrower legacy surface. This distinction is inferable from the source but is not stated in the docs.
|
|
57
|
-
|
|
58
|
-
No issues were found with:
|
|
59
|
-
- Install / setup instructions (match `package.json` scripts and peer deps).
|
|
60
|
-
- Subpath export paths (`/storage`, `/events`, `/scheduler`) — all match `package.json` `exports` field.
|
|
61
|
-
- Code examples for `WorkflowEngine`, storage adapters, event transports, scheduler, and planner.
|
|
62
|
-
- All nine documented config keys for `WorkflowEngineConfig`, `PostgresStorageConfig`, and `SQLiteStorageConfig`.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Overlap & Redundancy
|
|
67
|
-
|
|
68
|
-
No meaningful overlap exists across the three files. Each file occupies a distinct niche:
|
|
69
|
-
|
|
70
|
-
- `README.md` — orientation and quick-start; deliberately high-level.
|
|
71
|
-
- `docs/github-packages-setup.md` — operational runbook for package publishing; not replicated elsewhere.
|
|
72
|
-
- `docs/stepflow-api-reference.md` — exhaustive API detail; README does not duplicate it.
|
|
73
|
-
|
|
74
|
-
The README links to the API reference rather than reproducing its content, which is the correct pattern.
|
|
75
|
-
|
|
76
|
-
**No merge or deletion actions are warranted on overlap grounds.**
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Fragmentation
|
|
81
|
-
|
|
82
|
-
No fragmentation detected. The documentation set is already consolidated: three files covering three distinct concerns. There are no orphaned spec documents, proposal files, or feature-design docs in the repository. The `docs/` directory contains exactly two files, both purposeful and non-overlapping.
|
|
83
|
-
|
|
84
|
-
No "plan" or "proposal" documents describing completed work were found.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Action Items
|
|
89
|
-
|
|
90
|
-
### Delete
|
|
91
|
-
|
|
92
|
-
| File | Reason |
|
|
93
|
-
|------|--------|
|
|
94
|
-
| *(none)* | No files are outdated, superseded, or describe completed proposals with no reference value. |
|
|
95
|
-
|
|
96
|
-
### Consolidate
|
|
97
|
-
|
|
98
|
-
| Source Files | Target File | Notes |
|
|
99
|
-
|-------------|-------------|-------|
|
|
100
|
-
| *(none)* | — | No consolidation needed; the current three-file structure is appropriate. |
|
|
101
|
-
|
|
102
|
-
### Update
|
|
103
|
-
|
|
104
|
-
| File | Section Needing Update | What Changed |
|
|
105
|
-
|------|----------------------|--------------|
|
|
106
|
-
| `docs/stepflow-api-reference.md` | Error Classes table | Add missing `WaitForRunTimeoutError` entry: code `WAIT_FOR_RUN_TIMEOUT`, constructor `(runId, timeoutMs)`, thrown by `waitForRun()` on timeout. |
|
|
107
|
-
| `docs/stepflow-api-reference.md` | TypeScript Types Reference | Add a one-sentence note clarifying that `WorkflowStorage` is the current extended interface and `StorageAdapter` is the narrower legacy one, so users know which to implement. |
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Recommendations
|
|
112
|
-
|
|
113
|
-
1. **Add `WaitForRunTimeoutError` to the error-class table** in `docs/stepflow-api-reference.md`. It is exported, thrown at a documented public API boundary (`waitForRun`), and its absence is the only real gap in API coverage.
|
|
114
|
-
|
|
115
|
-
2. **Clarify `StorageAdapter` vs `WorkflowStorage`** in the TypeScript types section — a single sentence noting which is the current recommended interface and which is the narrower legacy surface will prevent confusion for implementors.
|
|
116
|
-
|
|
117
|
-
3. **Add a `CHANGELOG.md` or version-history section** to `README.md` as the project evolves past v0.2.6. The current single-commit history makes this unnecessary now, but without it, future contributors will have no changelog to update when they introduce breaking changes.
|
|
118
|
-
|
|
119
|
-
4. **Protect documentation accuracy through CI.** Because the repository has no docs-linting step, future code changes could silently invalidate examples. Consider adding a `docs:check` script (e.g., `markdownlint`, `markdown-link-check`) to the GitHub Actions workflow so broken links and formatting regressions are caught automatically.
|
|
120
|
-
|
|
121
|
-
5. **Keep the three-file structure.** The current organisation (`README.md` + `docs/github-packages-setup.md` + `docs/stepflow-api-reference.md`) is clean and proportional to the codebase size. Resist splitting the API reference into per-module files until the reference exceeds ~3,000 lines or the docs audience clearly segments by module.
|