Repository navigation
Edit agent configs' setup commands in the console, and document them - #206
Merged
Merged
Conversation
The create and edit dialogs get a Setup commands field: a card per command, in run order, each a monospace textarea sized to its command (a heredoc shows whole). A blank card holds Create and Save back, as an empty credential field does; an edit sends the list only when it changed, so other edits carry it forward. The README gains a Setup commands section, with the Monid CLI as the example: they run in the package template's build, as the sandbox's user, each in its own shell; they see no credentials, what they fetch is frozen at the first build, and the build's network isn't the session's. A failing command ends the run naming it, and a network hiccup counts too, so downloads should retry on their own. The credentials section points file-keyed tools at it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A simpler example (git config, a work directory) in place of the Monid CLI, and three bullets. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Last PR for setup commands, after #203 (core schema), #204 (configs store them) and #205 (E2B runs them in the template build).
Console:
components/SetupCommandsFields.tsx).setupCommandsonly when the list changed (lib/setup-commands.ts,sameSetupCommands). An edit to another field carries the list forward.[]. It stays the short path, as it does for credentials.README: a short "Setup commands" section: a one-line example (
echo 'hello world' > ~/hello.txt) and three bullets. Commands run in order, each in its own shell, as the sandbox user. They run once per build, so they see no credentials. A failing command ends the run and is named, so downloads should retry on their own.The Credentials section's stand-in-key bullet now links to this section for tools that keep their key in a file.
Verified in a browser: headless Chrome driven over CDP, against the real api (
buildApp) on an in-memory store. 15/15 checks:{"setupCommands":[…],"version":1};setupCommandsout, and version 3 still has the list.Full
pnpm test, typecheck and prettier pass.🤖 Generated with Claude Code