Relationships
#932 Allow dynamic object expressions for workflow task inputs/globalArgs
Opened by evrardjp · 7/2/2026· Shipped 7/4/2026
Summary
Allow workflow model_method tasks to set globalArgs and inputs from object-valued CEL expressions, not only literal YAML records.
Motivation
In local-infra's capability planner, each planned item already contains the target model type/name/method plus the evaluated argument objects needed to invoke it. The dynamic dispatcher can select modelType, modelName, and methodName with expressions, but cannot pass the whole argument maps:
task:
type: model_method
modelType: ${{ self.item.implementation.modelType }}
modelName: ${{ self.item.implementation.modelName }}
methodName: ${{ self.item.implementation.methodName }}
globalArgs: ${{ self.item.implementation.globalArgs }}
inputs: ${{ self.item.implementation.inputs }}This currently fails schema/loading with errors like:
task.inputs: Invalid input: expected record, received string
task.globalArgs: Invalid input: expected record, received stringBecause of that, a capability catalog cannot dispatch model_method implementations directly. It has to create many tiny adapter workflows whose only purpose is to turn implementationInputs into model method calls.
Desired behavior
Support object-valued expressions for task.inputs and task.globalArgs, evaluated to records at workflow evaluation/runtime. For example:
task:
type: model_method
modelType: ${{ self.item.implementation.modelType }}
modelName: ${{ self.item.implementation.modelName }}
methodName: ${{ self.item.implementation.methodName }}
globalArgs: ${{ self.item.implementation.globalArgs }}
inputs: ${{ self.item.implementation.inputs }}The evaluator should reject the result if it is not an object/record after expression evaluation.
Use case
Capability planning can emit generic plan items such as:
{
"host": "vaultwarden",
"capability": "vaultwarden-container",
"implementation": {
"type": "model_method",
"modelType": "@adam/cfgmgmt/docker_container",
"modelName": "lab-vaultwarden-vaultwarden-container",
"methodName": "apply",
"globalArgs": { "name": "vaultwarden", "image": "vaultwarden/server:latest" },
"inputs": {}
}
}Then one generic dispatcher workflow can apply the plan without N service-specific adapter workflows.
Benefits
- Removes boilerplate adapter workflows.
- Makes capability planners and other dynamic orchestrators simpler.
- Keeps workflow DAGs declarative while allowing typed validation after expression evaluation.
- Complements the existing support for dynamic model type/name/method strings.
Shipped
Click a lifecycle step above to view its details.