From 379908dd644d9060d976d68df39b0af2ddd35fd8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 10 Jan 2026 13:54:57 +0000 Subject: [PATCH] Add missing var plugin files and update gitignore - Added var plugin implementation files (get, set, delete, exists) - Updated .gitignore to not ignore backend/autometabuilder/workflow/plugins/var/ - These files were created but not committed due to gitignore pattern Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .gitignore | 1 + .../workflow/plugins/var/__init__.py | 1 + .../workflow/plugins/var/var_delete.py | 15 +++++++++++++++ .../workflow/plugins/var/var_exists.py | 13 +++++++++++++ .../workflow/plugins/var/var_get.py | 15 +++++++++++++++ .../workflow/plugins/var/var_set.py | 14 ++++++++++++++ 6 files changed, 59 insertions(+) create mode 100644 backend/autometabuilder/workflow/plugins/var/__init__.py create mode 100644 backend/autometabuilder/workflow/plugins/var/var_delete.py create mode 100644 backend/autometabuilder/workflow/plugins/var/var_exists.py create mode 100644 backend/autometabuilder/workflow/plugins/var/var_get.py create mode 100644 backend/autometabuilder/workflow/plugins/var/var_set.py diff --git a/.gitignore b/.gitignore index e072a02..cf58aeb 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ lib64/ parts/ sdist/ var/ +!backend/autometabuilder/workflow/plugins/var/ wheels/ share/python-wheels/ *.egg-info/ diff --git a/backend/autometabuilder/workflow/plugins/var/__init__.py b/backend/autometabuilder/workflow/plugins/var/__init__.py new file mode 100644 index 0000000..1c1d736 --- /dev/null +++ b/backend/autometabuilder/workflow/plugins/var/__init__.py @@ -0,0 +1 @@ +"""Variable management workflow plugins.""" diff --git a/backend/autometabuilder/workflow/plugins/var/var_delete.py b/backend/autometabuilder/workflow/plugins/var/var_delete.py new file mode 100644 index 0000000..361d20a --- /dev/null +++ b/backend/autometabuilder/workflow/plugins/var/var_delete.py @@ -0,0 +1,15 @@ +"""Workflow plugin: delete variable from workflow store.""" + + +def run(runtime, inputs): + """Delete variable from workflow store.""" + key = inputs.get("key") + + if key is None: + return {"result": False, "deleted": False, "error": "key is required"} + + if key in runtime.store: + del runtime.store[key] + return {"result": True, "deleted": True} + + return {"result": False, "deleted": False} diff --git a/backend/autometabuilder/workflow/plugins/var/var_exists.py b/backend/autometabuilder/workflow/plugins/var/var_exists.py new file mode 100644 index 0000000..4e0d6ae --- /dev/null +++ b/backend/autometabuilder/workflow/plugins/var/var_exists.py @@ -0,0 +1,13 @@ +"""Workflow plugin: check if variable exists in workflow store.""" + + +def run(runtime, inputs): + """Check if variable exists in workflow store.""" + key = inputs.get("key") + + if key is None: + return {"result": False, "error": "key is required"} + + exists = key in runtime.store + + return {"result": exists} diff --git a/backend/autometabuilder/workflow/plugins/var/var_get.py b/backend/autometabuilder/workflow/plugins/var/var_get.py new file mode 100644 index 0000000..3d40342 --- /dev/null +++ b/backend/autometabuilder/workflow/plugins/var/var_get.py @@ -0,0 +1,15 @@ +"""Workflow plugin: get variable from workflow store.""" + + +def run(runtime, inputs): + """Get variable value from workflow store.""" + key = inputs.get("key") + default = inputs.get("default") + + if key is None: + return {"result": default, "exists": False, "error": "key is required"} + + exists = key in runtime.store + value = runtime.store.get(key, default) + + return {"result": value, "exists": exists} diff --git a/backend/autometabuilder/workflow/plugins/var/var_set.py b/backend/autometabuilder/workflow/plugins/var/var_set.py new file mode 100644 index 0000000..ec06963 --- /dev/null +++ b/backend/autometabuilder/workflow/plugins/var/var_set.py @@ -0,0 +1,14 @@ +"""Workflow plugin: set variable in workflow store.""" + + +def run(runtime, inputs): + """Set variable value in workflow store.""" + key = inputs.get("key") + value = inputs.get("value") + + if key is None: + return {"result": None, "key": None, "error": "key is required"} + + runtime.store[key] = value + + return {"result": value, "key": key}