- Go 98.6%
- Makefile 0.8%
- Dockerfile 0.6%
|
|
||
|---|---|---|
| .github/workflows | ||
| cmd/module | ||
| deploy | ||
| internal | ||
| .env.example | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| MEDIA-DAGS.md | ||
| muxcore.json | ||
| README.md | ||
| SECURITY.md | ||
Workflow Tapestry
Multi-step DAG workflow engine for MuxCore.
Overview
Workflow Tapestry is a MuxCore sidecar module that provides a
WorkflowEngine contract (capability workflow.engine). It
orchestrates multi-step workflows with declarative DAG dependencies,
bounded parallel waves, exponential retry backoff, and optional
IdempotencyProvider dedup via the mesh.
On start, the module seeds built-in definitions from
internal/definitions/ (movie-request, tv-request, music-request,
book-request, media-transcode, media-migrate, media-backup,
library-scan). Steps dispatch to handlers by module ID or capability
via the mesh.
Mesh method adapters: each step must resolve to a real RPC method.
Prefer meta.method on the step (seeded for movie-request /
tv-request). Fallback table maps known step names (metadata-lookup →
Search, download → AddTorrent, library-import → ImportPath,
notify → Notify). Unknown steps without meta.method fail instead of
calling mesh.Call with the bare step name.
MVP host: start with MVP_ENABLE_WORKFLOW_TAPESTRY=1 (see mvp/run-host.sh).
Media DAGs: see MEDIA-DAGS.md for movie-request / tv-request (and scaffold definitions).
Configuration
| Environment Variable | Default | Description |
|---|---|---|
WORKFLOW_GRPC_ADDR |
:9603 |
gRPC listen address |
MUXCORE_GRPC_ADDR |
(required to run) | Core mesh address (--muxcore-mesh-addr) |
MUXCORE_MODULE_ID |
workflow-tapestry |
Module identity override (--muxcore-module-id) |
MUXCORE_INSECURE_DISABLE_TLS |
unset | Set true for insecure gRPC (dev only) |
Usage
- Register a workflow definition with steps and dependencies (or use a seeded one).
- Start a run by definition ID.
- Monitor progress via Status/ListRuns.
- Cancel, pause, or resume runs.
API
The module exposes the WorkflowService gRPC service:
RegisterDefinition/RemoveDefinition/GetDefinition/ListDefinitionsRun/Status/Cancel/Pause/Resume/ListRuns
Build
make build
make test
make docker
License
GPL-3.0 (see LICENSE).