Files
metabuilder/workflow/examples/cross-project-workflow.json
johndoe6345789 af4a9d8d8d feat: Add workflow plugins for standalone project integration
Created TypeScript workflow plugins to integrate all standalone projects:

Plugins (8 files):
- cadquery.ts - 3D CAD modeling (box, cylinder, execute)
- gameengine.ts - SDL3 game engine (build, run, listPackages)
- pastebin.ts - Code snippets (create, get, list)
- pcb.ts - PCB design (generate, createBoard, listFootprints)
- docker.ts - Container management (run, stop, scale, deploy)
- smtp.ts - Email relay (sendEmail, status, start)
- mojo.ts - Systems programming (run, build, runExample)
- postgres.ts - Database admin (query, execute, backup)

Total: 30+ workflow nodes for cross-project automation

Example workflow: cross-project-workflow.json
- Demonstrates parallel execution across 6 projects
- Database check, Docker status, 3D modeling, Mojo benchmark
- Results aggregation, pastebin sharing, email notification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:15:45 +00:00

124 lines
4.1 KiB
JSON

{
"version": "2.2.0",
"name": "cross-project-demo",
"description": "Demonstrates integration between multiple MetaBuilder standalone projects",
"nodes": [
{
"id": "start",
"type": "trigger",
"op": "manual",
"description": "Manual trigger to start the workflow"
},
{
"id": "check-postgres",
"type": "operation",
"op": "postgres.checkConnection",
"description": "Verify database is accessible",
"params": {
"host": "localhost",
"port": 5432,
"database": "metabuilder",
"user": "postgres"
}
},
{
"id": "list-containers",
"type": "operation",
"op": "docker.listContainers",
"description": "Get running Docker containers",
"params": {
"all": false
}
},
{
"id": "create-3d-model",
"type": "operation",
"op": "cadquery.box",
"description": "Create a sample 3D box model",
"params": {
"length": 100,
"width": 50,
"height": 25,
"outputPath": "/tmp/demo-box.step"
}
},
{
"id": "run-mojo-benchmark",
"type": "operation",
"op": "mojo.runExample",
"description": "Run Mojo performance example",
"params": {
"example": "life/benchmark.mojo"
}
},
{
"id": "aggregate-results",
"type": "operation",
"op": "transform",
"description": "Combine all results into a summary",
"params": {
"expression": {
"database": {
"connected": "{{ $nodes['check-postgres'].success }}",
"version": "{{ $nodes['check-postgres'].version }}"
},
"docker": {
"containerCount": "{{ $nodes['list-containers'].containers.length }}",
"containers": "{{ $nodes['list-containers'].containers }}"
},
"cadquery": {
"modelCreated": "{{ $nodes['create-3d-model'].success }}",
"outputPath": "{{ $nodes['create-3d-model'].outputPath }}"
},
"mojo": {
"benchmarkRan": "{{ $nodes['run-mojo-benchmark'].success }}",
"executionTime": "{{ $nodes['run-mojo-benchmark'].executionTime }}"
}
}
}
},
{
"id": "share-results",
"type": "operation",
"op": "pastebin.create",
"description": "Share results as a paste",
"params": {
"content": "{{ JSON.stringify($nodes['aggregate-results'].result, null, 2) }}",
"title": "Cross-Project Workflow Results",
"language": "json",
"expiresIn": "1d"
}
},
{
"id": "send-notification",
"type": "operation",
"op": "smtp.sendEmail",
"description": "Email the results",
"params": {
"from": "workflow@metabuilder.local",
"to": "admin@example.com",
"subject": "Cross-Project Workflow Complete",
"body": "Workflow completed successfully.\n\nResults: {{ $nodes['share-results'].url }}\n\nSummary:\n- Database: {{ $nodes['check-postgres'].success ? 'Connected' : 'Failed' }}\n- Docker Containers: {{ $nodes['list-containers'].containers.length }}\n- 3D Model: {{ $nodes['create-3d-model'].success ? 'Created' : 'Failed' }}\n- Mojo Benchmark: {{ $nodes['run-mojo-benchmark'].executionTime }}ms"
}
}
],
"connections": [
{ "from": "start", "to": "check-postgres" },
{ "from": "start", "to": "list-containers" },
{ "from": "start", "to": "create-3d-model" },
{ "from": "start", "to": "run-mojo-benchmark" },
{ "from": "check-postgres", "to": "aggregate-results" },
{ "from": "list-containers", "to": "aggregate-results" },
{ "from": "create-3d-model", "to": "aggregate-results" },
{ "from": "run-mojo-benchmark", "to": "aggregate-results" },
{ "from": "aggregate-results", "to": "share-results" },
{ "from": "share-results", "to": "send-notification" }
],
"metadata": {
"author": "MetaBuilder",
"created": "2026-01-21",
"tags": ["demo", "cross-project", "integration"],
"projects": ["postgres", "docker", "cadquery", "mojo", "pastebin", "smtp"]
}
}