AS AgentScopeAPI 手册 / API Reference

WorkspaceEntry

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(value = FileEntry.class, name = "file"), @JsonSubTypes.Type(value = DirEntry.class, name = "dir"), @JsonSubTypes.Type(value = LocalFileEntry.class, name = "local_file"), @JsonSubTypes.Type(value = LocalDirEntry.class, name = "local_dir"), @JsonSubTypes.Type(value = GitRepoEntry.class, name = "git_repo"), @JsonSubTypes.Type(value = WorkspaceProjectionEntry.class, name = "workspace_projection"), @JsonSubTypes.Type(value = BindMountEntry.class, name = "bind_mount"), }) public abstract class WorkspaceEntry
源码Source io/agentscope/harness/agent/sandbox/layout/WorkspaceEntry.java:32–66

条目 inio.agentscope.harness.agent.sandbox.WorkspaceSpec的基类。位于 io.agentscope.harness.agent.sandbox.layout 包。核心成员包括 isEphemeral、setEphemeral。

Base class for entries in a io.agentscope.harness.agent.sandbox.WorkspaceSpec.

Each entry describes a single file or directory that should be present in the sandbox workspace at startup. Entries can be materialized from inline content, local host files, or remote sources.

When ephemeral is true, this entry is always re-applied on every sandbox start, even when a snapshot exists. Non-ephemeral entries are persisted inside the snapshot and restored with the workspace.

方法摘要Method Summary

方法Method说明Description
public boolean isEphemeral()
判断是否 `isEphemeral`。
Returns whether this entry is ephemeral.
public void setEphemeral(boolean ephemeral)
设置 `setEphemeral`。
Sets whether this entry is ephemeral.

方法详情Method Detail

isEphemeral

public boolean isEphemeral()

判断是否 isEphemeral。

Returns whether this entry is ephemeral.

返回Returns boolean
返回布尔值,表示判断结果。true if this entry is ephemeral
源码Source io/agentscope/harness/agent/sandbox/layout/WorkspaceEntry.java:54–56

setEphemeral

public void setEphemeral(boolean ephemeral)

设置 setEphemeral。

Sets whether this entry is ephemeral.

参数Parameters
名称Name类型Type说明Description
ephemeralbooleanephemeral(类型 `boolean`)。true to mark as ephemeral
源码Source io/agentscope/harness/agent/sandbox/layout/WorkspaceEntry.java:63–65
基于官方固定版本源码静态生成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.