E2bSnapshotRefs
public final class E2bSnapshotRefs
源码Source
io/agentscope/extensions/sandbox/e2b/E2bSnapshotRefs.java:26–69E 2 b 快照 Refs,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.e2b 包。核心成员包括 encodeSnapshotId、decodeSnapshotIdIfPresent、MAGIC_PREFIX。
Cross-language marker for E2B native snapshot references, aligned with openai-agents-python
E2B_SANDBOX_SNAPSHOT_V1.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
MAGIC_PREFIXstaticfinal | byte[] | MAGIC PREFIX字段。 The MAGIC PREFIX field. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static byte[] encodeSnapshotId(String snapshotId) throws Exceptionstatic | 执行快照标识。 Performs the encode snapshot id operation. |
public static String decodeSnapshotIdIfPresent(byte[] raw)static | 执行 `decodeSnapshotIdIfPresent`。 Performs the decode snapshot id if present operation. |
字段详情Field Detail
MAGIC_PREFIX
public static final byte[] MAGIC_PREFIX
staticfinal
MAGIC PREFIX字段。声明为 public static final byte[] MAGIC_PREFIX。
The MAGIC PREFIX field.
源码Source
io/agentscope/extensions/sandbox/e2b/E2bSnapshotRefs.java:28–29方法详情Method Detail
encodeSnapshotId
public static byte[] encodeSnapshotId(String snapshotId) throws Exception
static
执行快照标识。
Performs the encode snapshot id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
snapshotId | String | 快照标识(类型 `String`)。The snapshot id. |
byte[]返回byte[]。Returns byte.
Exception可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/extensions/sandbox/e2b/E2bSnapshotRefs.java:33–41decodeSnapshotIdIfPresent
public static String decodeSnapshotIdIfPresent(byte[] raw)
static
执行 decodeSnapshotIdIfPresent。
Performs the decode snapshot id if present operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
raw | byte[] | 原始(类型 `byte[]`)。The raw. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/sandbox/e2b/E2bSnapshotRefs.java:43–68