E2bSandboxState
public class E2bSandboxState extends SandboxState
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:23–120E 2 b 沙箱状态,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.e2b 包,继承自 SandboxState。核心成员包括 getSandboxId、setSandboxId、getTemplateId、setTemplateId、getSandboxDomain、setSandboxDomain。
Serializable state for an E2B-backed sandbox.
方法摘要Method Summary
方法详情Method Detail
getSandboxId
public String getSandboxId()
获取沙箱标识。
Returns the sandbox id.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:41–43setSandboxId
public void setSandboxId(String sandboxId)
设置沙箱标识。
Sets the sandbox id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxId | String | 沙箱标识(类型 `String`)。The sandbox id. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:45–47getTemplateId
public String getTemplateId()
获取模板标识。
Returns the template id.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:49–51setTemplateId
public void setTemplateId(String templateId)
设置模板标识。
Sets the template id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
templateId | String | 模板标识(类型 `String`)。The template id. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:53–55getSandboxDomain
public String getSandboxDomain()
获取 getSandboxDomain。
Returns the sandbox domain.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:57–59setSandboxDomain
public void setSandboxDomain(String sandboxDomain)
设置 setSandboxDomain。
Sets the sandbox domain.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxDomain | String | 沙箱 Domain(类型 `String`)。The sandbox domain. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:61–63getEnvdAccessToken
public String getEnvdAccessToken()
获取 getEnvdAccessToken。
Returns the envd access token.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:65–67setEnvdAccessToken
public void setEnvdAccessToken(String envdAccessToken)
设置 setEnvdAccessToken。
Sets the envd access token.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
envdAccessToken | String | envd 访问令牌(类型 `String`)。The envd access token. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:69–71getEnvdVersion
public String getEnvdVersion()
获取 getEnvdVersion。
Returns the envd version.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:73–75setEnvdVersion
public void setEnvdVersion(String envdVersion)
设置 setEnvdVersion。
Sets the envd version.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
envdVersion | String | envd 版本(类型 `String`)。The envd version. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:77–79getWorkspaceRoot
public String getWorkspaceRoot()
获取工作区根。
Returns the workspace root.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:81–83setWorkspaceRoot
public void setWorkspaceRoot(String workspaceRoot)
设置工作区根。
Sets the workspace root.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspaceRoot | String | 工作区根(类型 `String`)。The workspace root. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:85–87isSandboxOwned
public boolean isSandboxOwned()
判断是否 isSandboxOwned。
Returns whether the sandbox owned.
booleanio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:89–91setSandboxOwned
public void setSandboxOwned(boolean sandboxOwned)
设置 setSandboxOwned。
Sets the sandbox owned.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxOwned | boolean | 沙箱 Owned(类型 `boolean`)。The sandbox owned. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:93–95getPersistenceMode
public E2bPersistenceMode getPersistenceMode()
获取持久化模式。
Returns the persistence mode.
E2bPersistenceModeio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:97–99setPersistenceMode
public void setPersistenceMode(E2bPersistenceMode persistenceMode)
设置持久化模式。
Sets the persistence mode.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
persistenceMode | E2bPersistenceMode | 持久化模式(类型 `E2bPersistenceMode`)。The persistence mode. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:101–103getCodec
public E2bCodec getCodec()
获取编解码器。
Returns the codec.
E2bCodecio/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:105–107setCodec
public void setCodec(E2bCodec codec)
设置编解码器。
Sets the codec.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
codec | E2bCodec | 编解码器(类型 `E2bCodec`)。The codec. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:109–111getSnapshotIds
public List<String> getSnapshotIds()
获取 getSnapshotIds。
Returns the snapshot ids.
List<String>io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:113–115setSnapshotIds
public void setSnapshotIds(List<String> snapshotIds)
设置 setSnapshotIds。
Sets the snapshot ids.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
snapshotIds | List<String> | 快照 Ids(类型 `List`)。The snapshot ids. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxState.java:117–119