Skip to main content

workflow-code resolve-params

resolve-params is called by the Desktop and server hosts, and can also be used for local debugging parameter linkage. Workflow uses --entrypoint <id> to select the resolveParams of the entry, using the default entry when omitted;Conversation uses executor resolveParams and rejects non-empty entry parameters. Request JSON to read from stdin, avoiding the input body appearing in the command line arguments.

printf '%s' '{"draftText":"Search the documentation","args":["--tone","balanced"],"inputMode":"form","trigger":{"kind":"input"}}' \
| workflow-code resolve-params ./workspace/workflow/example --entrypoint search

On success stdout returns WorkflowParamResolveResult:

{"params":{"tone":{"value":"precise","resolvedOptions":[{"value":"precise","label":"Precise"},{"value":"creative","label":"Creative"}],"options":{"creative":{"disabled":true}}}}}

Returns {"params":{}} if the selected entry or Conversation executor has no resolveParams defined. The resolvedOptions array replaces the parameter's current full list of options,null restores the static list, and options only supplements the display or disabled state of a single option. --entrypoint must be placed in the CLI parameter area; parameters with the same name after an explicit -- will not be read by CLI. If the request format, entry, or callback result is invalid, the exit code is 1, and stderr is incorrectly written.