Commit Graph

4443 Commits

Author SHA1 Message Date
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>
@e2b/python-sdk@1.11.0 e2b@1.13.0
2025-08-04 12:34:59 +00:00
Vasek Mlejnsky beb1e2cdd8 Fix typo (#844) 2025-08-02 17:23:31 +00:00
Vasek Mlejnsky 2c3b01b3cb Add rate limits page (#843)
Adds page with details about rate limits.

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-08-02 01:14:08 +00:00
Vasek Mlejnsky f717caa631 Udate readme assets (#840)
Update images
2025-07-31 14:03:28 -07:00
0div 4d7eda4f51 Sort SDK version for dropdown using semver package (#839)
Sorting the versions lexicographically was not ordering by latest
correctly, now using `semver` package to sort them:
```ts
> versions = [
  '1.9.0',  '1.8.0',
  '1.7.0',  '1.6.0',
  '1.5.0',  '1.4.0',
  '1.3.0',  '1.2.0',
  '1.12.0', '1.11.0',
  '1.10.0', '1.1.0',
  '1.0.0'
]

> versions.sort((a, b) => semver.rcompare(a, b))
[
  '1.12.0', '1.11.0',
  '1.10.0', '1.9.0',
  '1.8.0',  '1.7.0',
  '1.6.0',  '1.5.0',
  '1.4.0',  '1.3.0',
  '1.2.0',  '1.1.0',
  '1.0.0'
]
```
2025-07-31 14:01:15 -07:00
Tomas Valenta 761f74ebaa Remove new tags from Metrics and Persistence (#838) 2025-07-31 10:33:01 -07: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.
@e2b/cli@1.9.2
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
@e2b/cli@1.9.1
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.
e2b@1.12.0 @e2b/python-sdk@1.10.0
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>
@e2b/cli@1.9.0 @e2b/python-sdk@1.9.0 e2b@1.11.0
2025-07-30 12:17:30 -07:00
Jakub Novák 14d7ff645b Update documentation title for file and directory metadata (#832)
This pull request updates the title of a navigation route in the
`docRoutes` configuration to improve clarity and consistency.

From:
<img width="342" height="288" alt="image"
src="https://github.com/user-attachments/assets/be4f237f-d329-468e-b5fc-098704eb1ae8"
/>

To:
<img width="381" height="254" alt="image"
src="https://github.com/user-attachments/assets/73d0cadb-3dd1-45f1-a94e-c050556bb4c6"
/>
2025-07-29 16:06:30 +00: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>
@e2b/python-sdk@1.8.0 e2b@1.10.0
2025-07-29 03:39:42 -07:00
0div 625f6d830f Update sandbox env var markdown doc file (#831)
Remove the erroneous note about scoped command env vars.
2025-07-28 19:36:52 -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.
@e2b/python-sdk@1.7.1 e2b@1.9.1
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
Jakub Dobry c28f471013 Add note about Debian based images limitation (#825) 2025-07-25 03:13:07 -07:00
Jakub Novák 3b26f71b44 Update dependencies (#824)
# Description

Fixes: 
https://github.com/e2b-dev/E2B/security/dependabot/184
https://github.com/e2b-dev/E2B/security/dependabot/182
https://github.com/e2b-dev/E2B/security/dependabot/178
https://github.com/e2b-dev/E2B/security/dependabot/183
https://github.com/e2b-dev/E2B/security/dependabot/176
https://github.com/e2b-dev/E2B/security/dependabot/175
https://github.com/e2b-dev/E2B/security/dependabot/174
https://github.com/e2b-dev/E2B/security/dependabot/173
2025-07-24 06:21:03 -07: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.
@e2b/cli@1.8.0
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.
@e2b/cli@1.7.0 @e2b/python-sdk@1.7.0 e2b@1.9.0
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
@e2b/cli@1.6.0 @e2b/python-sdk@1.6.0 e2b@1.8.0
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()
@e2b/python-sdk@1.5.6
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
@e2b/cli@1.5.2
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
@e2b/python-sdk@1.5.5
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
Mish Ushakov 0ac4112b25 Fixes parsing http errors in connect client (#806) @e2b/python-sdk@1.5.4 2025-07-03 20:27:32 +02:00
Vasek Mlejnsky e5b4fc2513 Remove migration guide (#805)
Removes the old SDK migration guide for migrating from v0 to v1.
2025-07-03 12:59:32 +02:00
github-actions[bot] 69eacc71bb [skip ci] Release new versions 2025-06-27 20:24:58 +00:00
Mish Ushakov 1067fc53e8 Ignore unknown fields from received messages (protobuf) (#738)
(We might actually not need this if we version the methods instead)

context:
https://github.com/e2b-dev/infra/pull/655#pullrequestreview-2851059703
reference:
https://googleapis.dev/python/protobuf/latest/google/protobuf/message.html#google.protobuf.message.Message.MergeFrom
@e2b/python-sdk@1.5.3
2025-06-27 13:20:40 -07:00
github-actions[bot] 9704e2ff03 [skip ci] Release new versions 2025-06-24 17:08:34 +00:00
Mish Ushakov 89b8680c75 watchDir remove redundant "timeout" option in JS SDK (#796)
- removes redundant "timeout" option for watchDir method in the JS SDK
(we're using timeoutMs already)
e2b@1.7.1
2025-06-24 19:00:49 +02:00
Mish Ushakov 72924e294f Redirect /docs/getting-help > /docs/support (#794)
- Adds a redirect from the old path to the updated doc
2025-06-23 15:11:25 -07:00
Jiri Sveceny aa13185e7b Await for get uploadUrl and downloadUrl (#793)
After merge of https://github.com/e2b-dev/E2B/pull/790 api for
`.downloadUrl` and `.uploadUrl` are assync.
This pr updates docs.
2025-06-23 22:31:00 +02:00
Jiri Sveceny 3d68fceffd Added docs for pre-signed URLs (#783)
Showcase of secured sandbox with pre-generated signed urls for file
upload/download

<img width="891" alt="image"
src="https://github.com/user-attachments/assets/0a56979b-bf45-4560-9492-291ef5fee9e4"
/>
<img width="891" alt="image"
src="https://github.com/user-attachments/assets/ccb60051-5667-46c3-9704-b782ea9f8d10"
/>
2025-06-23 11:00:38 -07:00
github-actions[bot] 884e6b3917 [skip ci] Release new versions 2025-06-23 16:58:16 +00:00
Mish Ushakov 05948ed527 Use TextEncoder for crypto/signed URLs (#790)
- Replaces node:crypto with cross-runtime TextEncoder/TextDecoder API
- The uploadUrl/downloadUrl methods are now async
e2b@1.7.0
2025-06-23 09:51:54 -07:00
github-actions[bot] 40c73100bc [skip ci] Release new versions 2025-06-20 02:52:52 +00:00