Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Remove forgotten log
Jakub Novak8c89991e855b
diff --git a/.changeset/warm-jars-suffer.md b/.changeset/warm-jars-suffer.mdnew file mode 100644index 000000000..d4d42b6d2--- /dev/null+++ b/.changeset/warm-jars-suffer.md@@ -0,0 +1,5 @@+---+"e2b": patch+---++Remove forgotten logdiff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.tsindex 7a3d5e882..23b3b2eeb 100644--- a/packages/js-sdk/src/sandbox/index.ts+++ b/packages/js-sdk/src/sandbox/index.ts@@ -18,7 +18,7 @@ export type DownloadFileFormat =| 'blob'| 'buffer'| 'arraybuffer'- | 'text';+ | 'text'export interface SandboxOpts extends SandboxConnectionOpts {onScanPorts?: ScanOpenPortsHandler;@@ -428,7 +428,7 @@ export class Sandbox extends SandboxConnection {* If a file with the same name already exists, it will be overwritten.*/get fileURL() {- const protocol = this.getProtocol('http', this.opts.__debug_devEnv !== "local")+ const protocol = this.getProtocol('http', this.opts.__debug_devEnv !== 'local')const hostname = this.getHostname(this.opts.__debug_port || ENVD_PORT)return `${protocol}://${hostname}${FILE_ROUTE}`}@@ -463,7 +463,7 @@ export class Sandbox extends SandboxConnection {* ```* @constructs Sandbox*/- static async create<S extends typeof Sandbox>(this: S): Promise<InstanceType<S>>;+ static async create<S extends typeof Sandbox>(this: S): Promise<InstanceType<S>>/*** Creates a new Sandbox from the template with the specified ID.* @param template Sandbox template ID or name@@ -474,7 +474,7 @@ export class Sandbox extends SandboxConnection {* const sandbox = await Sandbox.create("sandboxTemplateID")* ```*/- static async create<S extends typeof Sandbox>(this: S, template: string): Promise<InstanceType<S>>;+ static async create<S extends typeof Sandbox>(this: S, template: string): Promise<InstanceType<S>>/*** Creates a new Sandbox from the specified options.* @param opts Sandbox options@@ -488,7 +488,7 @@ export class Sandbox extends SandboxConnection {* })* ```*/- static async create<S extends typeof Sandbox>(this: S, opts: SandboxOpts): Promise<InstanceType<S>>;+ static async create<S extends typeof Sandbox>(this: S, opts: SandboxOpts): Promise<InstanceType<S>>static async create(optsOrTemplate?: string | SandboxOpts) {const opts: SandboxOpts | undefined = typeof optsOrTemplate === 'string' ? { template: optsOrTemplate } : optsOrTemplateconst sandbox = new Sandbox(opts)@@ -513,7 +513,7 @@ export class Sandbox extends SandboxConnection {* const reconnectedSandbox = await Sandbox.reconnect(sandboxID)* ```*/- static async reconnect<S extends typeof Sandbox>(this: S, sandboxID: string): Promise<InstanceType<S>>;+ static async reconnect<S extends typeof Sandbox>(this: S, sandboxID: string): Promise<InstanceType<S>>/*** Reconnects to an existing Sandbox.* @param opts Sandbox options@@ -532,7 +532,7 @@ export class Sandbox extends SandboxConnection {* })* ```*/- static async reconnect<S extends typeof Sandbox>(this: S, opts: Omit<SandboxOpts, 'id' | 'template'> & { sandboxID: string }): Promise<InstanceType<S>>;+ static async reconnect<S extends typeof Sandbox>(this: S, opts: Omit<SandboxOpts, 'id' | 'template'> & { sandboxID: string }): Promise<InstanceType<S>>static async reconnect<S extends typeof Sandbox>(this: S, sandboxIDorOpts: string | Omit<SandboxOpts, 'id' | 'template'> & { sandboxID: string }): Promise<InstanceType<S>> {let id: stringlet opts: SandboxOpts@@ -544,7 +544,7 @@ export class Sandbox extends SandboxConnection {opts = sandboxIDorOpts}- const sandboxIDAndClientID = id.split("-")+ const sandboxIDAndClientID = id.split('-')const sandboxID = sandboxIDAndClientID[0]const clientID = sandboxIDAndClientID[1]opts.__sandbox = { sandboxID, clientID, templateID: 'unknown' }@@ -569,7 +569,7 @@ export class Sandbox extends SandboxConnection {* sandbox.addAction('readFile', (sandbox, args) => sandbox.filesystem.read(args.path))* ```*/- addAction<T = { [name: string]: any }>(action: Action<this, T>): this;+ addAction<T = { [name: string]: any }>(action: Action<this, T>): this/*** Add a new action with a specified name.*@@ -589,7 +589,7 @@ export class Sandbox extends SandboxConnection {* sandbox.addAction(readFile)* ```*/- addAction<T = { [name: string]: any }>(name: string, action: Action<this, T>): this;+ addAction<T = { [name: string]: any }>(name: string, action: Action<this, T>): thisaddAction<T = { [name: string]: any }>(actionOrName: string | Action<this, T>, action?: Action<this, T>): this {if (typeof actionOrName === 'string') {if (!action) throw new Error('Action is required')@@ -717,7 +717,6 @@ export class Sandbox extends SandboxConnection {)if (this.cwd) {- console.log(`Custom cwd for Sandbox set: "${this.cwd}"`)await this.filesystem.makeDir(this.cwd)}@@ -736,7 +735,7 @@ export class Sandbox extends SandboxConnection {cwd: '/',})} catch (err) {- this.logger.debug?.("start command not started", err)+ this.logger.debug?.('start command not started', err)}}}