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 <noreply@anthropic.com>
121 KiB
121 KiB