Files
AutoMetabuilder/backend/autometabuilder/packages/README.md
copilot-swe-agent[bot] 3175a4187f Add unit testing workflow plugins and test packages
- Created var plugin directory with get, set, delete, exists plugins
- Created test plugin directory with assert_equals, assert_true, assert_false, assert_exists, run_suite plugins
- Updated plugin_map.json to register all new plugins (90 total plugins now)
- Created 5 test packages: logic_plugins_test, math_plugins_test, string_plugins_test, list_plugins_test, dict_plugins_test
- Added comprehensive unit tests for all new plugins
- Updated documentation with test plugin information
- All tests passing (16 workflow plugin tests + 11 unit testing plugin tests)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-10 13:53:51 +00:00

2.4 KiB

Workflow Packages

This directory contains workflow packages in NPM-style format. Each package is a self-contained workflow with metadata.

Structure

Each package is a directory containing:

package.json

Metadata about the workflow package:

{
  "name": "package-name",
  "version": "1.0.0",
  "description": "Human-readable description",
  "author": "AutoMetabuilder",
  "license": "MIT",
  "keywords": ["tag1", "tag2"],
  "main": "workflow.json",
  "metadata": {
    "label": "translation.key",
    "description": "translation.key",
    "tags": ["category"],
    "icon": "icon-name",
    "category": "templates"
  }
}

workflow.json

The N8N workflow definition:

{
  "name": "Workflow Name",
  "active": false,
  "nodes": [...],
  "connections": {...}
}

Available Packages

Workflow Templates

  • blank: Empty workflow canvas starter
  • single_pass: Single AI request + tool execution
  • iterative_loop: Looping AI agent with tool calls
  • contextual_iterative_loop: Context loading + iterative loop
  • plan_execute_summarize: Planning workflow with summary
  • testing_triangle: Lint + unit + UI test pipeline
  • repo_scan_context: Repository file scanning
  • game_tick_loop: Game engine tick simulation

Plugin Testing Packages

These packages test the correctness of workflow plugins using the test.* assertion plugins:

  • logic_plugins_test: Tests for logic plugins (and, or, equals, gt, lt, gte, lte, xor, in)
  • math_plugins_test: Tests for math plugins (add, multiply, subtract, divide, min, max)
  • string_plugins_test: Tests for string plugins (concat, upper, lower, split, length)
  • list_plugins_test: Tests for list plugins (concat, length, slice, find)
  • dict_plugins_test: Tests for dict plugins (get, set, keys, merge)

Creating New Packages

  1. Create a directory: mkdir packages/my-workflow
  2. Add package.json with metadata
  3. Add workflow.json with N8N schema
  4. Ensure workflow has required fields:
    • nodes with id, name, type, typeVersion, position
    • connections mapping
    • workflow name

Loading Packages

Packages are loaded via load_workflow_packages() in web/data/workflow.py:

from autometabuilder.web.data import load_workflow_packages

packages = load_workflow_packages()

Each package is validated and includes both metadata and workflow definition.