diff --git a/internal/adapter/cli/run.go b/internal/adapter/cli/run.go index b07ed72..060b55a 100644 --- a/internal/adapter/cli/run.go +++ b/internal/adapter/cli/run.go @@ -708,5 +708,5 @@ func printUsage(w io.Writer) { fmt.Fprintln(w, "usage: scriptorium ...") fmt.Fprintln(w, " run: scriptorium run [--config PATH] [--prompt-dir DIR] [--profile-dir DIR] --prompt ID --input name=path [--input ...] [--profile ID] [--llm-base-url URL] [--model NAME] [--api-key-env ENV] [--temperature N] [--max-tokens N] [--top-p N] [--var k=v] [--out path] [--timeout 10m]") fmt.Fprintln(w, " render: scriptorium render [--config PATH] [--prompt-dir DIR] [--profile-dir DIR] --prompt ID --input name=path [--input ...] [--profile ID] [--llm-base-url URL] [--model NAME] [--api-key-env ENV] [--temperature N] [--max-tokens N] [--top-p N] [--var k=v] [--format text|json] [--out path] [--timeout 10m]") - fmt.Fprintf(w, " serve: scriptorium serve [--config PATH] [--addr %s] [--prompt-dir DIR] [--profile-dir DIR] [--schema-dir DIR]\n", defaults.HTTPAddrDefault) + fmt.Fprintf(w, " serve: scriptorium serve [--config PATH] [--addr %s] [--prompt-dir DIR] [--profile-dir DIR] [--schema-dir DIR] [--artifact-root DIR] [--max-request-bytes N] [--max-artifact-bytes N] [--max-response-bytes N]\n", defaults.HTTPAddrDefault) } diff --git a/internal/adapter/cli/run_test.go b/internal/adapter/cli/run_test.go index 7a37bd7..f2400e0 100644 --- a/internal/adapter/cli/run_test.go +++ b/internal/adapter/cli/run_test.go @@ -192,6 +192,26 @@ func TestParseServeArgsRejectsRuntimeOverrideFlags(t *testing.T) { } } +func TestUsageIncludesServeFileAndSizeLimitFlags(t *testing.T) { + var stderr bytes.Buffer + code := Run(nil, io.Discard, &stderr) + if code != ExitRuntimeError { + t.Fatalf("expected usage path to return runtime error, got %d", code) + } + + usage := stderr.String() + for _, want := range []string{ + "--artifact-root", + "--max-request-bytes", + "--max-artifact-bytes", + "--max-response-bytes", + } { + if !strings.Contains(usage, want) { + t.Fatalf("expected usage to include %q, got %q", want, usage) + } + } +} + func TestParseRunArgsTimeout(t *testing.T) { cfg, err := parseRunArgs([]string{ "--prompt-dir", "./prompts",