Skip to content

feat: update run command input schema

What does this merge request do and why?

As proposed in the issue gitlab-org/gitlab#556137 (comment 2662383502), this MR is going to simplify the input schema of run_command tool to fix the issues of agent unable to provide the tool input args that follows the schema.

An example Bash command: cp -r -v /home/user/documents /backup/location, the input schema is as follows:

  • without MR: {"program": "cp", "flags": ["-r", "-v"], "arguments": ["/home/user/documents", "/backup/location"]}
  • with MR: {"program": "cp", "args": "-r -v /home/user/documents /backup/location"}

As suggested here gitlab-org/gitlab#556137 (comment 2695428935), this MR is merging the arguments and flags into one parameter, so that we don't introduce breaking changes to the executor. Later we can gracefully remove flags in node and go executor.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. clone this MR
  2. Ask duo chat or flow run a command uv run uvicorn main:app --host 0.0.0.0 --port 8018
  3. It should parse the uv as the input of the program and run uvicorn main:app --host 0.0.0.0 --port 8018 as the args

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.

Merge request reports

Loading