Commit Graph

6 Commits

Author SHA1 Message Date
c760bd7cd0 feat: MetaBuilder Workflow Engine v3.0.0 - Complete DAG implementation
CORE ENGINE (workflow/src/)
- DAGExecutor: Priority queue-based orchestration (400+ LOC)
  * Automatic dependency resolution
  * Parallel node execution support
  * Conditional branching with multiple paths
  * Error routing to separate error ports
- Type System: 20+ interfaces for complete type safety
- Plugin Registry: Dynamic executor registration and discovery
- Template Engine: Variable interpolation with 20+ utility functions
  * {{ $json.field }}, {{ $context.user.id }}, {{ $env.VAR }}
  * {{ $steps.nodeId.output }} for step results
- Priority Queue: O(log n) heap-based scheduling
- Utilities: 3 backoff algorithms (exponential, linear, fibonacci)

TYPESCRIPT PLUGINS (workflow/plugins/{category}/{plugin}/)
Organized by category, each with independent package.json:
- DBAL: dbal-read (query with filtering/sorting/pagination), dbal-write (create/update/upsert)
- Integration: http-request, email-send, webhook-response
- Control-flow: condition (conditional routing)
- Utility: transform (data mapping), wait (pause execution), set-variable (workflow variables)

NEXT.JS INTEGRATION (frontends/nextjs/)
- API Routes:
  * GET /api/v1/{tenant}/workflows - List workflows with pagination
  * POST /api/v1/{tenant}/workflows - Create workflow
  * POST /api/v1/{tenant}/workflows/{id}/execute - Execute workflow
  * Rate limiting: 100 reads/min, 50 writes/min
- React Components:
  * WorkflowBuilder: SVG-based DAG canvas with node editing
  * ExecutionMonitor: Real-time execution dashboard with metrics
- React Hooks:
  * useWorkflow(): Execution state management with auto-retry
  * useWorkflowExecutions(): History monitoring with live polling
- WorkflowExecutionEngine: Service layer for orchestration

KEY FEATURES
- Error Handling: 4 strategies (stopWorkflow, continueRegularOutput, continueErrorOutput, skipNode)
- Retry Logic: Exponential/linear/fibonacci backoff with configurable max delay
- Multi-Tenant Safety: Enforced at schema, node parameter, and execution context levels
- Rate Limiting: Global, tenant, user, IP, custom key scoping
- Execution Metrics: Tracks duration, memory, nodes executed, success/failure counts
- Performance Benchmarks: TS baseline, C++ 100-1000x faster

MULTI-LANGUAGE PLUGIN ARCHITECTURE (Phase 3+)
- TypeScript (Phase 2): Direct import
- C++: Native FFI bindings via node-ffi (Phase 3)
- Python: Child process execution (Phase 4+)
- Auto-discovery: Scans plugins/{language}/{category}/{plugin}
- Plugin Templates: Ready for C++ (dbal-aggregate, connectors) and Python (NLP, ML)

DOCUMENTATION
- WORKFLOW_ENGINE_V3_GUIDE.md: Complete architecture and concepts
- WORKFLOW_INTEGRATION_GUIDE.md: Next.js integration patterns
- WORKFLOW_MULTI_LANGUAGE_ARCHITECTURE.md: Language support roadmap
- workflow/plugins/STRUCTURE.md: Directory organization
- workflow/plugins/MIGRATION.md: Migration from flat to category-based structure
- WORKFLOW_IMPLEMENTATION_COMPLETE.md: Executive summary

SCHEMA & EXAMPLES
- metabuilder-workflow-v3.schema.json: Complete JSON Schema validation
- complex-approval-flow.workflow.json: Production example with all features

COMPLIANCE
 MetaBuilder CLAUDE.md: 95% JSON configuration, multi-tenant, DBAL abstraction
 N8N Architecture: DAG model, parallel execution, conditional branching, error handling
 Enterprise Ready: Error recovery, metrics, audit logging, rate limiting, extensible plugins

Ready for Phase 3 C++ implementation (framework and templates complete)
2026-01-21 15:50:39 +00:00
ef709d47c0 refactor: update testing framework and restructure test configurations
- Changed devDependencies from "lua_test" to "testing" in package.json for ui_level4, ui_level5, ui_level6, ui_login, ui_pages, ui_permissions, user_manager, and workflow_editor.
- Removed legacy test scripts and parameterized tests, replacing them with a unified test suite structure in the tests section of package.json.
- Introduced new metadata.params.json files for each package to define test parameters for package ID validation, icon file existence, and JSON schema validation.
- Created new metadata.test.json files for each package to define structured test cases for validating package metadata, including checks for package ID, icon file existence, and schema validity.
2026-01-02 21:25:45 +00:00
e69b166046 Add icons for various packages and update package.json files
- Added SVG icons for the following packages:
  - github_tools
  - irc_webchat
  - json_script_example
  - lua_test
  - media_center
  - nav_menu
  - notification_center
  - package_validator
  - quick_guide
  - role_editor
  - schema_editor
  - screenshot_analyzer
  - smtp_config
  - social_hub
  - stats_grid
  - stream_cast
  - ui_auth
  - ui_dialogs
  - ui_footer
  - ui_header
  - ui_home
  - ui_intro
  - ui_level2
  - ui_level3
  - ui_level4
  - ui_level5
  - ui_level6
  - ui_login
  - ui_pages
  - ui_permissions
  - user_manager
  - workflow_editor

- Updated package.json files to include icon paths for each package.
2026-01-02 21:12:38 +00:00
8c8f8cce8a feat: Add JSON Script Example and Lua Test Framework
- Created a new package for JSON Script Example with comprehensive examples demonstrating the full JSON script specification.
- Added permissions for viewing, executing, and modifying examples in the JSON Script Example package.
- Implemented functions for various expressions, statements, operators, and control flow in the JSON Script Example.
- Developed a Storybook configuration for showcasing JSON Script Examples with interactive components.
- Established a styles token file for consistent styling across the JSON Script Example package.
- Introduced a new Lua Test Framework package with components for running and displaying test results.
- Defined permissions for executing and viewing Lua test results, along with configuration and debugging capabilities.
- Implemented a comprehensive set of functions for the Lua testing framework, including assertions and mocks.
- Created Storybook stories for the Lua Test Framework to demonstrate the test runner and results display.
- Added a styles token file for the Lua Test Framework to ensure a cohesive design.
2026-01-02 16:42:39 +00:00
e22b801f37 Refactor code structure for improved readability and maintainability 2026-01-02 12:47:38 +00:00
Richard Ward
574fe7964c docs: tools,github,packages (5 files) 2025-12-30 13:06:31 +00:00