GitRepoEntry
public class GitRepoEntry extends WorkspaceEntry
源码Source
io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:25–79Git 仓库条目,承载智能体的部署、调度与服务化运行。位于 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:31GitRepoEntry
public GitRepoEntry(String url, String ref)
初始化 GitRepoEntry 实例。
Creates a git repo entry with the given URL and ref.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
url | String | 服务地址(类型 `String`)。the repository clone URL |
ref | String | 引用(类型 `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.
String返回字符串结果。clone URL
源码Source
io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:49–51setUrl
public void setUrl(String url)
设置URL。
Sets the repository clone URL.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
url | String | 服务地址(类型 `String`)。clone URL |
源码Source
io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:58–60getRef
public String getRef()
获取引用。
Returns the Git ref (branch, tag, or commit SHA) to check out.
String返回字符串结果。git ref
源码Source
io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:67–69setRef
public void setRef(String ref)
设置引用。
Sets the Git ref.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ref | String | 引用(类型 `String`)。branch, tag, or commit SHA |
源码Source
io/agentscope/harness/agent/sandbox/layout/GitRepoEntry.java:76–78