Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Change envd access token to protected (#867)
Jakub Novákfe214af0cef2
diff --git a/.changeset/twelve-pumas-fail.md b/.changeset/twelve-pumas-fail.mdnew file mode 100644index 000000000..e4a8a0dd3--- /dev/null+++ b/.changeset/twelve-pumas-fail.md@@ -0,0 +1,5 @@+---+'e2b': patch+---++Change envdAccessToken to protecteddiff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.tsindex 43c161885..cb95d33a1 100644--- a/packages/js-sdk/src/sandbox/index.ts+++ b/packages/js-sdk/src/sandbox/index.ts@@ -91,8 +91,8 @@ export class Sandbox extends SandboxApi {protected readonly envdPort = 49983protected readonly connectionConfig: ConnectionConfig+ protected readonly envdAccessToken?: stringprivate readonly envdApiUrl: string- private readonly envdAccessToken?: stringprivate readonly envdApi: EnvdApiClient/**@@ -119,8 +119,9 @@ export class Sandbox extends SandboxApi {this.sandboxDomain = opts.sandboxDomain ?? this.connectionConfig.domainthis.envdAccessToken = opts.envdAccessToken- this.envdApiUrl = `${this.connectionConfig.debug ? 'http' : 'https'- }://${this.getHost(this.envdPort)}`+ this.envdApiUrl = `${+ this.connectionConfig.debug ? 'http' : 'https'+ }://${this.getHost(this.envdPort)}`const rpcTransport = createConnectTransport({baseUrl: this.envdApiUrl,@@ -272,7 +273,7 @@ export class Sandbox extends SandboxApi {* @beta This feature is in beta and may change in the future.** Create a new sandbox from the specified sandbox template.- *+ ** @param template sandbox template name or ID.* @param opts connection options.*@@ -630,7 +631,7 @@ export class Sandbox extends SandboxApi {if (compareVersions(this.envdApi.version, '0.1.5') < 0) {throw new SandboxError('You need to update the template to use the new SDK. ' +- 'You can do this by running `e2b template build` in the directory with the template.'+ 'You can do this by running `e2b template build` in the directory with the template.')}