Commit Graph

1337 Commits

Author SHA1 Message Date
Jakub Novák cf0bb40ed3 Fix autopause (#876)
# Description

Autopause option shouldn't be passed for resume
2025-09-03 11:48:12 +00:00
github-actions[bot] 0070938d01 [skip ci] Release new versions 2025-09-01 07:47:17 +00:00
Jakub Novák 99b9ed768d Deprecate spawn instead of remove (#885)
Adds a deprecated `spawn` command to the CLI, ensuring backward
compatibility and guiding users toward the preferred `create` command.


```
$ e2b sandbox
Usage: index sandbox|sbx [options] [command]

work with sandboxes

Options:
  -h, --help                        display help for command

Commands:
  connect|cn <sandboxID>            connect terminal to already running sandbox
  list|ls [options]                 list all sandboxes, by default it list only running ones
  kill|kl [options] [sandboxID]     kill sandbox
  create|cr [options] [template]    create sandbox and connect terminal to it
  logs|lg [options] <sandboxID>     show logs for sandbox
  metrics|mt [options] <sandboxID>  show metrics for sandbox
  help [command]                    display help for command
  ```
  
  ```
$ sbx sp base
Warning: The 'spawn' command is deprecated and will be removed in future releases. Please use 'e2b sandbox create' instead.
Terminal connecting to template base with sandbox ID in897x2dqs7aws8h1x0in
```
2025-09-01 07:44:10 +00:00
Jakub Novák b42ab2a86b Add pipeline for linting and formatting (#883)
Setup linting and formatting in all packages
2025-08-31 12:06:00 -07:00
Jakub Novák a5f4802ec5 Add migration guide to docs (#870)
Adds migration guide for SDK v2
Adds mentions about auto pause

https://e2b-web-git-migration-guide-v2.e2b-preview.dev/docs/migration/v2

---------

Co-authored-by: Vasek Mlejnsky <vasek@e2b.dev>
2025-08-28 01:21:43 -07:00
github-actions[bot] 663d832ddc [skip ci] Release new versions 2025-08-22 09:45:46 +00:00
Jakub Novák c2195d832f Fix API key check in JS SDK & remove deprecated fields (#869)
Fix the check and remove deprecated fields
2025-08-22 09:42:49 +00:00
github-actions[bot] 4eb3a2d322 [skip ci] Release new versions 2025-08-21 20:08:42 +00:00
Jakub Novák fe214af0ce Change envd access token to protected (#867) 2025-08-21 19:56:11 +00:00
github-actions[bot] 774dfd7667 [skip ci] Release new versions 2025-08-21 15:51:16 +00:00
Jakub Novák 74457ff1dd SDK v2 - Changeset and docs (#862)
SDK v2 release
2025-08-21 08:45:25 -07:00
Jakub Novák d117ba09e8 SDK v2 - Add beta pause and update Sandbox list (#854)
Introduce beta submodule with beta features - pause and resume
Update Sandbox list to also return paused sandboxes

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-08-19 00:37:07 -07:00
Jakub Novák 1aee7c8195 Refactor Sandbox object in Python (#855)
# Description

We can simplify typing and return only SandboxInfo in SDKs as the types
are very similar (there are some extra fields in detail, which we don't
want to expose but we need them e.g. for connect)
2025-08-10 12:40:09 -07:00
Jakub Novák da7c60d2dd Simplify connection config handling in Python SDK (#849)
Several improvements and refactors to the Python SDK's sandbox
connection and configuration logic.

The main focus is on making header management more flexible, improving
API parameter handling, and simplifying class structures for better
maintainability and usability.

Also unifies doc strings
2025-08-10 08:09:45 -07:00
Jakub Dobry 41d909a4bb Update access token location readme (#852) 2025-08-07 04:23:22 -07:00
github-actions[bot] e140ec3717 [skip ci] Release new versions 2025-08-06 21:14:31 +00:00
Tomas Valenta 1f1c666413 Add RateLimitError to export (#851)
Co-authored-by: Zobeir Hamid <zobeirhamid@berkeley.edu>
2025-08-06 21:09:23 +00:00
github-actions[bot] 7540839268 [skip ci] Release new versions 2025-08-06 10:32:14 +00:00
Tomas Valenta 0bace983b1 Increase default request timeout (#847)
Increase the default request timeout to 60 seconds. This is the value in
the current beta, and with the merge, we want to keep it that way, to
minimize possible negative migration impact.
2025-08-06 03:27:19 -07:00
Tomas Valenta 33b9467bef Allow more protobuf versions (#846)
- Allow protobuf `4.21.0`+ (we previously allowed this, and some users
in beta require this)
- Allow protobuf `6.0.0`+ (some other users need to use the SDK with the
latest versions)

The SDK should work with both of these, but we may want to smoke test it
somehow.

---------

Co-authored-by: Jakub Novak <jakub@e2b.dev>
2025-08-06 03:27:00 -07:00
github-actions[bot] 9d2b3c92a7 [skip ci] Release new versions 2025-08-04 12:40:16 +00:00
Jiri Sveceny c0a41722e5 Secured sandbox auto signature (#845)
Some users report that JS/Python types lack a `useSignature` attribute,
which only works when `secure=true` is set for the sandbox. This change
removes the `useSignatrue` parameter and makes all upload/download URL
requests signed if `secure` was provided, making sure the function will
work for all possible cases.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Fornefeld <50748440+ben-fornefeld@users.noreply.github.com>
2025-08-04 12:34:59 +00:00
github-actions[bot] 64a5d52dd5 [skip ci] Release new versions 2025-07-31 10:43:16 +00:00
Jakub Novák ec1b831018 Fix byte shift in sandbox metrics (#837)
This pull request addresses a bug in the CLI related to incorrect byte
shifting for memory and disk metrics when dealing with sizes greater
than 4 GB.
2025-07-31 03:40:27 -07:00
github-actions[bot] 0c6cfed137 [skip ci] Release new versions 2025-07-31 09:57:39 +00:00
Jakub Novák 8c4710cc60 Fix metrics cli missing api key (#836)
# Description
Fixing a missing API key issue for sandbox metrics in the CLI
2025-07-31 09:54:44 +00:00
github-actions[bot] 115407cf1e [skip ci] Release new versions 2025-07-31 09:44:55 +00:00
Jakub Novák f123091e9a Allow to block network from SDK (#834)
# Description

This pull request introduces the ability to control internet access for
sandboxes, enhancing security for sensitive workloads.
2025-07-31 02:34:57 -07:00
github-actions[bot] 76d62ed070 [skip ci] Release new versions 2025-07-30 19:25:33 +00:00
Jakub Novák e34d69525f Expose sandbox metrics in SDKs and CLI (#828)
# Description

Expose sandbox metrics in SDKs and CLI


```
e2b sbx mt il98ycmohc6enybi79uf8

Metrics for sandbox il98ycmohc6enybi79uf8:

[2025-07-25 14:05:55Z]  CPU:  8.27% /  2 Cores | Memory:    31 / 484   MiB | Disk:  1445 / 2453  MiB
[2025-07-25 14:06:00Z]  CPU:   0.5% /  2 Cores | Memory:    32 / 484   MiB | Disk:  1445 / 2453  MiB
[2025-07-25 14:06:05Z]  CPU:   0.1% /  2 Cores | Memory:    32 / 484   MiB | Disk:  1445 / 2453  MiB
[2025-07-25 14:06:10Z]  CPU:   0.3% /  2 Cores | Memory:    32 / 484   MiB | Disk:  1445 / 2453  MiB

```

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-07-30 12:17:30 -07:00
github-actions[bot] 7f26f5536e [skip ci] Release new versions 2025-07-29 10:44:36 +00:00
Mish Ushakov edeafb1cdd Adds files.getInfo / files.get_info methods to retrieve information about directory/files (#724)
**Changelog**

- Adds `files.getInfo`, `files.get_info` methods to the SDKs.
- Adds tests for the new methods
- Adds documentation for the above.

**Examples**

JavaScript

```js
import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create()

// Create a new file
await sandbox.files.write('test_file.txt', 'Hello, world!')

// Get information about the file
const info = await sandbox.files.getInfo('test_file.txt')

console.log(info)
// {
//   name: 'test_file.txt',
//   type: 'file',
//   path: '/home/user/test_file.txt'
// }
```

Python

```py
from e2b_code_interpreter import Sandbox

sandbox = Sandbox()

# Create a new file
sandbox.files.write('test_file', 'Hello, world!')

# Get information about the file
info = sandbox.files.get_info('test_file')

print(info)
# EntryInfo(name='test_file.txt', type=<FileType.FILE: 'file'>, path='/home/user/test_file.txt')
```

---------

Co-authored-by: Jakub Novak <jakub@e2b.dev>
2025-07-29 03:39:42 -07:00
github-actions[bot] 37d69be891 [skip ci] Release new versions 2025-07-28 15:23:07 +00:00
Jakub Novák c54528faea Update User-Agent header in SDKs based on the SDK version (#830)
# Description

The bug where extra fields in envd response caused an exception was
fixed in #738. As we're also ignoring new fields in envd (implemented in
https://github.com/e2b-dev/infra/pull/847). We now have to update the
`user-agent` header.
2025-07-28 08:18:02 -07:00
Jakub Novák 706ebd9af8 Fix generating files with docker (#829)
# Description

Fixes an issue in generating files in Docker. There has been an
incompatibility of `buf` (version `29.5`) and `protoc-gen-es` (version
`2.2.2`).

I updated `protoc-gen-es@` to `2.6.2`

Also refactored the code a little so it's easier to read
Added a CI pipeline job to check all files are properly generated
2025-07-28 13:47:26 +02:00
github-actions[bot] 37ec33654d [skip ci] Release new versions 2025-07-18 15:23:52 +00:00
Jiri Sveceny 56dfb423ad Add image URI mask option for template build to allow custom image repository (#819)
This will allow customers who are not using our Docker repository to
fall back to their own during template build.
2025-07-18 17:20:46 +02:00
github-actions[bot] e7538fb5cc [skip ci] Release new versions 2025-07-18 11:20:02 +00:00
Jiri Sveceny 10e9a28a82 Support sandbox domain in sdk and cli (#821)
Support sandbox traffic routing to the custom domain returned from API.
2025-07-18 13:15:12 +02:00
github-actions[bot] 5f207ffa95 [skip ci] Release new versions 2025-07-17 13:16:31 +00:00
Jiri Sveceny 9f8c40e49e Client ID part removal from SDKs (#820)
- CLI spawn, connect, and logs work with and without the client part
provided
- JavaScript and Python SDKs are no longer returning IDs with client
part
2025-07-17 13:11:50 +00:00
github-actions[bot] 5cf6c145a5 [skip ci] Release new versions 2025-07-10 13:45:42 +00:00
Mish Ushakov 5c68eb7a25 Fixes Sandbox.connect not working when trying to pass API key via parameters (#772)
fixes https://github.com/e2b-dev/E2B/issues/746

- Renamed SandboxApi.get_info() > SandboxApi._cls_get_info()
- Properly overloaded Sandbox.get_info()
- Passed connect parameters to SandboxApi._cls_get_info()
2025-07-10 15:41:33 +02:00
github-actions[bot] 8b8cf0084f [skip ci] Release new versions 2025-07-09 14:49:53 +00:00
Jakub Dobry 2817a85101 Print all logs also on build success (#814)
Print all logs also on build success
2025-07-09 07:46:13 -07:00
James Murdza 606d03060c Fix broken example code in README (#798)
This fixes the broken example code in the README.
2025-07-09 07:28:42 -07:00
github-actions[bot] 083d5eefa8 [skip ci] Release new versions 2025-07-09 14:08:34 +00:00
Jakub Novák 10aab1d7d6 Set default domain even if the env variable is an empty string (#813)
# Description

os.getenv doesn't use the default value, if the variable is empty string
2025-07-09 07:03:31 -07:00
0div 9b4861d2ea Add sandbox metadata docs and update env var tests (#804)
# Description
- [x] update env var docs to include new default sandbox metadata env
vars
- [x] update js-sdk tests
- [x] update python tests

# Test
```sh
$ [packages/js-sdk] pnpm test env

$ [packages/python-sdk] poetry run pytest --verbose -x tests/async/sandbox_async/commands/test_env_vars.py

$ [packages/python-sdk] poetry run pytest --verbose -x tests/sync/sandbox_sync/commands/test_env_vars.py
```
2025-07-03 14:44:27 -07:00
github-actions[bot] 3547878756 [skip ci] Release new versions 2025-07-03 18:31:46 +00:00