From 3d4e55b9e2d245a73b8fafa9c865e671e8333a0e Mon Sep 17 00:00:00 2001 From: Jason Lernerman Date: Thu, 15 Oct 2026 19:11:25 -0400 Subject: [PATCH 1/2] fix(simulate): offer `lk cloud auth` when no project is linked `lk agent simulate text|audio|view|export` resolved credentials with loadProjectDetails, so a fresh install got a bare "api-key is required". Resolve through requireProject like the other agent commands: a terminal prompts to authenticate, and a non-interactive run says to run `lk cloud auth` or set --project. --- cmd/lk/simulate.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/lk/simulate.go b/cmd/lk/simulate.go index 37e52cbe..af6a8796 100644 --- a/cmd/lk/simulate.go +++ b/cmd/lk/simulate.go @@ -116,7 +116,7 @@ var simulateCommand = &cli.Command{ // `list` and `cancel` never hit the API-key project gate. // // TODO(DEVX-577): unify text/audio/view/export with --experimental-auth. For -// now they stay API-key only (loadProjectDetails rejects --experimental-auth). +// now they stay API-key only (requireProject rejects --experimental-auth). // Blockers: a spawned agent needs API keys to register as a worker, and the // Public API can't issue them; it also lacks a confirm-source-upload op, and // its create has no audio-impairment or CI fields. Live-agent mode @@ -124,10 +124,11 @@ var simulateCommand = &cli.Command{ // oapi run type would need converting to the livekit.SimulationRun the TUI, // CI report and export consume. func loadSimulateProject(ctx context.Context, cmd *cli.Command) (context.Context, error) { - pc, err := loadProjectDetails(cmd) + ctx, err := requireProject(ctx, cmd) if err != nil { return nil, err } + pc := project simulateProjectConfig = pc if !cmd.IsSet("server-url") { if api := cloudAPIURL(pc.URL); api != "" { From 63d5728a5e73de736f3ae300e053c76c49b760d1 Mon Sep 17 00:00:00 2001 From: Jason Lernerman Date: Thu, 15 Oct 2026 22:16:58 -0400 Subject: [PATCH 2/2] fix(simulate): drop unused ctx from requireProject --- cmd/lk/simulate.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/lk/simulate.go b/cmd/lk/simulate.go index af6a8796..1cfdbd7a 100644 --- a/cmd/lk/simulate.go +++ b/cmd/lk/simulate.go @@ -124,14 +124,12 @@ var simulateCommand = &cli.Command{ // oapi run type would need converting to the livekit.SimulationRun the TUI, // CI report and export consume. func loadSimulateProject(ctx context.Context, cmd *cli.Command) (context.Context, error) { - ctx, err := requireProject(ctx, cmd) - if err != nil { + if _, err := requireProject(ctx, cmd); err != nil { return nil, err } - pc := project - simulateProjectConfig = pc + simulateProjectConfig = project if !cmd.IsSet("server-url") { - if api := cloudAPIURL(pc.URL); api != "" { + if api := cloudAPIURL(project.URL); api != "" { serverURL = api } }