Record Class ArtifactDeliveryRequest

java.lang.Object
java.lang.Record
io.agentscope.harness.agent.artifact.ArtifactDeliveryRequest
Record Components:
filePath - path of the generated file in the agent workspace, normalized the same way as other file tools (relative to the workspace, or absolute where permitted by the active filesystem)
content - file bytes downloaded from the filesystem
fileName - target file name after delivery; defaults to the basename of filePath. Always a plain file name — the tool rejects values containing path separators, . or .., so targets can resolve it directly
description - short description of the artifact, may be null
force - whether an existing artifact with the same fileName should be overwritten (false by default — the target rejects the delivery and the agent should retry with a new fileName)

public record ArtifactDeliveryRequest(String filePath, byte[] content, String fileName, String description, boolean force) extends Record
A single artifact delivery request issued by the deliver_artifact tool.

The tool downloads the file bytes from the agent filesystem and hands them to a configured ArtifactDeliveryTarget, which is responsible for storing the artifact in its destination (e.g. a project's artifacts directory / artifact store, WebDAV, an object store).

  • Constructor Details

    • ArtifactDeliveryRequest

      public ArtifactDeliveryRequest(String filePath, byte[] content, String fileName, String description, boolean force)
      Creates an instance of a ArtifactDeliveryRequest record class.
      Parameters:
      filePath - the value for the filePath record component
      content - the value for the content record component
      fileName - the value for the fileName record component
      description - the value for the description record component
      force - the value for the force record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • filePath

      public String filePath()
      Returns the value of the filePath record component.
      Returns:
      the value of the filePath record component
    • content

      public byte[] content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component
    • fileName

      public String fileName()
      Returns the value of the fileName record component.
      Returns:
      the value of the fileName record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • force

      public boolean force()
      Returns the value of the force record component.
      Returns:
      the value of the force record component