@@ -1170,10 +1170,17 @@ def serve_api(self, args):
11701170 elif oidc :
11711171 self .print_success ("Auth: OIDC / JWT" )
11721172
1173+ public_dashboard = dev_mode or os .environ .get (
1174+ "EFFGEN_PUBLIC_DASHBOARD" , "0"
1175+ ).strip () == "1"
1176+
11731177 self .print (f"Starting server on { host } :{ port } " )
11741178 self .print (f" OpenAI-compatible API : http://{ host } :{ port } /v1" )
11751179 self .print (f" Interactive docs : http://{ host } :{ port } /docs" )
1176- self .print (f" Dashboard : http://{ host } :{ port } /dashboard" )
1180+ dashboard_line = f" Dashboard : http://{ host } :{ port } /dashboard"
1181+ if not public_dashboard :
1182+ dashboard_line += " (data requires an API key; set EFFGEN_PUBLIC_DASHBOARD=1 for local viewing)"
1183+ self .print (dashboard_line )
11771184 self .print ()
11781185
11791186 uvicorn .run (
@@ -2666,6 +2673,10 @@ def create_parser():
26662673 " EFFGEN_OIDC_ISSUER / enable OIDC/JWT auth instead of a static key.\n "
26672674 " EFFGEN_OIDC_CLIENT_ID\n "
26682675 " EFFGEN_PUBLIC_METRICS=1 serve /metrics without auth (default: auth).\n "
2676+ " EFFGEN_PUBLIC_DASHBOARD=1 serve /dashboard/data.json + /dashboard/spans\n "
2677+ " without auth, for local viewing (default: auth;\n "
2678+ " the /dashboard page itself always loads, but its\n "
2679+ " data calls 401 without this or an API key).\n "
26692680 " EFFGEN_MODEL_POOL_SIZE loaded models kept warm (default 4).\n "
26702681 " EFFGEN_NO_DOTENV=1 skip the .env filesystem search entirely, so\n "
26712682 " only environment variables the orchestrator set\n "
@@ -2997,12 +3008,14 @@ def create_parser():
29973008 prompts_render = prompts_subparsers .add_parser ('render' , help = 'Non-interactive: render a prompt to stdout' )
29983009 prompts_render .add_argument ('prompt_name' , metavar = 'name' , help = 'Prompt name (e.g. research.literature_review.v1)' )
29993010 prompts_render .add_argument ('--input' , dest = 'input_file' , metavar = 'FILE' ,
3000- help = 'JSON file with input variables (merged over fixture defaults)' )
3011+ help = "JSON file with input variables, validated against the prompt's "
3012+ "input_schema (see 'prompts show <name>'); omit to render the fixture" )
30013013
30023014 prompts_run = prompts_subparsers .add_parser ('run' , help = 'Non-interactive: render + run through a model' )
30033015 prompts_run .add_argument ('prompt_name' , metavar = 'name' , help = 'Prompt name' )
30043016 prompts_run .add_argument ('--input' , dest = 'input_file' , metavar = 'FILE' ,
3005- help = 'JSON file with input variables' )
3017+ help = "JSON file with input variables, validated against the prompt's "
3018+ "input_schema (see 'prompts show <name>'); omit to render the fixture" )
30063019 prompts_run .add_argument ('--model' , required = True , help = 'Model identifier to run against' )
30073020
30083021 # Load test command
@@ -4651,7 +4664,10 @@ def _handle_prompts_command(args, cli: "CLIInterface") -> int:
46514664 if RICH_AVAILABLE and cli .console :
46524665 from rich .table import Table
46534666 t = Table (title = "Prompt Library" , show_lines = False )
4654- t .add_column ("Name" , style = "cyan" )
4667+ # Names must never be clipped — they're the id a user types back
4668+ # into `prompts show`/`run`/`render`. "fold" wraps onto extra
4669+ # lines instead of the default ellipsis truncation.
4670+ t .add_column ("Name" , style = "cyan" , overflow = "fold" )
46554671 t .add_column ("Domain" )
46564672 t .add_column ("Variant" )
46574673 t .add_column ("Description" )
@@ -4674,10 +4690,11 @@ def _handle_prompts_command(args, cli: "CLIInterface") -> int:
46744690 # ---- show ----
46754691 if cmd == 'show' :
46764692 name = args .name
4693+ from effgen .cli .playground import _key_error_message , _resolve_prompt
46774694 try :
4678- p = registry . get (name )
4679- except KeyError :
4680- cli .print_error (f"Prompt ' { name } ' not found." )
4695+ p , _resolved_name = _resolve_prompt (name )
4696+ except KeyError as exc :
4697+ cli .print_error (_key_error_message ( exc , name ) )
46814698 return 1
46824699
46834700 cli .print_header (f"Prompt: { p .name } " )
0 commit comments