AS AgentScopeAPI 手册 / API Reference

GitRepoEntry

public class GitRepoEntry extends WorkspaceEntry
源码Source io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:25–79

Git 仓库条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox.layout 包,继承自 WorkspaceEntry。核心成员包括 getUrl、setUrl、getRef、setRef、GitRepoEntry。

Layout entry that clones a Git repository into the sandbox workspace.

The repository is cloned from url at the given ref (branch, tag, or commit SHA). This class serves as the type skeleton for JSON serialization.

构造器摘要Constructor Summary

构造器Constructor说明Description
public GitRepoEntry()
初始化 `GitRepoEntry` 实例。
Creates an empty git repo entry.
public GitRepoEntry(String url, String ref)
初始化 `GitRepoEntry` 实例。
Creates a git repo entry with the given URL and ref.

方法摘要Method Summary

方法Method说明Description
public String getUrl()
获取URL。
Returns the repository clone URL.
public void setUrl(String url)
设置URL。
Sets the repository clone URL.
public String getRef()
获取引用。
Returns the Git ref (branch, tag, or commit SHA) to check out.
public void setRef(String ref)
设置引用。
Sets the Git ref.

构造器详情Constructor Detail

GitRepoEntry

public GitRepoEntry()

初始化 GitRepoEntry 实例。

Creates an empty git repo entry.

源码Source io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:31

GitRepoEntry

public GitRepoEntry(String url, String ref)

初始化 GitRepoEntry 实例。

Creates a git repo entry with the given URL and ref.

参数Parameters
名称Name类型Type说明Description
urlString服务地址(类型 `String`)。the repository clone URL
refString引用(类型 `String`)。the branch, tag, or commit SHA to check out
源码Source io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:39–42

方法详情Method Detail

getUrl

public String getUrl()

获取URL。

Returns the repository clone URL.

返回Returns String
返回字符串结果。clone URL
源码Source io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:49–51

setUrl

public void setUrl(String url)

设置URL。

Sets the repository clone URL.

参数Parameters
名称Name类型Type说明Description
urlString服务地址(类型 `String`)。clone URL
源码Source io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:58–60

getRef

public String getRef()

获取引用。

Returns the Git ref (branch, tag, or commit SHA) to check out.

返回Returns String
返回字符串结果。git ref
源码Source io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:67–69

setRef

public void setRef(String ref)

设置引用。

Sets the Git ref.

参数Parameters
名称Name类型Type说明Description
refString引用(类型 `String`)。branch, tag, or commit SHA
源码Source io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:76–78

继承成员Inherited Members

继承自Methods inherited from WorkspaceEntry
基于官方固定版本源码静态生成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.