Skip to content

feat (api): Sandbox info lifecycle network#1213

Open
matthewlouisbrockman wants to merge 7 commits intomainfrom
sandbox-info-lifecycle-network
Open

feat (api): Sandbox info lifecycle network#1213
matthewlouisbrockman wants to merge 7 commits intomainfrom
sandbox-info-lifecycle-network

Conversation

@matthewlouisbrockman
Copy link
Contributor

@matthewlouisbrockman matthewlouisbrockman commented Mar 19, 2026

extracts the allow_internet_access, lifecycle, and network configs to the get info responses from the api when present.

Create a sandbox with lifecycle and network rules, check info while running, pause it, and check info again. Network rules, lifecycle config, and allowInternetAccess all returned while running and paused

$ e2b sandbox info xxx --format json

# running
{
  "sandboxId": "xxx",
  "templateId": "xxx",
  "name": "stdin",
  "metadata": {},
  "allowInternetAccess": true,
  "envdVersion": "0.4.3",
  "startedAt": "2026-03-19T01:39:56.238Z",
  "endAt": "2026-03-19T01:44:56.238Z",
  "state": "running",
  "cpuCount": 2,
  "memoryMB": 1024,
  "network": {
    "allowOut": ["api.example.com", "cdn.example.com"],
    "denyOut": ["0.0.0.0/0"],
    "allowPublicTraffic": true
  },
  "lifecycle": {
    "onTimeout": "pause",
    "autoResume": true
  }
}

# paused
{
  "sandboxId": "xxx",
  "templateId": "xxx",
  "metadata": {},
  "allowInternetAccess": true,
  "envdVersion": "0.4.3",
  "startedAt": "2026-03-19T01:39:56.238Z",
  "endAt": "2026-03-19T01:40:27.964Z",
  "state": "paused",
  "cpuCount": 2,
  "memoryMB": 1024,
  "network": {
    "allowOut": ["api.example.com", "cdn.example.com"],
    "denyOut": ["0.0.0.0/0"],
    "allowPublicTraffic": true
  },
  "lifecycle": {
    "onTimeout": "pause",
    "autoResume": true
  }
}

Note

Medium Risk
Updates the public sandbox info response shape across OpenAPI, JS, and Python SDKs, which may impact downstream consumers that assume the previous schema. Risk is moderate since changes are additive/optional but touch generated models and response mapping logic.

Overview
Sandbox info responses now include network and lifecycle configuration when present. The OpenAPI spec and generated JS schema extend SandboxDetail with allowInternetAccess, network, and a new lifecycle object (with SandboxOnTimeout and SandboxLifecycle).

The JS SDK updates SandboxApi.getFullInfo() and exported types to return these fields, introducing SandboxInfoLifecycle for info responses. The Python SDK updates generated client models accordingly, adds SandboxLifecycle/SandboxOnTimeout models, and maps SandboxDetail.network/SandboxDetail.lifecycle into SandboxInfo (plus exports SandboxInfoLifecycle).

A changeset bumps @e2b/python-sdk and e2b as minor for the expanded info payload.

Written by Cursor Bugbot for commit adb2229. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Mar 19, 2026

🦋 Changeset detected

Latest commit: adb2229

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@e2b/python-sdk Minor
e2b Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 2026

Package Artifacts

Built from 10f9e15. Download artifacts from this workflow run.

JS SDK (e2b@2.14.2-sandbox-info-lifecycle-network.0):

npm install ./e2b-2.14.2-sandbox-info-lifecycle-network.0.tgz

CLI (@e2b/cli@2.8.2-sandbox-info-lifecycle-network.0):

npm install ./e2b-cli-2.8.2-sandbox-info-lifecycle-network.0.tgz

Python SDK (e2b==2.15.3+sandbox-info-lifecycle-network):

pip install ./e2b-2.15.3+sandbox.info.lifecycle.network-py3-none-any.whl

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@matthewlouisbrockman matthewlouisbrockman changed the title Sandbox info lifecycle network feat (api): Sandbox info lifecycle network Mar 19, 2026
Copy link
Member

@mishushakov mishushakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good with minor type change

@matthewlouisbrockman matthewlouisbrockman marked this pull request as ready for review March 19, 2026 19:40
@ValentaTomas ValentaTomas removed their request for review March 21, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants