fix(cli): print only the sandbox ID in detached sandbox create - #1762
fix(cli): print only the sandbox ID in detached sandbox create#1762devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
🦋 Changeset detectedLatest commit: 80b608b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Package ArtifactsBuilt from 6006d12. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.45.1-devin-1787401692-cli-detach-print-id.0.tgzCLI ( npm install ./e2b-cli-2.17.2-devin-1787401692-cli-detach-print-id.0.tgzPython SDK ( pip install ./e2b-2.45.1+devin.1787401692.cli.detach.print.id-py3-none-any.whl |
There was a problem hiding this comment.
Reviewed against TASTE.md (sdk-harness). Checked the changed surface — the new --detach output contract, the printDashboardSandboxInspectUrl option, and the test — against the API-shape rules (T-3, T-12, T-14, T-15, T-22, T-23) and naming/casing rules.
1 violation found (inline comment below). The rest complies: the new optional parameter correctly lands in a trailing options object rather than an optional positional (T-3), and stream: 'stdout' | 'stderr' is a string-literal union instead of a toStderr: boolean flag, leaving room for future variants (T-14).
Note: TASTE.md scopes itself to the js-sdk/python-sdk public surface; the flagged rule is applied here because the CLI util is an exported function growing an options parameter, where the same reasoning (named, reusable, Pick<>-able option type) holds.
| export const printDashboardSandboxInspectUrl = ( | ||
| sandboxId: string, | ||
| opts?: { stream?: 'stdout' | 'stderr' } | ||
| ) => { |
There was a problem hiding this comment.
T-23 — option types are always named and exported, never an inline anonymous shape in the signature (and per T-22 they carry the Opts suffix). opts?: { stream?: 'stdout' | 'stderr' } is neither discoverable nor reusable by callers.
| export const printDashboardSandboxInspectUrl = ( | |
| sandboxId: string, | |
| opts?: { stream?: 'stdout' | 'stderr' } | |
| ) => { | |
| export interface PrintDashboardSandboxInspectUrlOpts { | |
| stream?: 'stdout' | 'stderr' | |
| } | |
| export const printDashboardSandboxInspectUrl = ( | |
| sandboxId: string, | |
| opts?: PrintDashboardSandboxInspectUrlOpts | |
| ) => { |
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Summary
e2b sandbox create -d/--detachis the non-interactive path, but stdout also carried the dashboard inspect link and a prose line (Sandbox created with ID ... using template ...), so callers had to grep it. In detached mode stdout is now exactly the sandbox ID: the dashboard link is skipped entirely and the "Found sandbox template" line goes to stderr.Attached mode and
sandbox connectare unchanged.Usage:
Link to Devin session: https://app.devin.ai/sessions/ac66b81916bf4c2496af9f662a781509
Requested by: @mishushakov