From b9df724bb5aa6b65c78d191c04b138d4c3dae3ce Mon Sep 17 00:00:00 2001 From: Naveen Chatlapalli Date: Thu, 22 Oct 2026 09:47:51 -0500 Subject: [PATCH] fix(cli): name direct run input --task --- apps/cli/README.md | 6 ++++++ apps/cli/src/__snapshots__/cli-commands.test.ts.snap | 1 + apps/cli/src/commands/run.test.ts | 2 +- apps/cli/src/commands/run.ts | 7 ++++--- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/cli/README.md b/apps/cli/README.md index b40bc2b5d..a39427d1d 100644 --- a/apps/cli/README.md +++ b/apps/cli/README.md @@ -77,6 +77,9 @@ scope run list # Submit a run scope run submit -s config/scenarios/hello-world.yaml -w coder-acp-copilot +# Submit a task directly +scope run submit --task "Create a hello-world app" -w coder-acp-copilot + # Get run details scope run get -i @@ -91,6 +94,9 @@ scope --help scope run --help ``` +`--task` is the name of the direct task option. The former `--message` option +remains accepted as a hidden compatibility alias; `-m` still works. + ### Provider secrets `scope secret` manages provider credentials (GitHub tokens, Anthropic keys, diff --git a/apps/cli/src/__snapshots__/cli-commands.test.ts.snap b/apps/cli/src/__snapshots__/cli-commands.test.ts.snap index 66f3e414c..e0a34b5e1 100644 --- a/apps/cli/src/__snapshots__/cli-commands.test.ts.snap +++ b/apps/cli/src/__snapshots__/cli-commands.test.ts.snap @@ -844,6 +844,7 @@ exports[`CLI command registration > full command tree matches snapshot 1`] = ` "--resources", "--scenario", "--skills", + "--task", "--traits", "--url", "--worker", diff --git a/apps/cli/src/commands/run.test.ts b/apps/cli/src/commands/run.test.ts index b26334bab..9a2337c67 100644 --- a/apps/cli/src/commands/run.test.ts +++ b/apps/cli/src/commands/run.test.ts @@ -340,7 +340,7 @@ describe("run submit gates", () => { await program.parseAsync([ "run", "submit", - "--message", + "--task", "Implement the task", "--worker", "dynamic-worker", diff --git a/apps/cli/src/commands/run.ts b/apps/cli/src/commands/run.ts index 4c2727699..24cd50beb 100644 --- a/apps/cli/src/commands/run.ts +++ b/apps/cli/src/commands/run.ts @@ -73,7 +73,8 @@ run .option("-s, --scenario ", "Path to scenario YAML file (provides task + criteria)") .option("-p, --persona ", "Path to persona YAML file (provides judge personality)") .option("-t, --traits ", "Path to traits.yaml (default: config/traits.yaml next to persona)") - .option("-m, --message ", "Message/task to process (overrides scenario task)") + .option("-m, --task ", "Task to process (overrides scenario task)") + .addOption(new Option("--message ", "Deprecated alias for --task.").hideHelp()) .option("-w, --worker ", "Registered worker ID (see `scope agent list`)") .option("-c, --criteria ", "Evaluation criteria (overrides scenario criteria)") .option("--max-iterations ", "Max judge iterations for multi-turn mode", parseInt) @@ -105,7 +106,7 @@ run try { // Resolve scenario + persona YAML if provided - let message = options.message; + let message = options.task ?? options.message; let criteria = options.criteria; let personaInstructions: string | undefined; let personaObj: Record | undefined; @@ -126,7 +127,7 @@ run } if (!message) { - console.error(errorText("Error: --message or --scenario is required")); + console.error(errorText("Error: --task or --scenario is required")); process.exit(1); }