Dependency Graph
Visualize how artifacts, modules, workflows, and packs depend on each other — understand blast radius before making changes.
The dependency graph at SDK → Dependencies is a live directed acyclic graph (DAG) showing every dependency relationship in your workspace. It answers the question: "If I change X, what breaks?"
Node Types
| Icon Color | Type | Description |
|---|---|---|
| Indigo | Module | TypeScript library imported by artifacts. |
| Purple | Artifact | Custom node, script, handler, job, or transform. |
| Green | Workflow | Workflow definition that uses a custom node or runs a script. |
| Amber | Pack | Installed pack providing bundled artifacts and modules. |
| Blue | npm Package | External npm package imported in a module or artifact. |
| Gray | System Table | Platform table read or written by an artifact. |
Reading the Graph
- •Arrow direction: Points from dependent → dependency. An arrow from artifact A to module M means "A imports M".
- •Upstream (ancestors): Click any node and select "Show upstream" to see everything that depends on this node. This is your blast radius for a change.
- •Downstream (descendants): "Show downstream" shows everything this node depends on — its full transitive dependency tree.
- •Critical path: Nodes with the most upstream dependents are highlighted in red — changes here affect the most other things.
Impact Analysis Before Deployment
When you publish a new version of a module or artifact, FlowOS automatically runs an impact analysis and shows you all affected artifacts and workflows:
# CLI — show impact before publishing
flowos module publish github-helpers --dry-run
# Output:
# Publishing github-helpers@5 would affect:
# 3 artifacts:
# - github-push-handler (active in production)
# - github-action-failed (active in production)
# - link-pr-to-change (active in staging)
# 2 workflows using these artifacts:
# - GitHub Actions Failure → Incident (active)
# - PR → Change Request Link (active)
#
# Proceed? [y/N]Circular Dependency Detection
The graph builder detects circular dependencies at save time. A module cannot import another module that directly or transitively imports it back. If a cycle is detected:
- •The save is blocked and the exact cycle path is shown in the editor:
module-a → module-b → module-c → module-a - •Refactor by extracting shared types or utilities into a third module that neither imports from the other two.
Stale Dependency Warnings
The graph flags the following conditions:
| Warning | Meaning | Action |
|---|---|---|
| Pinned to old version | Artifact pinned to module@2, but module@5 is active. | Update the import to latest or re-pin deliberately. |
| Deprecated artifact | A workflow uses an artifact flagged as deprecated. | Replace with the recommended successor. |
| Pack update available | An installed pack has a newer version. | Review changelog and update via SDK → Packs. |
| Unused module | Module has no dependents for 30+ days. | Candidate for archival. |
| Broken reference | Artifact imports a module that no longer exists. | Fix import or restore the module from version history. |
Graph API
The graph is built per-artifact rather than fetched as a single blob — the UI walks the tree by calling these endpoints for each node:
# Get dependencies (downstream) of a specific artifact — what it depends on
GET /api/flowsdk/artifacts/:id/dependencies
# Get dependents (upstream) of a specific artifact — what depends on it
GET /api/flowsdk/artifacts/:id/dependents