From 033237482d083747e5c95eefb93fc216379bdb39 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Tue, 3 Mar 2026 16:20:05 -0500 Subject: [PATCH] feat: workflow param substitution + link troubleshooter support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds {{param_name}} template substitution to the workflow execution engine so workflows can accept user-supplied inputs at run time. server.js: - applyParams() helper — substitutes {{name}} in command strings with validated values (alphanumeric + safe punctuation only); unsafe values throw and fail the execution cleanly - executeCommandStep() / executeWorkflowSteps() — accept params={} and apply substitution before dispatching commands to workers - POST /api/executions — accepts params:{} from client; validates required params against definition.params[]; logs params in initial execution log index.html: - loadWorkflows() caches definition in _workflowRegistry keyed by id; shows "[N params]" badge on parameterised workflows - executeWorkflow() checks for definition.params; if present, shows param input modal instead of plain confirm() - showParamModal() — builds labelled input form from param definitions, marks required fields, focuses first input, Enter submits - submitParamForm() — validates required fields, calls startExecution() - startExecution() — POSTs {workflow_id, params} and switches to executions tab - Param input modal — terminal-aesthetic overlay, no external dependencies Co-Authored-By: Claude Sonnet 4.6 --- public/index.html | 121 ++++++++++++++++++++++++++++++++++++++++------ server.js | 42 +++++++++++++--- 2 files changed, 142 insertions(+), 21 deletions(-) diff --git a/public/index.html b/public/index.html index 049bf10..e57c7c5 100644 --- a/public/index.html +++ b/public/index.html @@ -991,6 +991,25 @@ + + +