Class GitRepoEntry

java.lang.Object
io.agentscope.harness.agent.sandbox.layout.WorkspaceEntry
io.agentscope.harness.agent.sandbox.layout.GitRepoEntry

public class GitRepoEntry extends WorkspaceEntry
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 Details

    • GitRepoEntry

      public GitRepoEntry()
      Creates an empty git repo entry.
    • GitRepoEntry

      public GitRepoEntry(String url, String ref)
      Creates a git repo entry with the given URL and ref.
      Parameters:
      url - the repository clone URL
      ref - the branch, tag, or commit SHA to check out
  • Method Details

    • getUrl

      public String getUrl()
      Returns the repository clone URL.
      Returns:
      clone URL
    • setUrl

      public void setUrl(String url)
      Sets the repository clone URL.
      Parameters:
      url - clone URL
    • getRef

      public String getRef()
      Returns the Git ref (branch, tag, or commit SHA) to check out.
      Returns:
      git ref
    • setRef

      public void setRef(String ref)
      Sets the Git ref.
      Parameters:
      ref - branch, tag, or commit SHA