AS AgentScopeAPI 手册 / API Reference

E2bSandboxState

public class E2bSandboxState extends SandboxState
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:23–120

E 2 b 沙箱状态,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.e2b 包,继承自 SandboxState。核心成员包括 getSandboxId、setSandboxId、getTemplateId、setTemplateId、getSandboxDomain、setSandboxDomain。

Serializable state for an E2B-backed sandbox.

方法摘要Method Summary

方法Method说明Description
public String getSandboxId()
获取沙箱标识。
Returns the sandbox id.
public void setSandboxId(String sandboxId)
设置沙箱标识。
Sets the sandbox id.
public String getTemplateId()
获取模板标识。
Returns the template id.
public void setTemplateId(String templateId)
设置模板标识。
Sets the template id.
public String getSandboxDomain()
获取 `getSandboxDomain`。
Returns the sandbox domain.
public void setSandboxDomain(String sandboxDomain)
设置 `setSandboxDomain`。
Sets the sandbox domain.
public String getEnvdAccessToken()
获取 `getEnvdAccessToken`。
Returns the envd access token.
public void setEnvdAccessToken(String envdAccessToken)
设置 `setEnvdAccessToken`。
Sets the envd access token.
public String getEnvdVersion()
获取 `getEnvdVersion`。
Returns the envd version.
public void setEnvdVersion(String envdVersion)
设置 `setEnvdVersion`。
Sets the envd version.
public String getWorkspaceRoot()
获取工作区根。
Returns the workspace root.
public void setWorkspaceRoot(String workspaceRoot)
设置工作区根。
Sets the workspace root.
public boolean isSandboxOwned()
判断是否 `isSandboxOwned`。
Returns whether the sandbox owned.
public void setSandboxOwned(boolean sandboxOwned)
设置 `setSandboxOwned`。
Sets the sandbox owned.
public E2bPersistenceMode getPersistenceMode()
获取持久化模式。
Returns the persistence mode.
public void setPersistenceMode(E2bPersistenceMode persistenceMode)
设置持久化模式。
Sets the persistence mode.
public E2bCodec getCodec()
获取编解码器。
Returns the codec.
public void setCodec(E2bCodec codec)
设置编解码器。
Sets the codec.
public List<String> getSnapshotIds()
获取 `getSnapshotIds`。
Returns the snapshot ids.
public void setSnapshotIds(List<String> snapshotIds)
设置 `setSnapshotIds`。
Sets the snapshot ids.

方法详情Method Detail

getSandboxId

public String getSandboxId()

获取沙箱标识。

Returns the sandbox id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:41–43

setSandboxId

public void setSandboxId(String sandboxId)

设置沙箱标识。

Sets the sandbox id.

参数Parameters
名称Name类型Type说明Description
sandboxIdString沙箱标识(类型 `String`)。The sandbox id.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:45–47

getTemplateId

public String getTemplateId()

获取模板标识。

Returns the template id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:49–51

setTemplateId

public void setTemplateId(String templateId)

设置模板标识。

Sets the template id.

参数Parameters
名称Name类型Type说明Description
templateIdString模板标识(类型 `String`)。The template id.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:53–55

getSandboxDomain

public String getSandboxDomain()

获取 getSandboxDomain。

Returns the sandbox domain.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:57–59

setSandboxDomain

public void setSandboxDomain(String sandboxDomain)

设置 setSandboxDomain。

Sets the sandbox domain.

参数Parameters
名称Name类型Type说明Description
sandboxDomainString沙箱 Domain(类型 `String`)。The sandbox domain.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:61–63

getEnvdAccessToken

public String getEnvdAccessToken()

获取 getEnvdAccessToken。

Returns the envd access token.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:65–67

setEnvdAccessToken

public void setEnvdAccessToken(String envdAccessToken)

设置 setEnvdAccessToken。

Sets the envd access token.

参数Parameters
名称Name类型Type说明Description
envdAccessTokenStringenvd 访问令牌(类型 `String`)。The envd access token.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:69–71

getEnvdVersion

public String getEnvdVersion()

获取 getEnvdVersion。

Returns the envd version.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:73–75

setEnvdVersion

public void setEnvdVersion(String envdVersion)

设置 setEnvdVersion。

Sets the envd version.

参数Parameters
名称Name类型Type说明Description
envdVersionStringenvd 版本(类型 `String`)。The envd version.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:77–79

getWorkspaceRoot

public String getWorkspaceRoot()

获取工作区根。

Returns the workspace root.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:81–83

setWorkspaceRoot

public void setWorkspaceRoot(String workspaceRoot)

设置工作区根。

Sets the workspace root.

参数Parameters
名称Name类型Type说明Description
workspaceRootString工作区根(类型 `String`)。The workspace root.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:85–87

isSandboxOwned

public boolean isSandboxOwned()

判断是否 isSandboxOwned。

Returns whether the sandbox owned.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:89–91

setSandboxOwned

public void setSandboxOwned(boolean sandboxOwned)

设置 setSandboxOwned。

Sets the sandbox owned.

参数Parameters
名称Name类型Type说明Description
sandboxOwnedboolean沙箱 Owned(类型 `boolean`)。The sandbox owned.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:93–95

getPersistenceMode

public E2bPersistenceMode getPersistenceMode()

获取持久化模式。

Returns the persistence mode.

返回Returns E2bPersistenceMode
返回E2bPersistenceMode。Returns e 2 b persistence mode.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:97–99

setPersistenceMode

public void setPersistenceMode(E2bPersistenceMode persistenceMode)

设置持久化模式。

Sets the persistence mode.

参数Parameters
名称Name类型Type说明Description
persistenceModeE2bPersistenceMode持久化模式(类型 `E2bPersistenceMode`)。The persistence mode.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:101–103

getCodec

public E2bCodec getCodec()

获取编解码器。

Returns the codec.

返回Returns E2bCodec
返回E2bCodec。Returns e 2 b codec.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:105–107

setCodec

public void setCodec(E2bCodec codec)

设置编解码器。

Sets the codec.

参数Parameters
名称Name类型Type说明Description
codecE2bCodec编解码器(类型 `E2bCodec`)。The codec.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:109–111

getSnapshotIds

public List<String> getSnapshotIds()

获取 getSnapshotIds。

Returns the snapshot ids.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:113–115

setSnapshotIds

public void setSnapshotIds(List<String> snapshotIds)

设置 setSnapshotIds。

Sets the snapshot ids.

参数Parameters
名称Name类型Type说明Description
snapshotIdsList<String>快照 Ids(类型 `List`)。The snapshot ids.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:117–119

继承成员Inherited Members

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.