SandboxAware
public interface SandboxAware
源码Source
io/agentscope/harness/agent/sandbox/SandboxAware.java:27–32定义沙箱 Aware契约的接口。位于 io.agentscope.harness.agent.sandbox 包。核心成员包括 setSandbox、getSandbox。
Marks a filesystem that can have its backing Sandbox injected at runtime.
Implemented by SandboxBackedFilesystem so io.agentscope.harness.agent.middleware.SandboxLifecycleMiddleware can set the active sandbox for each
call and clear it afterward.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void setSandbox(Sandbox sandbox) | 设置沙箱。 Sets the sandbox. |
public Sandbox getSandbox() | 获取沙箱。 Returns the sandbox. |
方法详情Method Detail
setSandbox
public void setSandbox(Sandbox sandbox)
设置沙箱。
Sets the sandbox.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandbox | Sandbox | 沙箱(类型 `Sandbox`)。The sandbox. |
源码Source
io/agentscope/harness/agent/sandbox/SandboxAware.java:29getSandbox
public Sandbox getSandbox()
获取沙箱。
Returns the sandbox.
Sandbox返回沙箱。Returns sandbox.
源码Source
io/agentscope/harness/agent/sandbox/SandboxAware.java:31