Repository navigation
Conversation
The wizard now uses the setup agent to add the SDK initialization code. The agent step replaces the init step, and `ldcli setup agent` runs only that step. The --agent flag controls the step. With auto, the default, setup uses the agent if OpenCode 1.19.0 or later is installed, and the templates if not. With on, setup stops if the agent cannot run. With off, setup always uses the templates. The step shows the agent's finished tool calls and its questions, with numbered options. After the run, it lists the changed files and the export command for the SDK's own credential. If the agent fails after it changed a file, setup stops and does not apply a template on top. Setup stops OpenCode when the user quits, when the run starts late, and when the terminal closes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atornsii
added this pull request to stack #902
October 20, 2026 15:48
This was referenced Oct 20, 2026
… into atorns/agent-2-wizard-step
…ronment Setup now always uses the setup agent. The --agent flag and its auto, on, and off modes are gone, and so is the fallback to the init templates. If the agent cannot run or fails, setup stops with the error. ldcli setup now takes --project and --environment. The wizard selects them and skips their screens, so one command can start setup. The subcommand that runs only the agent step is now ldcli setup agentcontrol. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This adds the setup agent step to the
ldcli setupwizard, on top of the adapter from PR 1.What changed
ldcli setup --project <key> --environment <key>selects the project and environment and skips their screens, so one command can start setup.ldcli setup agentcontrol --path . --sdk-id node-server --flag-key my-new-flagruns only the agent step, without the wizard.sskips). Permission requests are queued, if a version asks for them.SIGHUP).Testing
Wizard tests with a fake runner cover the agent step, the queue of permission requests, questions with one or several items, the error when the agent cannot run or fails, the
--projectand--environmentpresets and an unknown key, the close on quit, and the credential line.ldcli setup agentcontroltests cover permission and question input on the terminal.Diagram
Blue boxes are new files, orange boxes are changed files, dashed boxes are files from an earlier PR, and purple boxes are outside ldcli. A solid arrow goes from the caller to the code that it calls. A dashed arrow shows data that moves without a direct call.
setup.goadds the--projectand--environmentflags, gives the runner to the wizard model, and registersldcli setup agentcontrol. When the project or environment list loads,update.goselects a preset key and skips that screen. In the wizard,commands.gostarts the run and waits for each event as a Bubble Tea command (a function that returns a message to the wizard).update.gohandles each event, changes the state inmodel.go, and returns the next command.view.godraws that state. If the agent cannot run or fails,update.gostops setup with the error. When the agent finishes, the wizard goes to the existing verify step. Theldcli setup agentcontrolsubcommand inagent.gouses the same runner without the wizard.This PR uses only the
RunnerandRuninterfaces and theEventtypes from #894. It does not change the agent package.Stack
This is one of six PRs for the
ldcli setupagent. Review and merge them in order, after #877 (Go 1.26):They replace #876 and #878.
🤖 Generated with Claude Code