Repository navigation
Conversation
`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.
Contributor
Author
|
On a fresh install with no linked project: sim-auth-prompt.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a fresh install with no project linked,
lk agent simulate text(the dashboard's getting-started command) exits 1 with only:Nothing tells the user to run
lk cloud auth. This failure happens on the client before any request reaches the server, so server-side telemetry never records it. Other agent commands likelk agent createandlk agent deployinstead offer to authenticate.The cause:
loadSimulateProjectresolved credentials withloadProjectDetails, which has no fallback when nothing resolves. The other agent commands go throughrequireProject, which does.Fix
loadSimulateProjectnow resolves throughrequireProject. Affected commands:simulate text,audio,viewandexport.api-key is requiredlk cloud authflow and continues with the new projectapi-key is requiredno projects configured; run 'lk cloud auth' in an interactive terminal or set --projectapi-key is requiredAnything that already resolved still resolves the same way:
--project, env/flag credentials,livekit.toml, and the default project.--experimental-authis still rejected, by the sameexperimentalAuthGate.Verification
go test ./cmd/lk/passes.agent-starter-pythonwith an emptyHOME, comparing main with this branch:api-key is required. This branch shows the authenticate prompt, and Enter starts thelk cloud authdevice flow.lk cloud auth/--projectmessage.LIVEKIT_URL/LIVEKIT_API_KEY/LIVEKIT_API_SECRETenv: unchanged. It prints "Using url, api-key, api-secret from environment" and starts the agent with no prompt.